constellai 0.3.3 → 0.3.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 (252) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/(app)/activity/page.js +2 -2
  5. package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  6. package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  7. package/.next/server/app/(app)/agents/[handle]/page.js +3 -3
  8. package/.next/server/app/(app)/agents/[handle]/page.js.nft.json +1 -1
  9. package/.next/server/app/(app)/agents/[handle]/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/(app)/code/page.js +2 -2
  11. package/.next/server/app/(app)/code/page.js.nft.json +1 -1
  12. package/.next/server/app/(app)/code/page_client-reference-manifest.js +1 -1
  13. package/.next/server/app/(app)/config/page.js +2 -2
  14. package/.next/server/app/(app)/config/page.js.nft.json +1 -1
  15. package/.next/server/app/(app)/config/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/(app)/costs/page.js +2 -2
  17. package/.next/server/app/(app)/costs/page.js.nft.json +1 -1
  18. package/.next/server/app/(app)/costs/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/(app)/cron/page.js +2 -2
  20. package/.next/server/app/(app)/cron/page.js.nft.json +1 -1
  21. package/.next/server/app/(app)/cron/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/(app)/dashboard/page.js +2 -2
  23. package/.next/server/app/(app)/dashboard/page.js.nft.json +1 -1
  24. package/.next/server/app/(app)/dashboard/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/(app)/design/page.js +44 -44
  26. package/.next/server/app/(app)/design/page.js.nft.json +1 -1
  27. package/.next/server/app/(app)/design/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/(app)/docs/[id]/page.js +2 -2
  29. package/.next/server/app/(app)/docs/[id]/page.js.nft.json +1 -1
  30. package/.next/server/app/(app)/docs/[id]/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/(app)/docs/page.js +2 -2
  32. package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
  33. package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/(app)/github/page.js +2 -2
  35. package/.next/server/app/(app)/github/page.js.nft.json +1 -1
  36. package/.next/server/app/(app)/github/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/(app)/goals/page.js +2 -2
  38. package/.next/server/app/(app)/goals/page.js.nft.json +1 -1
  39. package/.next/server/app/(app)/goals/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/(app)/inbox/page.js +2 -2
  41. package/.next/server/app/(app)/inbox/page.js.nft.json +1 -1
  42. package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/(app)/knowledge/page.js +3 -3
  44. package/.next/server/app/(app)/knowledge/page.js.nft.json +1 -1
  45. package/.next/server/app/(app)/knowledge/page_client-reference-manifest.js +1 -1
  46. package/.next/server/app/(app)/models/page.js +2 -2
  47. package/.next/server/app/(app)/models/page.js.nft.json +1 -1
  48. package/.next/server/app/(app)/models/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/(app)/notifications/page.js +2 -2
  50. package/.next/server/app/(app)/notifications/page.js.nft.json +1 -1
  51. package/.next/server/app/(app)/notifications/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/(app)/org/page.js +3 -3
  53. package/.next/server/app/(app)/org/page.js.nft.json +1 -1
  54. package/.next/server/app/(app)/org/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/(app)/organizations/page.js +2 -2
  56. package/.next/server/app/(app)/organizations/page.js.nft.json +1 -1
  57. package/.next/server/app/(app)/organizations/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/(app)/page.js +3 -3
  59. package/.next/server/app/(app)/page.js.nft.json +1 -1
  60. package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/(app)/planner/page.js +2 -2
  62. package/.next/server/app/(app)/planner/page.js.nft.json +1 -1
  63. package/.next/server/app/(app)/planner/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/(app)/plugins/page.js +2 -2
  65. package/.next/server/app/(app)/plugins/page.js.nft.json +1 -1
  66. package/.next/server/app/(app)/plugins/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/(app)/pm/page.js +2 -2
  68. package/.next/server/app/(app)/pm/page.js.nft.json +1 -1
  69. package/.next/server/app/(app)/pm/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/(app)/prepare-deploy/page.js +2 -2
  71. package/.next/server/app/(app)/prepare-deploy/page.js.nft.json +1 -1
  72. package/.next/server/app/(app)/prepare-deploy/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/(app)/profile/page.js +2 -2
  74. package/.next/server/app/(app)/profile/page.js.nft.json +1 -1
  75. package/.next/server/app/(app)/profile/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/(app)/pulse/page.js +2 -2
  77. package/.next/server/app/(app)/pulse/page.js.nft.json +1 -1
  78. package/.next/server/app/(app)/pulse/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/(app)/reports/[id]/page.js +3 -3
  80. package/.next/server/app/(app)/reports/[id]/page.js.nft.json +1 -1
  81. package/.next/server/app/(app)/reports/[id]/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/(app)/reports/page.js +3 -3
  83. package/.next/server/app/(app)/reports/page.js.nft.json +1 -1
  84. package/.next/server/app/(app)/reports/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/(app)/routines/page.js +1 -1
  86. package/.next/server/app/(app)/routines/page.js.nft.json +1 -1
  87. package/.next/server/app/(app)/routines/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/(app)/search/page.js +2 -2
  89. package/.next/server/app/(app)/search/page.js.nft.json +1 -1
  90. package/.next/server/app/(app)/search/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app/(app)/security/page.js +2 -2
  92. package/.next/server/app/(app)/security/page.js.nft.json +1 -1
  93. package/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/(app)/skills/page.js +3 -3
  95. package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
  96. package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app/(app)/tasks/page.js +2 -2
  98. package/.next/server/app/(app)/tasks/page.js.nft.json +1 -1
  99. package/.next/server/app/(app)/tasks/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/(app)/test-dev/page.js +2 -2
  101. package/.next/server/app/(app)/test-dev/page.js.nft.json +1 -1
  102. package/.next/server/app/(app)/test-dev/page_client-reference-manifest.js +1 -1
  103. package/.next/server/app/(app)/update/page.js +2 -2
  104. package/.next/server/app/(app)/update/page.js.nft.json +1 -1
  105. package/.next/server/app/(app)/update/page_client-reference-manifest.js +1 -1
  106. package/.next/server/app/(auth)/login/page.js +2 -2
  107. package/.next/server/app/(auth)/login/page.js.nft.json +1 -1
  108. package/.next/server/app/(auth)/login/page_client-reference-manifest.js +1 -1
  109. package/.next/server/app/(auth)/onboarding/page.js +2 -2
  110. package/.next/server/app/(auth)/onboarding/page.js.nft.json +1 -1
  111. package/.next/server/app/(auth)/onboarding/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/_global-error/page.js +1 -1
  113. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  114. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  115. package/.next/server/app/_global-error.html +1 -1
  116. package/.next/server/app/_global-error.rsc +3 -3
  117. package/.next/server/app/_global-error.segments/_full.segment.rsc +3 -3
  118. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  119. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  120. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  121. package/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
  122. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  123. package/.next/server/app/_not-found/page.js +1 -1
  124. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  125. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/cron/tick/route.js +2 -2
  127. package/.next/server/app/api/sync/file/route.js +2 -2
  128. package/.next/server/app/api/telegram/poll/route.js +2 -2
  129. package/.next/server/app/api/v1/[[...path]]/route.js +1 -1
  130. package/.next/server/chunks/1249.js +7 -7
  131. package/.next/server/chunks/1845.js +1 -1
  132. package/.next/server/chunks/212.js +1 -0
  133. package/.next/server/chunks/259.js +1 -1
  134. package/.next/server/chunks/260.js +1 -1
  135. package/.next/server/chunks/2867.js +1 -1
  136. package/.next/server/chunks/2960.js +1 -1
  137. package/.next/server/chunks/3131.js +1 -1
  138. package/.next/server/chunks/3234.js +1 -1
  139. package/.next/server/chunks/4979.js +2 -2
  140. package/.next/server/chunks/6381.js +15 -0
  141. package/.next/server/chunks/6431.js +1 -1
  142. package/.next/server/chunks/6853.js +12 -0
  143. package/.next/server/chunks/6954.js +1 -0
  144. package/.next/server/chunks/7589.js +1 -1
  145. package/.next/server/chunks/7989.js +1 -1
  146. package/.next/server/chunks/8561.js +1 -1
  147. package/.next/server/chunks/8623.js +1 -1
  148. package/.next/server/chunks/8762.js +417 -15
  149. package/.next/server/chunks/8823.js +1 -1
  150. package/.next/server/chunks/9215.js +4 -0
  151. package/.next/server/chunks/9229.js +1 -0
  152. package/.next/server/chunks/9310.js +21 -0
  153. package/.next/server/chunks/9783.js +1 -1
  154. package/.next/server/middleware-build-manifest.js +1 -1
  155. package/.next/server/pages/500.html +1 -1
  156. package/.next/server/server-reference-manifest.js +1 -1
  157. package/.next/server/server-reference-manifest.json +1 -1
  158. package/.next/static/chunks/2692-7fee6e06b3c93940.js +1 -0
  159. package/.next/static/chunks/2997-ec8b18227849683e.js +1 -0
  160. package/.next/static/chunks/3219-b4941c7ff967e904.js +1 -0
  161. package/.next/static/chunks/6602-f26d109fd94cee1d.js +4 -0
  162. package/.next/static/chunks/8370-2733742abf5f3ddf.js +12 -0
  163. package/.next/static/chunks/{5332-84d9a65aa5d16106.js → 9112-c37628abc8a164cd.js} +1 -1
  164. package/.next/static/chunks/app/(app)/activity/{page-0f51a22d4f2207b2.js → page-29e80a32c02f376b.js} +1 -1
  165. package/.next/static/chunks/app/(app)/agents/[handle]/page-83277413debb3b25.js +1 -0
  166. package/.next/static/chunks/app/(app)/code/page-1f954f7688bc24e4.js +1 -0
  167. package/.next/static/chunks/app/(app)/config/page-eee4f8736608afa5.js +1 -0
  168. package/.next/static/chunks/app/(app)/costs/page-0beac688917eaa30.js +1 -0
  169. package/.next/static/chunks/app/(app)/cron/{page-ab35783e4341f6b7.js → page-a4dd65c78173b872.js} +1 -1
  170. package/.next/static/chunks/app/(app)/dashboard/page-519a934ccfcce6fa.js +1 -0
  171. package/.next/static/chunks/app/(app)/design/{page-fcee2dfd5c7e3a4b.js → page-238be90d78d22780.js} +3 -3
  172. package/.next/static/chunks/app/(app)/docs/[id]/page-e29afa1ba1a086e1.js +1 -0
  173. package/.next/static/chunks/app/(app)/docs/page-b4462f9ca2118f8b.js +1 -0
  174. package/.next/static/chunks/app/(app)/github/page-cf8501e45fe38663.js +1 -0
  175. package/.next/static/chunks/app/(app)/goals/page-75c36155c162df5b.js +1 -0
  176. package/.next/static/chunks/app/(app)/inbox/page-f40bdb457609ddad.js +12 -0
  177. package/.next/static/chunks/app/(app)/knowledge/page-dc5dd15e4f0ad22e.js +1 -0
  178. package/.next/static/chunks/app/(app)/layout-408976a4d35f06a8.js +1 -0
  179. package/.next/static/chunks/app/(app)/models/page-a54e0b8ffed0085c.js +1 -0
  180. package/.next/static/chunks/app/(app)/notifications/page-1f84d74bc53c2c6c.js +12 -0
  181. package/.next/static/chunks/app/(app)/org/page-d17c62b7a668b399.js +12 -0
  182. package/.next/static/chunks/app/(app)/organizations/page-b55445f226cf8c61.js +1 -0
  183. package/.next/static/chunks/app/(app)/{page-54a99a54295a40be.js → page-c7dd52ecc2da529d.js} +1 -1
  184. package/.next/static/chunks/app/(app)/planner/page-920e439e6f88c238.js +1 -0
  185. package/.next/static/chunks/app/(app)/plugins/{page-e75d982132825b07.js → page-d10239fcbabdf4fa.js} +1 -1
  186. package/.next/static/chunks/app/(app)/pm/page-61ad11558f241cf1.js +1 -0
  187. package/.next/static/chunks/app/(app)/prepare-deploy/page-8d25f86b26ab0d2e.js +1 -0
  188. package/.next/static/chunks/app/(app)/profile/page-236673e1a8c1e6c6.js +1 -0
  189. package/.next/static/chunks/app/(app)/pulse/{page-1a63c4ed76db48f5.js → page-f2c6049a967b93a3.js} +1 -1
  190. package/.next/static/chunks/app/(app)/reports/[id]/{page-ab35783e4341f6b7.js → page-a4dd65c78173b872.js} +1 -1
  191. package/.next/static/chunks/app/(app)/reports/page-5c07fa3a8b5ba553.js +1 -0
  192. package/.next/static/chunks/app/(app)/routines/page-0193e84e6a60a06a.js +1 -0
  193. package/.next/static/chunks/app/(app)/search/{page-d30f1c44c95e14a3.js → page-07e037c487f14c35.js} +1 -1
  194. package/.next/static/chunks/app/(app)/security/{page-4640d72a0b360f05.js → page-71e5d992b5ddf79a.js} +1 -1
  195. package/.next/static/chunks/app/(app)/skills/page-72691864856c9906.js +1 -0
  196. package/.next/static/chunks/app/(app)/tasks/page-5c9ca8f83d4c904f.js +1 -0
  197. package/.next/static/chunks/app/(app)/test-dev/page-5aee630d9bc73a0b.js +1 -0
  198. package/.next/static/chunks/app/(app)/update/page-2c9bcdb65bd2f597.js +1 -0
  199. package/.next/static/chunks/app/(auth)/login/page-50033813b56469ee.js +1 -0
  200. package/.next/static/chunks/app/(auth)/onboarding/{page-0cd7cd9fa146a927.js → page-075fd9673f7ab241.js} +1 -1
  201. package/.next/static/chunks/app/_not-found/page-dc38b02aebeab535.js +1 -0
  202. package/.next/trace-build +1 -1
  203. package/CHANGELOG.md +45 -3
  204. package/README.md +1 -1
  205. package/README.pt-BR.md +1 -1
  206. package/bin/constella-update.mjs +44 -0
  207. package/docs/UPDATE.md +38 -7
  208. package/package.json +1 -1
  209. package/scripts/vps-install.sh +25 -0
  210. package/scripts/vps-update.sh +24 -0
  211. package/.next/server/chunks/3174.js +0 -12
  212. package/.next/server/chunks/3334.js +0 -1
  213. package/.next/server/chunks/3439.js +0 -4
  214. package/.next/server/chunks/478.js +0 -1
  215. package/.next/server/chunks/5086.js +0 -417
  216. package/.next/server/chunks/8195.js +0 -21
  217. package/.next/server/chunks/8244.js +0 -1
  218. package/.next/static/chunks/3219-9684aa1c634212de.js +0 -1
  219. package/.next/static/chunks/386-0f2b8d23016cf4d0.js +0 -1
  220. package/.next/static/chunks/4909-9f16a714c78ed30d.js +0 -4
  221. package/.next/static/chunks/5664-3cb5735f1b5bbde1.js +0 -1
  222. package/.next/static/chunks/8370-7ec9e9bf414f8f2d.js +0 -12
  223. package/.next/static/chunks/app/(app)/agents/[handle]/page-14805dd54a1333e8.js +0 -1
  224. package/.next/static/chunks/app/(app)/code/page-7ebd6923ac440103.js +0 -1
  225. package/.next/static/chunks/app/(app)/config/page-47b5b62b73050673.js +0 -1
  226. package/.next/static/chunks/app/(app)/costs/page-969eba498344314d.js +0 -1
  227. package/.next/static/chunks/app/(app)/dashboard/page-59521ad116c60a88.js +0 -1
  228. package/.next/static/chunks/app/(app)/docs/[id]/page-b3451b21d7d2127b.js +0 -1
  229. package/.next/static/chunks/app/(app)/docs/page-3a34eec67591ce3e.js +0 -1
  230. package/.next/static/chunks/app/(app)/github/page-a0117637dc143821.js +0 -1
  231. package/.next/static/chunks/app/(app)/goals/page-d1cb2552625ccadb.js +0 -1
  232. package/.next/static/chunks/app/(app)/inbox/page-dbfc885cd61f9b9f.js +0 -12
  233. package/.next/static/chunks/app/(app)/knowledge/page-29df476a9c2f930c.js +0 -1
  234. package/.next/static/chunks/app/(app)/layout-2b6b23e82fbf0211.js +0 -1
  235. package/.next/static/chunks/app/(app)/models/page-ea54a5d167cd3cc2.js +0 -1
  236. package/.next/static/chunks/app/(app)/notifications/page-ef1ac55efadb2a1a.js +0 -12
  237. package/.next/static/chunks/app/(app)/org/page-a7c734b8d86f7641.js +0 -12
  238. package/.next/static/chunks/app/(app)/organizations/page-4bcec3010a9d9119.js +0 -1
  239. package/.next/static/chunks/app/(app)/planner/page-adfd05afc6ddcbef.js +0 -1
  240. package/.next/static/chunks/app/(app)/pm/page-773626398c10fdb7.js +0 -1
  241. package/.next/static/chunks/app/(app)/prepare-deploy/page-01f767248e7fa2a7.js +0 -1
  242. package/.next/static/chunks/app/(app)/profile/page-cb2450679785db1a.js +0 -1
  243. package/.next/static/chunks/app/(app)/reports/page-b0bcc85ad4afecf5.js +0 -1
  244. package/.next/static/chunks/app/(app)/routines/page-c0ce223d128a9010.js +0 -1
  245. package/.next/static/chunks/app/(app)/skills/page-87a71bd0a6b0f262.js +0 -1
  246. package/.next/static/chunks/app/(app)/tasks/page-a34a5658aff509ec.js +0 -1
  247. package/.next/static/chunks/app/(app)/test-dev/page-842f8771d36e964b.js +0 -1
  248. package/.next/static/chunks/app/(app)/update/page-64467fa6d8ed737e.js +0 -1
  249. package/.next/static/chunks/app/(auth)/login/page-82964b720ff11bab.js +0 -1
  250. package/.next/static/chunks/app/_not-found/page-489c316e4356f1b7.js +0 -1
  251. /package/.next/static/{Fx06n4huXV42eQUI-Lty0 → vaEtsAmUuKf_DngRqwRUn}/_buildManifest.js +0 -0
  252. /package/.next/static/{Fx06n4huXV42eQUI-Lty0 → vaEtsAmUuKf_DngRqwRUn}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5134],{4526:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>I});var r=a(5076),t=a(8488),n=a(9860),l=a(7814);let i=(0,l.createServerReference)("0069a0375c633fde1b5af25e39b13f2344e4474f6c",l.callServer,void 0,l.findSourceMapURL,"operatorHasOrg"),c=(0,l.createServerReference)("40a6d78084a3eae2f319b09ed1e9a3bc48b030c55c",l.callServer,void 0,l.findSourceMapURL,"completeOnboarding"),o=new Set(["node_modules",".git",".next",".turbo","dist","build","out","coverage",".cache",".pnpm-store",".vercel","vendor",".parcel-cache",".svelte-kit",".nuxt",".astro",".angular",".venv","venv","env","__pycache__",".mypy_cache",".pytest_cache",".ruff_cache",".tox",".nox","htmlcov","site-packages",".eggs",".ipynb_checkpoints","target",".gradle","bin","obj","Pods",".cargo","Carthage",".cxx","DerivedData",".idea",".vscode",".svn",".hg",".vs",".fleet","logs","tmp","temp",".terraform","archives",".testdev"]),d=/\.(py|pyi|pyw|js|jsx|ts|tsx|mjs|cjs|mts|cts|json|jsonc|html?|css|scss|sass|less|styl|md|markdown|mdx|txt|rst|yml|yaml|toml|ini|cfg|conf|env|example|sample|sh|bash|zsh|bat|cmd|ps1|sql|graphql|gql|prisma|xml|svg|vue|svelte|astro|go|rs|java|kt|kts|scala|clj|rb|erb|php|blade|c|h|cpp|cc|hpp|cs|fs|swift|m|mm|dart|lua|r|ex|exs|erl|hrl|gradle|properties|lock|proto|tf|tfvars|dockerfile|dockerignore|gitignore|gitattributes|editorconfig|prettierrc|eslintrc|babelrc|npmrc|nvmrc|browserslistrc)$/i,h=new Set(["dockerfile","makefile","procfile","rakefile","gemfile","brewfile","vagrantfile","license","licence","readme","changelog","authors","contributors","notice","codeowners"]),g=(0,l.createServerReference)("401a8ffed3e8dc7848177474edc403f5a72496d114",l.callServer,void 0,l.findSourceMapURL,"githubReposForToken"),x=(0,l.createServerReference)("00a1472c0197981c7759af669e0698374b558c5b3a",l.callServer,void 0,l.findSourceMapURL,"checkSetupEnv"),u=(0,l.createServerReference)("40ea93891fee122229bface2df45e51ed201c35877",l.callServer,void 0,l.findSourceMapURL,"checkAdapter"),m=(0,l.createServerReference)("4073b4cf374846b740a1e596ce9da014350b4f1281",l.callServer,void 0,l.findSourceMapURL,"testConnection"),p=(0,l.createServerReference)("60698f01a9ec09368c4477b95ff4fe692a9c0ee614",l.callServer,void 0,l.findSourceMapURL,"probeModel"),j=(0,l.createServerReference)("00316e3ba29ffc1699b2c0691b73ac23d7f6e4d1f0",l.callServer,void 0,l.findSourceMapURL,"detectProviders");var b=a(8088),v=a(3730);let f={TypeScript:{slug:"typescript"},JavaScript:{slug:"javascript"},Python:{slug:"python"},Go:{slug:"go",variant:"original-wordmark"},Rust:{slug:"rust"},Java:{slug:"java"},Kotlin:{slug:"kotlin"},"C#":{slug:"csharp"},Ruby:{slug:"ruby"},PHP:{slug:"php"},Elixir:{slug:"elixir"},Swift:{slug:"swift"},"C++":{slug:"cplusplus"},Scala:{slug:"scala"},Dart:{slug:"dart"},C:{slug:"c"},Clojure:{slug:"clojure"},Haskell:{slug:"haskell"},Lua:{slug:"lua"},R:{slug:"r"},"Objective-C":{slug:"objectivec"},Erlang:{slug:"erlang",variant:"plain"},"Node.js":{slug:"nodejs"},Bun:{slug:"bun"},Deno:{slug:"denojs"},"Python 3":{slug:"python"},JVM:{slug:"java"},".NET":{slug:"dotnetcore"},"BEAM (Erlang VM)":{slug:"erlang",variant:"plain"},React:{slug:"react"},Vue:{slug:"vuejs"},Svelte:{slug:"svelte"},Angular:{slug:"angular"},SolidJS:{slug:"solidjs"},"Alpine.js":{slug:"alpinejs"},Ember:{slug:"ember"},Backbone:{slug:"backbonejs"},"HTML/CSS":{slug:"html5"},"Vanilla JS":{slug:"javascript"},"Plain CSS":{slug:"css3"},"Next.js":{slug:"nextjs"},Nuxt:{slug:"nuxtjs"},Remix:{slug:"remix"},SvelteKit:{slug:"svelte"},Astro:{slug:"astro"},Gatsby:{slug:"gatsby"},"Vite (SPA)":{slug:"vitejs"},Hugo:{slug:"hugo"},Jekyll:{slug:"jekyll",variant:"original-wordmark"},NestJS:{slug:"nestjs"},Fastify:{slug:"fastify"},Express:{slug:"express"},Koa:{slug:"koa"},Django:{slug:"django",variant:"plain"},Flask:{slug:"flask"},FastAPI:{slug:"fastapi"},"Spring Boot":{slug:"spring"},Spring:{slug:"spring"},Laravel:{slug:"laravel"},"Ruby on Rails":{slug:"rails"},Gin:{slug:"go",variant:"original-wordmark"},Phoenix:{slug:"phoenix"},"ASP.NET Core":{slug:"dotnetcore"},Nginx:{slug:"nginx"},GraphQL:{slug:"graphql"},Symfony:{slug:"symfony"},CodeIgniter:{slug:"codeigniter"},PostgreSQL:{slug:"postgresql"},MySQL:{slug:"mysql"},MariaDB:{slug:"mariadb"},SQLite:{slug:"sqlite"},MongoDB:{slug:"mongodb"},Redis:{slug:"redis"},Cassandra:{slug:"cassandra"},DynamoDB:{slug:"dynamodb"},Supabase:{slug:"supabase"},Prisma:{slug:"prisma"},Sequelize:{slug:"sequelize"},SQLAlchemy:{slug:"sqlalchemy"},"Tailwind CSS":{slug:"tailwindcss"},"CSS Modules":{slug:"css3"},Sass:{slug:"sass"},MUI:{slug:"materialui"},Bootstrap:{slug:"bootstrap"},Bulma:{slug:"bulma"},Vuetify:{slug:"vuetify"},Docker:{slug:"docker"},Podman:{slug:"podman"},Vercel:{slug:"vercel"},Netlify:{slug:"netlify"},AWS:{slug:"amazonwebservices",variant:"original-wordmark"},GCP:{slug:"googlecloud"},Kubernetes:{slug:"kubernetes"},Azure:{slug:"azure"},Jenkins:{slug:"jenkins"},CircleCI:{slug:"circleci",variant:"plain"},Terraform:{slug:"terraform"},Ansible:{slug:"ansible"},Vagrant:{slug:"vagrant"},RabbitMQ:{slug:"rabbitmq"},Kafka:{slug:"apachekafka"},Auth0:{slug:"auth0",variant:"plain"},Keycloak:{slug:"keycloak"},"React Native":{slug:"react"},Flutter:{slug:"flutter"},Android:{slug:"android"},Ionic:{slug:"ionic"},Xamarin:{slug:"xamarin"},NativeScript:{slug:"nativescript"},TensorFlow:{slug:"tensorflow"},PyTorch:{slug:"pytorch"},"scikit-learn":{slug:"scikitlearn"},Pandas:{slug:"pandas"},NumPy:{slug:"numpy"},Jupyter:{slug:"jupyter"},Jest:{slug:"jest"},Vitest:{slug:"vitest"},Cypress:{slug:"cypressio"},Playwright:{slug:"playwright"},Selenium:{slug:"selenium"},Mocha:{slug:"mocha"},Jasmine:{slug:"jasmine"},Puppeteer:{slug:"puppeteer"},D3:{slug:"d3js"},Grafana:{slug:"grafana"},Firebase:{slug:"firebase"},Appwrite:{slug:"appwrite"},Heroku:{slug:"heroku"}};var y=a(9562),k=a(973),M=a(6816),N=a(8576),S=a(3728),w=a(9265),C=a(5629);let z=["company","ceoModel","connection","stack","brief"];function L({name:e}){let s,a=(s=f[e])?`https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${s.slug}/${s.slug}-${s.variant??"original"}.svg`:null,[n,l]=(0,t.useState)(!1);return!a||n?(0,r.jsx)("span",{className:"sc-mono",children:e.replace(/[^A-Za-z0-9]/g,"").slice(0,2)}):(0,r.jsx)("img",{className:"sc-ico",src:a,alt:"",loading:"lazy",onError:()=>l(!0)})}function F({stack:e,onPick:s,query:a,setQuery:t}){let n=(0,C.k)(),l=a.trim().toLowerCase(),i=l?v.z.flatMap(s=>s.opts.filter(e=>"None"!==e&&(e.toLowerCase().includes(l)||s.label.toLowerCase().includes(l))).map(a=>({cat:s,o:a,bad:(0,y.YL)(e,s.key,a)}))).slice(0,16):[];return(0,r.jsxs)("div",{className:"stack-search-wrap",children:[(0,r.jsxs)("div",{className:"stack-search",children:[(0,r.jsx)(N.I,{name:"search",size:15}),(0,r.jsx)("input",{placeholder:n("onboarding.stackSearchPh"),value:a,onChange:e=>t(e.target.value)}),a&&(0,r.jsx)("button",{className:"ss-clear",onClick:()=>t(""),children:(0,r.jsx)(N.I,{name:"close",size:13})})]}),l&&i.length>0&&(0,r.jsx)("div",{className:"stack-find scroll",children:i.map(({cat:a,o:t,bad:n})=>(0,r.jsxs)("button",{type:"button",className:"stack-find-row"+(n?" disabled":""),disabled:!!n,title:n||(0,v.f)(a.key,t),onClick:()=>{n||s(a.key,t)},children:[(0,r.jsx)(L,{name:t}),(0,r.jsx)("span",{className:"sf-name",children:t}),(0,r.jsx)("span",{className:"sf-cat",children:a.label}),(0,k.Hn)(e[a.key],t)&&(0,r.jsx)(N.I,{name:"check",size:13})]},a.key+t))}),l&&0===i.length&&(0,r.jsx)("div",{className:"stack-find sf-empty",children:n("onboarding.stackNoMatch",{query:a})})]})}function P({step:e}){let s=(0,C.k)();return(0,r.jsx)("div",{className:"onb-steps",children:z.map((a,t)=>(0,r.jsxs)("span",{style:{display:"contents"},children:[t>0&&(0,r.jsx)("span",{className:"onb-sep"}),(0,r.jsxs)("div",{className:"onb-stepdot"+(e===t?" on":e>t?" done":""),children:[(0,r.jsx)("span",{className:"num",children:e>t?"✓":t+1}),(0,r.jsx)("span",{children:s(`onboarding.step.${a}`)})]})]},a))})}function R({adapter:e,model:s,cached:a,onDone:n}){let l=(0,C.k)(),i=[{t:l("onboarding.test.prepare"),d:l("onboarding.test.prepareDesc")},{t:l("onboarding.test.adapter"),d:l("onboarding.test.adapterDesc",{adapter:e})},{t:l("onboarding.test.connection"),d:l("onboarding.test.connectionDesc")},{t:l("onboarding.test.model",{model:s}),d:l("onboarding.test.modelDesc")},{t:l("onboarding.test.ready"),d:l("onboarding.test.readyDesc")}],[c,o]=(0,t.useState)(a?i.length:0),[d,h]=(0,t.useState)(null),[g,j]=(0,t.useState)(null);return(0,t.useEffect)(()=>{if(a)return void o(i.length);let r=!0;return h(null),j(null),(async()=>{let a=[()=>x(),()=>u(e),()=>m(e),()=>p(e,s)];for(let e=0;e<a.length;e++){if(!r)return;o(e);let s=await a[e]();if(!r)return;if(!s.ok){h(e),j(s.error??l("onboarding.test.failed")),n(!1);return}o(e+1)}r&&(o(i.length),n(!0))})(),()=>{r=!1}},[a]),(0,r.jsx)("div",{className:"track",children:i.map((e,s)=>{let a=d===s,t=a?"":s<c?"done":s===c?"on":"todo";return(0,r.jsxs)("div",{className:"track-step "+t,children:[(0,r.jsx)("div",{className:"track-ico",children:a?(0,r.jsx)(N.I,{name:"close",size:15}):"done"===t?(0,r.jsx)(N.I,{name:"check",size:16}):"on"===t?(0,r.jsx)("span",{className:"spin",children:(0,r.jsx)(N.I,{name:"refresh",size:15})}):(0,r.jsx)(N.I,{name:"dot",size:8})}),(0,r.jsxs)("div",{className:"track-main",children:[(0,r.jsx)("div",{className:"track-t",children:e.t}),(0,r.jsx)("div",{className:"track-d",children:a?g:e.d})]})]},s)})})}function I(){let e=(0,n.useRouter)(),s=(0,C.k)(),[a,l]=(0,t.useState)(0),[x,u]=(0,t.useState)(!1);(0,t.useEffect)(()=>{i().then(u).catch(()=>{})},[]);let[m,p]=(0,t.useState)(""),[f,z]=(0,t.useState)(""),[I,H]=(0,t.useState)(""),[A,V]=(0,t.useState)([]),[T,D]=(0,t.useState)(""),[$,q]=(0,t.useState)(""),[_,E]=(0,t.useState)({}),[J,U]=(0,t.useState)(""),[B,W]=(0,t.useState)(""),[O,Q]=(0,t.useState)("You are Ada, the CEO of this company. Plan before building: analyse the brief, design the architecture and rituals, then organise the team."),[K,G]=(0,t.useState)(""),[Y,X]=(0,t.useState)(""),[Z,ee]=(0,t.useState)([]),[es,ea]=(0,t.useState)(!1),[er,et]=(0,t.useState)(""),[en,el]=(0,t.useState)("new"),[ei,ec]=(0,t.useState)(""),[eo,ed]=(0,t.useState)(""),[eh,eg]=(0,t.useState)([]),[ex,eu]=(0,t.useState)(""),[em,ep]=(0,t.useState)(!1),[ej,eb]=(0,t.useState)(""),[ev,ef]=(0,t.useState)([]),[ey,ek]=(0,t.useState)(""),[eM,eN]=(0,t.useState)(""),[eS,ew]=(0,t.useState)(!1),[eC,ez]=(0,t.useState)(0),[eL,eF]=(0,t.useState)(0),[eP,eR]=(0,t.useState)("");async function eI(){ep(!0),eb("");try{let e=await g(ei);if(!e.ok){eb(e.error??s("onboarding.src.listReposFailed")),eg([]);return}ed(e.login??""),eg(e.repos??[]),e.repos?.[0]&&eu(e.repos[0].full)}finally{ep(!1)}}async function eH(e){var a;let r;if(!e||!e.length)return;ew(!0),ez(0),eb(""),ef([]),eN("");let t=Array.from(e),n=(t[0].webkitRelativePath||t[0].name).split("/")[0]||"project",l=t.filter(e=>{var s;let a=(e.webkitRelativePath||e.name).split("/");for(let e=1;e<a.length-1;e++)if(s=a[e],o.has(s))return!1;let r=a[a.length-1];return!/^\.env(\.local|\.development|\.production)?$/i.test(r)&&".DS_Store"!==r&&!!(d.test(r)||h.has(r.toLowerCase()))&&!(e.size>524288)});if(!l.length){ew(!1),eb(s("onboarding.src.noFiles"));return}let i=[];for(let e=0;e<l.length;e++){let s=l[e],a=(s.webkitRelativePath||s.name).split("/").slice(1).join("/");if(a)try{i.push({path:a,content:await s.text()})}catch{}(e%5==0||e===l.length-1)&&ez(Math.round((e+1)/l.length*100))}ef(i),ek(n),eN((a=i.map(e=>e.path),(r=e=>a.some(s=>e.test(s)))(/(^|\/)manage\.py$/)?"Django (Python)":r(/(^|\/)next\.config\.(js|mjs|ts)$/)?"Next.js":r(/\.vue$/)?"Vue":r(/(^|\/)go\.mod$/)?"Go":r(/(^|\/)Cargo\.toml$/i)?"Rust":r(/(^|\/)pom\.xml$/)||r(/(^|\/)build\.gradle/)?"JVM":r(/(^|\/)composer\.json$/)?"PHP":r(/\.py$/)?"Python":r(/(^|\/)package\.json$/)?"Node":"")),ew(!1)}let eA="new"===en||"github"===en&&!!ex||"local"===en&&ev.length>0;async function eV(e){if(!e)return;let s=/\.(html?|css|jsx?|tsx?|md|txt|json|svg)$/i,a=[];for(let r of Array.from(e).slice(0,120)){let e=(r.webkitRelativePath||r.name).replace(/^\/+/,"");if(s.test(e)&&!(r.size>262144))try{a.push({path:e,content:await r.text()})}catch{}}ee(a)}let[eT,eD]=(0,t.useState)(!1),[e$,eq]=(0,t.useState)(""),[e_,eE]=(0,t.useState)(""),[eJ,eU]=(0,t.useState)(""),[eB,eW]=(0,t.useTransition)();(0,t.useEffect)(()=>{j().then(({detected:e})=>{V(e),e[0]&&(D(e[0].id),q(e[0].models[0]??""))})},[]),(0,t.useEffect)(()=>{if(!eB)return void eF(0);eF(8);let e=setInterval(()=>eF(e=>e<92?e+Math.max(1,Math.round((92-e)/12)):e),400);return()=>clearInterval(e)},[eB]);let eO=A.find(e=>e.id===T),eQ=eO?.adapter??"",eK=eQ+":"+$,eG=es&&er===eK,eY=(0,y.hP)(_);function eX(e,s){let a=(0,y.T1)({..._,[e]:(0,k.P_)(_[e],s)});E(a.stack),W(a.removed.map(e=>`${e.opt} was unselected automatically — ${e.reason}.`).join(" "))}return(0,r.jsxs)("div",{className:"onb",children:[(0,r.jsxs)("div",{className:"onb-top",children:[(0,r.jsxs)("div",{className:"onb-brand",children:[(0,r.jsx)(M.J,{size:34,rx:9}),(0,r.jsx)("div",{className:"bw",children:"Constella"})]}),(0,r.jsx)(P,{step:a}),x&&(0,r.jsx)("button",{className:"onb-close",title:s("onboarding.closeSetup"),"aria-label":s("onboarding.closeSetup"),onClick:()=>e.push("/"),children:(0,r.jsx)(N.I,{name:"close",size:16})})]}),(0,r.jsx)("div",{className:"onb-body",children:(0,r.jsxs)("div",{className:"onb-card"+(3===a?" onb-card-wide":""),children:[0===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.company.h")}),(0,r.jsx)("div",{className:"onb-sub",style:{marginBottom:14},children:s("onboarding.company.sub")}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.company.nameLabel")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("input",{className:"form-input",required:!0,autoFocus:!0,value:m,onChange:e=>p(e.target.value),placeholder:s("onboarding.company.namePh")})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.company.missionLabel")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("textarea",{className:"persona-ta",required:!0,value:f,onChange:e=>z(e.target.value),placeholder:s("onboarding.company.missionPh")})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.company.objectiveLabel")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("textarea",{className:"persona-ta",required:!0,value:I,onChange:e=>H(e.target.value),placeholder:s("onboarding.company.objectivePh")})]}),(0,r.jsx)("div",{className:"onb-foot",children:(0,r.jsxs)("button",{className:"btn-accent",disabled:!m.trim()||!f.trim()||!I.trim(),onClick:()=>l(1),children:[s("common.next")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]})})]}),1===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.brain.h")}),(0,r.jsx)("div",{className:"onb-sub",children:s("onboarding.brain.sub")}),(0,r.jsxs)("div",{className:"onb-secrow",children:[(0,r.jsx)("span",{className:"osr-t",children:s("onboarding.brain.detected")}),(0,r.jsx)("span",{className:"osr-line"})]}),(0,r.jsxs)("div",{className:"prov-cards",children:[A.map(e=>(0,r.jsxs)("div",{className:"prov-card "+("local"===e.kind?"local-card":"cloud-card")+(T===e.id?" on":""),onClick:()=>{D(e.id),q(e.models[0]??"")},children:[(0,r.jsx)("span",{className:"pc-badge",children:s(`onboarding.kind.${e.kind}`)}),(0,r.jsx)(w.W,{id:e.id,size:42}),(0,r.jsx)("div",{className:"pc-name",children:e.name}),(0,r.jsx)("div",{className:"pc-sub",children:e.adapter})]},e.id)),0===A.length&&(0,r.jsx)("div",{className:"muted",style:{fontSize:12.5,padding:12},children:s("onboarding.brain.detecting")})]}),(0,r.jsxs)("button",{className:"btn-ghost",style:{marginTop:10},onClick:()=>eD(e=>!e),children:[(0,r.jsx)(N.I,{name:"add",size:13})," ",s("onboarding.brain.registerToggle")]}),eT&&(0,r.jsxs)("div",{className:"card",style:{marginTop:10},children:[(0,r.jsx)("div",{className:"detail-label",children:s("onboarding.brain.registerTitle")}),(0,r.jsx)(S.m,{value:e$,placeholder:s("onboarding.brain.chooseProvider"),options:b.WQ.filter(e=>"unsupported"!==e.status).map(e=>({value:e.id,label:e.displayName,glyphId:e.id})),onChange:eq,glyph:!0}),(0,r.jsxs)("div",{className:"set-grid",style:{marginTop:8},children:[(0,r.jsx)("input",{className:"form-input mono",placeholder:s("onboarding.brain.modelIdPh"),value:eJ,onChange:e=>eU(e.target.value)}),(0,r.jsx)("input",{className:"form-input mono",type:"password",placeholder:s("onboarding.brain.apiKeyPh"),value:e_,onChange:e=>eE(e.target.value)})]}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:10},children:[(0,r.jsx)("button",{className:"btn-ghost",onClick:()=>eD(!1),children:s("common.cancel")}),(0,r.jsxs)("button",{className:"btn-accent",disabled:!e$,onClick:function(){let e=b.WQ.find(e=>e.id===e$);if(!e)return;let s={id:e.id,name:e.displayName,adapter:e.defaultAdapter,kind:"cli"===e.category?"cli":"local_runtime"===e.category?"local":"cloud",models:eJ.trim()?[eJ.trim()]:[]};V(e=>e.find(e=>e.id===s.id)?e:[...e,s]),D(s.id),q(eJ.trim()||""),eD(!1)},children:[(0,r.jsx)(N.I,{name:"check",size:13})," ",s("onboarding.brain.addSelect")]})]})]}),eO&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"onb-secrow",children:[(0,r.jsx)("span",{className:"osr-t",children:s("onboarding.brain.modelFor",{name:eO.name})}),(0,r.jsx)("span",{className:"osr-line"})]}),(0,r.jsx)(S.m,{mono:!0,value:$,options:eO.models.map(e=>({value:e,label:e})),onChange:q})]}),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",onClick:()=>l(0),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsxs)("button",{className:"btn-accent",disabled:!eO||!$,onClick:()=>l(2),children:[s("common.next")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]})]})]}),2===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.setup.h")}),(0,r.jsxs)("div",{className:"onb-sub",children:[s("onboarding.setup.sub")," ",(0,r.jsx)("b",{style:{color:"var(--text)"},children:eQ})," \xb7 ",(0,r.jsx)("b",{style:{color:"var(--text)"},children:$}),"."]}),(0,r.jsx)(R,{adapter:eQ,model:$,cached:eG,onDone:e=>{ea(e),et(eK)}}),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",onClick:()=>l(1),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsx)("button",{className:"btn-accent",disabled:!eG,onClick:()=>l(3),children:eG?(0,r.jsxs)(r.Fragment,{children:[s("onboarding.setup.continue")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]}):s("onboarding.setup.testing")})]})]}),3===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.stack.h")}),(0,r.jsx)("div",{className:"onb-sub",children:s("onboarding.stack.sub")}),eY&&(0,r.jsxs)("div",{className:"modal-hint",style:{color:"var(--sx-number)"},children:[(0,r.jsx)(N.I,{name:"pulse",size:12})," ",eY]}),B&&(0,r.jsxs)("div",{className:"modal-hint",style:{color:"var(--sx-keyword)"},children:[(0,r.jsx)(N.I,{name:"warn",size:12})," ",B]}),(0,r.jsx)(F,{stack:_,onPick:eX,query:J,setQuery:U}),v.z.map(e=>(0,r.jsxs)("div",{className:"stack-cat",children:[(0,r.jsxs)("div",{className:"onb-secrow",children:[(0,r.jsx)("span",{className:"osr-t",children:e.label}),(0,r.jsx)("span",{className:"osr-pick",children:_[e.key]||"—"}),(0,r.jsx)("span",{className:"osr-line"})]}),(0,r.jsx)("div",{className:"stack-cards",children:e.opts.map(s=>{let a=(0,y.YL)(_,e.key,s),t=(0,k.Hn)(_[e.key],s);return(0,r.jsxs)("button",{className:"stack-card"+(t?" on":"")+(a?" disabled":""),disabled:!!a&&!t,title:a||(0,v.f)(e.key,s),onClick:()=>!a&&eX(e.key,s),children:[(0,r.jsx)(L,{name:s}),(0,r.jsx)("span",{className:"sc-name",children:s}),t&&(0,r.jsx)("span",{className:"sc-check",children:(0,r.jsx)(N.I,{name:"check",size:12})})]},s)})})]},e.key)),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",onClick:()=>l(2),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsxs)("button",{className:"btn-accent",onClick:()=>l(4),children:[s("common.next")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]})]})]}),4===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.brief.h")}),(0,r.jsx)("div",{className:"onb-sub",children:s("onboarding.brief.sub")}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsx)("label",{className:"form-label",children:s("onboarding.brief.sourceLabel")}),(0,r.jsx)("div",{className:"src-cards",children:["new","github","local"].map(e=>(0,r.jsxs)("button",{type:"button",className:"src-card"+(en===e?" on":""),onClick:()=>{el(e),eb("")},children:[(0,r.jsx)(N.I,{name:"new"===e?"add":"github"===e?"git":"files",size:18}),(0,r.jsx)("div",{className:"src-t",children:s(`onboarding.src.${e}.t`)}),(0,r.jsx)("div",{className:"src-d",children:s(`onboarding.src.${e}.d`)})]},e))}),"github"===en&&(0,r.jsxs)("div",{className:"card",style:{marginTop:10,display:"grid",gap:8},children:[(0,r.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,r.jsx)("input",{className:"form-input mono",type:"password",placeholder:s("onboarding.src.tokenPh"),value:ei,onChange:e=>ec(e.target.value)}),(0,r.jsx)("button",{className:"btn-ghost",disabled:em||ei.trim().length<7,onClick:eI,children:em?"…":s("onboarding.src.listRepos")})]}),eh.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-hint",children:[eo&&(0,r.jsxs)(r.Fragment,{children:[s("onboarding.src.signedInAs")," ",(0,r.jsx)("b",{children:eo})," \xb7 "]}),s("onboarding.src.pickRepo")]}),(0,r.jsx)(S.m,{value:ex,options:eh.map(e=>({value:e.full,label:e.full,tag:e.private?s("onboarding.src.private"):s("onboarding.src.public")})),onChange:eu})]})]}),"local"===en&&(0,r.jsxs)("div",{className:"card",style:{marginTop:10,display:"grid",gap:8},children:[(0,r.jsxs)("label",{className:"btn-ghost",style:{cursor:eS?"default":"pointer",justifyContent:"center"},children:[(0,r.jsx)(N.I,{name:"grid",size:14})," ",eS?s("onboarding.src.reading"):ev.length>0?s("onboarding.src.chooseAnother"):s("onboarding.src.chooseFolder"),(0,r.jsx)("input",{type:"file",hidden:!0,webkitdirectory:"",directory:"",multiple:!0,disabled:eS,onChange:e=>eH(e.target.files)})]}),eS&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{height:6,borderRadius:999,background:"var(--bg-active)",overflow:"hidden"},children:(0,r.jsx)("div",{style:{height:"100%",width:eC+"%",background:"var(--accent)",transition:"width .2s"}})}),(0,r.jsx)("div",{className:"form-hint",children:s("onboarding.src.readingPct",{pct:eC})})]}),!eS&&ev.length>0&&(0,r.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-string)"},children:[(0,r.jsx)(N.I,{name:"check",size:12})," ",s(1===ev.length?"onboarding.src.imported.one":"onboarding.src.imported.other",{n:ev.length,name:ey}),eM&&(0,r.jsxs)(r.Fragment,{children:[" \xb7 ",(0,r.jsx)("b",{style:{color:"var(--text)"},children:eM})]})]})]}),ej&&(0,r.jsx)("div",{style:{fontSize:11.5,color:"#e8688f",marginTop:6},children:ej}),(0,r.jsxs)("div",{className:"form-hint",children:[(0,r.jsx)(N.I,{name:"bot",size:12})," ",s("onboarding.src.analyseHint")]})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.brief.systemPrompt")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("textarea",{className:"persona-ta mono",required:!0,value:O,onChange:e=>Q(e.target.value)})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.brief.projectBrief")," ",(0,r.jsxs)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:["\xb7 ",s("onboarding.brief.optional")]})]}),(0,r.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:110},placeholder:s("onboarding.brief.briefPh"),value:Y,onChange:e=>{X(e.target.value),!K&&e.target.value&&G("project-brief.md")}})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.brief.attachMock")," ",(0,r.jsxs)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:["\xb7 ",s("onboarding.brief.optional")," \xb7 HTML, CSS, JS, MD"]})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsxs)("label",{className:"btn-ghost",style:{cursor:"pointer"},children:[(0,r.jsx)(N.I,{name:"doc",size:13})," ",s("onboarding.brief.files"),(0,r.jsx)("input",{type:"file",multiple:!0,hidden:!0,onChange:e=>eV(e.target.files)})]}),(0,r.jsxs)("label",{className:"btn-ghost",style:{cursor:"pointer"},children:[(0,r.jsx)(N.I,{name:"grid",size:13})," ",s("onboarding.brief.folder"),(0,r.jsx)("input",{type:"file",hidden:!0,webkitdirectory:"",directory:"",multiple:!0,onChange:e=>eV(e.target.files)})]}),Z.length>0&&(0,r.jsxs)("span",{className:"chip-sm",style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,r.jsx)(N.I,{name:"check",size:12})," ",s(1===Z.length?"onboarding.brief.filesAttached.one":"onboarding.brief.filesAttached.other",{n:Z.length}),(0,r.jsx)("button",{className:"link-btn",style:{marginLeft:4},onClick:()=>ee([]),children:(0,r.jsx)(N.I,{name:"close",size:11})})]})]}),(0,r.jsxs)("div",{className:"form-hint",children:[(0,r.jsx)(N.I,{name:"bot",size:12})," ",s("onboarding.brief.mockHintPre")," ",(0,r.jsx)("span",{className:"mono",children:"mock/"})," ",s("onboarding.brief.mockHintPost")]})]}),eB&&(0,r.jsxs)("div",{style:{marginTop:12},children:[(0,r.jsx)("div",{style:{height:6,borderRadius:999,background:"var(--bg-active)",overflow:"hidden"},children:(0,r.jsx)("div",{style:{height:"100%",width:eL+"%",background:"var(--accent)",transition:"width .3s"}})}),(0,r.jsxs)("div",{className:"form-hint",children:[s("onboarding.src.settingUp")," ",eL,"%"]})]}),eP&&(0,r.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-keyword)",marginTop:10},children:[(0,r.jsx)(N.I,{name:"close",size:12})," ",eP]}),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",disabled:eB,onClick:()=>l(3),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsxs)("button",{className:"btn-accent",disabled:eB||!O.trim()||!eA,onClick:function(){let e="github"===en?{type:"github",pat:ei,repoFull:ex,branch:eh.find(e=>e.full===ex)?.branch,login:eo||void 0}:"local"===en?{type:"local",rootName:ey,files:ev}:{type:"new"};eR(""),eW(async()=>{try{let s=await c({company:m,mission:f,objective:I,stack:_,provider:eQ,model:$,systemPrompt:O,briefText:Y,briefName:K,mockFiles:Z,source:e,providerCatalogId:T||void 0,providerKey:e$&&e$===T&&e_?e_:void 0});if(s&&!s.ok)return void eR(s.error||"Setup didn't complete — please try again.");eF(100),window.location.assign("/planner")}catch{eR("Setup didn't complete — please try again. If it keeps failing, reload the page.")}})},children:[(0,r.jsx)(N.I,{name:"bot",size:14})," ",eB?s("onboarding.brief.settingUp"):s("onboarding.brief.handOff")]})]})]})]})})]})}},5629:(e,s,a)=>{"use strict";a.d(s,{LangProvider:()=>i,k:()=>c});var r=a(5076),t=a(8488),n=a(3219);let l=(0,t.createContext)("en");function i({lang:e,children:s}){return(0,r.jsx)(l.Provider,{value:e,children:s})}function c(){let e=(0,t.useContext)(l);return(s,a)=>(0,n.t)(e,s,a)}},6816:(e,s,a)=>{"use strict";a.d(s,{J:()=>t});var r=a(5076);function t({size:e=34,rx:s=9}){return(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 100 100",style:{display:"block",flex:`0 0 ${e}px`},"aria-label":"Constella",children:[(0,r.jsx)("rect",{x:"1",y:"1",width:"98",height:"98",rx:s,fill:"var(--cs-bg)",stroke:"var(--cs-border)",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M66.06 27.06 L42.75 22.95 L24.62 38.17 L24.62 61.83 L42.75 77.05 L66.06 72.94",fill:"none",stroke:"var(--cs-line)",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M48 50 L42.75 22.95 M48 50 L24.62 50 M48 50 L42.75 77.05",fill:"none",stroke:"var(--cs-line)",strokeWidth:"1.2",strokeLinecap:"round",opacity:"0.55"}),[[66.06,27.06],[42.75,22.95],[24.62,38.17],[24.62,61.83],[42.75,77.05],[66.06,72.94]].map((e,s)=>(0,r.jsx)("circle",{cx:e[0],cy:e[1],r:"3.1",fill:"var(--cs-node)"},s)),(0,r.jsx)("circle",{cx:"48",cy:"50",r:"8.5",fill:"var(--cs-glow)",opacity:"0.4"}),(0,r.jsx)("circle",{cx:"48",cy:"50",r:"4.3",fill:"var(--cs-core)"})]})}},7814:(e,s,a)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var t in r)Object.defineProperty(s,t,{enumerable:!0,get:r[t]});let n=a(3825),l=a(2617),i=a(5986)},8576:(e,s,a)=>{"use strict";a.d(s,{I:()=>n});var r=a(5076);let t={files:(0,r.jsx)("path",{d:"M3 3.5h5l1.5 2H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1z"}),search:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"7",cy:"7",r:"4.2"}),(0,r.jsx)("path",{d:"M10.2 10.2 14 14"})]}),git:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"4",cy:"4",r:"1.8"}),(0,r.jsx)("circle",{cx:"4",cy:"12",r:"1.8"}),(0,r.jsx)("circle",{cx:"12",cy:"9.5",r:"1.8"}),(0,r.jsx)("path",{d:"M4 5.8v4.4M5.8 4H9a2 2 0 0 1 2 2v1.6"})]}),debug:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8.5",r:"3.5"}),(0,r.jsx)("path",{d:"M8 5V3M4.5 8.5H2m12 0h-2.5M4.8 11.8 3.4 13M11.2 11.8l1.4 1.2M5.2 5 3.8 3.6M10.8 5l1.4-1.4"})]}),ext:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("path",{d:"M9 11.2h4.5M11.2 9v4.5"})]}),settings:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2.2"}),(0,r.jsx)("path",{d:"M8 1.5v2M8 12.5v2M14.5 8h-2M3.5 8h-2M12.6 3.4l-1.4 1.4M4.8 11.2l-1.4 1.4M12.6 12.6l-1.4-1.4M4.8 4.8 3.4 3.4"})]}),account:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"5.5",r:"2.8"}),(0,r.jsx)("path",{d:"M2.8 14c0-2.8 2.3-4.5 5.2-4.5s5.2 1.7 5.2 4.5"})]}),chevronRight:(0,r.jsx)("path",{d:"M6 4l4 4-4 4"}),chevronDown:(0,r.jsx)("path",{d:"M4 6l4 4 4-4"}),chevronUp:(0,r.jsx)("path",{d:"M4 10l4-4 4 4"}),close:(0,r.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"}),add:(0,r.jsx)("path",{d:"M8 3v10M3 8h10"}),newFile:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M9 2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6L9 2z"}),(0,r.jsx)("path",{d:"M9 2v4h4M8 8v4M6 10h4"})]}),newFolder:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M2 5.5a1 1 0 0 1 1-1h3l1.2 1.5H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5.5z"}),(0,r.jsx)("path",{d:"M8 8v3M6.5 9.5h3"})]}),refresh:(0,r.jsx)("path",{d:"M13 8a5 5 0 1 1-1.5-3.5M13 2.5V5h-2.5"}),collapse:(0,r.jsx)("path",{d:"M3 5h6M3 8h6M3 11h6M12 6l-1.5 1.5L12 9"}),more:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"3.5",cy:"8",r:"1"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1"}),(0,r.jsx)("circle",{cx:"12.5",cy:"8",r:"1"})]}),split:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1"}),(0,r.jsx)("path",{d:"M8 3v10"})]}),terminal:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M4.5 6.5 6.5 8l-2 1.5M8 10h3.5"})]}),panelBottom:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M2 10h12"})]}),sidebarIcon:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M6 3v10"})]}),bell:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 2a3.5 3.5 0 0 0-3.5 3.5c0 3-1.3 4-1.3 4h9.6s-1.3-1-1.3-4A3.5 3.5 0 0 0 8 2z"}),(0,r.jsx)("path",{d:"M6.7 12a1.4 1.4 0 0 0 2.6 0"})]}),check:(0,r.jsx)("path",{d:"M3 8.5 6.5 12 13 4"}),error:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("path",{d:"M8 5v4M8 11h.01"})]}),warn:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 2.5 14.5 13.5h-13z"}),(0,r.jsx)("path",{d:"M8 7v3M8 12h.01"})]}),branch:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"4",cy:"4",r:"1.6"}),(0,r.jsx)("circle",{cx:"4",cy:"12",r:"1.6"}),(0,r.jsx)("circle",{cx:"12",cy:"9",r:"1.6"}),(0,r.jsx)("path",{d:"M4 5.6v4.8M5.6 4H9a1.8 1.8 0 0 1 1.8 1.8v1.6"})]}),sync:(0,r.jsx)("path",{d:"M3 6a5 5 0 0 1 8.5-2M13 10a5 5 0 0 1-8.5 2M11.5 2.5V4h-1.5M4.5 13.5V12h1.5"}),command:(0,r.jsx)("path",{d:"M5.5 3.5A1.5 1.5 0 1 1 4 5h8a1.5 1.5 0 1 1-1.5 1.5v3A1.5 1.5 0 1 1 12 11H4a1.5 1.5 0 1 1 1.5-1.5v-3z"}),goto:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M3 8h8M7.5 4.5 11 8l-3.5 3.5"}),(0,r.jsx)("path",{d:"M13 3v10"})]}),sun:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,r.jsx)("path",{d:"M8 1.5v1.5M8 13v1.5M14.5 8H13M3 8H1.5M12.6 3.4l-1 1M4.4 11.6l-1 1M12.6 12.6l-1-1M4.4 4.4l-1-1"})]}),moon:(0,r.jsx)("path",{d:"M13 9.2A5.5 5.5 0 0 1 6.8 3 5.5 5.5 0 1 0 13 9.2z"}),play:(0,r.jsx)("path",{d:"M5 3.5v9l7-4.5z"}),trash:(0,r.jsx)("path",{d:"M3.5 4.5h9M6 4.5V3h4v1.5M5 4.5l.5 8.5h5l.5-8.5"}),dot:(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),fileTs:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M9 2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6L9 2z"}),(0,r.jsx)("path",{d:"M9 2v4h4"})]}),arrowUp:(0,r.jsx)("path",{d:"M8 13V3M4 7l4-4 4 4"}),arrowDown:(0,r.jsx)("path",{d:"M8 3v10M4 9l4 4 4-4"}),agents:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"5.5",cy:"6",r:"2.2"}),(0,r.jsx)("circle",{cx:"11",cy:"6.5",r:"1.8"}),(0,r.jsx)("path",{d:"M2 13c0-2 1.6-3.2 3.5-3.2S9 11 9 13M9.5 12.5c.2-1.6 1.3-2.5 2.8-2.5 1.3 0 2.4.8 2.4 2.3"})]}),bot:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"3",y:"5.5",width:"10",height:"7",rx:"2"}),(0,r.jsx)("path",{d:"M8 3v2.5M5.8 9h.01M10.2 9h.01M6 12h4"}),(0,r.jsx)("circle",{cx:"8",cy:"3",r:"1"})]}),send:(0,r.jsx)("path",{d:"M14 2 7 9M14 2l-4.5 12-2.5-5L2 6.5z"}),at:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,r.jsx)("path",{d:"M11 8v1.2a1.8 1.8 0 0 0 3.5.6A6.5 6.5 0 1 0 11 13.2"})]}),chevronLeft:(0,r.jsx)("path",{d:"M10 4 6 8l4 4"}),dockRight:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M10 3v10"}),(0,r.jsx)("rect",{x:"10.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),dockLeft:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M6 3v10"}),(0,r.jsx)("rect",{x:"2.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),chat:(0,r.jsx)("path",{d:"M3 4.5h10a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H7l-3 2.5V11.5H3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z"}),grid:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"9",y:"9",width:"4.5",height:"4.5",rx:"1"})]}),inbox:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M2 9h3l1 2h4l1-2h3"}),(0,r.jsx)("path",{d:"M2.5 9 4 3.5h8L13.5 9v3.5a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1z"})]}),calendar:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M2.5 6.5h11M5.5 2v3M10.5 2v3"})]}),repeat:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M3 6a4 4 0 0 1 7-2.5L12 5M13 10a4 4 0 0 1-7 2.5L4 11"}),(0,r.jsx)("path",{d:"M12 2v3H9M4 14v-3h3"})]}),doc:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M9 2H4.5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.5L9 2z"}),(0,r.jsx)("path",{d:"M9 2v3.5h3.5M6 8.5h4M6 11h4"})]}),skill:(0,r.jsx)("path",{d:"M8 2.5l1.4 3.1 3.4.4-2.5 2.3.7 3.3L8 9.9 5 11.6l.7-3.3L3.2 6l3.4-.4z"}),pulse:(0,r.jsx)("path",{d:"M2 8h3l1.5-4 2.5 8 1.5-4H14"}),coins:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ellipse",{cx:"6",cy:"4.5",rx:"3.5",ry:"1.8"}),(0,r.jsx)("path",{d:"M2.5 4.5v3c0 1 1.6 1.8 3.5 1.8s3.5-.8 3.5-1.8v-3"}),(0,r.jsx)("ellipse",{cx:"10",cy:"9.5",rx:"3.5",ry:"1.8"}),(0,r.jsx)("path",{d:"M6.5 9.5c.4.9 1.8 1.5 3.5 1.5s3.5-.8 3.5-1.8v-1.2"})]}),cpu:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1.5"}),(0,r.jsx)("rect",{x:"6.3",y:"6.3",width:"3.4",height:"3.4",rx:".5"}),(0,r.jsx)("path",{d:"M6 2v2M10 2v2M6 12v2M10 12v2M2 6h2M2 10h2M12 6h2M12 10h2"})]}),shield:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 2 3 4v4c0 3 2.2 5 5 6 2.8-1 5-3 5-6V4z"}),(0,r.jsx)("path",{d:"M5.8 8 7.3 9.5 10.4 6.3"})]}),target:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2.4"})]}),selectParent:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"2.5",width:"12",height:"11",rx:"1.5"}),(0,r.jsx)("path",{d:"M8 11V6.5M5.5 9 8 6.5l2.5 2.5"})]})};function n({name:e,size:s=16,className:a="",strokeWidth:l=1.4,style:i}){let c=t[e];return c?(0,r.jsx)("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",className:a,style:i,children:"play"===e||"dot"===e?(0,r.jsx)("g",{fill:"currentColor",stroke:"none",children:c}):c}):null}},9177:(e,s,a)=>{Promise.resolve().then(a.bind(a,4526))},9860:(e,s,a)=>{"use strict";var r=a(2004);a.o(r,"usePathname")&&a.d(s,{usePathname:function(){return r.usePathname}}),a.o(r,"useRouter")&&a.d(s,{useRouter:function(){return r.useRouter}})}},e=>{e.O(0,[3219,4263,9562,6646,6834,7358],()=>e(e.s=9177)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5134],{3917:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>I});var r=a(5076),t=a(8488),n=a(9860),l=a(7814);let i=(0,l.createServerReference)("002a58d4e2dea782e2d6c5630045ebc8a621e6fa3f",l.callServer,void 0,l.findSourceMapURL,"operatorHasOrg"),c=(0,l.createServerReference)("4053584b4b60068bbaa74e2ee47b431c2e15816866",l.callServer,void 0,l.findSourceMapURL,"completeOnboarding"),o=new Set(["node_modules",".git",".next",".turbo","dist","build","out","coverage",".cache",".pnpm-store",".vercel","vendor",".parcel-cache",".svelte-kit",".nuxt",".astro",".angular",".venv","venv","env","__pycache__",".mypy_cache",".pytest_cache",".ruff_cache",".tox",".nox","htmlcov","site-packages",".eggs",".ipynb_checkpoints","target",".gradle","bin","obj","Pods",".cargo","Carthage",".cxx","DerivedData",".idea",".vscode",".svn",".hg",".vs",".fleet","logs","tmp","temp",".terraform","archives",".testdev"]),d=/\.(py|pyi|pyw|js|jsx|ts|tsx|mjs|cjs|mts|cts|json|jsonc|html?|css|scss|sass|less|styl|md|markdown|mdx|txt|rst|yml|yaml|toml|ini|cfg|conf|env|example|sample|sh|bash|zsh|bat|cmd|ps1|sql|graphql|gql|prisma|xml|svg|vue|svelte|astro|go|rs|java|kt|kts|scala|clj|rb|erb|php|blade|c|h|cpp|cc|hpp|cs|fs|swift|m|mm|dart|lua|r|ex|exs|erl|hrl|gradle|properties|lock|proto|tf|tfvars|dockerfile|dockerignore|gitignore|gitattributes|editorconfig|prettierrc|eslintrc|babelrc|npmrc|nvmrc|browserslistrc)$/i,h=new Set(["dockerfile","makefile","procfile","rakefile","gemfile","brewfile","vagrantfile","license","licence","readme","changelog","authors","contributors","notice","codeowners"]),g=(0,l.createServerReference)("4001b6ad3840ef2468b0f85136746cbe8dee8e4afa",l.callServer,void 0,l.findSourceMapURL,"githubReposForToken"),x=(0,l.createServerReference)("00f24be2f0a613eea8d59bc5c8cdf4e773f4afc158",l.callServer,void 0,l.findSourceMapURL,"checkSetupEnv"),u=(0,l.createServerReference)("40b1f3f4be3ef23ed173347a4bffcf84043b3bdc74",l.callServer,void 0,l.findSourceMapURL,"checkAdapter"),m=(0,l.createServerReference)("405025c325f356c891fc604d54386ba0b30e29af89",l.callServer,void 0,l.findSourceMapURL,"testConnection"),p=(0,l.createServerReference)("600f36793d786fb2f67258e075b83e7650a89b9436",l.callServer,void 0,l.findSourceMapURL,"probeModel"),j=(0,l.createServerReference)("00a01a915e9d3cbf47622f6542d19ca50b14fe23ac",l.callServer,void 0,l.findSourceMapURL,"detectProviders");var b=a(8088),v=a(3730);let f={TypeScript:{slug:"typescript"},JavaScript:{slug:"javascript"},Python:{slug:"python"},Go:{slug:"go",variant:"original-wordmark"},Rust:{slug:"rust"},Java:{slug:"java"},Kotlin:{slug:"kotlin"},"C#":{slug:"csharp"},Ruby:{slug:"ruby"},PHP:{slug:"php"},Elixir:{slug:"elixir"},Swift:{slug:"swift"},"C++":{slug:"cplusplus"},Scala:{slug:"scala"},Dart:{slug:"dart"},C:{slug:"c"},Clojure:{slug:"clojure"},Haskell:{slug:"haskell"},Lua:{slug:"lua"},R:{slug:"r"},"Objective-C":{slug:"objectivec"},Erlang:{slug:"erlang",variant:"plain"},"Node.js":{slug:"nodejs"},Bun:{slug:"bun"},Deno:{slug:"denojs"},"Python 3":{slug:"python"},JVM:{slug:"java"},".NET":{slug:"dotnetcore"},"BEAM (Erlang VM)":{slug:"erlang",variant:"plain"},React:{slug:"react"},Vue:{slug:"vuejs"},Svelte:{slug:"svelte"},Angular:{slug:"angular"},SolidJS:{slug:"solidjs"},"Alpine.js":{slug:"alpinejs"},Ember:{slug:"ember"},Backbone:{slug:"backbonejs"},"HTML/CSS":{slug:"html5"},"Vanilla JS":{slug:"javascript"},"Plain CSS":{slug:"css3"},"Next.js":{slug:"nextjs"},Nuxt:{slug:"nuxtjs"},Remix:{slug:"remix"},SvelteKit:{slug:"svelte"},Astro:{slug:"astro"},Gatsby:{slug:"gatsby"},"Vite (SPA)":{slug:"vitejs"},Hugo:{slug:"hugo"},Jekyll:{slug:"jekyll",variant:"original-wordmark"},NestJS:{slug:"nestjs"},Fastify:{slug:"fastify"},Express:{slug:"express"},Koa:{slug:"koa"},Django:{slug:"django",variant:"plain"},Flask:{slug:"flask"},FastAPI:{slug:"fastapi"},"Spring Boot":{slug:"spring"},Spring:{slug:"spring"},Laravel:{slug:"laravel"},"Ruby on Rails":{slug:"rails"},Gin:{slug:"go",variant:"original-wordmark"},Phoenix:{slug:"phoenix"},"ASP.NET Core":{slug:"dotnetcore"},Nginx:{slug:"nginx"},GraphQL:{slug:"graphql"},Symfony:{slug:"symfony"},CodeIgniter:{slug:"codeigniter"},PostgreSQL:{slug:"postgresql"},MySQL:{slug:"mysql"},MariaDB:{slug:"mariadb"},SQLite:{slug:"sqlite"},MongoDB:{slug:"mongodb"},Redis:{slug:"redis"},Cassandra:{slug:"cassandra"},DynamoDB:{slug:"dynamodb"},Supabase:{slug:"supabase"},Prisma:{slug:"prisma"},Sequelize:{slug:"sequelize"},SQLAlchemy:{slug:"sqlalchemy"},"Tailwind CSS":{slug:"tailwindcss"},"CSS Modules":{slug:"css3"},Sass:{slug:"sass"},MUI:{slug:"materialui"},Bootstrap:{slug:"bootstrap"},Bulma:{slug:"bulma"},Vuetify:{slug:"vuetify"},Docker:{slug:"docker"},Podman:{slug:"podman"},Vercel:{slug:"vercel"},Netlify:{slug:"netlify"},AWS:{slug:"amazonwebservices",variant:"original-wordmark"},GCP:{slug:"googlecloud"},Kubernetes:{slug:"kubernetes"},Azure:{slug:"azure"},Jenkins:{slug:"jenkins"},CircleCI:{slug:"circleci",variant:"plain"},Terraform:{slug:"terraform"},Ansible:{slug:"ansible"},Vagrant:{slug:"vagrant"},RabbitMQ:{slug:"rabbitmq"},Kafka:{slug:"apachekafka"},Auth0:{slug:"auth0",variant:"plain"},Keycloak:{slug:"keycloak"},"React Native":{slug:"react"},Flutter:{slug:"flutter"},Android:{slug:"android"},Ionic:{slug:"ionic"},Xamarin:{slug:"xamarin"},NativeScript:{slug:"nativescript"},TensorFlow:{slug:"tensorflow"},PyTorch:{slug:"pytorch"},"scikit-learn":{slug:"scikitlearn"},Pandas:{slug:"pandas"},NumPy:{slug:"numpy"},Jupyter:{slug:"jupyter"},Jest:{slug:"jest"},Vitest:{slug:"vitest"},Cypress:{slug:"cypressio"},Playwright:{slug:"playwright"},Selenium:{slug:"selenium"},Mocha:{slug:"mocha"},Jasmine:{slug:"jasmine"},Puppeteer:{slug:"puppeteer"},D3:{slug:"d3js"},Grafana:{slug:"grafana"},Firebase:{slug:"firebase"},Appwrite:{slug:"appwrite"},Heroku:{slug:"heroku"}};var y=a(9562),k=a(973),M=a(6816),N=a(8576),S=a(3728),w=a(9265),C=a(5629);let z=["company","ceoModel","connection","stack","brief"];function L({name:e}){let s,a=(s=f[e])?`https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${s.slug}/${s.slug}-${s.variant??"original"}.svg`:null,[n,l]=(0,t.useState)(!1);return!a||n?(0,r.jsx)("span",{className:"sc-mono",children:e.replace(/[^A-Za-z0-9]/g,"").slice(0,2)}):(0,r.jsx)("img",{className:"sc-ico",src:a,alt:"",loading:"lazy",onError:()=>l(!0)})}function F({stack:e,onPick:s,query:a,setQuery:t}){let n=(0,C.k)(),l=a.trim().toLowerCase(),i=l?v.z.flatMap(s=>s.opts.filter(e=>"None"!==e&&(e.toLowerCase().includes(l)||s.label.toLowerCase().includes(l))).map(a=>({cat:s,o:a,bad:(0,y.YL)(e,s.key,a)}))).slice(0,16):[];return(0,r.jsxs)("div",{className:"stack-search-wrap",children:[(0,r.jsxs)("div",{className:"stack-search",children:[(0,r.jsx)(N.I,{name:"search",size:15}),(0,r.jsx)("input",{placeholder:n("onboarding.stackSearchPh"),value:a,onChange:e=>t(e.target.value)}),a&&(0,r.jsx)("button",{className:"ss-clear",onClick:()=>t(""),children:(0,r.jsx)(N.I,{name:"close",size:13})})]}),l&&i.length>0&&(0,r.jsx)("div",{className:"stack-find scroll",children:i.map(({cat:a,o:t,bad:n})=>(0,r.jsxs)("button",{type:"button",className:"stack-find-row"+(n?" disabled":""),disabled:!!n,title:n||(0,v.f)(a.key,t),onClick:()=>{n||s(a.key,t)},children:[(0,r.jsx)(L,{name:t}),(0,r.jsx)("span",{className:"sf-name",children:t}),(0,r.jsx)("span",{className:"sf-cat",children:a.label}),(0,k.Hn)(e[a.key],t)&&(0,r.jsx)(N.I,{name:"check",size:13})]},a.key+t))}),l&&0===i.length&&(0,r.jsx)("div",{className:"stack-find sf-empty",children:n("onboarding.stackNoMatch",{query:a})})]})}function P({step:e}){let s=(0,C.k)();return(0,r.jsx)("div",{className:"onb-steps",children:z.map((a,t)=>(0,r.jsxs)("span",{style:{display:"contents"},children:[t>0&&(0,r.jsx)("span",{className:"onb-sep"}),(0,r.jsxs)("div",{className:"onb-stepdot"+(e===t?" on":e>t?" done":""),children:[(0,r.jsx)("span",{className:"num",children:e>t?"✓":t+1}),(0,r.jsx)("span",{children:s(`onboarding.step.${a}`)})]})]},a))})}function R({adapter:e,model:s,cached:a,onDone:n}){let l=(0,C.k)(),i=[{t:l("onboarding.test.prepare"),d:l("onboarding.test.prepareDesc")},{t:l("onboarding.test.adapter"),d:l("onboarding.test.adapterDesc",{adapter:e})},{t:l("onboarding.test.connection"),d:l("onboarding.test.connectionDesc")},{t:l("onboarding.test.model",{model:s}),d:l("onboarding.test.modelDesc")},{t:l("onboarding.test.ready"),d:l("onboarding.test.readyDesc")}],[c,o]=(0,t.useState)(a?i.length:0),[d,h]=(0,t.useState)(null),[g,j]=(0,t.useState)(null);return(0,t.useEffect)(()=>{if(a)return void o(i.length);let r=!0;return h(null),j(null),(async()=>{let a=[()=>x(),()=>u(e),()=>m(e),()=>p(e,s)];for(let e=0;e<a.length;e++){if(!r)return;o(e);let s=await a[e]();if(!r)return;if(!s.ok){h(e),j(s.error??l("onboarding.test.failed")),n(!1);return}o(e+1)}r&&(o(i.length),n(!0))})(),()=>{r=!1}},[a]),(0,r.jsx)("div",{className:"track",children:i.map((e,s)=>{let a=d===s,t=a?"":s<c?"done":s===c?"on":"todo";return(0,r.jsxs)("div",{className:"track-step "+t,children:[(0,r.jsx)("div",{className:"track-ico",children:a?(0,r.jsx)(N.I,{name:"close",size:15}):"done"===t?(0,r.jsx)(N.I,{name:"check",size:16}):"on"===t?(0,r.jsx)("span",{className:"spin",children:(0,r.jsx)(N.I,{name:"refresh",size:15})}):(0,r.jsx)(N.I,{name:"dot",size:8})}),(0,r.jsxs)("div",{className:"track-main",children:[(0,r.jsx)("div",{className:"track-t",children:e.t}),(0,r.jsx)("div",{className:"track-d",children:a?g:e.d})]})]},s)})})}function I(){let e=(0,n.useRouter)(),s=(0,C.k)(),[a,l]=(0,t.useState)(0),[x,u]=(0,t.useState)(!1);(0,t.useEffect)(()=>{i().then(u).catch(()=>{})},[]);let[m,p]=(0,t.useState)(""),[f,z]=(0,t.useState)(""),[I,H]=(0,t.useState)(""),[A,V]=(0,t.useState)([]),[T,D]=(0,t.useState)(""),[$,q]=(0,t.useState)(""),[_,E]=(0,t.useState)({}),[J,U]=(0,t.useState)(""),[B,W]=(0,t.useState)(""),[O,Q]=(0,t.useState)("You are Ada, the CEO of this company. Plan before building: analyse the brief, design the architecture and rituals, then organise the team."),[K,G]=(0,t.useState)(""),[Y,X]=(0,t.useState)(""),[Z,ee]=(0,t.useState)([]),[es,ea]=(0,t.useState)(!1),[er,et]=(0,t.useState)(""),[en,el]=(0,t.useState)("new"),[ei,ec]=(0,t.useState)(""),[eo,ed]=(0,t.useState)(""),[eh,eg]=(0,t.useState)([]),[ex,eu]=(0,t.useState)(""),[em,ep]=(0,t.useState)(!1),[ej,eb]=(0,t.useState)(""),[ev,ef]=(0,t.useState)([]),[ey,ek]=(0,t.useState)(""),[eM,eN]=(0,t.useState)(""),[eS,ew]=(0,t.useState)(!1),[eC,ez]=(0,t.useState)(0),[eL,eF]=(0,t.useState)(0),[eP,eR]=(0,t.useState)("");async function eI(){ep(!0),eb("");try{let e=await g(ei);if(!e.ok){eb(e.error??s("onboarding.src.listReposFailed")),eg([]);return}ed(e.login??""),eg(e.repos??[]),e.repos?.[0]&&eu(e.repos[0].full)}finally{ep(!1)}}async function eH(e){var a;let r;if(!e||!e.length)return;ew(!0),ez(0),eb(""),ef([]),eN("");let t=Array.from(e),n=(t[0].webkitRelativePath||t[0].name).split("/")[0]||"project",l=t.filter(e=>{var s;let a=(e.webkitRelativePath||e.name).split("/");for(let e=1;e<a.length-1;e++)if(s=a[e],o.has(s))return!1;let r=a[a.length-1];return!/^\.env(\.local|\.development|\.production)?$/i.test(r)&&".DS_Store"!==r&&!!(d.test(r)||h.has(r.toLowerCase()))&&!(e.size>524288)});if(!l.length){ew(!1),eb(s("onboarding.src.noFiles"));return}let i=[];for(let e=0;e<l.length;e++){let s=l[e],a=(s.webkitRelativePath||s.name).split("/").slice(1).join("/");if(a)try{i.push({path:a,content:await s.text()})}catch{}(e%5==0||e===l.length-1)&&ez(Math.round((e+1)/l.length*100))}ef(i),ek(n),eN((a=i.map(e=>e.path),(r=e=>a.some(s=>e.test(s)))(/(^|\/)manage\.py$/)?"Django (Python)":r(/(^|\/)next\.config\.(js|mjs|ts)$/)?"Next.js":r(/\.vue$/)?"Vue":r(/(^|\/)go\.mod$/)?"Go":r(/(^|\/)Cargo\.toml$/i)?"Rust":r(/(^|\/)pom\.xml$/)||r(/(^|\/)build\.gradle/)?"JVM":r(/(^|\/)composer\.json$/)?"PHP":r(/\.py$/)?"Python":r(/(^|\/)package\.json$/)?"Node":"")),ew(!1)}let eA="new"===en||"github"===en&&!!ex||"local"===en&&ev.length>0;async function eV(e){if(!e)return;let s=/\.(html?|css|jsx?|tsx?|md|txt|json|svg)$/i,a=[];for(let r of Array.from(e).slice(0,120)){let e=(r.webkitRelativePath||r.name).replace(/^\/+/,"");if(s.test(e)&&!(r.size>262144))try{a.push({path:e,content:await r.text()})}catch{}}ee(a)}let[eT,eD]=(0,t.useState)(!1),[e$,eq]=(0,t.useState)(""),[e_,eE]=(0,t.useState)(""),[eJ,eU]=(0,t.useState)(""),[eB,eW]=(0,t.useTransition)();(0,t.useEffect)(()=>{j().then(({detected:e})=>{V(e),e[0]&&(D(e[0].id),q(e[0].models[0]??""))})},[]),(0,t.useEffect)(()=>{if(!eB)return void eF(0);eF(8);let e=setInterval(()=>eF(e=>e<92?e+Math.max(1,Math.round((92-e)/12)):e),400);return()=>clearInterval(e)},[eB]);let eO=A.find(e=>e.id===T),eQ=eO?.adapter??"",eK=eQ+":"+$,eG=es&&er===eK,eY=(0,y.hP)(_);function eX(e,s){let a=(0,y.T1)({..._,[e]:(0,k.P_)(_[e],s)});E(a.stack),W(a.removed.map(e=>`${e.opt} was unselected automatically — ${e.reason}.`).join(" "))}return(0,r.jsxs)("div",{className:"onb",children:[(0,r.jsxs)("div",{className:"onb-top",children:[(0,r.jsxs)("div",{className:"onb-brand",children:[(0,r.jsx)(M.J,{size:34,rx:9}),(0,r.jsx)("div",{className:"bw",children:"Constella"})]}),(0,r.jsx)(P,{step:a}),x&&(0,r.jsx)("button",{className:"onb-close",title:s("onboarding.closeSetup"),"aria-label":s("onboarding.closeSetup"),onClick:()=>e.push("/"),children:(0,r.jsx)(N.I,{name:"close",size:16})})]}),(0,r.jsx)("div",{className:"onb-body",children:(0,r.jsxs)("div",{className:"onb-card"+(3===a?" onb-card-wide":""),children:[0===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.company.h")}),(0,r.jsx)("div",{className:"onb-sub",style:{marginBottom:14},children:s("onboarding.company.sub")}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.company.nameLabel")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("input",{className:"form-input",required:!0,autoFocus:!0,value:m,onChange:e=>p(e.target.value),placeholder:s("onboarding.company.namePh")})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.company.missionLabel")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("textarea",{className:"persona-ta",required:!0,value:f,onChange:e=>z(e.target.value),placeholder:s("onboarding.company.missionPh")})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.company.objectiveLabel")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("textarea",{className:"persona-ta",required:!0,value:I,onChange:e=>H(e.target.value),placeholder:s("onboarding.company.objectivePh")})]}),(0,r.jsx)("div",{className:"onb-foot",children:(0,r.jsxs)("button",{className:"btn-accent",disabled:!m.trim()||!f.trim()||!I.trim(),onClick:()=>l(1),children:[s("common.next")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]})})]}),1===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.brain.h")}),(0,r.jsx)("div",{className:"onb-sub",children:s("onboarding.brain.sub")}),(0,r.jsxs)("div",{className:"onb-secrow",children:[(0,r.jsx)("span",{className:"osr-t",children:s("onboarding.brain.detected")}),(0,r.jsx)("span",{className:"osr-line"})]}),(0,r.jsxs)("div",{className:"prov-cards",children:[A.map(e=>(0,r.jsxs)("div",{className:"prov-card "+("local"===e.kind?"local-card":"cloud-card")+(T===e.id?" on":""),onClick:()=>{D(e.id),q(e.models[0]??"")},children:[(0,r.jsx)("span",{className:"pc-badge",children:s(`onboarding.kind.${e.kind}`)}),(0,r.jsx)(w.W,{id:e.id,size:42}),(0,r.jsx)("div",{className:"pc-name",children:e.name}),(0,r.jsx)("div",{className:"pc-sub",children:e.adapter})]},e.id)),0===A.length&&(0,r.jsx)("div",{className:"muted",style:{fontSize:12.5,padding:12},children:s("onboarding.brain.detecting")})]}),(0,r.jsxs)("button",{className:"btn-ghost",style:{marginTop:10},onClick:()=>eD(e=>!e),children:[(0,r.jsx)(N.I,{name:"add",size:13})," ",s("onboarding.brain.registerToggle")]}),eT&&(0,r.jsxs)("div",{className:"card",style:{marginTop:10},children:[(0,r.jsx)("div",{className:"detail-label",children:s("onboarding.brain.registerTitle")}),(0,r.jsx)(S.m,{value:e$,placeholder:s("onboarding.brain.chooseProvider"),options:b.WQ.filter(e=>"unsupported"!==e.status).map(e=>({value:e.id,label:e.displayName,glyphId:e.id})),onChange:eq,glyph:!0}),(0,r.jsxs)("div",{className:"set-grid",style:{marginTop:8},children:[(0,r.jsx)("input",{className:"form-input mono",placeholder:s("onboarding.brain.modelIdPh"),value:eJ,onChange:e=>eU(e.target.value)}),(0,r.jsx)("input",{className:"form-input mono",type:"password",placeholder:s("onboarding.brain.apiKeyPh"),value:e_,onChange:e=>eE(e.target.value)})]}),(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:10},children:[(0,r.jsx)("button",{className:"btn-ghost",onClick:()=>eD(!1),children:s("common.cancel")}),(0,r.jsxs)("button",{className:"btn-accent",disabled:!e$,onClick:function(){let e=b.WQ.find(e=>e.id===e$);if(!e)return;let s={id:e.id,name:e.displayName,adapter:e.defaultAdapter,kind:"cli"===e.category?"cli":"local_runtime"===e.category?"local":"cloud",models:eJ.trim()?[eJ.trim()]:[]};V(e=>e.find(e=>e.id===s.id)?e:[...e,s]),D(s.id),q(eJ.trim()||""),eD(!1)},children:[(0,r.jsx)(N.I,{name:"check",size:13})," ",s("onboarding.brain.addSelect")]})]})]}),eO&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"onb-secrow",children:[(0,r.jsx)("span",{className:"osr-t",children:s("onboarding.brain.modelFor",{name:eO.name})}),(0,r.jsx)("span",{className:"osr-line"})]}),(0,r.jsx)(S.m,{mono:!0,value:$,options:eO.models.map(e=>({value:e,label:e})),onChange:q})]}),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",onClick:()=>l(0),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsxs)("button",{className:"btn-accent",disabled:!eO||!$,onClick:()=>l(2),children:[s("common.next")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]})]})]}),2===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.setup.h")}),(0,r.jsxs)("div",{className:"onb-sub",children:[s("onboarding.setup.sub")," ",(0,r.jsx)("b",{style:{color:"var(--text)"},children:eQ})," \xb7 ",(0,r.jsx)("b",{style:{color:"var(--text)"},children:$}),"."]}),(0,r.jsx)(R,{adapter:eQ,model:$,cached:eG,onDone:e=>{ea(e),et(eK)}}),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",onClick:()=>l(1),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsx)("button",{className:"btn-accent",disabled:!eG,onClick:()=>l(3),children:eG?(0,r.jsxs)(r.Fragment,{children:[s("onboarding.setup.continue")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]}):s("onboarding.setup.testing")})]})]}),3===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.stack.h")}),(0,r.jsx)("div",{className:"onb-sub",children:s("onboarding.stack.sub")}),eY&&(0,r.jsxs)("div",{className:"modal-hint",style:{color:"var(--sx-number)"},children:[(0,r.jsx)(N.I,{name:"pulse",size:12})," ",eY]}),B&&(0,r.jsxs)("div",{className:"modal-hint",style:{color:"var(--sx-keyword)"},children:[(0,r.jsx)(N.I,{name:"warn",size:12})," ",B]}),(0,r.jsx)(F,{stack:_,onPick:eX,query:J,setQuery:U}),v.z.map(e=>(0,r.jsxs)("div",{className:"stack-cat",children:[(0,r.jsxs)("div",{className:"onb-secrow",children:[(0,r.jsx)("span",{className:"osr-t",children:e.label}),(0,r.jsx)("span",{className:"osr-pick",children:_[e.key]||"—"}),(0,r.jsx)("span",{className:"osr-line"})]}),(0,r.jsx)("div",{className:"stack-cards",children:e.opts.map(s=>{let a=(0,y.YL)(_,e.key,s),t=(0,k.Hn)(_[e.key],s);return(0,r.jsxs)("button",{className:"stack-card"+(t?" on":"")+(a?" disabled":""),disabled:!!a&&!t,title:a||(0,v.f)(e.key,s),onClick:()=>!a&&eX(e.key,s),children:[(0,r.jsx)(L,{name:s}),(0,r.jsx)("span",{className:"sc-name",children:s}),t&&(0,r.jsx)("span",{className:"sc-check",children:(0,r.jsx)(N.I,{name:"check",size:12})})]},s)})})]},e.key)),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",onClick:()=>l(2),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsxs)("button",{className:"btn-accent",onClick:()=>l(4),children:[s("common.next")," ",(0,r.jsx)(N.I,{name:"chevronRight",size:13})]})]})]}),4===a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"onb-h",children:s("onboarding.brief.h")}),(0,r.jsx)("div",{className:"onb-sub",children:s("onboarding.brief.sub")}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsx)("label",{className:"form-label",children:s("onboarding.brief.sourceLabel")}),(0,r.jsx)("div",{className:"src-cards",children:["new","github","local"].map(e=>(0,r.jsxs)("button",{type:"button",className:"src-card"+(en===e?" on":""),onClick:()=>{el(e),eb("")},children:[(0,r.jsx)(N.I,{name:"new"===e?"add":"github"===e?"git":"files",size:18}),(0,r.jsx)("div",{className:"src-t",children:s(`onboarding.src.${e}.t`)}),(0,r.jsx)("div",{className:"src-d",children:s(`onboarding.src.${e}.d`)})]},e))}),"github"===en&&(0,r.jsxs)("div",{className:"card",style:{marginTop:10,display:"grid",gap:8},children:[(0,r.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,r.jsx)("input",{className:"form-input mono",type:"password",placeholder:s("onboarding.src.tokenPh"),value:ei,onChange:e=>ec(e.target.value)}),(0,r.jsx)("button",{className:"btn-ghost",disabled:em||ei.trim().length<7,onClick:eI,children:em?"…":s("onboarding.src.listRepos")})]}),eh.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-hint",children:[eo&&(0,r.jsxs)(r.Fragment,{children:[s("onboarding.src.signedInAs")," ",(0,r.jsx)("b",{children:eo})," \xb7 "]}),s("onboarding.src.pickRepo")]}),(0,r.jsx)(S.m,{value:ex,options:eh.map(e=>({value:e.full,label:e.full,tag:e.private?s("onboarding.src.private"):s("onboarding.src.public")})),onChange:eu})]})]}),"local"===en&&(0,r.jsxs)("div",{className:"card",style:{marginTop:10,display:"grid",gap:8},children:[(0,r.jsxs)("label",{className:"btn-ghost",style:{cursor:eS?"default":"pointer",justifyContent:"center"},children:[(0,r.jsx)(N.I,{name:"grid",size:14})," ",eS?s("onboarding.src.reading"):ev.length>0?s("onboarding.src.chooseAnother"):s("onboarding.src.chooseFolder"),(0,r.jsx)("input",{type:"file",hidden:!0,webkitdirectory:"",directory:"",multiple:!0,disabled:eS,onChange:e=>eH(e.target.files)})]}),eS&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{style:{height:6,borderRadius:999,background:"var(--bg-active)",overflow:"hidden"},children:(0,r.jsx)("div",{style:{height:"100%",width:eC+"%",background:"var(--accent)",transition:"width .2s"}})}),(0,r.jsx)("div",{className:"form-hint",children:s("onboarding.src.readingPct",{pct:eC})})]}),!eS&&ev.length>0&&(0,r.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-string)"},children:[(0,r.jsx)(N.I,{name:"check",size:12})," ",s(1===ev.length?"onboarding.src.imported.one":"onboarding.src.imported.other",{n:ev.length,name:ey}),eM&&(0,r.jsxs)(r.Fragment,{children:[" \xb7 ",(0,r.jsx)("b",{style:{color:"var(--text)"},children:eM})]})]})]}),ej&&(0,r.jsx)("div",{style:{fontSize:11.5,color:"#e8688f",marginTop:6},children:ej}),(0,r.jsxs)("div",{className:"form-hint",children:[(0,r.jsx)(N.I,{name:"bot",size:12})," ",s("onboarding.src.analyseHint")]})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.brief.systemPrompt")," ",(0,r.jsx)("span",{className:"req",children:"*"})]}),(0,r.jsx)("textarea",{className:"persona-ta mono",required:!0,value:O,onChange:e=>Q(e.target.value)})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.brief.projectBrief")," ",(0,r.jsxs)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:["\xb7 ",s("onboarding.brief.optional")]})]}),(0,r.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:110},placeholder:s("onboarding.brief.briefPh"),value:Y,onChange:e=>{X(e.target.value),!K&&e.target.value&&G("project-brief.md")}})]}),(0,r.jsxs)("div",{className:"persona-field",children:[(0,r.jsxs)("label",{className:"form-label",children:[s("onboarding.brief.attachMock")," ",(0,r.jsxs)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:["\xb7 ",s("onboarding.brief.optional")," \xb7 HTML, CSS, JS, MD"]})]}),(0,r.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,r.jsxs)("label",{className:"btn-ghost",style:{cursor:"pointer"},children:[(0,r.jsx)(N.I,{name:"doc",size:13})," ",s("onboarding.brief.files"),(0,r.jsx)("input",{type:"file",multiple:!0,hidden:!0,onChange:e=>eV(e.target.files)})]}),(0,r.jsxs)("label",{className:"btn-ghost",style:{cursor:"pointer"},children:[(0,r.jsx)(N.I,{name:"grid",size:13})," ",s("onboarding.brief.folder"),(0,r.jsx)("input",{type:"file",hidden:!0,webkitdirectory:"",directory:"",multiple:!0,onChange:e=>eV(e.target.files)})]}),Z.length>0&&(0,r.jsxs)("span",{className:"chip-sm",style:{display:"inline-flex",alignItems:"center",gap:6},children:[(0,r.jsx)(N.I,{name:"check",size:12})," ",s(1===Z.length?"onboarding.brief.filesAttached.one":"onboarding.brief.filesAttached.other",{n:Z.length}),(0,r.jsx)("button",{className:"link-btn",style:{marginLeft:4},onClick:()=>ee([]),children:(0,r.jsx)(N.I,{name:"close",size:11})})]})]}),(0,r.jsxs)("div",{className:"form-hint",children:[(0,r.jsx)(N.I,{name:"bot",size:12})," ",s("onboarding.brief.mockHintPre")," ",(0,r.jsx)("span",{className:"mono",children:"mock/"})," ",s("onboarding.brief.mockHintPost")]})]}),eB&&(0,r.jsxs)("div",{style:{marginTop:12},children:[(0,r.jsx)("div",{style:{height:6,borderRadius:999,background:"var(--bg-active)",overflow:"hidden"},children:(0,r.jsx)("div",{style:{height:"100%",width:eL+"%",background:"var(--accent)",transition:"width .3s"}})}),(0,r.jsxs)("div",{className:"form-hint",children:[s("onboarding.src.settingUp")," ",eL,"%"]})]}),eP&&(0,r.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-keyword)",marginTop:10},children:[(0,r.jsx)(N.I,{name:"close",size:12})," ",eP]}),(0,r.jsxs)("div",{className:"onb-foot",children:[(0,r.jsxs)("button",{className:"btn-ghost",disabled:eB,onClick:()=>l(3),children:[(0,r.jsx)(N.I,{name:"chevronLeft",size:13})," ",s("common.back")]}),(0,r.jsxs)("button",{className:"btn-accent",disabled:eB||!O.trim()||!eA,onClick:function(){let e="github"===en?{type:"github",pat:ei,repoFull:ex,branch:eh.find(e=>e.full===ex)?.branch,login:eo||void 0}:"local"===en?{type:"local",rootName:ey,files:ev}:{type:"new"};eR(""),eW(async()=>{try{let s=await c({company:m,mission:f,objective:I,stack:_,provider:eQ,model:$,systemPrompt:O,briefText:Y,briefName:K,mockFiles:Z,source:e,providerCatalogId:T||void 0,providerKey:e$&&e$===T&&e_?e_:void 0});if(s&&!s.ok)return void eR(s.error||"Setup didn't complete — please try again.");eF(100),window.location.assign("/planner")}catch{eR("Setup didn't complete — please try again. If it keeps failing, reload the page.")}})},children:[(0,r.jsx)(N.I,{name:"bot",size:14})," ",eB?s("onboarding.brief.settingUp"):s("onboarding.brief.handOff")]})]})]})]})})]})}},5629:(e,s,a)=>{"use strict";a.d(s,{LangProvider:()=>i,k:()=>c});var r=a(5076),t=a(8488),n=a(3219);let l=(0,t.createContext)("en");function i({lang:e,children:s}){return(0,r.jsx)(l.Provider,{value:e,children:s})}function c(){let e=(0,t.useContext)(l);return(s,a)=>(0,n.t)(e,s,a)}},6816:(e,s,a)=>{"use strict";a.d(s,{J:()=>t});var r=a(5076);function t({size:e=34,rx:s=9}){return(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 100 100",style:{display:"block",flex:`0 0 ${e}px`},"aria-label":"Constella",children:[(0,r.jsx)("rect",{x:"1",y:"1",width:"98",height:"98",rx:s,fill:"var(--cs-bg)",stroke:"var(--cs-border)",strokeWidth:"1.5"}),(0,r.jsx)("path",{d:"M66.06 27.06 L42.75 22.95 L24.62 38.17 L24.62 61.83 L42.75 77.05 L66.06 72.94",fill:"none",stroke:"var(--cs-line)",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M48 50 L42.75 22.95 M48 50 L24.62 50 M48 50 L42.75 77.05",fill:"none",stroke:"var(--cs-line)",strokeWidth:"1.2",strokeLinecap:"round",opacity:"0.55"}),[[66.06,27.06],[42.75,22.95],[24.62,38.17],[24.62,61.83],[42.75,77.05],[66.06,72.94]].map((e,s)=>(0,r.jsx)("circle",{cx:e[0],cy:e[1],r:"3.1",fill:"var(--cs-node)"},s)),(0,r.jsx)("circle",{cx:"48",cy:"50",r:"8.5",fill:"var(--cs-glow)",opacity:"0.4"}),(0,r.jsx)("circle",{cx:"48",cy:"50",r:"4.3",fill:"var(--cs-core)"})]})}},7814:(e,s,a)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return i.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var t in r)Object.defineProperty(s,t,{enumerable:!0,get:r[t]});let n=a(3825),l=a(2617),i=a(5986)},8576:(e,s,a)=>{"use strict";a.d(s,{I:()=>n});var r=a(5076);let t={files:(0,r.jsx)("path",{d:"M3 3.5h5l1.5 2H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1z"}),search:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"7",cy:"7",r:"4.2"}),(0,r.jsx)("path",{d:"M10.2 10.2 14 14"})]}),git:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"4",cy:"4",r:"1.8"}),(0,r.jsx)("circle",{cx:"4",cy:"12",r:"1.8"}),(0,r.jsx)("circle",{cx:"12",cy:"9.5",r:"1.8"}),(0,r.jsx)("path",{d:"M4 5.8v4.4M5.8 4H9a2 2 0 0 1 2 2v1.6"})]}),debug:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8.5",r:"3.5"}),(0,r.jsx)("path",{d:"M8 5V3M4.5 8.5H2m12 0h-2.5M4.8 11.8 3.4 13M11.2 11.8l1.4 1.2M5.2 5 3.8 3.6M10.8 5l1.4-1.4"})]}),ext:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("path",{d:"M9 11.2h4.5M11.2 9v4.5"})]}),settings:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2.2"}),(0,r.jsx)("path",{d:"M8 1.5v2M8 12.5v2M14.5 8h-2M3.5 8h-2M12.6 3.4l-1.4 1.4M4.8 11.2l-1.4 1.4M12.6 12.6l-1.4-1.4M4.8 4.8 3.4 3.4"})]}),account:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"5.5",r:"2.8"}),(0,r.jsx)("path",{d:"M2.8 14c0-2.8 2.3-4.5 5.2-4.5s5.2 1.7 5.2 4.5"})]}),chevronRight:(0,r.jsx)("path",{d:"M6 4l4 4-4 4"}),chevronDown:(0,r.jsx)("path",{d:"M4 6l4 4 4-4"}),chevronUp:(0,r.jsx)("path",{d:"M4 10l4-4 4 4"}),close:(0,r.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"}),add:(0,r.jsx)("path",{d:"M8 3v10M3 8h10"}),newFile:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M9 2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6L9 2z"}),(0,r.jsx)("path",{d:"M9 2v4h4M8 8v4M6 10h4"})]}),newFolder:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M2 5.5a1 1 0 0 1 1-1h3l1.2 1.5H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5.5z"}),(0,r.jsx)("path",{d:"M8 8v3M6.5 9.5h3"})]}),refresh:(0,r.jsx)("path",{d:"M13 8a5 5 0 1 1-1.5-3.5M13 2.5V5h-2.5"}),collapse:(0,r.jsx)("path",{d:"M3 5h6M3 8h6M3 11h6M12 6l-1.5 1.5L12 9"}),more:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"3.5",cy:"8",r:"1"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"1"}),(0,r.jsx)("circle",{cx:"12.5",cy:"8",r:"1"})]}),split:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1"}),(0,r.jsx)("path",{d:"M8 3v10"})]}),terminal:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M4.5 6.5 6.5 8l-2 1.5M8 10h3.5"})]}),panelBottom:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M2 10h12"})]}),sidebarIcon:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M6 3v10"})]}),bell:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 2a3.5 3.5 0 0 0-3.5 3.5c0 3-1.3 4-1.3 4h9.6s-1.3-1-1.3-4A3.5 3.5 0 0 0 8 2z"}),(0,r.jsx)("path",{d:"M6.7 12a1.4 1.4 0 0 0 2.6 0"})]}),check:(0,r.jsx)("path",{d:"M3 8.5 6.5 12 13 4"}),error:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,r.jsx)("path",{d:"M8 5v4M8 11h.01"})]}),warn:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 2.5 14.5 13.5h-13z"}),(0,r.jsx)("path",{d:"M8 7v3M8 12h.01"})]}),branch:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"4",cy:"4",r:"1.6"}),(0,r.jsx)("circle",{cx:"4",cy:"12",r:"1.6"}),(0,r.jsx)("circle",{cx:"12",cy:"9",r:"1.6"}),(0,r.jsx)("path",{d:"M4 5.6v4.8M5.6 4H9a1.8 1.8 0 0 1 1.8 1.8v1.6"})]}),sync:(0,r.jsx)("path",{d:"M3 6a5 5 0 0 1 8.5-2M13 10a5 5 0 0 1-8.5 2M11.5 2.5V4h-1.5M4.5 13.5V12h1.5"}),command:(0,r.jsx)("path",{d:"M5.5 3.5A1.5 1.5 0 1 1 4 5h8a1.5 1.5 0 1 1-1.5 1.5v3A1.5 1.5 0 1 1 12 11H4a1.5 1.5 0 1 1 1.5-1.5v-3z"}),goto:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M3 8h8M7.5 4.5 11 8l-3.5 3.5"}),(0,r.jsx)("path",{d:"M13 3v10"})]}),sun:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,r.jsx)("path",{d:"M8 1.5v1.5M8 13v1.5M14.5 8H13M3 8H1.5M12.6 3.4l-1 1M4.4 11.6l-1 1M12.6 12.6l-1-1M4.4 4.4l-1-1"})]}),moon:(0,r.jsx)("path",{d:"M13 9.2A5.5 5.5 0 0 1 6.8 3 5.5 5.5 0 1 0 13 9.2z"}),play:(0,r.jsx)("path",{d:"M5 3.5v9l7-4.5z"}),trash:(0,r.jsx)("path",{d:"M3.5 4.5h9M6 4.5V3h4v1.5M5 4.5l.5 8.5h5l.5-8.5"}),dot:(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),fileTs:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M9 2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6L9 2z"}),(0,r.jsx)("path",{d:"M9 2v4h4"})]}),arrowUp:(0,r.jsx)("path",{d:"M8 13V3M4 7l4-4 4 4"}),arrowDown:(0,r.jsx)("path",{d:"M8 3v10M4 9l4 4 4-4"}),agents:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"5.5",cy:"6",r:"2.2"}),(0,r.jsx)("circle",{cx:"11",cy:"6.5",r:"1.8"}),(0,r.jsx)("path",{d:"M2 13c0-2 1.6-3.2 3.5-3.2S9 11 9 13M9.5 12.5c.2-1.6 1.3-2.5 2.8-2.5 1.3 0 2.4.8 2.4 2.3"})]}),bot:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"3",y:"5.5",width:"10",height:"7",rx:"2"}),(0,r.jsx)("path",{d:"M8 3v2.5M5.8 9h.01M10.2 9h.01M6 12h4"}),(0,r.jsx)("circle",{cx:"8",cy:"3",r:"1"})]}),send:(0,r.jsx)("path",{d:"M14 2 7 9M14 2l-4.5 12-2.5-5L2 6.5z"}),at:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,r.jsx)("path",{d:"M11 8v1.2a1.8 1.8 0 0 0 3.5.6A6.5 6.5 0 1 0 11 13.2"})]}),chevronLeft:(0,r.jsx)("path",{d:"M10 4 6 8l4 4"}),dockRight:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M10 3v10"}),(0,r.jsx)("rect",{x:"10.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),dockLeft:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M6 3v10"}),(0,r.jsx)("rect",{x:"2.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),chat:(0,r.jsx)("path",{d:"M3 4.5h10a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H7l-3 2.5V11.5H3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z"}),grid:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,r.jsx)("rect",{x:"9",y:"9",width:"4.5",height:"4.5",rx:"1"})]}),inbox:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M2 9h3l1 2h4l1-2h3"}),(0,r.jsx)("path",{d:"M2.5 9 4 3.5h8L13.5 9v3.5a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1z"})]}),calendar:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"10",rx:"1.5"}),(0,r.jsx)("path",{d:"M2.5 6.5h11M5.5 2v3M10.5 2v3"})]}),repeat:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M3 6a4 4 0 0 1 7-2.5L12 5M13 10a4 4 0 0 1-7 2.5L4 11"}),(0,r.jsx)("path",{d:"M12 2v3H9M4 14v-3h3"})]}),doc:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M9 2H4.5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.5L9 2z"}),(0,r.jsx)("path",{d:"M9 2v3.5h3.5M6 8.5h4M6 11h4"})]}),skill:(0,r.jsx)("path",{d:"M8 2.5l1.4 3.1 3.4.4-2.5 2.3.7 3.3L8 9.9 5 11.6l.7-3.3L3.2 6l3.4-.4z"}),pulse:(0,r.jsx)("path",{d:"M2 8h3l1.5-4 2.5 8 1.5-4H14"}),coins:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ellipse",{cx:"6",cy:"4.5",rx:"3.5",ry:"1.8"}),(0,r.jsx)("path",{d:"M2.5 4.5v3c0 1 1.6 1.8 3.5 1.8s3.5-.8 3.5-1.8v-3"}),(0,r.jsx)("ellipse",{cx:"10",cy:"9.5",rx:"3.5",ry:"1.8"}),(0,r.jsx)("path",{d:"M6.5 9.5c.4.9 1.8 1.5 3.5 1.5s3.5-.8 3.5-1.8v-1.2"})]}),cpu:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1.5"}),(0,r.jsx)("rect",{x:"6.3",y:"6.3",width:"3.4",height:"3.4",rx:".5"}),(0,r.jsx)("path",{d:"M6 2v2M10 2v2M6 12v2M10 12v2M2 6h2M2 10h2M12 6h2M12 10h2"})]}),shield:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 2 3 4v4c0 3 2.2 5 5 6 2.8-1 5-3 5-6V4z"}),(0,r.jsx)("path",{d:"M5.8 8 7.3 9.5 10.4 6.3"})]}),target:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2.4"})]}),selectParent:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("rect",{x:"2",y:"2.5",width:"12",height:"11",rx:"1.5"}),(0,r.jsx)("path",{d:"M8 11V6.5M5.5 9 8 6.5l2.5 2.5"})]})};function n({name:e,size:s=16,className:a="",strokeWidth:l=1.4,style:i}){let c=t[e];return c?(0,r.jsx)("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",className:a,style:i,children:"play"===e||"dot"===e?(0,r.jsx)("g",{fill:"currentColor",stroke:"none",children:c}):c}):null}},9177:(e,s,a)=>{Promise.resolve().then(a.bind(a,3917))},9860:(e,s,a)=>{"use strict";var r=a(2004);a.o(r,"usePathname")&&a.d(s,{usePathname:function(){return r.usePathname}}),a.o(r,"useRouter")&&a.d(s,{useRouter:function(){return r.useRouter}})}},e=>{e.O(0,[3219,4263,9562,6646,6834,7358],()=>e(e.s=9177)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9492],{5041:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5608:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(5076),n=l(6702),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5845:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(5608)}])},6702:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(5076),n=l(5041);function o({status:e,message:t}){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:`${e}: ${t}`}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:e}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:t})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[6646,6834,7358],()=>e(e.s=5845)),_N_E=e.O()}]);
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":28123414,"timestamp":188576713988,"id":14,"parentId":1,"tags":{},"startTime":1782508279864,"traceId":"a4e358a6c66332a8"},{"name":"run-typescript","duration":11131837,"timestamp":188604843419,"id":7669,"parentId":1,"tags":{},"startTime":1782508307994,"traceId":"a4e358a6c66332a8"},{"name":"static-check","duration":1473166,"timestamp":188616164789,"id":7672,"parentId":1,"tags":{},"startTime":1782508319315,"traceId":"a4e358a6c66332a8"},{"name":"static-generation","duration":2941059,"timestamp":188618394581,"id":7782,"parentId":1,"tags":{},"startTime":1782508321545,"traceId":"a4e358a6c66332a8"},{"name":"collect-build-traces","duration":10815973,"timestamp":188617642309,"id":7779,"parentId":1,"tags":{},"startTime":1782508320792,"traceId":"a4e358a6c66332a8"},{"name":"telemetry-flush","duration":52,"timestamp":188628462932,"id":7791,"parentId":1,"tags":{},"startTime":1782508331613,"traceId":"a4e358a6c66332a8"},{"name":"next-build","duration":51864070,"timestamp":188576598934,"id":1,"tags":{"buildMode":"default","version":"16.2.9","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1782508279749,"traceId":"a4e358a6c66332a8"}]
1
+ [{"name":"run-webpack","duration":26815952,"timestamp":190799899484,"id":14,"parentId":1,"tags":{},"startTime":1782510503049,"traceId":"bc7cc12461eca835"},{"name":"run-typescript","duration":12000260,"timestamp":190826723198,"id":7670,"parentId":1,"tags":{},"startTime":1782510529873,"traceId":"bc7cc12461eca835"},{"name":"static-check","duration":1542436,"timestamp":190838901609,"id":7673,"parentId":1,"tags":{},"startTime":1782510542051,"traceId":"bc7cc12461eca835"},{"name":"static-generation","duration":3346027,"timestamp":190841194366,"id":7783,"parentId":1,"tags":{},"startTime":1782510544344,"traceId":"bc7cc12461eca835"},{"name":"collect-build-traces","duration":11536388,"timestamp":190840447211,"id":7780,"parentId":1,"tags":{},"startTime":1782510543597,"traceId":"bc7cc12461eca835"},{"name":"telemetry-flush","duration":42,"timestamp":190851987658,"id":7792,"parentId":1,"tags":{},"startTime":1782510555137,"traceId":"bc7cc12461eca835"},{"name":"next-build","duration":52206246,"timestamp":190799781460,"id":1,"tags":{"buildMode":"default","version":"16.2.9","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1782510502931,"traceId":"bc7cc12461eca835"}]
package/CHANGELOG.md CHANGED
@@ -12,6 +12,51 @@ may still introduce breaking changes while the platform stabilises.
12
12
 
13
13
  ---
14
14
 
15
+ ## [0.3.5] — 2026-06-26 — "VPS update polish"
16
+
17
+ ### Fixed
18
+ - **Dropped the wrong "(Docker)" label** on the VPS update context. Constella's VPS mode is **native** — systemd +
19
+ Tailscale, **no Docker** — so the Update module now reads "Running on a VPS — one-click self-update".
20
+ - **The passwordless self-update drop-in is no longer skipped at setup.** `visudo` lives in `/usr/sbin`, which
21
+ isn't on a non-root user's PATH, so the install/update scripts' `visudo -cf` check failed with "command not
22
+ found" and silently never wrote `/etc/sudoers.d/constella` — leaving one-click VPS updates un-enabled. The
23
+ scripts now resolve `visudo` explicitly (`/usr/sbin/visudo` fallback) and validate **through `sudo`**, and the
24
+ sudoers body is pure ASCII (no em-dash) to remove any locale-parse risk.
25
+
26
+ ---
27
+
28
+ ## [0.3.4] — 2026-06-26 — "A VPS updates itself"
29
+
30
+ The **Update now** button finally does the whole thing on a server — no shell, no copy-paste.
31
+
32
+ ### Added
33
+ - **One-click updates on a VPS.** Pressing **Update now** in the Update module now installs the new release and
34
+ restarts the service **by itself**. It updates the global package, lets **systemd** cycle the unit onto the new
35
+ code, and the page **reloads itself** once the server answers again — it waits out the ~3s restart instead of
36
+ landing on a dead connection. Before, a VPS could only print the manual command for you to run.
37
+ - **Scoped passwordless self-update.** `vps-install.sh` (and `vps-update.sh`) now drop a tightly-scoped
38
+ `/etc/sudoers.d/constella` that grants the service user **NOPASSWD for exactly two commands** —
39
+ `npm install -g constellai[@version]` and `systemctl restart constella` — and nothing else. It's validated with
40
+ `visudo` before it's installed, so a malformed rule can never lock you out of sudo.
41
+
42
+ ### Note
43
+ - **Bootstrap.** Hosts installed before 0.3.4 don't have the sudoers drop-in yet, so the **first** update still
44
+ uses the shell — run the VPS one-liner once
45
+ (`curl -fsSL …/scripts/vps-update.sh | bash`). That run writes the drop-in; **every update after is one-click**
46
+ from the button.
47
+
48
+ ---
49
+
50
+ ## [0.3.3] — 2026-06-26 — "Avatar photos show everywhere"
51
+
52
+ ### Fixed
53
+ - **Avatar photos show in the home chat + @-mention list** — the home page passed the operator without its
54
+ `image`, so an uploaded operator photo never appeared there (always the "OP" initials), and the @-mention list
55
+ also dropped the agent image. Both now thread the saved avatar (the chat dock + sidebar already did). Avatars
56
+ are small data URLs in the DB.
57
+
58
+ ---
59
+
15
60
  ## [0.3.2] — 2026-06-26 — "Install & onboarding fixes"
16
61
 
17
62
  A point release fixing first-run on Windows and on a VPS.
@@ -28,9 +73,6 @@ A point release fixing first-run on Windows and on a VPS.
28
73
  agent runs couldn't spawn the binary. `vps-install.sh` now bakes a full `Environment=PATH` into the service (covers
29
74
  **all** CLIs). On an existing host: symlink the CLI into `/usr/local/bin`, or add a `PATH=` systemd drop-in — see
30
75
  [Troubleshooting](docs/en/TROUBLESHOOTING.md).
31
- - **Avatar photos show in the home chat** — the home page passed the operator without its `image`, so an uploaded
32
- operator photo never appeared there (always the "OP" initials); the @-mention list also dropped the agent image.
33
- Both now thread the saved avatar (the chat dock + sidebar already did). Avatars are small data URLs in the DB.
34
76
 
35
77
  ---
36
78
 
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <p align="center">
7
7
  <a href="#-quickstart"><img alt="npx constella" src="https://img.shields.io/badge/npx-constellai-7c3aed?style=for-the-badge&logo=npm&logoColor=white"></a>
8
- <img alt="version" src="https://img.shields.io/badge/version-0.3.2-22d3ee?style=for-the-badge">
8
+ <img alt="version" src="https://img.shields.io/badge/version-0.3.5-22d3ee?style=for-the-badge">
9
9
  <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A520-3fb950?style=for-the-badge&logo=node.js&logoColor=white">
10
10
  <img alt="license" src="https://img.shields.io/badge/license-MIT-a78bfa?style=for-the-badge">
11
11
  <img alt="agent CLIs" src="https://img.shields.io/badge/agent%20CLIs-claude%20%C2%B7%20codex%20%C2%B7%20%2B8-e879f9?style=for-the-badge">
package/README.pt-BR.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <p align="center">
7
7
  <a href="#-início-rápido"><img alt="npx constella" src="https://img.shields.io/badge/npx-constellai-7c3aed?style=for-the-badge&logo=npm&logoColor=white"></a>
8
- <img alt="version" src="https://img.shields.io/badge/version-0.3.2-22d3ee?style=for-the-badge">
8
+ <img alt="version" src="https://img.shields.io/badge/version-0.3.5-22d3ee?style=for-the-badge">
9
9
  <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A520-3fb950?style=for-the-badge&logo=node.js&logoColor=white">
10
10
  <img alt="license" src="https://img.shields.io/badge/license-MIT-a78bfa?style=for-the-badge">
11
11
  <img alt="agent CLIs" src="https://img.shields.io/badge/CLIs%20de%20agente-claude%20%C2%B7%20codex%20%C2%B7%20%2B8-e879f9?style=for-the-badge">
@@ -109,6 +109,50 @@ function relaunch() {
109
109
  try { spawn("constella", ["--" + MODE], { detached: true, stdio: "ignore", shell: true, windowsHide: true, env: { ...process.env, CONSTELLA_HOME: HOME } }).unref(); } catch { /* user can start it by hand */ }
110
110
  }
111
111
 
112
+ // ── VPS path ─────────────────────────────────────────────────────────────────────────────────────────────
113
+ // A VPS runs under systemd as a non-root service user, so it CANNOT touch the root-owned global package or
114
+ // `systemctl` on its own. The installer (vps-install.sh) drops a tightly-scoped /etc/sudoers.d/constella that
115
+ // grants NOPASSWD for EXACTLY two commands: `npm install -g constellai[@*]` and `systemctl restart constella`.
116
+ // So here we update via `sudo -n` and then let systemd cycle the unit (it stops this whole cgroup — us
117
+ // included — and starts fresh on the new code). No kill-by-pid, no relaunch: systemd owns the process.
118
+ const SERVICE = process.env.CONSTELLA_SERVICE || "constella";
119
+
120
+ function vpsInstall(target) {
121
+ const opt = { stdio: QUIET ? "ignore" : "inherit", windowsHide: true, cwd: SAFE_CWD };
122
+ for (let i = 0; i < 4; i++) {
123
+ log(`• sudo npm install -g ${target} (attempt ${i + 1}/4)…`);
124
+ // Prefer passwordless sudo (root-owned global prefix). Fall back to plain npm in case the prefix is
125
+ // already user-writable (a user-level npm prefix) — then no sudo is needed at all.
126
+ let r = spawnSync("sudo", ["-n", "npm", "install", "-g", target], opt);
127
+ if (r.status === 0) return true;
128
+ r = spawnSync("npm", ["install", "-g", target], { ...opt, shell: true });
129
+ if (r.status === 0) return true;
130
+ sleep(3000);
131
+ }
132
+ return false;
133
+ }
134
+
135
+ function restartUnit() {
136
+ log(`• Restarting the ${SERVICE} systemd service…`);
137
+ // Self-restart: systemd SIGTERMs this cgroup (incl. this updater) then starts the unit fresh on the new
138
+ // code. The result file is already "done", so the reconnecting UI sees success. If sudo/systemctl isn't
139
+ // available (a non-systemd container), this no-ops and the host keeps running the old code until a manual
140
+ // restart — `Restart=always` does NOT help here because we didn't crash.
141
+ try { spawnSync("sudo", ["-n", "systemctl", "restart", SERVICE], { stdio: QUIET ? "ignore" : "inherit" }); } catch { /* manual restart needed */ }
142
+ }
143
+
144
+ if (MODE === "vps") {
145
+ result({ status: "running" });
146
+ if (QUIET) sleep(1200); // let the UI receive the response + start polling
147
+ const v = arg("--version") || "latest";
148
+ const target = `${PKG}@${/^\d+\.\d+\.\d+/.test(v) ? v : "latest"}`; // only a real semver or @latest (sudoers-scoped)
149
+ const okv = vpsInstall(target);
150
+ result({ status: okv ? "done" : "error" });
151
+ log(okv ? "✓ Installed — restarting the service." : "✖ Update failed — run by hand: sudo npm i -g constellai@latest && sudo systemctl restart constella");
152
+ if (okv) restartUnit();
153
+ process.exit(okv ? 0 : 1);
154
+ }
155
+
112
156
  result({ status: "running" });
113
157
  if (QUIET) sleep(1200); // let the UI receive the response + start polling
114
158
 
package/docs/UPDATE.md CHANGED
@@ -4,8 +4,9 @@
4
4
 
5
5
  ![](./assets/divider-orbit.svg)
6
6
 
7
- **Current stable release: `v0.3.2`** — install & onboarding fixes on top of 0.3.0. See what changed in the
8
- [Changelog](../CHANGELOG.md) (the Update module also shows it inline as “What's new”).
7
+ **Current stable release: `v0.3.5`** — a VPS updates itself in one click (now correctly labelled + reliably
8
+ enabled). See what changed in the [Changelog](../CHANGELOG.md) (the Update module also shows it inline as
9
+ “What's new”).
9
10
 
10
11
  > This is the page the **Update** module's “docs” button opens. It tells you, in plain terms, how to move Constella
11
12
  > to a newer version — from the app or the terminal — and how to roll back if you ever need to. Your data
@@ -23,6 +24,25 @@ it didn't earn: the updater writes the real result and the screen reflects it tr
23
24
  Latest first. The in-app **Update** module shows the changelog inline as “What's new”; this is the same history, kept
24
25
  here so the “docs” button always shows what each release added. Full detail: [Changelog](../CHANGELOG.md).
25
26
 
27
+ ### v0.3.5 — VPS update polish
28
+ - Dropped the inaccurate **"(Docker)"** label — VPS mode is **native** (systemd + Tailscale, no Docker).
29
+ - Fixed the passwordless self-update drop-in being **skipped at setup** (`visudo` wasn't on the non-root PATH), so
30
+ one-click VPS updates actually get enabled now.
31
+
32
+ ### v0.3.4 — a VPS updates itself
33
+ - **One-click updates on a VPS.** **Update now** installs the new release and restarts the service **by itself** —
34
+ it updates the global package, lets **systemd** cycle the unit onto the new code, and the page **reloads itself**
35
+ once the server is back (it waits out the restart instead of dropping a dead connection). Before, a VPS could
36
+ only print the manual command.
37
+ - **Scoped passwordless self-update.** The installer drops a tightly-scoped `/etc/sudoers.d/constella` that lets
38
+ the service user run **exactly two** commands without a password — `npm install -g constellai[@version]` and
39
+ `systemctl restart constella` — validated with `visudo` first. _Bootstrap:_ hosts installed before 0.3.4 run the
40
+ VPS one-liner **once** to gain the drop-in; every update after that is one-click.
41
+
42
+ ### v0.3.3 — avatar photos show everywhere
43
+ - Operator/agent avatar photos now appear in the **home chat** and the **@-mention list** (they already showed in
44
+ the chat dock + sidebar).
45
+
26
46
  ### v0.3.2 — install & onboarding fixes
27
47
  - `npx constellai` works on **Windows** (the package ships a matching `constellai` bin).
28
48
  - Onboarding no longer freezes at “Setting up… 100%” — it hard-navigates to the Planner (all modes).
@@ -77,23 +97,34 @@ constella update
77
97
 
78
98
  ## 🌌 How it updates, per environment
79
99
 
80
- The first match wins. Only a **global npm install** updates itself automatically everything else hands you the precise
81
- command, because running it from the web server would be environment-specific.
100
+ The first match wins. A **global npm install** and a **VPS** both update themselves from the button; dev / npx /
101
+ portable hand you the precise command, because running it from the web server would be environment-specific.
82
102
 
83
103
  | Environment | Auto-updates? | What to run |
84
104
  | --- | --- | --- |
85
105
  | **Global npm install** | ✅ in the background | `npm install -g constellai@latest` (Constella runs this for you) → then restart |
106
+ | **VPS (native service)** | ✅ from the button¹ | nothing — it installs + `systemctl restart`s + reloads itself |
86
107
  | **Dev (from source)** | ❌ | `git pull && pnpm install && pnpm build` |
87
108
  | **npx** | ❌ | `npx constellai@latest` |
88
- | **VPS (native service)** | ❌ | `bash scripts/vps-update.sh` (or the curl one-liner below) |
89
109
  | **Portable (USB)** | ❌ | `npm install -g constellai@latest` (after a free-space + backup check) |
90
110
 
111
+ > ¹ One-click VPS updates need the passwordless self-update drop-in (`/etc/sudoers.d/constella`) that the installer
112
+ > writes from **v0.3.4** on. A host installed earlier runs the VPS one-liner **once** (below) to gain it — after
113
+ > that, **Update now** does everything on its own.
114
+
91
115
  ---
92
116
 
93
117
  ## 🛰️ VPS update
94
118
 
95
- Run **one** of these on the VPS host. Data in `~/.constella` is preserved, and the database migrations run automatically
96
- on the next boot.
119
+ **From v0.3.4 the button does it for you.** On a VPS, **Update now** installs the new release, lets systemd restart
120
+ the unit, and reloads the page once the server is back — no shell needed. It works because the installer grants the
121
+ service user passwordless rights to **exactly** `npm install -g constellai` and `systemctl restart constella`
122
+ (`/etc/sudoers.d/constella`, validated with `visudo`). A host first installed **before** v0.3.4 doesn't have that
123
+ drop-in yet, so run the one-liner below **once** — that update writes the drop-in, and every update after is
124
+ one-click from the button.
125
+
126
+ To update from a shell instead (or to do that first bootstrap run), use **one** of these on the VPS host. Data in
127
+ `~/.constella` is preserved, and the database migrations run automatically on the next boot.
97
128
 
98
129
  ```bash
99
130
  # Native install — pull the updater straight from GitHub (no repo checkout needed):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "constellai",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Constella — run autonomous AI agent-companies locally: real claude/codex agents, Goals → Specs → Issues → Plans, local models, GitHub & Telegram, all from one cosmic control plane.",
5
5
  "//name": "Published as `constellai` (the unscoped `constella` was taken). Ships BOTH a `constellai` and a `constella` bin (same launcher): `npx constellai` needs a bin matching the package name to run on Windows, and a global install also gives the short `constella` command.",
6
6
  "license": "MIT",
@@ -82,6 +82,31 @@ EOF
82
82
  $SUDO systemctl daemon-reload
83
83
  $SUDO systemctl enable --now constella
84
84
 
85
+ # 4b) Passwordless self-update. The service runs as a NON-root user, so it can't touch the root-owned global
86
+ # package or `systemctl` by itself — the in-app "Update now" button would stall waiting for a password.
87
+ # Drop a TIGHTLY-SCOPED /etc/sudoers.d/constella granting NOPASSWD for EXACTLY two commands: install the
88
+ # package and restart the unit. Nothing else. Validated with `visudo -c` before it's installed (a malformed
89
+ # sudoers file would lock out sudo), and skipped gracefully if validation fails.
90
+ say "• Enabling passwordless self-update (sudoers.d/constella)…"
91
+ NPM_PATH="$(command -v npm || echo /usr/bin/npm)"
92
+ SYSTEMCTL_PATH="$(command -v systemctl || echo /usr/bin/systemctl)"
93
+ # visudo lives in /usr/sbin, which is NOT on a non-root user's PATH (this script may run as the operator via
94
+ # `curl | bash`). Resolve it explicitly and validate THROUGH sudo so it's both found and privileged.
95
+ VISUDO="$(command -v visudo || echo /usr/sbin/visudo)"
96
+ SUDOERS_TMP="$(mktemp)"
97
+ cat > "$SUDOERS_TMP" <<EOF
98
+ # Constella self-update - managed by scripts/vps-install.sh. Lets ${RUN_USER} update Constella and restart
99
+ # its service without a password (the in-app Update button + scripts/vps-update.sh). Scoped to two commands.
100
+ ${RUN_USER} ALL=(root) NOPASSWD: ${NPM_PATH} install -g constellai, ${NPM_PATH} install -g constellai@*, ${SYSTEMCTL_PATH} restart constella, ${SYSTEMCTL_PATH} restart constella.service
101
+ EOF
102
+ if $SUDO "$VISUDO" -cf "$SUDOERS_TMP" >/dev/null 2>&1; then
103
+ $SUDO install -m 0440 -o root -g root "$SUDOERS_TMP" /etc/sudoers.d/constella
104
+ say " ✓ One-click updates enabled — the Update module can install + restart on its own."
105
+ else
106
+ say " • Skipped (sudoers validation failed) — in-app VPS updates will fall back to the shell command."
107
+ fi
108
+ rm -f "$SUDOERS_TMP"
109
+
85
110
  # 5) Reach URL = the host's tailnet IP.
86
111
  sleep 2
87
112
  IP="$(tailscale ip -4 2>/dev/null | head -1 || true)"
@@ -12,9 +12,33 @@ SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
12
12
  say() { printf '%s\n' "$*"; }
13
13
  VERSION="${1:-latest}"
14
14
 
15
+ # The user the service runs as (owns ~/.constella). Under sudo, the real operator.
16
+ RUN_USER="${SUDO_USER:-$(id -un)}"
17
+
15
18
  say "• Installing ${PKG}@${VERSION}…"
16
19
  $SUDO npm install -g "${PKG}@${VERSION}"
17
20
 
21
+ # Ensure the passwordless self-update drop-in exists (so the in-app "Update now" button can install + restart
22
+ # on its own from here on). Idempotent: re-writes the same scoped file each run. See vps-install.sh for the
23
+ # rationale; validated with visudo before install so a bad file can never lock out sudo.
24
+ if [ ! -f /etc/sudoers.d/constella ]; then
25
+ NPM_PATH="$(command -v npm || echo /usr/bin/npm)"
26
+ SYSTEMCTL_PATH="$(command -v systemctl || echo /usr/bin/systemctl)"
27
+ # visudo is in /usr/sbin (off a non-root PATH) — resolve it and validate through sudo so it's found + privileged.
28
+ VISUDO="$(command -v visudo || echo /usr/sbin/visudo)"
29
+ SUDOERS_TMP="$(mktemp)"
30
+ cat > "$SUDOERS_TMP" <<EOF
31
+ # Constella self-update - managed by scripts/vps-update.sh. Lets ${RUN_USER} update Constella and restart its
32
+ # service without a password (the in-app Update button). Scoped to two commands.
33
+ ${RUN_USER} ALL=(root) NOPASSWD: ${NPM_PATH} install -g constellai, ${NPM_PATH} install -g constellai@*, ${SYSTEMCTL_PATH} restart constella, ${SYSTEMCTL_PATH} restart constella.service
34
+ EOF
35
+ if $SUDO "$VISUDO" -cf "$SUDOERS_TMP" >/dev/null 2>&1; then
36
+ $SUDO install -m 0440 -o root -g root "$SUDOERS_TMP" /etc/sudoers.d/constella
37
+ say "• Enabled passwordless one-click updates (sudoers.d/constella)."
38
+ fi
39
+ rm -f "$SUDOERS_TMP"
40
+ fi
41
+
18
42
  if systemctl list-unit-files 2>/dev/null | grep -q '^constella\.service'; then
19
43
  say "• Restarting the constella service…"
20
44
  $SUDO systemctl restart constella
@@ -1,12 +0,0 @@
1
- "use strict";exports.id=3174,exports.ids=[3174],exports.modules={385:(a,b,c)=>{c.r(b),c.d(b,{"005641f9bad364cd965612fff5a0ebc8059a938c60":()=>d.cT,"009d9820e2f136072e02d1e2ec05cf2e8515dba657":()=>d.Kd,"4096859a52aa6289b261195d6bcc88bffcc739678f":()=>d.OD,"40f3f64e22dddffa875535f6844b15de00041aae6a":()=>d.j0});var d=c(14565)},13841:(a,b,c)=>{c.d(b,{FixButton:()=>n,RunReviewButton:()=>o,Toggle:()=>m});var d=c(4374),e=c(74679),f=c(2910);let g=(0,f.createServerReference)("603e1090ba538c0080e8b0f8c4ebd5f42f7d362694",f.callServer,void 0,f.findSourceMapURL,"toggleRoutine"),h=(0,f.createServerReference)("6097597c07ade6019706d8296d6400c7502816aeea",f.callServer,void 0,f.findSourceMapURL,"togglePlugin"),i=(0,f.createServerReference)("404d70b8e0b42761e87757d9f572241e1fe4a0cb5c",f.callServer,void 0,f.findSourceMapURL,"fixFinding"),j=(0,f.createServerReference)("006fe099d4524d3419950e00a8dab2f38e33f2a5da",f.callServer,void 0,f.findSourceMapURL,"runReview");var k=c(43526),l=c(31819);function m({kind:a,id:b,on:c}){let[f,i]=(0,e.useTransition)(),j="routine"===a?g:h;return(0,d.jsx)("div",{className:"toggle"+(c?" on":""),"aria-disabled":f,role:"switch","aria-checked":c,onClick:()=>!f&&i(()=>j(b,!c))})}function n({id:a}){let b=(0,l.k)(),[c,f]=(0,e.useTransition)();return(0,d.jsxs)("button",{className:"sc2-btn",disabled:c,onClick:()=>f(()=>i(a)),children:[(0,d.jsx)(k.I,{name:"bot",size:12})," ",b("security.letAgentFix")]})}function o(){let a=(0,l.k)(),[b,c]=(0,e.useTransition)();return(0,d.jsxs)("button",{className:"btn-accent",disabled:b,onClick:()=>{window.dispatchEvent(new CustomEvent("constella:agent-run",{detail:{channel:"security"}})),c(async()=>{await j()})},children:[(0,d.jsx)(k.I,{name:"refresh",size:14,className:b?"sync-spin":""})," ",a(b?"security.reviewing":"security.runReview")]})}},15165:(a,b,c)=>{c.r(b),c.d(b,{"0006e9a4090ba43efa59bbc52b604c68dda554a774":()=>i.V,"001d11e1ddfafcf521054a33afdc0087b8fc02ca5e":()=>j.f,"00554f3f45aed8311b34015efd1675c98eb75a7003":()=>h.Mp,"005cb7cf17a2509d978d131aea927da4e5dfbe7b4d":()=>k.dj,"0065d0a233bee6cc0f2cc0ec1c9e2e57d3fe4146bd":()=>d.bt,"0067de168f0f3d5d47da2729379e374260b6f809a6":()=>F.eU,"006fe099d4524d3419950e00a8dab2f38e33f2a5da":()=>E,"0074f45d8e4ca4543908c3ced6c3b9b9a3706ea44d":()=>e.GK,"00776508d76f457fe33f124a1fb10321c0b2c6f3d6":()=>F.pM,"00787e1d3b391edf77c366599af3e651180d599956":()=>h.x7,"0078c3cfde299e57b61ac68334e3fe978d3fc6cef6":()=>k.io,"009f3ddf3819ad383dee68db2183a1210c5023774a":()=>F.PG,"00a0c266caaa88ca19c7fce426d235d7254e156543":()=>k.eg,"00d246fcde2d3c50428679fff30012c9289346cf37":()=>e.PE,"00d7e9c1769c68149f98218001d1ddeb98043eccfe":()=>d.xU,"00ec143d02ba9e6f04b7c8a88a81e38d3cf3251d07":()=>e.y_,"00f0bb87694f8eeadf8dcf1c1cfa321313a5a4b1fb":()=>e.KO,"00fee93e284b9d3ce4673d4b35a90469df57457050":()=>j.O,"40036da9c7c0ca4e2e6adcf4b5fdaefded4551dd7e":()=>h.sE,"400a37db059d75ab551eb466d9f9056caa6261039b":()=>e.RG,"400eee66a77accda3de846105635a40928fdfbd421":()=>d.rd,"4012501e494aa25cf5c7859e4f894c264b3df602d1":()=>d.gg,"4022dbfbf7ae4d80973913063f180ab793855b0200":()=>i.F,"40293323048082ece1bf68bdf4c696ef179d3f8e40":()=>e.ey,"403ac9e50781e88525176283ac0911735a903bdcfe":()=>l.IL,"40438be7dc3629c2574f17d3fbaa4372f44bc5df39":()=>C,"404d70b8e0b42761e87757d9f572241e1fe4a0cb5c":()=>D,"40567e035fbfc4a7f481e872dbcbc25e0603fbe645":()=>F.Kg,"405d7da766ec83b2a7be6e5c1b554e0077d0584ad8":()=>i.VJ,"40601efd7c8cf9c8003649273bd48079ac53d9137b":()=>d.H7,"4065765cf5017f860dee347e9cf6370a4635b09b71":()=>k.De,"406e99a37195b91a40e27c4203663a3e23f1c53e50":()=>e.S,"407edf85849570f6bac31fa7be72ea92e762873ac0":()=>h.lR,"407fce3da0c8d3712c1bb9b6e37754fd1c495cb81b":()=>d.GW,"40854c3b69d8580f508df721657835a17406a94f4e":()=>m.y,"40906b2a0eff3b995c5509c6955f597a85e3c500c2":()=>l.q4,"4090dfcfd07d329c55152cb0be356ba4ac7bbb578b":()=>d.VL,"409a1ff3bd65586fb0174477315a6bd8ba37af4bdc":()=>A,"40ac6757fb2775911c0038068e6886a3048ccde63e":()=>d.Wu,"40ad220ad11c5e62121a9df3584f8a27bc67e248d1":()=>l.TX,"40b3106761cb55bccc8cf2a370e0965143c7c098cd":()=>e.r7,"40d0e07cd481a5d3b711c27030044fd000f063541a":()=>F.lP,"40da22700f7d2c6a79cb198ecbf50ad7b3ac270e07":()=>e.lJ,"40e22c0531e76deec086d8616469b01a4fd360e0ff":()=>e.jc,"40e2554fd57b4e5a7a54c4ede48a862646bc2f4006":()=>g.p,"40e4bd9b38ad957c8d265442dfc9c1bf36c0abd7a3":()=>z,"40ed76b2ba0cfbb4589e93ea1063b8cda68094a7f4":()=>i.E_,"40f2ed8b17501eb4f787ae6031a1453166894c6b1a":()=>g.L,"40f5c5f7f97d05cc50aacd64dda0072d6ce1fd937b":()=>i.zS,"601c5045ab6df3fac3ad4460cda224c173358681c8":()=>l.Jp,"60292c59db016271742efaad80f36105065410c82f":()=>e.AA,"603e1090ba538c0080e8b0f8c4ebd5f42f7d362694":()=>y,"6059882e0544cbad698c8da2cd5f36f90b414b4dae":()=>d.Fu,"606172ae2b4f1bd8d53a80749741c48cdb043bc24f":()=>f.I,"6071f6fad90bba9afb8993e8201d90922c0b420035":()=>d.rm,"607abf4183886833e6e480c222512329f142131c77":()=>d.jw,"6080d722c582ff327c6d40d6d75b49792f25d05e90":()=>e.q$,"6097597c07ade6019706d8296d6400c7502816aeea":()=>B,"609840742e940619bb5a84de070dda27c453a3a4a4":()=>d.ME,"609babc1bf8e845464b748fcd82cf2757a1ce45f90":()=>e.LZ,"60a025032216a5019fcba2c05847baf9e0b0fe8214":()=>l.bV,"60aabde05e027b8493bf2f9d8d59fc5fed6b687751":()=>l.bk,"60ac6b802b4ac5f1a28c3dbdb5ff9f27e10a8e3dcf":()=>f.k,"60edb05ee6cc09289adab8cda11ee413c19d4c7f54":()=>d.n4,"703023a31555bd5115954eb1274fb796ec5c2ca922":()=>d._z,"709237475d6d2e64f2d693bc804672bd7e7e2e48e3":()=>e.M8});var d=c(97140),e=c(15487),f=c(79505),g=c(51605),h=c(46363),i=c(46282),j=c(387),k=c(13604),l=c(7482),m=c(58169),n=c(6866),o=c(77598),p=c(97603),q=c(31371),r=c(65705),s=c(1890),t=c(53993),u=c(70149),v=c(56338),w=c(24701),x=c(83963);async function y(a,b){let{workspace:c}=await (0,t.nP)();await r.db.update(s.routine).set({enabled:b}).where((0,p.Uo)((0,p.eq)(s.routine.id,a),(0,p.eq)(s.routine.workspaceId,c.id))),(0,q.revalidatePath)("/routines")}async function z(a){let{workspace:b}=await (0,t.nP)(),c=a.name.trim();return c?(await r.db.insert(s.routine).values({id:(0,o.randomUUID)(),workspaceId:b.id,name:c.slice(0,120),cmd:(a.cmd??"").trim().slice(0,500),freq:(a.freq??"Daily").trim()||"Daily",agentId:a.agentId||null,enabled:!0}),(0,q.revalidatePath)("/routines"),{ok:!0}):{ok:!1,error:"Name the routine."}}async function A(a){let{workspace:b}=await (0,t.nP)();await r.db.delete(s.routine).where((0,p.Uo)((0,p.eq)(s.routine.id,a),(0,p.eq)(s.routine.workspaceId,b.id))),(0,q.revalidatePath)("/routines")}async function B(a,b){let{workspace:c}=await (0,t.nP)();await r.db.update(s.plugin).set({enabled:b}).where((0,p.Uo)((0,p.eq)(s.plugin.id,a),(0,p.eq)(s.plugin.workspaceId,c.id))),(0,q.revalidatePath)("/plugins")}async function C(a){let{workspace:b}=await (0,t.nP)();await r.db.delete(s.inboxItem).where((0,p.Uo)((0,p.eq)(s.inboxItem.id,a),(0,p.eq)(s.inboxItem.workspaceId,b.id))),(0,q.revalidatePath)("/inbox")}async function D(a){let{workspace:b}=await (0,t.nP)();await r.db.update(s.finding).set({status:"fixed"}).where((0,p.Uo)((0,p.eq)(s.finding.id,a),(0,p.eq)(s.finding.workspaceId,b.id))),await r.db.insert(s.notification).values({id:(0,o.randomUUID)(),workspaceId:b.id,kind:"security",text:"Finding patched by the Code Review Agent",detail:"A security finding was fixed and a report was filed."}),(0,q.revalidatePath)("/security")}async function E(){let{org:a,workspace:b}=await (0,t.nP)(),c=await r.db.select().from(s.agent).where((0,p.eq)(s.agent.workspaceId,b.id)),d=c.find(a=>"whitfield"===a.handle)??c.find(a=>/cyber|sec/i.test(a.role))??c[0],e=(0,o.randomUUID)();if(!d)return{ok:!1,count:0,runId:e,error:"no agent"};await r.db.update(s.agent).set({status:"working"}).where((0,p.eq)(s.agent.id,d.id)),await (0,f.I)(b.id,{runId:e,channel:"security",agentId:d.id,kind:"thinking",target:`${d.name} is reviewing the workspace…`});let g=await r.db.select({name:s.skill.name,instructions:s.skill.instructions,summary:s.skill.summary}).from(s.agentSkill).innerJoin(s.skill,(0,p.eq)(s.agentSkill.skillId,s.skill.id)).where((0,p.Uo)((0,p.eq)(s.agentSkill.agentId,d.id),(0,p.RV)(s.skill.name,["owasp-top-10","owasp-asvs","appsec-fundamentals","secrets-management","secure-auth-sessions","dependency-supply-chain","review-code-perf-security","code-review-practices"]))),h=g.length?`
2
- Apply these review skills (consult before judging):
3
- ${g.map(a=>`- ${a.name}: ${(a.instructions||a.summary).replace(/\s+/g," ").slice(0,300)}`).join("\n")}`:"",i=await (0,v.yY)(a.id,"security review: vulnerabilities, auth, secrets, prior findings and decisions",{agentHandle:d.handle,k:6}),j=i.context?`
4
- Project knowledge (prior findings, decisions, patterns — do not contradict):
5
- ${i.context}`:"",k=[`You are ${d.name}, the security reviewer. Review the code in the current workspace directory for vulnerabilities, secret/token exposure, permission & workspace-isolation issues, and risky patterns.`,h,j,"Output ONLY a JSON array (no prose, no markdown fences) of findings:",'[{"sev":"high"|"med"|"low","title":"short title","file":"relative/path","suggestion":"how to fix"}]',"If the workspace is clean or empty, output []. Do not modify any files."].filter(Boolean).join("\n"),l=(0,u.hW)(d.adapter,d.model),m=(0,u.qX)(d.adapter),n=await (0,u.p1)(k,{orgId:a.id,binary:l,model:m,timeoutMs:24e4},a=>{(0,f.I)(b.id,{runId:e,channel:"security",agentId:d.id,kind:a.kind,target:a.target,detail:a.detail})}),y=[],z=n.text.match(/\[[\s\S]*\]/);if(z)try{y=JSON.parse(z[0])}catch{y=[]}for(let a of y.slice(0,40)){let c="high"===a.sev||"low"===a.sev?a.sev:"med";await r.db.insert(s.finding).values({id:(0,o.randomUUID)(),workspaceId:b.id,sev:c,title:String(a.title??"Finding").slice(0,200),file:String(a.file??""),suggestion:String(a.suggestion??""),status:"open"})}y.length&&(0,v.ru)(a.id,y.slice(0,40).map(a=>({type:"vuln",title:String(a.title??"Finding").slice(0,120),summary:`${a.sev??"med"}: ${String(a.suggestion??"")}`.slice(0,1e3),paths:a.file?[String(a.file)]:void 0,agentHandle:d.handle,sourceKind:"review",sourceRef:`${String(a.file??"")}::${String(a.title??"")}`.slice(0,200)}))).catch(()=>{}),(n.usd>0||n.inputTokens+n.outputTokens>0)&&await r.db.insert(s.costEntry).values({id:(0,o.randomUUID)(),workspaceId:b.id,agentId:d.id,provider:n.binary,model:n.model??d.model,usd:n.usd,tokens:n.inputTokens+n.outputTokens,at:new Date}),await r.db.update(s.workspace).set({settings:{...b.settings??{},lastSecurityRun:Date.now()}}).where((0,p.eq)(s.workspace.id,b.id)),await r.db.update(s.agent).set({status:"idle"}).where((0,p.eq)(s.agent.id,d.id));let A=new Date().toISOString().replace("T"," ").slice(0,19),B=`# Security review
6
-
7
- _By @${d.handle} (${d.role}) \xb7 ${A}_
8
-
9
- `+(y.length?`Filed ${y.length} finding(s):
10
-
11
- `+y.slice(0,40).map(a=>`- **${a.sev??"med"}** ${a.title??"Finding"} — \`${a.file??"?"}\`
12
- - ${a.suggestion??""}`).join("\n")+"\n":"No findings — the workspace looks clean.\n");try{await (0,x.g)(a.id,"Reports/security-review.md",B)}catch(a){console.error("[review] security report write failed:",a)}return await (0,f.I)(b.id,{runId:e,channel:"security",agentId:d.id,kind:n.ok?"done":"error",target:n.ok?`${y.length} finding(s) filed`:(n.error??"review failed").slice(0,200)}),await (0,w.I)(b.id,{kind:"security",text:"Security sweep finished",detail:`${d.name} filed ${y.length} finding(s).`,agentId:d.id}),(0,q.revalidatePath)("/security"),(0,q.revalidatePath)("/","layout"),{ok:n.ok,count:y.length,runId:e,error:n.error}}(0,c(74252).D)([y,z,A,B,C,D,E]),(0,n.A)(y,"603e1090ba538c0080e8b0f8c4ebd5f42f7d362694",null),(0,n.A)(z,"40e4bd9b38ad957c8d265442dfc9c1bf36c0abd7a3",null),(0,n.A)(A,"409a1ff3bd65586fb0174477315a6bd8ba37af4bdc",null),(0,n.A)(B,"6097597c07ade6019706d8296d6400c7502816aeea",null),(0,n.A)(C,"40438be7dc3629c2574f17d3fbaa4372f44bc5df39",null),(0,n.A)(D,"404d70b8e0b42761e87757d9f572241e1fe4a0cb5c",null),(0,n.A)(E,"006fe099d4524d3419950e00a8dab2f38e33f2a5da",null);var F=c(52932)},86450:(a,b,c)=>{c.d(b,{FixButton:()=>f,RunReviewButton:()=>g,Toggle:()=>e});var d=c(62060);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call Toggle() from the server but Toggle is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\Usuario\\Documents\\constella\\src\\components\\modules\\module-toggles.tsx","Toggle");(0,d.registerClientReference)(function(){throw Error("Attempted to call ResolveButton() from the server but ResolveButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\Usuario\\Documents\\constella\\src\\components\\modules\\module-toggles.tsx","ResolveButton");let f=(0,d.registerClientReference)(function(){throw Error("Attempted to call FixButton() from the server but FixButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\Usuario\\Documents\\constella\\src\\components\\modules\\module-toggles.tsx","FixButton"),g=(0,d.registerClientReference)(function(){throw Error("Attempted to call RunReviewButton() from the server but RunReviewButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"C:\\Users\\Usuario\\Documents\\constella\\src\\components\\modules\\module-toggles.tsx","RunReviewButton")}};