@drewsepsi/nextpi 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 (303) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +13 -0
  3. package/.next/build/chunks/33f32_323ea524._.js +6766 -0
  4. package/.next/build/chunks/33f32_323ea524._.js.map +47 -0
  5. package/.next/build/chunks/[root-of-the-server]__6ead02f9._.js +500 -0
  6. package/.next/build/chunks/[root-of-the-server]__6ead02f9._.js.map +11 -0
  7. package/.next/build/chunks/[root-of-the-server]__777e9116._.js +206 -0
  8. package/.next/build/chunks/[root-of-the-server]__777e9116._.js.map +8 -0
  9. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_597188b4._.js +13 -0
  10. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_597188b4._.js.map +5 -0
  11. package/.next/build/chunks/[turbopack]_runtime.js +795 -0
  12. package/.next/build/chunks/[turbopack]_runtime.js.map +10 -0
  13. package/.next/build/package.json +1 -0
  14. package/.next/build/postcss.js +6 -0
  15. package/.next/build/postcss.js.map +5 -0
  16. package/.next/build-manifest.json +19 -0
  17. package/.next/cache/.previewinfo +1 -0
  18. package/.next/cache/.rscinfo +1 -0
  19. package/.next/cache/.tsbuildinfo +1 -0
  20. package/.next/diagnostics/build-diagnostics.json +6 -0
  21. package/.next/diagnostics/framework.json +1 -0
  22. package/.next/export-marker.json +6 -0
  23. package/.next/fallback-build-manifest.json +12 -0
  24. package/.next/images-manifest.json +67 -0
  25. package/.next/next-minimal-server.js.nft.json +1 -0
  26. package/.next/next-server.js.nft.json +1 -0
  27. package/.next/package.json +1 -0
  28. package/.next/prerender-manifest.json +114 -0
  29. package/.next/required-server-files.js +324 -0
  30. package/.next/required-server-files.json +324 -0
  31. package/.next/routes-manifest.json +113 -0
  32. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  33. package/.next/server/app/_global-error/page/build-manifest.json +16 -0
  34. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  35. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  36. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  37. package/.next/server/app/_global-error/page.js +11 -0
  38. package/.next/server/app/_global-error/page.js.map +5 -0
  39. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  40. package/.next/server/app/_global-error/page_client-reference-manifest.js +2 -0
  41. package/.next/server/app/_global-error.html +2 -0
  42. package/.next/server/app/_global-error.meta +15 -0
  43. package/.next/server/app/_global-error.rsc +13 -0
  44. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
  45. package/.next/server/app/_global-error.segments/_full.segment.rsc +13 -0
  46. package/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
  47. package/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
  48. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  49. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  50. package/.next/server/app/_not-found/page/build-manifest.json +16 -0
  51. package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
  52. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  53. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  54. package/.next/server/app/_not-found/page.js +14 -0
  55. package/.next/server/app/_not-found/page.js.map +5 -0
  56. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  57. package/.next/server/app/_not-found/page_client-reference-manifest.js +2 -0
  58. package/.next/server/app/_not-found.html +1 -0
  59. package/.next/server/app/_not-found.meta +16 -0
  60. package/.next/server/app/_not-found.rsc +15 -0
  61. package/.next/server/app/_not-found.segments/_full.segment.rsc +15 -0
  62. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  63. package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -0
  64. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  65. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
  66. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
  67. package/.next/server/app/api/chat/route/app-paths-manifest.json +3 -0
  68. package/.next/server/app/api/chat/route/build-manifest.json +11 -0
  69. package/.next/server/app/api/chat/route/server-reference-manifest.json +4 -0
  70. package/.next/server/app/api/chat/route.js +7 -0
  71. package/.next/server/app/api/chat/route.js.map +5 -0
  72. package/.next/server/app/api/chat/route.js.nft.json +1 -0
  73. package/.next/server/app/api/chat/route_client-reference-manifest.js +2 -0
  74. package/.next/server/app/api/config/route/app-paths-manifest.json +3 -0
  75. package/.next/server/app/api/config/route/build-manifest.json +11 -0
  76. package/.next/server/app/api/config/route/server-reference-manifest.json +4 -0
  77. package/.next/server/app/api/config/route.js +7 -0
  78. package/.next/server/app/api/config/route.js.map +5 -0
  79. package/.next/server/app/api/config/route.js.nft.json +1 -0
  80. package/.next/server/app/api/config/route_client-reference-manifest.js +2 -0
  81. package/.next/server/app/api/files/[...path]/route/app-paths-manifest.json +3 -0
  82. package/.next/server/app/api/files/[...path]/route/build-manifest.json +11 -0
  83. package/.next/server/app/api/files/[...path]/route/server-reference-manifest.json +4 -0
  84. package/.next/server/app/api/files/[...path]/route.js +7 -0
  85. package/.next/server/app/api/files/[...path]/route.js.map +5 -0
  86. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
  87. package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +2 -0
  88. package/.next/server/app/api/files/route/app-paths-manifest.json +3 -0
  89. package/.next/server/app/api/files/route/build-manifest.json +11 -0
  90. package/.next/server/app/api/files/route/server-reference-manifest.json +4 -0
  91. package/.next/server/app/api/files/route.js +7 -0
  92. package/.next/server/app/api/files/route.js.map +5 -0
  93. package/.next/server/app/api/files/route.js.nft.json +1 -0
  94. package/.next/server/app/api/files/route_client-reference-manifest.js +2 -0
  95. package/.next/server/app/api/messages/route/app-paths-manifest.json +3 -0
  96. package/.next/server/app/api/messages/route/build-manifest.json +11 -0
  97. package/.next/server/app/api/messages/route/server-reference-manifest.json +4 -0
  98. package/.next/server/app/api/messages/route.js +7 -0
  99. package/.next/server/app/api/messages/route.js.map +5 -0
  100. package/.next/server/app/api/messages/route.js.nft.json +1 -0
  101. package/.next/server/app/api/messages/route_client-reference-manifest.js +2 -0
  102. package/.next/server/app/api/session/route/app-paths-manifest.json +3 -0
  103. package/.next/server/app/api/session/route/build-manifest.json +11 -0
  104. package/.next/server/app/api/session/route/server-reference-manifest.json +4 -0
  105. package/.next/server/app/api/session/route.js +7 -0
  106. package/.next/server/app/api/session/route.js.map +5 -0
  107. package/.next/server/app/api/session/route.js.nft.json +1 -0
  108. package/.next/server/app/api/session/route_client-reference-manifest.js +2 -0
  109. package/.next/server/app/api/stream/route/app-paths-manifest.json +3 -0
  110. package/.next/server/app/api/stream/route/build-manifest.json +11 -0
  111. package/.next/server/app/api/stream/route/server-reference-manifest.json +4 -0
  112. package/.next/server/app/api/stream/route.js +6 -0
  113. package/.next/server/app/api/stream/route.js.map +5 -0
  114. package/.next/server/app/api/stream/route.js.nft.json +1 -0
  115. package/.next/server/app/api/stream/route_client-reference-manifest.js +2 -0
  116. package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
  117. package/.next/server/app/favicon.ico/route/build-manifest.json +11 -0
  118. package/.next/server/app/favicon.ico/route.js +8 -0
  119. package/.next/server/app/favicon.ico/route.js.map +5 -0
  120. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  121. package/.next/server/app/favicon.ico.body +0 -0
  122. package/.next/server/app/favicon.ico.meta +1 -0
  123. package/.next/server/app/index.html +1 -0
  124. package/.next/server/app/index.meta +14 -0
  125. package/.next/server/app/index.rsc +21 -0
  126. package/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
  127. package/.next/server/app/index.segments/_full.segment.rsc +21 -0
  128. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  129. package/.next/server/app/index.segments/_index.segment.rsc +6 -0
  130. package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
  131. package/.next/server/app/page/app-paths-manifest.json +3 -0
  132. package/.next/server/app/page/build-manifest.json +16 -0
  133. package/.next/server/app/page/next-font-manifest.json +11 -0
  134. package/.next/server/app/page/react-loadable-manifest.json +1 -0
  135. package/.next/server/app/page/server-reference-manifest.json +4 -0
  136. package/.next/server/app/page.js +16 -0
  137. package/.next/server/app/page.js.map +5 -0
  138. package/.next/server/app/page.js.nft.json +1 -0
  139. package/.next/server/app/page_client-reference-manifest.js +2 -0
  140. package/.next/server/app-paths-manifest.json +13 -0
  141. package/.next/server/chunks/33f32_next_b78429d5._.js +17 -0
  142. package/.next/server/chunks/33f32_next_b78429d5._.js.map +1 -0
  143. package/.next/server/chunks/33f32_next_dist_esm_build_templates_app-route_5a539e27.js +3 -0
  144. package/.next/server/chunks/33f32_next_dist_esm_build_templates_app-route_5a539e27.js.map +1 -0
  145. package/.next/server/chunks/[externals]_next_dist_b89b5a39._.js +3 -0
  146. package/.next/server/chunks/[externals]_next_dist_b89b5a39._.js.map +1 -0
  147. package/.next/server/chunks/[root-of-the-server]__2554f0b0._.js +17 -0
  148. package/.next/server/chunks/[root-of-the-server]__2554f0b0._.js.map +1 -0
  149. package/.next/server/chunks/[root-of-the-server]__5e671cad._.js +7 -0
  150. package/.next/server/chunks/[root-of-the-server]__5e671cad._.js.map +1 -0
  151. package/.next/server/chunks/[root-of-the-server]__629f5815._.js +3 -0
  152. package/.next/server/chunks/[root-of-the-server]__629f5815._.js.map +1 -0
  153. package/.next/server/chunks/[root-of-the-server]__633f9ccd._.js +3 -0
  154. package/.next/server/chunks/[root-of-the-server]__633f9ccd._.js.map +1 -0
  155. package/.next/server/chunks/[root-of-the-server]__65cdeb73._.js +17 -0
  156. package/.next/server/chunks/[root-of-the-server]__65cdeb73._.js.map +1 -0
  157. package/.next/server/chunks/[root-of-the-server]__bc57ef5b._.js +21 -0
  158. package/.next/server/chunks/[root-of-the-server]__bc57ef5b._.js.map +1 -0
  159. package/.next/server/chunks/[root-of-the-server]__be62c218._.js +17 -0
  160. package/.next/server/chunks/[root-of-the-server]__be62c218._.js.map +1 -0
  161. package/.next/server/chunks/[root-of-the-server]__e87dbf93._.js +3 -0
  162. package/.next/server/chunks/[root-of-the-server]__e87dbf93._.js.map +1 -0
  163. package/.next/server/chunks/[turbopack]_runtime.js +795 -0
  164. package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
  165. package/.next/server/chunks/c45a0_nextpi__next-internal_server_app_api_files_[___path]_route_actions_16a66e62.js +3 -0
  166. package/.next/server/chunks/c45a0_nextpi__next-internal_server_app_api_files_[___path]_route_actions_16a66e62.js.map +1 -0
  167. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_chat_route_actions_e342cdbf.js +3 -0
  168. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_chat_route_actions_e342cdbf.js.map +1 -0
  169. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_config_route_actions_04d1272c.js +3 -0
  170. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_config_route_actions_04d1272c.js.map +1 -0
  171. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_files_route_actions_a8035013.js +3 -0
  172. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_files_route_actions_a8035013.js.map +1 -0
  173. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_messages_route_actions_4f52ac4b.js +3 -0
  174. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_messages_route_actions_4f52ac4b.js.map +1 -0
  175. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_session_route_actions_ff684c69.js +3 -0
  176. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_session_route_actions_ff684c69.js.map +1 -0
  177. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_stream_route_actions_7a0f6dba.js +3 -0
  178. package/.next/server/chunks/picode_nextpi__next-internal_server_app_api_stream_route_actions_7a0f6dba.js.map +1 -0
  179. package/.next/server/chunks/picode_nextpi__next-internal_server_app_favicon_ico_route_actions_2526216f.js +3 -0
  180. package/.next/server/chunks/picode_nextpi__next-internal_server_app_favicon_ico_route_actions_2526216f.js.map +1 -0
  181. package/.next/server/chunks/ssr/33f32_next_dist_580d3573._.js +6 -0
  182. package/.next/server/chunks/ssr/33f32_next_dist_580d3573._.js.map +1 -0
  183. package/.next/server/chunks/ssr/33f32_next_dist_85b0ccc0._.js +4 -0
  184. package/.next/server/chunks/ssr/33f32_next_dist_85b0ccc0._.js.map +1 -0
  185. package/.next/server/chunks/ssr/33f32_next_dist_client_components_a8ffe8d4._.js +3 -0
  186. package/.next/server/chunks/ssr/33f32_next_dist_client_components_a8ffe8d4._.js.map +1 -0
  187. package/.next/server/chunks/ssr/33f32_next_dist_client_components_builtin_forbidden_ad97660b.js +3 -0
  188. package/.next/server/chunks/ssr/33f32_next_dist_client_components_builtin_forbidden_ad97660b.js.map +1 -0
  189. package/.next/server/chunks/ssr/33f32_next_dist_client_components_builtin_global-error_ab28468b.js +3 -0
  190. package/.next/server/chunks/ssr/33f32_next_dist_client_components_builtin_global-error_ab28468b.js.map +1 -0
  191. package/.next/server/chunks/ssr/33f32_next_dist_client_components_builtin_unauthorized_edd1fe08.js +3 -0
  192. package/.next/server/chunks/ssr/33f32_next_dist_client_components_builtin_unauthorized_edd1fe08.js.map +1 -0
  193. package/.next/server/chunks/ssr/33f32_next_dist_esm_build_templates_app-page_5ef96b51.js +4 -0
  194. package/.next/server/chunks/ssr/33f32_next_dist_esm_build_templates_app-page_5ef96b51.js.map +1 -0
  195. package/.next/server/chunks/ssr/33f32_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_33aeae20.js +3 -0
  196. package/.next/server/chunks/ssr/33f32_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_33aeae20.js.map +1 -0
  197. package/.next/server/chunks/ssr/[root-of-the-server]__028106ef._.js +3 -0
  198. package/.next/server/chunks/ssr/[root-of-the-server]__028106ef._.js.map +1 -0
  199. package/.next/server/chunks/ssr/[root-of-the-server]__0dc9a9e1._.js +4 -0
  200. package/.next/server/chunks/ssr/[root-of-the-server]__0dc9a9e1._.js.map +1 -0
  201. package/.next/server/chunks/ssr/[root-of-the-server]__15f57d5d._.js +3 -0
  202. package/.next/server/chunks/ssr/[root-of-the-server]__15f57d5d._.js.map +1 -0
  203. package/.next/server/chunks/ssr/[root-of-the-server]__26f2451b._.js +3 -0
  204. package/.next/server/chunks/ssr/[root-of-the-server]__26f2451b._.js.map +1 -0
  205. package/.next/server/chunks/ssr/[root-of-the-server]__42ddc417._.js +3 -0
  206. package/.next/server/chunks/ssr/[root-of-the-server]__42ddc417._.js.map +1 -0
  207. package/.next/server/chunks/ssr/[root-of-the-server]__6823e2d4._.js +3 -0
  208. package/.next/server/chunks/ssr/[root-of-the-server]__6823e2d4._.js.map +1 -0
  209. package/.next/server/chunks/ssr/[root-of-the-server]__6bf5dd5d._.js +3 -0
  210. package/.next/server/chunks/ssr/[root-of-the-server]__6bf5dd5d._.js.map +1 -0
  211. package/.next/server/chunks/ssr/[root-of-the-server]__7b7d477c._.js +10 -0
  212. package/.next/server/chunks/ssr/[root-of-the-server]__7b7d477c._.js.map +1 -0
  213. package/.next/server/chunks/ssr/[root-of-the-server]__85c46341._.js +3 -0
  214. package/.next/server/chunks/ssr/[root-of-the-server]__85c46341._.js.map +1 -0
  215. package/.next/server/chunks/ssr/[root-of-the-server]__99c61367._.js +3 -0
  216. package/.next/server/chunks/ssr/[root-of-the-server]__99c61367._.js.map +1 -0
  217. package/.next/server/chunks/ssr/[root-of-the-server]__a0bdeac8._.js +3 -0
  218. package/.next/server/chunks/ssr/[root-of-the-server]__a0bdeac8._.js.map +1 -0
  219. package/.next/server/chunks/ssr/[turbopack]_runtime.js +795 -0
  220. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
  221. package/.next/server/chunks/ssr/_091ac666._.js +3 -0
  222. package/.next/server/chunks/ssr/_091ac666._.js.map +1 -0
  223. package/.next/server/chunks/ssr/picode_nextpi_1e69e558._.js +4 -0
  224. package/.next/server/chunks/ssr/picode_nextpi_1e69e558._.js.map +1 -0
  225. package/.next/server/chunks/ssr/picode_nextpi_4fadcd01._.js +3 -0
  226. package/.next/server/chunks/ssr/picode_nextpi_4fadcd01._.js.map +1 -0
  227. package/.next/server/chunks/ssr/picode_nextpi__next-internal_server_app__global-error_page_actions_91eb1cf1.js +3 -0
  228. package/.next/server/chunks/ssr/picode_nextpi__next-internal_server_app__global-error_page_actions_91eb1cf1.js.map +1 -0
  229. package/.next/server/chunks/ssr/picode_nextpi__next-internal_server_app__not-found_page_actions_0a31df41.js +3 -0
  230. package/.next/server/chunks/ssr/picode_nextpi__next-internal_server_app__not-found_page_actions_0a31df41.js.map +1 -0
  231. package/.next/server/chunks/ssr/picode_nextpi__next-internal_server_app_page_actions_b14d985f.js +3 -0
  232. package/.next/server/chunks/ssr/picode_nextpi__next-internal_server_app_page_actions_b14d985f.js.map +1 -0
  233. package/.next/server/chunks/ssr/picode_nextpi_app_77d1bd95._.js +3 -0
  234. package/.next/server/chunks/ssr/picode_nextpi_app_77d1bd95._.js.map +1 -0
  235. package/.next/server/chunks/ssr/picode_nextpi_app_page_tsx_cebd7814._.js +3 -0
  236. package/.next/server/chunks/ssr/picode_nextpi_app_page_tsx_cebd7814._.js.map +1 -0
  237. package/.next/server/functions-config-manifest.json +4 -0
  238. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  239. package/.next/server/middleware-build-manifest.js +20 -0
  240. package/.next/server/middleware-manifest.json +6 -0
  241. package/.next/server/next-font-manifest.js +1 -0
  242. package/.next/server/next-font-manifest.json +15 -0
  243. package/.next/server/pages/404.html +1 -0
  244. package/.next/server/pages/500.html +2 -0
  245. package/.next/server/pages-manifest.json +4 -0
  246. package/.next/server/server-reference-manifest.js +1 -0
  247. package/.next/server/server-reference-manifest.json +5 -0
  248. package/.next/static/PdRtiPZ_ExBLCzmKGXOBT/_buildManifest.js +11 -0
  249. package/.next/static/PdRtiPZ_ExBLCzmKGXOBT/_clientMiddlewareManifest.json +1 -0
  250. package/.next/static/PdRtiPZ_ExBLCzmKGXOBT/_ssgManifest.js +1 -0
  251. package/.next/static/chunks/0ab43a45e07af0f9.js +1 -0
  252. package/.next/static/chunks/265e06106152dcbb.js +1 -0
  253. package/.next/static/chunks/65d5124f3edd1b84.js +1 -0
  254. package/.next/static/chunks/76111d9b2044b643.js +1 -0
  255. package/.next/static/chunks/81dfdd74986c8afe.css +3 -0
  256. package/.next/static/chunks/93b85e5de0842835.js +5 -0
  257. package/.next/static/chunks/a6dad97d9634a72d.js +1 -0
  258. package/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
  259. package/.next/static/chunks/cace1b477872431f.js +1 -0
  260. package/.next/static/chunks/turbopack-775e95d747b6e667.js +4 -0
  261. package/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
  262. package/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
  263. package/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
  264. package/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
  265. package/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
  266. package/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
  267. package/.next/static/media/favicon.0b3bf435.ico +0 -0
  268. package/.next/trace +1 -0
  269. package/.next/trace-build +1 -0
  270. package/.next/turbopack +0 -0
  271. package/.next/types/routes.d.ts +79 -0
  272. package/.next/types/validator.ts +133 -0
  273. package/README.md +50 -0
  274. package/app/api/chat/route.ts +28 -0
  275. package/app/api/config/route.ts +25 -0
  276. package/app/api/files/[...path]/route.ts +55 -0
  277. package/app/api/files/route.ts +62 -0
  278. package/app/api/messages/route.ts +26 -0
  279. package/app/api/session/route.ts +55 -0
  280. package/app/api/stream/route.ts +76 -0
  281. package/app/favicon.ico +0 -0
  282. package/app/globals.css +1143 -0
  283. package/app/layout.tsx +46 -0
  284. package/app/page.tsx +1643 -0
  285. package/bin/cli.js +85 -0
  286. package/components/.gitkeep +0 -0
  287. package/components/theme-provider.tsx +71 -0
  288. package/components/ui/button.tsx +67 -0
  289. package/components/ui/file-tree.tsx +560 -0
  290. package/lib/.gitkeep +0 -0
  291. package/lib/agent.ts +105 -0
  292. package/lib/config.ts +50 -0
  293. package/lib/root-path.ts +15 -0
  294. package/lib/session-singleton.ts +48 -0
  295. package/lib/utils.ts +6 -0
  296. package/package.json +72 -0
  297. package/public/.gitkeep +0 -0
  298. package/src/agent.ts +82 -0
  299. package/src/cli.ts +107 -0
  300. package/src/tools.ts +71 -0
  301. package/src/tui.ts +238 -0
  302. package/src/web-server.ts +280 -0
  303. package/tsconfig.json +34 -0
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # 🚀 NextPi: The Agentic IDE
2
+
3
+ **NextPi** is your project's personal secret agent. It's a tiny, powerful workspace that lives in your project folder and helps you research, code, and debug using top-tier AI.
4
+
5
+ Turn any folder into an intelligent workspace with just one command.
6
+
7
+ ---
8
+
9
+ ## ⚡️ Quick Start
10
+
11
+ You don't even need to install it! Just run this in any folder on your computer:
12
+
13
+ ```bash
14
+ npx @drewsepsi/nextpi
15
+ ```
16
+
17
+ *Requires [Node.js](https://nodejs.org/) installed.*
18
+
19
+ ### 🔑 Setup
20
+ You will need an [OpenRouter](https://openrouter.ai/) API key to use the AI features. Set it in your terminal:
21
+ ```bash
22
+ export OPENROUTER_API_KEY=your_key_here
23
+ ```
24
+
25
+ ---
26
+
27
+ ## ✨ Features
28
+
29
+ - **📂 Folder-Aware**: NextPi instantly understands the files in your current folder.
30
+ - **🌐 Web Research**: It can search the internet, read documentation, and find answers for you.
31
+ - **Code Editing**: Ask it to fix bugs or add features, and watch it work directly on your files.
32
+ - **🧠 Multi-Model Support**: Use any model from OpenRouter (Claude, GPT-4, Gemini, etc.).
33
+ - **🚀 One-Tap Preview**: Run your app and see the changes live inside the NextPi interface.
34
+
35
+ ---
36
+
37
+ ## 🛠 How it Works
38
+
39
+ NextPi starts a small web server on your machine that only you can access. It uses **Agentic AI**—which means it doesn't just talk; it **takes action**. It can read your code, search the web for solutions, and help you build faster than ever.
40
+
41
+ ---
42
+
43
+ ## 🔒 Privacy & Safety
44
+
45
+ NextPi runs entirely on **your** computer. While it uses cloud AI models to "think," it only accesses the files in the folder where you started it. You are always in control.
46
+
47
+ ---
48
+
49
+ Built with ❤️ by [drewsepsi](https://github.com/drewsepsi)
50
+ # nextpi
@@ -0,0 +1,28 @@
1
+ import { NextRequest, NextResponse } from 'next/server';
2
+ import { getSharedSession } from '@/lib/session-singleton';
3
+ export async function POST(request: NextRequest) {
4
+ try {
5
+ const { message } = await request.json();
6
+ if (!message) {
7
+ return NextResponse.json({ error: 'Message is required' }, { status: 400 });
8
+ }
9
+
10
+ const agentSession = await getSharedSession();
11
+ console.log(`[Chat] Received message. Session ID: ${agentSession.sessionId}`);
12
+
13
+ // We launch the prompt in the background and return immediately.
14
+ // The events will be streamed via the /api/stream connection which
15
+ // is subscribed to the same agentSession instance.
16
+ // NOTE: In Next.js, background tasks should ideally use waitUntil()
17
+ // to ensure the process doesn't exit if it were on a serverless platform.
18
+ agentSession.prompt(message).catch(err => {
19
+ console.error(`[Chat] Background prompt error for ${agentSession.sessionId}:`, err);
20
+ });
21
+
22
+ console.log(`[Chat] Prompt triggered for session ${agentSession.sessionId}`);
23
+ return NextResponse.json({ success: true, sessionId: agentSession.sessionId });
24
+ } catch (error: unknown) {
25
+ console.error(`[Chat] Error in route handler:`, error);
26
+ return NextResponse.json({ error: (error as Error).message }, { status: 500 });
27
+ }
28
+ }
@@ -0,0 +1,25 @@
1
+ import { NextRequest, NextResponse } from 'next/server';
2
+ import { getConfig, saveConfig, getEffectiveApiKey } from '@/lib/config';
3
+
4
+ export async function GET() {
5
+ const apiKey = getEffectiveApiKey();
6
+ return NextResponse.json({
7
+ hasKey: !!apiKey,
8
+ // We don't return the full key for safety, just first 4 and last 4
9
+ maskedKey: apiKey ? `${apiKey.slice(0, 4)}...${apiKey.slice(-4)}` : null
10
+ });
11
+ }
12
+
13
+ export async function POST(request: NextRequest) {
14
+ try {
15
+ const { apiKey } = await request.json();
16
+ if (!apiKey) {
17
+ return NextResponse.json({ error: 'API Key is required' }, { status: 400 });
18
+ }
19
+
20
+ saveConfig({ openRouterApiKey: apiKey });
21
+ return NextResponse.json({ success: true });
22
+ } catch (error) {
23
+ return NextResponse.json({ error: 'Failed to save config' }, { status: 500 });
24
+ }
25
+ }
@@ -0,0 +1,55 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { promises as fs } from 'fs';
3
+ import path from 'path';
4
+ import { getProjectRoot } from '@/lib/root-path';
5
+ export async function GET(
6
+ request: Request,
7
+ { params }: { params: Promise<{ path: string[] }> }
8
+ ) {
9
+ try {
10
+ const { path: pathSegments } = await params;
11
+ const projectRoot = getProjectRoot();
12
+ const filePath = path.join(projectRoot, ...pathSegments);
13
+
14
+ const content = await fs.readFile(filePath, 'utf-8');
15
+ return NextResponse.json({ content });
16
+ } catch (error: any) {
17
+ return NextResponse.json({ error: error.message }, { status: 500 });
18
+ }
19
+ }
20
+
21
+ export async function PUT(
22
+ request: Request,
23
+ { params }: { params: Promise<{ path: string[] }> }
24
+ ) {
25
+ try {
26
+ const { path: pathSegments } = await params;
27
+ const { content } = await request.json();
28
+ const projectRoot = getProjectRoot();
29
+ const filePath = path.join(projectRoot, ...pathSegments);
30
+
31
+ // Ensure parent directory exists
32
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
33
+
34
+ await fs.writeFile(filePath, content, 'utf-8');
35
+ return NextResponse.json({ success: true });
36
+ } catch (error: any) {
37
+ return NextResponse.json({ error: error.message }, { status: 500 });
38
+ }
39
+ }
40
+
41
+ export async function DELETE(
42
+ request: Request,
43
+ { params }: { params: Promise<{ path: string[] }> }
44
+ ) {
45
+ try {
46
+ const { path: pathSegments } = await params;
47
+ const projectRoot = getProjectRoot();
48
+ const filePath = path.join(projectRoot, ...pathSegments);
49
+
50
+ await fs.unlink(filePath);
51
+ return NextResponse.json({ success: true });
52
+ } catch (error: any) {
53
+ return NextResponse.json({ error: error.message }, { status: 500 });
54
+ }
55
+ }
@@ -0,0 +1,62 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { promises as fs } from 'fs';
3
+ import path from 'path';
4
+ import { getProjectRoot } from '@/lib/root-path';
5
+
6
+ interface TreeViewElement {
7
+ id: string;
8
+ name: string;
9
+ type: 'file' | 'folder';
10
+ isSelectable?: boolean;
11
+ children?: TreeViewElement[];
12
+ }
13
+
14
+ async function scanDirectory(dirPath: string, basePath: string): Promise<TreeViewElement[]> {
15
+ const entries = await fs.readdir(dirPath, { withFileTypes: true });
16
+ const elements: TreeViewElement[] = [];
17
+
18
+ for (const entry of entries) {
19
+ const fullPath = path.join(dirPath, entry.name);
20
+ const relativePath = path.relative(basePath, fullPath);
21
+ const id = relativePath;
22
+
23
+ if (entry.isDirectory()) {
24
+ if (entry.name === 'node_modules' || entry.name === '.next' || entry.name === '.git') {
25
+ continue;
26
+ }
27
+ const children = await scanDirectory(fullPath, basePath);
28
+ elements.push({
29
+ id,
30
+ name: entry.name,
31
+ type: 'folder',
32
+ isSelectable: true,
33
+ children,
34
+ });
35
+ } else {
36
+ elements.push({
37
+ id,
38
+ name: entry.name,
39
+ type: 'file',
40
+ isSelectable: true,
41
+ });
42
+ }
43
+ }
44
+
45
+ return elements.sort((a, b) => {
46
+ if (a.type === b.type) {
47
+ return a.name.localeCompare(b.name);
48
+ }
49
+ return a.type === 'folder' ? -1 : 1;
50
+ });
51
+ }
52
+
53
+ export async function GET() {
54
+ try {
55
+ const projectRoot = getProjectRoot();
56
+ const elements = await scanDirectory(projectRoot, projectRoot);
57
+
58
+ return NextResponse.json({ elements });
59
+ } catch (error: any) {
60
+ return NextResponse.json({ error: error.message }, { status: 500 });
61
+ }
62
+ }
@@ -0,0 +1,26 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { getSharedSession } from '@/lib/session-singleton';
3
+
4
+ export async function GET() {
5
+ try {
6
+ const agentSession = await getSharedSession();
7
+
8
+ // Get messages from the session
9
+ // AgentSession usually has a getHistory() or messages property
10
+ // Looking at the library types, we can use session.messages
11
+ const messages = agentSession.messages.map((msg: any) => ({
12
+ id: msg.id || `msg-${Math.random().toString(36).slice(2, 9)}`,
13
+ content: Array.isArray(msg.content)
14
+ ? msg.content.filter((c: any) => c.type === 'text').map((c: any) => c.text).join('\n')
15
+ : msg.content,
16
+ thinking: msg.thinking, // Store thinking if available
17
+ isUser: msg.role === 'user',
18
+ timestamp: msg.timestamp
19
+ }));
20
+
21
+ return NextResponse.json({ messages });
22
+ } catch (error: any) {
23
+ console.error('[Messages] Error fetching history:', error);
24
+ return NextResponse.json({ error: error.message }, { status: 500 });
25
+ }
26
+ }
@@ -0,0 +1,55 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { getSharedSession, resetSharedSession } from '@/lib/session-singleton';
3
+
4
+ export async function GET() {
5
+ try {
6
+ const agentSession = await getSharedSession();
7
+
8
+ // Estimate token count from raw message content
9
+ const tokenCount = agentSession.messages.reduce((sum, msg: any) => {
10
+ let text = '';
11
+ if (msg.role === 'user') {
12
+ if (typeof msg.content === 'string') {
13
+ text = msg.content;
14
+ } else if (Array.isArray(msg.content)) {
15
+ text = msg.content
16
+ .map((c: any) => (c.type === 'text' ? c.text : ''))
17
+ .join('');
18
+ }
19
+ } else if (msg.role === 'assistant') {
20
+ text = msg.content
21
+ .map((c: any) => (c.type === 'text' ? c.text : ''))
22
+ .join('');
23
+ } else if (msg.role === 'toolResult') {
24
+ text = msg.content
25
+ .map((c: any) => (c.type === 'text' ? c.text : ''))
26
+ .join('');
27
+ }
28
+ return sum + Math.ceil(text.length / 4);
29
+ }, 0);
30
+
31
+ return NextResponse.json({
32
+ model: agentSession.model?.id,
33
+ messages: agentSession.messages.length,
34
+ tokens: tokenCount,
35
+ tools: agentSession.getActiveToolNames(),
36
+ });
37
+ } catch (error: any) {
38
+ return NextResponse.json({ error: error.message }, { status: 500 });
39
+ }
40
+ }
41
+
42
+ export async function POST(req: Request) {
43
+ try {
44
+ const { modelId } = await req.json().catch(() => ({}));
45
+
46
+ // Tear down and recreate the shared session
47
+ resetSharedSession(modelId);
48
+ const newSession = await getSharedSession();
49
+
50
+ return NextResponse.json({ success: true, sessionId: newSession.sessionId });
51
+ } catch (error: any) {
52
+ return NextResponse.json({ error: error.message }, { status: 500 });
53
+ }
54
+ }
55
+
@@ -0,0 +1,76 @@
1
+ import { getSharedSession } from '@/lib/session-singleton';
2
+ import type { AgentSessionEvent } from '@mariozechner/pi-coding-agent';
3
+
4
+ function translateEvent(event: AgentSessionEvent): { type: string; [key: string]: any } | null {
5
+ switch (event.type) {
6
+ case 'agent_start': return { type: 'start' };
7
+ case 'agent_end': return { type: 'end' };
8
+ case 'message_update': {
9
+ const ae = event.assistantMessageEvent;
10
+ if (ae.type === 'text_delta') return { type: 'content', content: ae.delta };
11
+ if (ae.type === 'thinking_delta') return { type: 'thinking', content: ae.delta };
12
+ return null;
13
+ }
14
+ case 'tool_execution_start':
15
+ return { type: 'tool_start', tool: event.toolName, args: event.args };
16
+ case 'tool_execution_end': {
17
+ let output = '';
18
+ if (Array.isArray(event.result?.content)) {
19
+ output = (event.result.content as any[])
20
+ .filter((c) => c.type === 'text')
21
+ .map((c) => c.text ?? '')
22
+ .join('');
23
+ }
24
+ return {
25
+ type: 'tool_end',
26
+ tool: event.toolName,
27
+ isError: event.isError,
28
+ output: output.slice(0, 2000),
29
+ error: event.isError ? (event.result?.error ?? '') : '',
30
+ };
31
+ }
32
+ case 'compaction_start': return { type: 'compacting' };
33
+ case 'auto_retry_start':
34
+ return { type: 'retry', attempt: event.attempt, maxAttempts: event.maxAttempts, delayMs: event.delayMs };
35
+ default: return null;
36
+ }
37
+ }
38
+
39
+ export async function GET() {
40
+ const agentSession = await getSharedSession();
41
+ console.log(`[SSE] Client connected. Session ID: ${agentSession.sessionId}`);
42
+
43
+ const encoder = new TextEncoder();
44
+ let unsubscribe: (() => void) | undefined;
45
+
46
+ const stream = new ReadableStream({
47
+ start(controller) {
48
+ controller.enqueue(encoder.encode(`data: ${JSON.stringify({ type: 'connected' })}\n\n`));
49
+
50
+ unsubscribe = agentSession.subscribe((event: AgentSessionEvent) => {
51
+ const translated = translateEvent(event);
52
+ if (translated !== null) {
53
+ console.log(`[SSE] Emitting event: ${translated.type} for session ${agentSession.sessionId}`);
54
+ try {
55
+ controller.enqueue(encoder.encode(`data: ${JSON.stringify(translated)}\n\n`));
56
+ } catch (err) {
57
+ console.log(`[SSE] Enqueue failed (likely client disconnected)`);
58
+ }
59
+ }
60
+ });
61
+ },
62
+ cancel() {
63
+ console.log(`[SSE] Client disconnected. Session ID: ${agentSession.sessionId}`);
64
+ unsubscribe?.();
65
+ },
66
+ });
67
+
68
+ return new Response(stream, {
69
+ headers: {
70
+ 'Content-Type': 'text/event-stream; charset=utf-8',
71
+ 'Cache-Control': 'no-cache, no-transform',
72
+ 'Connection': 'keep-alive',
73
+ 'X-Accel-Buffering': 'no',
74
+ },
75
+ });
76
+ }
Binary file