@baochunli/flakes 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/dist/commands/auth.d.ts.map +1 -1
  2. package/dist/commands/auth.js +133 -13
  3. package/dist/commands/auth.js.map +1 -1
  4. package/dist/commands/host.d.ts.map +1 -1
  5. package/dist/commands/host.js +77 -2
  6. package/dist/commands/host.js.map +1 -1
  7. package/dist/commands/projects.d.ts +4 -0
  8. package/dist/commands/projects.d.ts.map +1 -0
  9. package/dist/commands/projects.js +133 -0
  10. package/dist/commands/projects.js.map +1 -0
  11. package/dist/commands/runs.d.ts.map +1 -1
  12. package/dist/commands/runs.js +5 -1
  13. package/dist/commands/runs.js.map +1 -1
  14. package/dist/commands/runtime.d.ts +0 -1
  15. package/dist/commands/runtime.d.ts.map +1 -1
  16. package/dist/commands/runtime.js +2 -280
  17. package/dist/commands/runtime.js.map +1 -1
  18. package/dist/commands/server.d.ts.map +1 -1
  19. package/dist/commands/server.js +0 -6
  20. package/dist/commands/server.js.map +1 -1
  21. package/dist/commands/tasks.js +3 -0
  22. package/dist/commands/tasks.js.map +1 -1
  23. package/dist/config-example.js +1 -1
  24. package/dist/config-example.js.map +1 -1
  25. package/dist/host-config.d.ts +1 -6
  26. package/dist/host-config.d.ts.map +1 -1
  27. package/dist/host-config.js +10 -28
  28. package/dist/host-config.js.map +1 -1
  29. package/dist/host-runner.d.ts +3 -0
  30. package/dist/host-runner.d.ts.map +1 -1
  31. package/dist/host-runner.js +18 -6
  32. package/dist/host-runner.js.map +1 -1
  33. package/dist/host-runtime.d.ts.map +1 -1
  34. package/dist/host-runtime.js +92 -2
  35. package/dist/host-runtime.js.map +1 -1
  36. package/dist/host-transport.js +2 -5
  37. package/dist/host-transport.js.map +1 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +46 -42
  40. package/dist/index.js.map +1 -1
  41. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts +10 -0
  42. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts.map +1 -0
  43. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js +16 -0
  44. package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js.map +1 -0
  45. package/dist/node_modules/@flakes/auth/package.json +1 -1
  46. package/dist/node_modules/@flakes/console/.output/nitro.json +1 -1
  47. package/dist/node_modules/@flakes/console/.output/public/assets/DocumentationPage-CNPk8RVl.js +1 -0
  48. package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-CKPR1nnu.js +1 -0
  49. package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-BdugbnA3.js +3 -0
  50. package/dist/node_modules/@flakes/console/.output/public/assets/RunsPage-CJbycrqM.js +1 -0
  51. package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesLens-BoLM52PY.js +1 -0
  52. package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-6KHjMeaR.js +1 -0
  53. package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-CHSq0_qN.js +1 -0
  54. package/dist/node_modules/@flakes/console/.output/public/assets/_-CD1Voz9h.js +1 -0
  55. package/dist/node_modules/@flakes/console/.output/public/assets/_runId-_0VPmGYe.js +2 -0
  56. package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-CPAKAp4X.js +2 -0
  57. package/dist/node_modules/@flakes/console/.output/public/assets/account-BoRurhrq.js +1 -0
  58. package/dist/node_modules/@flakes/console/.output/public/assets/account-forms-D4eVqOhW.js +1 -0
  59. package/dist/node_modules/@flakes/console/.output/public/assets/arrow-right-QzVbRzF_.js +1 -0
  60. package/dist/node_modules/@flakes/console/.output/public/assets/auth-layout-DBnq_eif.js +1 -0
  61. package/dist/node_modules/@flakes/console/.output/public/assets/bits-BOMPEHvv.js +1 -0
  62. package/dist/node_modules/@flakes/console/.output/public/assets/card-37qs8AAd.js +1 -0
  63. package/dist/node_modules/@flakes/console/.output/public/assets/circle-alert-CM0SVfzc.js +1 -0
  64. package/dist/node_modules/@flakes/console/.output/public/assets/circle-check-CzwcEElH.js +1 -0
  65. package/dist/node_modules/@flakes/console/.output/public/assets/circle-x-C_sOQVNQ.js +1 -0
  66. package/dist/node_modules/@flakes/console/.output/public/assets/device-FqII-S41.js +1 -0
  67. package/dist/node_modules/@flakes/console/.output/public/assets/dist-BEfdrJTS.js +1 -0
  68. package/dist/node_modules/@flakes/console/.output/public/assets/documentation-2C3ncAuV.js +1 -0
  69. package/dist/node_modules/@flakes/console/.output/public/assets/{external-link-BW8lpiMR.js → external-link-BWhbbPgy.js} +1 -1
  70. package/dist/node_modules/@flakes/console/.output/public/assets/{file-text-DMdy8OfN.js → file-text-DLxLJ7P1.js} +1 -1
  71. package/dist/node_modules/@flakes/console/.output/public/assets/forgot-password-BSQ4TWpA.js +1 -0
  72. package/dist/node_modules/@flakes/console/.output/public/assets/inbox-BVu38EN6.js +1 -0
  73. package/dist/node_modules/@flakes/console/.output/public/assets/{lib-DtfURcG3.js → lib-COfgMmRR.js} +3 -3
  74. package/dist/node_modules/@flakes/console/.output/public/assets/link-ll3nLBSM.js +1 -0
  75. package/dist/node_modules/@flakes/console/.output/public/assets/{lock-D4OhqEPW.js → lock-Ck2SfQA2.js} +1 -1
  76. package/dist/node_modules/@flakes/console/.output/public/assets/main-LpSDdT-S.js +1215 -0
  77. package/dist/node_modules/@flakes/console/.output/public/assets/matchContext-puEkI9BI.js +1 -0
  78. package/dist/node_modules/@flakes/console/.output/public/assets/otp-verification-CussJQT1.js +20 -0
  79. package/dist/node_modules/@flakes/console/.output/public/assets/projects-CLgKBrCe.js +2 -0
  80. package/dist/node_modules/@flakes/console/.output/public/assets/react-B8IZ02wI.js +1 -0
  81. package/dist/node_modules/@flakes/console/.output/public/assets/react-dom-ki7NpxV4.js +1 -0
  82. package/dist/node_modules/@flakes/console/.output/public/assets/redirect-Cu9zBy04.js +1 -0
  83. package/dist/node_modules/@flakes/console/.output/public/assets/reset-password-DwWhVkEh.js +1 -0
  84. package/dist/node_modules/@flakes/console/.output/public/assets/runs-CFYk2iRh.js +2 -0
  85. package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-mGsOcVFL.js +2 -0
  86. package/dist/node_modules/@flakes/console/.output/public/assets/{save-1uf5fQff.js → save-Bte_1tnN.js} +1 -1
  87. package/dist/node_modules/@flakes/console/.output/public/assets/security-MjM55vIw.js +1 -0
  88. package/dist/node_modules/@flakes/console/.output/public/assets/signin-KbA1cD6o.js +1 -0
  89. package/dist/node_modules/@flakes/console/.output/public/assets/signin-form-CBF-d8iK.js +1 -0
  90. package/dist/node_modules/@flakes/console/.output/public/assets/signup-CbHsThKr.js +1 -0
  91. package/dist/node_modules/@flakes/console/.output/public/assets/styles-DtA2wbW8.css +2 -0
  92. package/dist/node_modules/@flakes/console/.output/public/assets/table-WMIs2m3R.js +1 -0
  93. package/dist/node_modules/@flakes/console/.output/public/assets/tiny-invariant-CO5X59di.js +1 -0
  94. package/dist/node_modules/@flakes/console/.output/public/assets/user-Bt9z7sSI.js +1 -0
  95. package/dist/node_modules/@flakes/console/.output/public/assets/utils-CBxvVKOM.js +1 -0
  96. package/dist/node_modules/@flakes/console/.output/public/assets/x-Bdsfqbi3.js +1 -0
  97. package/dist/node_modules/@flakes/console/.output/server/{_-CjpSIsvB.mjs → _-BULJ6utw.mjs} +3 -3
  98. package/dist/node_modules/@flakes/console/.output/server/{_-8ZDVkA1O.mjs → _-_ST9QYWn.mjs} +3 -3
  99. package/dist/node_modules/@flakes/console/.output/server/_chunks/ProjectsPage.mjs +589 -0
  100. package/dist/node_modules/@flakes/console/.output/server/_chunks/RunPage.mjs +13 -6
  101. package/dist/node_modules/@flakes/console/.output/server/_chunks/RunsPage.mjs +43 -12
  102. package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesPage.mjs +2 -2
  103. package/dist/node_modules/@flakes/console/.output/server/_chunks/TranscriptPage.mjs +2 -2
  104. package/dist/node_modules/@flakes/console/.output/server/_chunks/project-navigation.mjs +79 -0
  105. package/dist/node_modules/@flakes/console/.output/server/_chunks/router.mjs +195 -112
  106. package/dist/node_modules/@flakes/console/.output/server/_chunks/utils.mjs +111 -3
  107. package/dist/node_modules/@flakes/console/.output/server/_libs/lucide-react.mjs +178 -1
  108. package/dist/node_modules/@flakes/console/.output/server/{_runId-CJ5_8uS8.mjs → _runId-CmYWNL8A.mjs} +3 -3
  109. package/dist/node_modules/@flakes/console/.output/server/{_runId-Cag5UaYU.mjs → _runId-WZmbo654.mjs} +2 -2
  110. package/dist/node_modules/@flakes/console/.output/server/_ssr/{App-CwFtUgAz.mjs → App-CUx8Ftit.mjs} +118 -64
  111. package/dist/node_modules/@flakes/console/.output/server/_ssr/{DocumentationPage-D85Budiq.mjs → DocumentationPage-0I9oWWJT.mjs} +5 -5
  112. package/dist/node_modules/@flakes/console/.output/server/_ssr/ProjectsPage-CGj9V2Of.mjs +590 -0
  113. package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunPage-CatpnkFy.mjs → RunPage-B2vhVaj6.mjs} +14 -7
  114. package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunsPage-BmLTih8Z.mjs → RunsPage-BifKogQE.mjs} +44 -13
  115. package/dist/node_modules/@flakes/console/.output/server/_ssr/{SandboxesPage-Dlq0Ga24.mjs → SandboxesPage-DGji_OdB.mjs} +3 -3
  116. package/dist/node_modules/@flakes/console/.output/server/_ssr/{TranscriptPage-DaSIDCKk.mjs → TranscriptPage-deSxVZaQ.mjs} +3 -3
  117. package/dist/node_modules/@flakes/console/.output/server/_ssr/{account-DzluYS58.mjs → account-D5y9vkAc.mjs} +2 -2
  118. package/dist/node_modules/@flakes/console/.output/server/_ssr/account-forms-CsothyLo.mjs +1 -1
  119. package/dist/node_modules/@flakes/console/.output/server/_ssr/device-CRZl7dGv.mjs +1 -1
  120. package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-4BCES--X.mjs → documentation-C69e9_eF.mjs} +3 -3
  121. package/dist/node_modules/@flakes/console/.output/server/_ssr/documentation-C91gfyy0.mjs +210 -0
  122. package/dist/node_modules/@flakes/console/.output/server/_ssr/{hooks-COIYuQzf.mjs → hooks-DrgN35zn.mjs} +110 -4
  123. package/dist/node_modules/@flakes/console/.output/server/_ssr/project-navigation-DI77TL9a.mjs +79 -0
  124. package/dist/node_modules/@flakes/console/.output/server/_ssr/projects-lJ2tIIPj.mjs +5 -0
  125. package/dist/node_modules/@flakes/console/.output/server/_ssr/reset-password-SmmTixcr.mjs +1 -1
  126. package/dist/node_modules/@flakes/console/.output/server/_ssr/{router-B3vKkNtv.mjs → router-DHxFQ03L.mjs} +49 -41
  127. package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-CBkO-RO8.mjs → runs-BWxEGKO_.mjs} +17 -5
  128. package/dist/node_modules/@flakes/console/.output/server/_ssr/runs-dnPfp9dt.mjs +19 -0
  129. package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-BIAgn8pu2.mjs → sandboxes-hxFINxDS.mjs} +3 -3
  130. package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-qSX_pfUJ.mjs → sandboxes-v28LJQM3.mjs} +2 -2
  131. package/dist/node_modules/@flakes/console/.output/server/_ssr/signin-form-CQDi-0A5.mjs +1 -1
  132. package/dist/node_modules/@flakes/console/.output/server/_ssr/ssr.mjs +2 -2
  133. package/dist/node_modules/@flakes/console/.output/server/{_tanstack-start-manifest_v-llXRWxjT.mjs → _tanstack-start-manifest_v-DfwuEzTr.mjs} +54 -46
  134. package/dist/node_modules/@flakes/console/.output/server/{_taskId-BaezvY0w.mjs → _taskId-CBo95z-s.mjs} +2 -2
  135. package/dist/node_modules/@flakes/console/.output/server/{_taskId-Da7kHKj9.mjs → _taskId-Sil3-PKh.mjs} +3 -3
  136. package/dist/node_modules/@flakes/console/package.json +1 -1
  137. package/dist/node_modules/@flakes/control-plane/dist/client-access.d.ts +17 -0
  138. package/dist/node_modules/@flakes/control-plane/dist/client-access.d.ts.map +1 -1
  139. package/dist/node_modules/@flakes/control-plane/dist/client-access.js +12 -0
  140. package/dist/node_modules/@flakes/control-plane/dist/client-access.js.map +1 -1
  141. package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts +1 -1
  142. package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts.map +1 -1
  143. package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.d.ts +24 -1
  144. package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.d.ts.map +1 -1
  145. package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.js +87 -3
  146. package/dist/node_modules/@flakes/control-plane/dist/host-pool-matching.js.map +1 -1
  147. package/dist/node_modules/@flakes/control-plane/dist/host-stream.d.ts.map +1 -1
  148. package/dist/node_modules/@flakes/control-plane/dist/host-stream.js +150 -40
  149. package/dist/node_modules/@flakes/control-plane/dist/host-stream.js.map +1 -1
  150. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts +71 -0
  151. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts.map +1 -0
  152. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js +243 -0
  153. package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js.map +1 -0
  154. package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.d.ts.map +1 -1
  155. package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.js +219 -0
  156. package/dist/node_modules/@flakes/control-plane/dist/routes/hosts.js.map +1 -1
  157. package/dist/node_modules/@flakes/control-plane/dist/routes/projects.d.ts +3 -0
  158. package/dist/node_modules/@flakes/control-plane/dist/routes/projects.d.ts.map +1 -0
  159. package/dist/node_modules/@flakes/control-plane/dist/routes/projects.js +226 -0
  160. package/dist/node_modules/@flakes/control-plane/dist/routes/projects.js.map +1 -0
  161. package/dist/node_modules/@flakes/control-plane/dist/routes/runs.d.ts.map +1 -1
  162. package/dist/node_modules/@flakes/control-plane/dist/routes/runs.js +93 -6
  163. package/dist/node_modules/@flakes/control-plane/dist/routes/runs.js.map +1 -1
  164. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts +3 -0
  165. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts.map +1 -0
  166. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js +153 -0
  167. package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js.map +1 -0
  168. package/dist/node_modules/@flakes/control-plane/dist/routes/tasks.js +2 -2
  169. package/dist/node_modules/@flakes/control-plane/dist/routes/tasks.js.map +1 -1
  170. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts +19 -0
  171. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts.map +1 -0
  172. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js +46 -0
  173. package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js.map +1 -0
  174. package/dist/node_modules/@flakes/control-plane/dist/scheduler.d.ts +2 -0
  175. package/dist/node_modules/@flakes/control-plane/dist/scheduler.d.ts.map +1 -1
  176. package/dist/node_modules/@flakes/control-plane/dist/scheduler.js +53 -21
  177. package/dist/node_modules/@flakes/control-plane/dist/scheduler.js.map +1 -1
  178. package/dist/node_modules/@flakes/control-plane/dist/server.d.ts.map +1 -1
  179. package/dist/node_modules/@flakes/control-plane/dist/server.js +2 -0
  180. package/dist/node_modules/@flakes/control-plane/dist/server.js.map +1 -1
  181. package/dist/node_modules/@flakes/control-plane/dist/types.d.ts +2 -0
  182. package/dist/node_modules/@flakes/control-plane/dist/types.d.ts.map +1 -1
  183. package/dist/node_modules/@flakes/control-plane/package.json +1 -1
  184. package/dist/node_modules/@flakes/core/dist/config.d.ts.map +1 -1
  185. package/dist/node_modules/@flakes/core/dist/config.js +6 -2
  186. package/dist/node_modules/@flakes/core/dist/config.js.map +1 -1
  187. package/dist/node_modules/@flakes/core/dist/ids.d.ts +4 -0
  188. package/dist/node_modules/@flakes/core/dist/ids.d.ts.map +1 -1
  189. package/dist/node_modules/@flakes/core/dist/ids.js +2 -0
  190. package/dist/node_modules/@flakes/core/dist/ids.js.map +1 -1
  191. package/dist/node_modules/@flakes/core/dist/runtime.d.ts +1 -1
  192. package/dist/node_modules/@flakes/core/dist/schemas.d.ts +11 -0
  193. package/dist/node_modules/@flakes/core/dist/schemas.d.ts.map +1 -1
  194. package/dist/node_modules/@flakes/core/dist/schemas.js +10 -0
  195. package/dist/node_modules/@flakes/core/dist/schemas.js.map +1 -1
  196. package/dist/node_modules/@flakes/core/package.json +1 -1
  197. package/dist/node_modules/@flakes/harness-agent/package.json +1 -1
  198. package/dist/node_modules/@flakes/harness-sdk/package.json +1 -1
  199. package/dist/node_modules/@flakes/pi-agent/package.json +1 -1
  200. package/dist/node_modules/@flakes/protocol/dist/index.d.ts +1 -1
  201. package/dist/node_modules/@flakes/protocol/dist/index.d.ts.map +1 -1
  202. package/dist/node_modules/@flakes/protocol/dist/index.js +1 -1
  203. package/dist/node_modules/@flakes/protocol/dist/index.js.map +1 -1
  204. package/dist/node_modules/@flakes/protocol/dist/v1.d.ts +317 -0
  205. package/dist/node_modules/@flakes/protocol/dist/v1.d.ts.map +1 -1
  206. package/dist/node_modules/@flakes/protocol/dist/v1.js +50 -1
  207. package/dist/node_modules/@flakes/protocol/dist/v1.js.map +1 -1
  208. package/dist/node_modules/@flakes/protocol/package.json +1 -1
  209. package/dist/node_modules/@flakes/sandbox-runtime/dist/transport.js +3 -6
  210. package/dist/node_modules/@flakes/sandbox-runtime/dist/transport.js.map +1 -1
  211. package/dist/node_modules/@flakes/sandbox-runtime/package.json +1 -1
  212. package/dist/node_modules/@flakes/store/dist/artifacts-events-store.d.ts.map +1 -1
  213. package/dist/node_modules/@flakes/store/dist/artifacts-events-store.js +10 -0
  214. package/dist/node_modules/@flakes/store/dist/artifacts-events-store.js.map +1 -1
  215. package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.d.ts +2 -1
  216. package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.d.ts.map +1 -1
  217. package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.js +1 -0
  218. package/dist/node_modules/@flakes/store/dist/host-provisioning-limits.js.map +1 -1
  219. package/dist/node_modules/@flakes/store/dist/kysely-store.d.ts +2 -2
  220. package/dist/node_modules/@flakes/store/dist/kysely-store.d.ts.map +1 -1
  221. package/dist/node_modules/@flakes/store/dist/kysely-store.js +2 -2
  222. package/dist/node_modules/@flakes/store/dist/kysely-store.js.map +1 -1
  223. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts +6 -2
  224. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts.map +1 -1
  225. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js +160 -3
  226. package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js.map +1 -1
  227. package/dist/node_modules/@flakes/store/dist/mappers.d.ts +10 -2
  228. package/dist/node_modules/@flakes/store/dist/mappers.d.ts.map +1 -1
  229. package/dist/node_modules/@flakes/store/dist/mappers.js +45 -0
  230. package/dist/node_modules/@flakes/store/dist/mappers.js.map +1 -1
  231. package/dist/node_modules/@flakes/store/dist/projects-store.d.ts +42 -0
  232. package/dist/node_modules/@flakes/store/dist/projects-store.d.ts.map +1 -0
  233. package/dist/node_modules/@flakes/store/dist/projects-store.js +376 -0
  234. package/dist/node_modules/@flakes/store/dist/projects-store.js.map +1 -0
  235. package/dist/node_modules/@flakes/store/dist/runs-store.d.ts.map +1 -1
  236. package/dist/node_modules/@flakes/store/dist/runs-store.js +7 -2
  237. package/dist/node_modules/@flakes/store/dist/runs-store.js.map +1 -1
  238. package/dist/node_modules/@flakes/store/dist/schema.js +72 -0
  239. package/dist/node_modules/@flakes/store/dist/schema.js.map +1 -1
  240. package/dist/node_modules/@flakes/store/dist/sqlite.d.ts +4 -0
  241. package/dist/node_modules/@flakes/store/dist/sqlite.d.ts.map +1 -0
  242. package/dist/node_modules/@flakes/store/dist/sqlite.js +34 -0
  243. package/dist/node_modules/@flakes/store/dist/sqlite.js.map +1 -0
  244. package/dist/node_modules/@flakes/store/dist/store-base.d.ts +14 -12
  245. package/dist/node_modules/@flakes/store/dist/store-base.d.ts.map +1 -1
  246. package/dist/node_modules/@flakes/store/dist/tables.d.ts +41 -1
  247. package/dist/node_modules/@flakes/store/dist/tables.d.ts.map +1 -1
  248. package/dist/node_modules/@flakes/store/dist/tasks-store.d.ts.map +1 -1
  249. package/dist/node_modules/@flakes/store/dist/tasks-store.js +9 -2
  250. package/dist/node_modules/@flakes/store/dist/tasks-store.js.map +1 -1
  251. package/dist/node_modules/@flakes/store/dist/types.d.ts +159 -1
  252. package/dist/node_modules/@flakes/store/dist/types.d.ts.map +1 -1
  253. package/dist/node_modules/@flakes/store/package.json +1 -1
  254. package/package.json +1 -1
  255. package/dist/node_modules/@flakes/console/.output/public/assets/DocumentationPage-DrqDulyL.js +0 -1
  256. package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-BC3sGoPN.js +0 -3
  257. package/dist/node_modules/@flakes/console/.output/public/assets/RunsPage-LkYGVvbL.js +0 -1
  258. package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesLens-BUQQWmH6.js +0 -1
  259. package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-CwWMogj6.js +0 -1
  260. package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-CTMgJgHp.js +0 -1
  261. package/dist/node_modules/@flakes/console/.output/public/assets/_-DRcA_CG9.js +0 -1
  262. package/dist/node_modules/@flakes/console/.output/public/assets/_runId-CO1ozt9P.js +0 -2
  263. package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-CcIypX6M.js +0 -2
  264. package/dist/node_modules/@flakes/console/.output/public/assets/account-DKgjbb-C.js +0 -1
  265. package/dist/node_modules/@flakes/console/.output/public/assets/account-forms-DrHA3zEd.js +0 -1
  266. package/dist/node_modules/@flakes/console/.output/public/assets/arrow-right-BMW8fJP5.js +0 -1
  267. package/dist/node_modules/@flakes/console/.output/public/assets/auth-layout-INHonQMf.js +0 -1
  268. package/dist/node_modules/@flakes/console/.output/public/assets/bits-Cv0Te4iz.js +0 -1
  269. package/dist/node_modules/@flakes/console/.output/public/assets/card-DSG3_teC.js +0 -1
  270. package/dist/node_modules/@flakes/console/.output/public/assets/circle-check-B0gtb8OH.js +0 -1
  271. package/dist/node_modules/@flakes/console/.output/public/assets/device-DOGZUNMB.js +0 -1
  272. package/dist/node_modules/@flakes/console/.output/public/assets/dist-BtPw3IIV.js +0 -1
  273. package/dist/node_modules/@flakes/console/.output/public/assets/documentation-Dr9Bdqxh.js +0 -1
  274. package/dist/node_modules/@flakes/console/.output/public/assets/forgot-password-C7qvwcpm.js +0 -1
  275. package/dist/node_modules/@flakes/console/.output/public/assets/link-BsixJinJ.js +0 -1
  276. package/dist/node_modules/@flakes/console/.output/public/assets/main-RzjfJZwD.js +0 -1121
  277. package/dist/node_modules/@flakes/console/.output/public/assets/matchContext-tJ0VTv5m.js +0 -1
  278. package/dist/node_modules/@flakes/console/.output/public/assets/otp-verification-Cqa6lopR.js +0 -20
  279. package/dist/node_modules/@flakes/console/.output/public/assets/react-DtOYBmep.js +0 -1
  280. package/dist/node_modules/@flakes/console/.output/public/assets/react-dom-DrIU40PY.js +0 -1
  281. package/dist/node_modules/@flakes/console/.output/public/assets/redirect-BEm0VK76.js +0 -1
  282. package/dist/node_modules/@flakes/console/.output/public/assets/reset-password-tImCgEn0.js +0 -1
  283. package/dist/node_modules/@flakes/console/.output/public/assets/runs-Cuk0VOVi.js +0 -2
  284. package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-BBIIbVN8.js +0 -2
  285. package/dist/node_modules/@flakes/console/.output/public/assets/security-D3N68cBT.js +0 -1
  286. package/dist/node_modules/@flakes/console/.output/public/assets/signin-DylILjyG.js +0 -1
  287. package/dist/node_modules/@flakes/console/.output/public/assets/signin-form-DWaa_uwj.js +0 -1
  288. package/dist/node_modules/@flakes/console/.output/public/assets/signup-KmFQL_1g.js +0 -1
  289. package/dist/node_modules/@flakes/console/.output/public/assets/styles-8wEqfToJ.css +0 -2
  290. package/dist/node_modules/@flakes/console/.output/public/assets/table-DptQuuuq.js +0 -1
  291. package/dist/node_modules/@flakes/console/.output/public/assets/user-DK27uFod.js +0 -1
  292. package/dist/node_modules/@flakes/console/.output/public/assets/utils-CEE0-YEp.js +0 -1
  293. package/dist/node_modules/@flakes/console/.output/public/assets/x-fKvnmCoQ.js +0 -1
  294. package/dist/node_modules/@flakes/console/.output/server/_ssr/documentation-Do_Mr_e4.mjs +0 -210
  295. package/dist/node_modules/@flakes/console/.output/server/_ssr/runs-BzfGldVd.mjs +0 -12
@@ -3,6 +3,55 @@ import { i as useQuery, n as useMutation, o as useQueryClient, t as useInfiniteQ
3
3
  import { n as clsx } from "../_libs/class-variance-authority+clsx.mjs";
4
4
  import { t as twMerge } from "../_libs/tailwind-merge.mjs";
5
5
  import { n as normalizeConsolePath } from "./paths.mjs";
6
+ //#region src/lib/project-placement.ts
7
+ function hostProjectWorkspaceRootPath(hostId) {
8
+ return `/v1/hosts/${encodeURIComponent(hostId)}/project-workspace-root`;
9
+ }
10
+ function hostProjectBindingsPath(hostId) {
11
+ return `/v1/hosts/${encodeURIComponent(hostId)}/project-bindings`;
12
+ }
13
+ function hostProjectBindingPath(hostId, projectKey) {
14
+ return `${hostProjectBindingsPath(hostId)}/${encodeURIComponent(projectKey)}`;
15
+ }
16
+ function hostProjectWorkspacePath(projectWorkspaceRoot, projectKey) {
17
+ const separator = projectWorkspaceRoot.includes("\\") && !projectWorkspaceRoot.includes("/") ? "\\" : "/";
18
+ return projectWorkspaceRoot.endsWith("/") || projectWorkspaceRoot.endsWith("\\") ? `${projectWorkspaceRoot}${projectKey}` : `${projectWorkspaceRoot}${separator}${projectKey}`;
19
+ }
20
+ function bindingValidationView(binding) {
21
+ if (binding === void 0) return {
22
+ tone: "idle",
23
+ label: "Not bound",
24
+ detail: "No host binding has been saved for this project."
25
+ };
26
+ if (binding.availability === "available") return {
27
+ tone: "available",
28
+ label: "Available",
29
+ detail: `Validated ${binding.lastValidatedAt ?? binding.updatedAt}.`
30
+ };
31
+ if (binding.availability === "unavailable") return {
32
+ tone: "unavailable",
33
+ label: "Unavailable",
34
+ detail: binding.validationReason ?? `Last rejected ${binding.lastValidatedAt ?? binding.updatedAt}.`
35
+ };
36
+ return {
37
+ tone: "pending",
38
+ label: "Pending validation",
39
+ detail: "Waiting for the host runtime to validate this binding."
40
+ };
41
+ }
42
+ function poolChoicesForBinding(pools, binding) {
43
+ const selected = new Set(binding?.poolKeys ?? []);
44
+ return pools.map((pool) => {
45
+ const status = pool.status ?? "available";
46
+ return {
47
+ poolKey: pool.poolKey,
48
+ selected: selected.has(pool.poolKey),
49
+ status,
50
+ statusLabel: status
51
+ };
52
+ });
53
+ }
54
+ //#endregion
6
55
  //#region src/api/server-functions.ts
7
56
  var consoleGetJson = createServerFn({ method: "GET" }).inputValidator(validatePathInput).handler(async ({ data }) => {
8
57
  const { proxyJsonHandler } = await import("./server-runtime.mjs");
@@ -128,13 +177,20 @@ function isRecord(value) {
128
177
  //#endregion
129
178
  //#region src/api/hooks.ts
130
179
  var POLL_MS = 1e3;
131
- function useRuns(state) {
180
+ function useRuns(input) {
181
+ const state = typeof input === "string" ? input : input?.state;
182
+ const projectKey = typeof input === "string" ? void 0 : input?.projectKey;
132
183
  return useInfiniteQuery({
133
- queryKey: ["runs", state ?? null],
184
+ queryKey: [
185
+ "runs",
186
+ state ?? null,
187
+ projectKey ?? null
188
+ ],
134
189
  initialPageParam: void 0,
135
190
  queryFn: ({ pageParam }) => {
136
191
  const params = new URLSearchParams();
137
192
  if (state !== void 0) params.set("state", state);
193
+ if (projectKey !== void 0) params.set("projectKey", projectKey);
138
194
  if (pageParam !== void 0) params.set("cursor", pageParam);
139
195
  const query = params.toString();
140
196
  return apiGet(`/v1/runs${query ? `?${query}` : ""}`);
@@ -144,6 +200,54 @@ function useRuns(state) {
144
200
  refetchInterval: POLL_MS
145
201
  });
146
202
  }
203
+ function useProjects() {
204
+ return useQuery({
205
+ queryKey: ["projects"],
206
+ queryFn: () => apiGet("/v1/projects"),
207
+ refetchInterval: POLL_MS
208
+ });
209
+ }
210
+ function useHosts() {
211
+ return useQuery({
212
+ queryKey: ["hosts"],
213
+ queryFn: () => apiGet("/v1/hosts"),
214
+ refetchInterval: POLL_MS
215
+ });
216
+ }
217
+ function useHostPools(hostId) {
218
+ return useQuery({
219
+ queryKey: ["host-pools", hostId],
220
+ enabled: hostId !== null,
221
+ queryFn: () => apiGet(`/v1/hosts/${encodeURIComponent(requireHostId(hostId, "useHostPools"))}/pools`),
222
+ refetchInterval: POLL_MS
223
+ });
224
+ }
225
+ function useHostProjectBindings(hostId, enabled = true) {
226
+ return useQuery({
227
+ queryKey: ["host-project-bindings", hostId],
228
+ enabled: hostId !== null && enabled,
229
+ queryFn: () => apiGet(hostProjectBindingsPath(requireHostId(hostId, "useHostProjectBindings"))),
230
+ refetchInterval: POLL_MS
231
+ });
232
+ }
233
+ function useSetHostProjectWorkspaceRoot() {
234
+ const queryClient = useQueryClient();
235
+ return useMutation({
236
+ mutationFn: (input) => apiPut(hostProjectWorkspaceRootPath(input.hostId), { path: input.path }),
237
+ onSuccess: async (root) => {
238
+ await Promise.all([queryClient.invalidateQueries({ queryKey: ["hosts"] }), queryClient.invalidateQueries({ queryKey: ["host-project-bindings", root.hostId] })]);
239
+ }
240
+ });
241
+ }
242
+ function useUpsertHostProjectBinding() {
243
+ const queryClient = useQueryClient();
244
+ return useMutation({
245
+ mutationFn: (input) => apiPut(hostProjectBindingPath(input.hostId, input.projectKey), { poolKeys: input.poolKeys }),
246
+ onSuccess: async (_binding, input) => {
247
+ await queryClient.invalidateQueries({ queryKey: ["host-project-bindings", input.hostId] });
248
+ }
249
+ });
250
+ }
147
251
  function useRun(runId) {
148
252
  return useQuery({
149
253
  queryKey: ["run", runId],
@@ -276,10 +380,14 @@ function requireTaskId(taskId, hookName) {
276
380
  if (taskId === null) throw new Error(`${hookName} called without taskId`);
277
381
  return taskId;
278
382
  }
383
+ function requireHostId(hostId, hookName) {
384
+ if (hostId === null) throw new Error(`${hookName} called without hostId`);
385
+ return hostId;
386
+ }
279
387
  //#endregion
280
388
  //#region src/lib/utils.ts
281
389
  function cn(...inputs) {
282
390
  return twMerge(clsx(inputs));
283
391
  }
284
392
  //#endregion
285
- export { useRunFileReservations as a, useRuns as c, useTaskActivity as d, useTaskPiSession as f, downloadFile as g, ApiError as h, useRunArtifacts as i, useSaveTaskWorkpad as l, useTaskWorkpad as m, useDeleteRun as n, useRunMetrics as o, useTaskPiSessionRaw as p, useRun as r, useRunTasks as s, cn as t, useSendTaskMessage as u };
393
+ export { bindingValidationView as C, downloadFile as S, poolChoicesForBinding as T, useTaskPiSession as _, useHosts as a, useUpsertHostProjectBinding as b, useRunArtifacts as c, useRunTasks as d, useRuns as f, useTaskActivity as g, useSetHostProjectWorkspaceRoot as h, useHostProjectBindings as i, useRunFileReservations as l, useSendTaskMessage as m, useDeleteRun as n, useProjects as o, useSaveTaskWorkpad as p, useHostPools as r, useRun as s, cn as t, useRunMetrics as u, useTaskPiSessionRaw as v, hostProjectWorkspacePath as w, ApiError as x, useTaskWorkpad as y };
@@ -129,6 +129,30 @@ var createLucideIcon = (iconName, iconNode) => {
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
131
  */
132
+ var Archive = createLucideIcon("archive", [
133
+ ["rect", {
134
+ width: "20",
135
+ height: "5",
136
+ x: "2",
137
+ y: "3",
138
+ rx: "1",
139
+ key: "1wp1u1"
140
+ }],
141
+ ["path", {
142
+ d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",
143
+ key: "1s80jp"
144
+ }],
145
+ ["path", {
146
+ d: "M10 12h4",
147
+ key: "a56b0p"
148
+ }]
149
+ ]);
150
+ /**
151
+ * @license lucide-react v1.17.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */
132
156
  var ArrowDown = createLucideIcon("arrow-down", [["path", {
133
157
  d: "M12 5v14",
134
158
  key: "s699le"
@@ -297,6 +321,46 @@ var CircleCheck = createLucideIcon("circle-check", [["circle", {
297
321
  * This source code is licensed under the ISC license.
298
322
  * See the LICENSE file in the root directory of this source tree.
299
323
  */
324
+ var CircleDashed = createLucideIcon("circle-dashed", [
325
+ ["path", {
326
+ d: "M10.1 2.182a10 10 0 0 1 3.8 0",
327
+ key: "5ilxe3"
328
+ }],
329
+ ["path", {
330
+ d: "M13.9 21.818a10 10 0 0 1-3.8 0",
331
+ key: "11zvb9"
332
+ }],
333
+ ["path", {
334
+ d: "M17.609 3.721a10 10 0 0 1 2.69 2.7",
335
+ key: "1iw5b2"
336
+ }],
337
+ ["path", {
338
+ d: "M2.182 13.9a10 10 0 0 1 0-3.8",
339
+ key: "c0bmvh"
340
+ }],
341
+ ["path", {
342
+ d: "M20.279 17.609a10 10 0 0 1-2.7 2.69",
343
+ key: "1ruxm7"
344
+ }],
345
+ ["path", {
346
+ d: "M21.818 10.1a10 10 0 0 1 0 3.8",
347
+ key: "qkgqxc"
348
+ }],
349
+ ["path", {
350
+ d: "M3.721 6.391a10 10 0 0 1 2.7-2.69",
351
+ key: "1mcia2"
352
+ }],
353
+ ["path", {
354
+ d: "M6.391 20.279a10 10 0 0 1-2.69-2.7",
355
+ key: "1fvljs"
356
+ }]
357
+ ]);
358
+ /**
359
+ * @license lucide-react v1.17.0 - ISC
360
+ *
361
+ * This source code is licensed under the ISC license.
362
+ * See the LICENSE file in the root directory of this source tree.
363
+ */
300
364
  var CircleX = createLucideIcon("circle-x", [
301
365
  ["circle", {
302
366
  cx: "12",
@@ -319,6 +383,21 @@ var CircleX = createLucideIcon("circle-x", [
319
383
  * This source code is licensed under the ISC license.
320
384
  * See the LICENSE file in the root directory of this source tree.
321
385
  */
386
+ var Clock3 = createLucideIcon("clock-3", [["circle", {
387
+ cx: "12",
388
+ cy: "12",
389
+ r: "10",
390
+ key: "1mglay"
391
+ }], ["path", {
392
+ d: "M12 6v6h4",
393
+ key: "135r8i"
394
+ }]]);
395
+ /**
396
+ * @license lucide-react v1.17.0 - ISC
397
+ *
398
+ * This source code is licensed under the ISC license.
399
+ * See the LICENSE file in the root directory of this source tree.
400
+ */
322
401
  var Clock = createLucideIcon("clock", [["circle", {
323
402
  cx: "12",
324
403
  cy: "12",
@@ -442,6 +521,80 @@ var FileText = createLucideIcon("file-text", [
442
521
  * This source code is licensed under the ISC license.
443
522
  * See the LICENSE file in the root directory of this source tree.
444
523
  */
524
+ var FolderCog = createLucideIcon("folder-cog", [
525
+ ["path", {
526
+ d: "M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3",
527
+ key: "128dxu"
528
+ }],
529
+ ["path", {
530
+ d: "m14.305 19.53.923-.382",
531
+ key: "3m78fa"
532
+ }],
533
+ ["path", {
534
+ d: "m15.228 16.852-.923-.383",
535
+ key: "npixar"
536
+ }],
537
+ ["path", {
538
+ d: "m16.852 15.228-.383-.923",
539
+ key: "5xggr7"
540
+ }],
541
+ ["path", {
542
+ d: "m16.852 20.772-.383.924",
543
+ key: "dpfhf9"
544
+ }],
545
+ ["path", {
546
+ d: "m19.148 15.228.383-.923",
547
+ key: "1reyyz"
548
+ }],
549
+ ["path", {
550
+ d: "m19.53 21.696-.382-.924",
551
+ key: "1goivc"
552
+ }],
553
+ ["path", {
554
+ d: "m20.772 16.852.924-.383",
555
+ key: "htqkph"
556
+ }],
557
+ ["path", {
558
+ d: "m20.772 19.148.924.383",
559
+ key: "9w9pjp"
560
+ }],
561
+ ["circle", {
562
+ cx: "18",
563
+ cy: "18",
564
+ r: "3",
565
+ key: "1xkwt0"
566
+ }]
567
+ ]);
568
+ /**
569
+ * @license lucide-react v1.17.0 - ISC
570
+ *
571
+ * This source code is licensed under the ISC license.
572
+ * See the LICENSE file in the root directory of this source tree.
573
+ */
574
+ var FolderKanban = createLucideIcon("folder-kanban", [
575
+ ["path", {
576
+ d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",
577
+ key: "1fr9dc"
578
+ }],
579
+ ["path", {
580
+ d: "M8 10v4",
581
+ key: "tgpxqk"
582
+ }],
583
+ ["path", {
584
+ d: "M12 10v2",
585
+ key: "hh53o1"
586
+ }],
587
+ ["path", {
588
+ d: "M16 10v6",
589
+ key: "1d6xys"
590
+ }]
591
+ ]);
592
+ /**
593
+ * @license lucide-react v1.17.0 - ISC
594
+ *
595
+ * This source code is licensed under the ISC license.
596
+ * See the LICENSE file in the root directory of this source tree.
597
+ */
445
598
  var Folder = createLucideIcon("folder", [["path", {
446
599
  d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
447
600
  key: "1kt360"
@@ -452,6 +605,30 @@ var Folder = createLucideIcon("folder", [["path", {
452
605
  * This source code is licensed under the ISC license.
453
606
  * See the LICENSE file in the root directory of this source tree.
454
607
  */
608
+ var HardDrive = createLucideIcon("hard-drive", [
609
+ ["path", {
610
+ d: "M10 16h.01",
611
+ key: "1bzywj"
612
+ }],
613
+ ["path", {
614
+ d: "M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",
615
+ key: "18tbho"
616
+ }],
617
+ ["path", {
618
+ d: "M21.946 12.013H2.054",
619
+ key: "zqlbp7"
620
+ }],
621
+ ["path", {
622
+ d: "M6 16h.01",
623
+ key: "1pmjb7"
624
+ }]
625
+ ]);
626
+ /**
627
+ * @license lucide-react v1.17.0 - ISC
628
+ *
629
+ * This source code is licensed under the ISC license.
630
+ * See the LICENSE file in the root directory of this source tree.
631
+ */
455
632
  var Inbox = createLucideIcon("inbox", [["polyline", {
456
633
  points: "22 12 16 12 14 15 10 15 8 12 2 12",
457
634
  key: "o97t9d"
@@ -1049,4 +1226,4 @@ var ZoomOut = createLucideIcon("zoom-out", [
1049
1226
  }]
1050
1227
  ]);
1051
1228
  //#endregion
1052
- export { Inbox as A, ChevronRight as B, Mail as C, LoaderCircle as D, Lock as E, Download as F, ArrowRight as G, Check as H, Clock as I, ArrowDown as K, CircleX as L, FileText as M, ExternalLink as N, ListChecks as O, Expand as P, CircleCheck as R, Maximize2 as S, LogIn as T, Boxes as U, ChevronLeft as V, BookOpen as W, RotateCcw as _, UserRound as a, Moon as b, Terminal as c, Server as d, Send as f, Route as g, Save as h, User as i, Folder as j, KeyRound as k, Sun as l, Search as m, ZoomIn as n, UserPlus as o, SendHorizontal as p, X as r, Trash2 as s, ZoomOut as t, ShieldCheck as u, Pencil as v, LogOut as w, MessageSquarePlus as x, PanelLeft as y, CircleAlert as z };
1229
+ export { Inbox as A, Clock3 as B, Mail as C, LoaderCircle as D, Lock as E, FileText as F, ChevronRight as G, CircleDashed as H, ExternalLink as I, Boxes as J, ChevronLeft as K, Expand as L, Folder as M, FolderKanban as N, ListChecks as O, FolderCog as P, Archive as Q, Download as R, Maximize2 as S, LogIn as T, CircleCheck as U, CircleX as V, CircleAlert as W, ArrowRight as X, BookOpen as Y, ArrowDown as Z, RotateCcw as _, UserRound as a, Moon as b, Terminal as c, Server as d, Send as f, Route as g, Save as h, User as i, HardDrive as j, KeyRound as k, Sun as l, Search as m, ZoomIn as n, UserPlus as o, SendHorizontal as p, Check as q, X as r, Trash2 as s, ZoomOut as t, ShieldCheck as u, Pencil as v, LogOut as w, MessageSquarePlus as x, PanelLeft as y, Clock as z };
@@ -2,10 +2,10 @@ import { o as __toESM } from "./_runtime.mjs";
2
2
  import { c as require_jsx_runtime } from "./_libs/@radix-ui/react-arrow+[...].mjs";
3
3
  import { f as useNavigate, i as useLocation, s as Outlet } from "./_libs/@tanstack/react-router+[...].mjs";
4
4
  import { u as require_react } from "./_libs/@floating-ui/react-dom+[...].mjs";
5
- import { t as Route } from "./_runId-Cag5UaYU.mjs";
6
- //#region node_modules/.nitro/vite/services/ssr/assets/_runId-CJ5_8uS8.js
5
+ import { t as Route } from "./_runId-WZmbo654.mjs";
6
+ //#region node_modules/.nitro/vite/services/ssr/assets/_runId-CmYWNL8A.js
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
- var RunPage = (0, (/* @__PURE__ */ __toESM(require_react())).lazy)(() => import("./_ssr/RunPage-CatpnkFy.mjs").then((module) => ({ default: module.RunPage })));
8
+ var RunPage = (0, (/* @__PURE__ */ __toESM(require_react())).lazy)(() => import("./_ssr/RunPage-B2vhVaj6.mjs").then((module) => ({ default: module.RunPage })));
9
9
  function RunRouteComponent() {
10
10
  const { runId } = Route.useParams();
11
11
  const { tab, view } = Route.useSearch();
@@ -1,6 +1,6 @@
1
1
  import { c as lazyRouteComponent, l as createFileRoute } from "./_libs/@tanstack/react-router+[...].mjs";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/_runId-Cag5UaYU.js
3
- var $$splitComponentImporter = () => import("./_runId-CJ5_8uS8.mjs");
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/_runId-WZmbo654.js
3
+ var $$splitComponentImporter = () => import("./_runId-CmYWNL8A.mjs");
4
4
  var Route = createFileRoute("/runs/$runId")({
5
5
  validateSearch: (search) => {
6
6
  const next = {};
@@ -3,14 +3,15 @@ import { c as require_jsx_runtime } from "../_libs/@radix-ui/react-arrow+[...].m
3
3
  import { d as Link, f as useNavigate, i as useLocation } from "../_libs/@tanstack/react-router+[...].mjs";
4
4
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
5
5
  import { o as useQueryClient, r as useIsFetching } from "../_libs/tanstack__react-query.mjs";
6
- import { l as useRuns, r as useDeleteRun } from "./hooks-COIYuQzf.mjs";
6
+ import { g as useRuns, o as useDeleteRun, u as useProjects } from "./hooks-DrgN35zn.mjs";
7
7
  import { t as cn } from "./utils-C_uf36nf.mjs";
8
8
  import { a as Root2, i as Portal2, n as Item2, o as Separator2, r as Label2, s as Trigger, t as Content2 } from "../_libs/@radix-ui/react-dropdown-menu+[...].mjs";
9
9
  import { t as Button } from "./button-Btfpc86G.mjs";
10
- import { O as ListChecks, W as BookOpen, a as UserRound, d as Server, m as Search, s as Trash2, u as ShieldCheck, w as LogOut, y as PanelLeft } from "../_libs/lucide-react.mjs";
10
+ import { i as splitProjectsByStatus, n as projectLabelForRun, t as groupRunsByProject } from "./project-navigation-DI77TL9a.mjs";
11
+ import { M as Folder, N as FolderKanban, O as ListChecks, Q as Archive, Y as BookOpen, a as UserRound, d as Server, m as Search, s as Trash2, u as ShieldCheck, w as LogOut, y as PanelLeft } from "../_libs/lucide-react.mjs";
11
12
  import { a as buildRedirectTargetFromLocation, c as isProtectedConsolePath, l as sanitizeRedirectTarget, n as FlakesMark, r as ThemeToggle, s as isAuthRoutePath, t as ConsoleBrand } from "./auth-redirect-BI2bC7qX.mjs";
12
13
  import { t as authClient } from "./auth-validation-D9jyYJqc.mjs";
13
- //#region node_modules/.nitro/vite/services/ssr/assets/App-CwFtUgAz.js
14
+ //#region node_modules/.nitro/vite/services/ssr/assets/App-CUx8Ftit.js
14
15
  var import_jsx_runtime = require_jsx_runtime();
15
16
  var import_react = /* @__PURE__ */ __toESM(require_react());
16
17
  function DropdownMenu$1({ ...props }) {
@@ -220,19 +221,29 @@ function SidebarDocumentationLink(props) {
220
221
  });
221
222
  }
222
223
  function PrimaryNav(props) {
223
- const items = [{
224
- to: "/runs",
225
- label: "Runs",
226
- detail: "Task runs",
227
- icon: ListChecks,
228
- active: props.pathname === "/" || props.pathname.startsWith("/runs")
229
- }, {
230
- to: "/sandboxes",
231
- label: "Sandboxes",
232
- detail: "Run task placement",
233
- icon: Server,
234
- active: props.pathname.startsWith("/sandboxes")
235
- }];
224
+ const items = [
225
+ {
226
+ to: "/runs",
227
+ label: "Runs",
228
+ detail: "Task runs",
229
+ icon: ListChecks,
230
+ active: props.pathname === "/" || props.pathname.startsWith("/runs")
231
+ },
232
+ {
233
+ to: "/projects",
234
+ label: "Projects",
235
+ detail: "Project runs",
236
+ icon: FolderKanban,
237
+ active: props.pathname.startsWith("/projects")
238
+ },
239
+ {
240
+ to: "/sandboxes",
241
+ label: "Sandboxes",
242
+ detail: "Run task placement",
243
+ icon: Server,
244
+ active: props.pathname.startsWith("/sandboxes")
245
+ }
246
+ ];
236
247
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", {
237
248
  "aria-label": "Console sections",
238
249
  className: cn("grid gap-1 border-b border-sidebar-border p-2", props.collapsed && "justify-items-center"),
@@ -309,6 +320,10 @@ function Breadcrumb(props) {
309
320
  className: "text-foreground",
310
321
  children: "Documentation"
311
322
  });
323
+ if (segments[0] === "projects") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
324
+ className: "text-foreground",
325
+ children: "Projects"
326
+ });
312
327
  if (segments[0] === "sandboxes") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
313
328
  className: "text-foreground",
314
329
  children: "Sandboxes"
@@ -410,23 +425,20 @@ function ConnectionChip(props) {
410
425
  }), token.label]
411
426
  });
412
427
  }
413
- /**
414
- * Read-only session navigator: the token's runs (newest first), optionally
415
- * grouped by `run.metadata.project` with an Inbox for the rest. No authoring
416
- * here — runs come from the orchestrator/CLI. Shares the runs query the shell
417
- * already polls.
418
- */
428
+ /** Read-only project and run navigator backed by the Projects and Runs APIs. */
419
429
  function SessionList() {
420
430
  const [searchOpen, setSearchOpen] = (0, import_react.useState)(false);
421
431
  const runs = useRuns();
432
+ const projects = useProjects();
422
433
  const loaded = (runs.data?.pages ?? []).flatMap((page) => page.runs);
423
- if (loaded.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
424
- className: "min-h-0 flex-1 px-3 py-2 text-xs text-muted-foreground",
425
- children: runs.isPending ? "Loading sessions…" : "No sessions yet."
426
- });
427
- const groups = groupByProject(loaded);
428
- const hasProjects = groups.some((group) => group.project !== null);
434
+ const projectList = projects.data?.projects ?? [];
435
+ const groups = groupRunsByProject(projectList, loaded);
429
436
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
437
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProjectSidebarSection, {
438
+ projects: projectList,
439
+ loading: projects.isPending && projects.data === void 0,
440
+ error: projects.isError && projects.data === void 0 ? String(projects.error) : null
441
+ }),
430
442
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
431
443
  className: "border-b border-sidebar-border p-2",
432
444
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
@@ -448,24 +460,89 @@ function SessionList() {
448
460
  }),
449
461
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
450
462
  className: "min-h-0 flex-1 overflow-y-auto px-2 py-2",
451
- children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
452
- className: "mb-3",
453
- children: [group.project !== null || hasProjects ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
454
- className: "console-callout truncate px-2 pt-1 pb-1.5",
455
- children: group.project ?? "Inbox"
456
- }) : null, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
457
- className: "grid gap-0.5",
458
- children: group.runs.map((run) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionLink, { run }, run.runId))
459
- })]
460
- }, group.project ?? "__inbox"))
463
+ children: loaded.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
464
+ className: "px-1 py-2 text-xs text-muted-foreground",
465
+ children: runs.isPending ? "Loading sessions…" : "No sessions yet."
466
+ }) : groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionGroup, { group }, group.id))
461
467
  }),
462
468
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunSearchDialog, {
463
469
  open: searchOpen,
464
470
  runs: loaded,
471
+ projects: projectList,
465
472
  onOpenChange: setSearchOpen
466
473
  })
467
474
  ] });
468
475
  }
476
+ function ProjectSidebarSection(props) {
477
+ const { active } = splitProjectsByStatus(props.projects);
478
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
479
+ className: "border-b border-sidebar-border px-2 py-2",
480
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
481
+ className: "mb-1 flex items-center justify-between gap-2 px-2",
482
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
483
+ className: "console-callout truncate",
484
+ children: "Active projects"
485
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
486
+ to: "/projects",
487
+ className: "font-mono text-[10px] uppercase tracking-[0.08em] text-muted-foreground transition-colors hover:text-foreground",
488
+ children: "View"
489
+ })]
490
+ }), props.loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
491
+ className: "px-2 py-1.5 text-xs text-muted-foreground",
492
+ children: "Loading projects…"
493
+ }) : props.error !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
494
+ className: "px-2 py-1.5 text-xs text-status-failed",
495
+ children: "Projects unavailable"
496
+ }) : active.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
497
+ className: "px-2 py-1.5 text-xs text-muted-foreground",
498
+ children: "No active projects."
499
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
500
+ className: "grid gap-0.5",
501
+ children: active.map((project) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
502
+ to: "/runs",
503
+ search: { project: project.projectKey },
504
+ title: project.name,
505
+ className: "flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:outline-none",
506
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Folder, {
507
+ className: "size-3.5 shrink-0",
508
+ "aria-hidden": "true"
509
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
510
+ className: "min-w-0 flex-1",
511
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
512
+ className: "block truncate font-medium",
513
+ children: project.name
514
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
515
+ className: "block truncate font-mono text-[10px] text-muted-foreground",
516
+ children: project.projectKey
517
+ })]
518
+ })]
519
+ }, project.projectId))
520
+ })]
521
+ });
522
+ }
523
+ function SessionGroup(props) {
524
+ const archived = props.group.project?.status === "archived";
525
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
526
+ className: "mb-3",
527
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
528
+ className: "flex min-w-0 items-center gap-1.5 px-2 pt-1 pb-1.5",
529
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
530
+ className: "console-callout min-w-0 flex-1 truncate",
531
+ children: props.group.label
532
+ }), archived ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
533
+ title: "Archived project",
534
+ className: "inline-flex shrink-0 items-center gap-1 rounded border border-sidebar-border px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-[0.08em] text-muted-foreground",
535
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Archive, {
536
+ className: "size-3",
537
+ "aria-hidden": "true"
538
+ }), "Archived"]
539
+ }) : null]
540
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
541
+ className: "grid gap-0.5",
542
+ children: props.group.runs.map((run) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionLink, { run }, run.runId))
543
+ })]
544
+ });
545
+ }
469
546
  function RunSearchDialog(props) {
470
547
  const navigate = useNavigate();
471
548
  const inputRef = (0, import_react.useRef)(null);
@@ -496,7 +573,7 @@ function RunSearchDialog(props) {
496
573
  return () => window.removeEventListener("keydown", onKeyDown);
497
574
  }, [props.onOpenChange]);
498
575
  if (!props.open) return null;
499
- const results = filterRuns(props.runs, query).slice(0, 12);
576
+ const results = filterRuns(props.runs, props.projects, query).slice(0, 12);
500
577
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
501
578
  className: "fixed inset-0 z-50 bg-background/65 p-4",
502
579
  role: "dialog",
@@ -646,14 +723,14 @@ function SessionLink(props) {
646
723
  }) : null]
647
724
  });
648
725
  }
649
- function filterRuns(runs, query) {
726
+ function filterRuns(runs, projects, query) {
650
727
  const needle = query.trim().toLowerCase();
651
728
  if (needle.length === 0) return runs;
652
729
  return runs.filter((run) => [
653
730
  run.name,
654
731
  run.runId,
655
732
  run.state,
656
- typeof run.metadata?.project === "string" ? run.metadata.project : void 0
733
+ projectLabelForRun(projects, run)
657
734
  ].some((value) => value?.toLowerCase().includes(needle)));
658
735
  }
659
736
  function sidebarTaskProgress(run) {
@@ -681,29 +758,6 @@ var deletableRunStates = new Set([
681
758
  "CANCELLED",
682
759
  "STALLED"
683
760
  ]);
684
- /** Optional grouping by run.metadata.project; ungrouped runs fall to an Inbox. */
685
- function groupByProject(runs) {
686
- const projects = /* @__PURE__ */ new Map();
687
- const inbox = [];
688
- for (const run of runs) {
689
- const project = typeof run.metadata?.project === "string" ? run.metadata.project : void 0;
690
- if (project !== void 0 && project.length > 0) {
691
- const list = projects.get(project) ?? [];
692
- list.push(run);
693
- projects.set(project, list);
694
- } else inbox.push(run);
695
- }
696
- const groups = [];
697
- for (const project of [...projects.keys()].sort()) groups.push({
698
- project,
699
- runs: projects.get(project) ?? []
700
- });
701
- if (inbox.length > 0) groups.push({
702
- project: null,
703
- runs: inbox
704
- });
705
- return groups;
706
- }
707
761
  function sessionStateDot(state) {
708
762
  switch (state.toLowerCase()) {
709
763
  case "running": return "bg-status-running";