@mrpatronz/nexusflow 0.2.19 → 1.3.1

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 (294) hide show
  1. package/README.md +37 -7
  2. package/dist/analyzers/index.d.ts +23 -0
  3. package/dist/analyzers/index.d.ts.map +1 -1
  4. package/dist/analyzers/index.js +62 -0
  5. package/dist/analyzers/index.js.map +1 -1
  6. package/dist/commands/add-repo.d.ts +9 -0
  7. package/dist/commands/add-repo.d.ts.map +1 -1
  8. package/dist/commands/add-repo.js +12 -1
  9. package/dist/commands/add-repo.js.map +1 -1
  10. package/dist/commands/add-repo.test.d.ts +2 -0
  11. package/dist/commands/add-repo.test.d.ts.map +1 -0
  12. package/dist/commands/add-repo.test.js +30 -0
  13. package/dist/commands/add-repo.test.js.map +1 -0
  14. package/dist/commands/commands.test.js +26 -6
  15. package/dist/commands/commands.test.js.map +1 -1
  16. package/dist/commands/commit.d.ts +7 -1
  17. package/dist/commands/commit.d.ts.map +1 -1
  18. package/dist/commands/commit.js +31 -8
  19. package/dist/commands/commit.js.map +1 -1
  20. package/dist/commands/commit.test.d.ts +2 -0
  21. package/dist/commands/commit.test.d.ts.map +1 -0
  22. package/dist/commands/commit.test.js +54 -0
  23. package/dist/commands/commit.test.js.map +1 -0
  24. package/dist/commands/diff.d.ts +9 -2
  25. package/dist/commands/diff.d.ts.map +1 -1
  26. package/dist/commands/diff.js +36 -12
  27. package/dist/commands/diff.js.map +1 -1
  28. package/dist/commands/doctor.d.ts.map +1 -1
  29. package/dist/commands/doctor.js +16 -20
  30. package/dist/commands/doctor.js.map +1 -1
  31. package/dist/commands/handoff.d.ts.map +1 -1
  32. package/dist/commands/handoff.js +11 -15
  33. package/dist/commands/handoff.js.map +1 -1
  34. package/dist/commands/refresh.d.ts +4 -2
  35. package/dist/commands/refresh.d.ts.map +1 -1
  36. package/dist/commands/refresh.js +20 -36
  37. package/dist/commands/refresh.js.map +1 -1
  38. package/dist/commands/schedule.d.ts +35 -0
  39. package/dist/commands/schedule.d.ts.map +1 -0
  40. package/dist/commands/schedule.js +151 -0
  41. package/dist/commands/schedule.js.map +1 -0
  42. package/dist/commands/sync.d.ts.map +1 -1
  43. package/dist/commands/sync.js +28 -7
  44. package/dist/commands/sync.js.map +1 -1
  45. package/dist/commands/tui.js +1 -1
  46. package/dist/commands/tui.js.map +1 -1
  47. package/dist/commands/ui.d.ts +1 -0
  48. package/dist/commands/ui.d.ts.map +1 -1
  49. package/dist/commands/ui.js +5 -2
  50. package/dist/commands/ui.js.map +1 -1
  51. package/dist/core/adapters/local-storage.d.ts +7 -0
  52. package/dist/core/adapters/local-storage.d.ts.map +1 -1
  53. package/dist/core/adapters/local-storage.js +13 -4
  54. package/dist/core/adapters/local-storage.js.map +1 -1
  55. package/dist/core/adapters/storage.test.js +18 -0
  56. package/dist/core/adapters/storage.test.js.map +1 -1
  57. package/dist/core/analysis-cache.d.ts +58 -0
  58. package/dist/core/analysis-cache.d.ts.map +1 -0
  59. package/dist/core/analysis-cache.js +116 -0
  60. package/dist/core/analysis-cache.js.map +1 -0
  61. package/dist/core/analysis-cache.test.d.ts +2 -0
  62. package/dist/core/analysis-cache.test.d.ts.map +1 -0
  63. package/dist/core/analysis-cache.test.js +108 -0
  64. package/dist/core/analysis-cache.test.js.map +1 -0
  65. package/dist/core/refresh.d.ts +41 -0
  66. package/dist/core/refresh.d.ts.map +1 -0
  67. package/dist/core/refresh.js +56 -0
  68. package/dist/core/refresh.js.map +1 -0
  69. package/dist/core/scheduler.d.ts +117 -0
  70. package/dist/core/scheduler.d.ts.map +1 -0
  71. package/dist/core/scheduler.js +361 -0
  72. package/dist/core/scheduler.js.map +1 -0
  73. package/dist/core/scheduler.test.d.ts +2 -0
  74. package/dist/core/scheduler.test.d.ts.map +1 -0
  75. package/dist/core/scheduler.test.js +163 -0
  76. package/dist/core/scheduler.test.js.map +1 -0
  77. package/dist/core/sync.d.ts +6 -0
  78. package/dist/core/sync.d.ts.map +1 -1
  79. package/dist/core/sync.js +17 -12
  80. package/dist/core/sync.js.map +1 -1
  81. package/dist/core/workspace.d.ts +6 -0
  82. package/dist/core/workspace.d.ts.map +1 -1
  83. package/dist/core/workspace.js +32 -15
  84. package/dist/core/workspace.js.map +1 -1
  85. package/dist/core/workspace.test.d.ts +2 -0
  86. package/dist/core/workspace.test.d.ts.map +1 -0
  87. package/dist/core/workspace.test.js +42 -0
  88. package/dist/core/workspace.test.js.map +1 -0
  89. package/dist/generators/index.d.ts +7 -1
  90. package/dist/generators/index.d.ts.map +1 -1
  91. package/dist/generators/index.js +14 -1
  92. package/dist/generators/index.js.map +1 -1
  93. package/dist/generators/map-generator.d.ts.map +1 -1
  94. package/dist/generators/map-generator.js +4 -3
  95. package/dist/generators/map-generator.js.map +1 -1
  96. package/dist/generators/map-generator.test.js +4 -2
  97. package/dist/generators/map-generator.test.js.map +1 -1
  98. package/dist/gui/assets/index-ElroPpSP.js +26 -0
  99. package/dist/gui/index.html +1 -1
  100. package/dist/index.js +108 -4
  101. package/dist/index.js.map +1 -1
  102. package/dist/orchestration/index.d.ts +1 -1
  103. package/dist/orchestration/index.d.ts.map +1 -1
  104. package/dist/orchestration/index.js +1 -1
  105. package/dist/orchestration/index.js.map +1 -1
  106. package/dist/orchestration/runner.d.ts +16 -1
  107. package/dist/orchestration/runner.d.ts.map +1 -1
  108. package/dist/orchestration/runner.js +41 -5
  109. package/dist/orchestration/runner.js.map +1 -1
  110. package/dist/orchestration/runner.test.d.ts +2 -0
  111. package/dist/orchestration/runner.test.d.ts.map +1 -0
  112. package/dist/orchestration/runner.test.js +71 -0
  113. package/dist/orchestration/runner.test.js.map +1 -0
  114. package/dist/server.d.ts +17 -1
  115. package/dist/server.d.ts.map +1 -1
  116. package/dist/server.js +275 -114
  117. package/dist/server.js.map +1 -1
  118. package/dist/server.test.js +158 -1
  119. package/dist/server.test.js.map +1 -1
  120. package/dist/utils/multi-git.d.ts +21 -0
  121. package/dist/utils/multi-git.d.ts.map +1 -1
  122. package/dist/utils/multi-git.js +40 -4
  123. package/dist/utils/multi-git.js.map +1 -1
  124. package/dist/utils/prompts.d.ts.map +1 -1
  125. package/dist/utils/prompts.js +8 -2
  126. package/dist/utils/prompts.js.map +1 -1
  127. package/package.json +13 -1
  128. package/.agents/skills/ccc/SKILL.md +0 -71
  129. package/.agents/skills/ccc/references/management.md +0 -110
  130. package/.agents/skills/ccc/references/settings.md +0 -126
  131. package/.github/dependabot.yml +0 -52
  132. package/.github/workflows/ci.yml +0 -44
  133. package/.github/workflows/dependabot-merge.yml +0 -53
  134. package/.github/workflows/release-desktop.yml +0 -67
  135. package/.github/workflows/release-npm.yml +0 -65
  136. package/.github/workflows/release-vscode.yml +0 -61
  137. package/.vscode/launch.json +0 -17
  138. package/.vscode/tasks.json +0 -17
  139. package/GETTING_STARTED.md +0 -114
  140. package/desktop/build-installer.js +0 -228
  141. package/desktop/build.js +0 -118
  142. package/desktop/installer/nexusflow.iss +0 -35
  143. package/desktop/neutralino.config.json +0 -39
  144. package/desktop/package-lock.json +0 -1060
  145. package/desktop/package.json +0 -14
  146. package/dist/gui/assets/index-D8iJPvnk.js +0 -26
  147. package/extension/media/icon.svg +0 -1
  148. package/extension/package-lock.json +0 -6044
  149. package/extension/package.json +0 -117
  150. package/extension/src/extension.ts +0 -653
  151. package/extension/tsconfig.json +0 -21
  152. package/gui/README.md +0 -73
  153. package/gui/e2e/dashboard.spec.ts +0 -61
  154. package/gui/e2e/wizard.spec.ts +0 -346
  155. package/gui/eslint.config.js +0 -26
  156. package/gui/index.html +0 -17
  157. package/gui/package-lock.json +0 -3137
  158. package/gui/package.json +0 -37
  159. package/gui/playwright.config.ts +0 -41
  160. package/gui/public/app_logo.png +0 -0
  161. package/gui/public/favicon.svg +0 -1
  162. package/gui/public/icons.svg +0 -24
  163. package/gui/src/App.css +0 -1
  164. package/gui/src/App.tsx +0 -3573
  165. package/gui/src/app/AppSidebar.tsx +0 -69
  166. package/gui/src/assets/hero.png +0 -0
  167. package/gui/src/assets/react.svg +0 -1
  168. package/gui/src/assets/vite.svg +0 -1
  169. package/gui/src/components/AddRepoPicker.tsx +0 -81
  170. package/gui/src/components/ui/Button.tsx +0 -40
  171. package/gui/src/components/ui/Card.tsx +0 -6
  172. package/gui/src/components/ui/EmptyState.tsx +0 -22
  173. package/gui/src/components/ui/Input.tsx +0 -21
  174. package/gui/src/components/ui/Menu.tsx +0 -71
  175. package/gui/src/components/ui/Modal.tsx +0 -39
  176. package/gui/src/components/ui/PageHeader.tsx +0 -21
  177. package/gui/src/components/ui/RepoStatusStrip.tsx +0 -33
  178. package/gui/src/components/ui/Skeleton.tsx +0 -5
  179. package/gui/src/components/ui/StatusPill.tsx +0 -36
  180. package/gui/src/components/ui/Tabs.tsx +0 -40
  181. package/gui/src/components/ui/cn.ts +0 -4
  182. package/gui/src/components/ui/index.ts +0 -16
  183. package/gui/src/features/changes/ChangesViewer.tsx +0 -388
  184. package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
  185. package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
  186. package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
  187. package/gui/src/features/services/ServiceConsole.tsx +0 -215
  188. package/gui/src/features/sessions/SessionHistory.tsx +0 -195
  189. package/gui/src/index.css +0 -167
  190. package/gui/src/lib/status.ts +0 -24
  191. package/gui/src/main.tsx +0 -94
  192. package/gui/src/pages/DashboardPage.tsx +0 -129
  193. package/gui/src/pages/WorkspacesPage.tsx +0 -352
  194. package/gui/src/types.ts +0 -81
  195. package/gui/tsconfig.app.json +0 -25
  196. package/gui/tsconfig.json +0 -7
  197. package/gui/tsconfig.node.json +0 -24
  198. package/gui/vite.config.ts +0 -12
  199. package/resources/workflows/plan-implement-review.md +0 -8
  200. package/resources/workflows/research-verify.md +0 -6
  201. package/resources/workflows/solo-developer.md +0 -3
  202. package/scripts/simulate-workspaces.ts +0 -55
  203. package/skills-lock.json +0 -11
  204. package/src/analyzers/detect-apis.ts +0 -290
  205. package/src/analyzers/detect-deps.ts +0 -315
  206. package/src/analyzers/detect-existing.ts +0 -74
  207. package/src/analyzers/detect-ports.ts +0 -110
  208. package/src/analyzers/index.ts +0 -97
  209. package/src/analyzers/messaging-analyzer.ts +0 -254
  210. package/src/analyzers/readme-summarizer.ts +0 -102
  211. package/src/analyzers/run-analyzer.ts +0 -269
  212. package/src/analyzers/tech-stack.ts +0 -283
  213. package/src/commands/adapter.ts +0 -348
  214. package/src/commands/add-repo.ts +0 -156
  215. package/src/commands/commands.test.ts +0 -156
  216. package/src/commands/commit.ts +0 -131
  217. package/src/commands/config.ts +0 -52
  218. package/src/commands/create.ts +0 -204
  219. package/src/commands/desktop.ts +0 -128
  220. package/src/commands/diff.ts +0 -125
  221. package/src/commands/doctor.ts +0 -370
  222. package/src/commands/handoff.ts +0 -266
  223. package/src/commands/init.ts +0 -134
  224. package/src/commands/list.ts +0 -46
  225. package/src/commands/logs.ts +0 -63
  226. package/src/commands/mcp.ts +0 -94
  227. package/src/commands/open.ts +0 -129
  228. package/src/commands/refresh.ts +0 -137
  229. package/src/commands/remove.ts +0 -98
  230. package/src/commands/start.ts +0 -117
  231. package/src/commands/status.ts +0 -54
  232. package/src/commands/stop.ts +0 -55
  233. package/src/commands/sync.ts +0 -125
  234. package/src/commands/tui.ts +0 -484
  235. package/src/commands/ui.ts +0 -111
  236. package/src/core/adapters/local-storage.ts +0 -66
  237. package/src/core/adapters/obsidian-storage.ts +0 -151
  238. package/src/core/adapters/registry.ts +0 -44
  239. package/src/core/adapters/storage.test.ts +0 -174
  240. package/src/core/adapters/vault-storage.ts +0 -86
  241. package/src/core/config.test.ts +0 -96
  242. package/src/core/config.ts +0 -140
  243. package/src/core/graph.ts +0 -344
  244. package/src/core/plugins/index.ts +0 -17
  245. package/src/core/plugins/loader.ts +0 -36
  246. package/src/core/ports/storage.ts +0 -71
  247. package/src/core/scanner.test.ts +0 -61
  248. package/src/core/scanner.ts +0 -91
  249. package/src/core/storage.ts +0 -37
  250. package/src/core/sync.ts +0 -121
  251. package/src/core/workspace-state.test.ts +0 -108
  252. package/src/core/workspace-state.ts +0 -130
  253. package/src/core/workspace.ts +0 -487
  254. package/src/core/worktree.ts +0 -120
  255. package/src/generators/antigravity.ts +0 -32
  256. package/src/generators/base.ts +0 -243
  257. package/src/generators/claude.ts +0 -34
  258. package/src/generators/codex.ts +0 -48
  259. package/src/generators/copilot.ts +0 -56
  260. package/src/generators/cursor.ts +0 -44
  261. package/src/generators/diff-context.ts +0 -75
  262. package/src/generators/index.ts +0 -322
  263. package/src/generators/map-generator.test.ts +0 -159
  264. package/src/generators/map-generator.ts +0 -539
  265. package/src/generators/plan-generator.ts +0 -483
  266. package/src/generators/skills-generator.ts +0 -259
  267. package/src/index.ts +0 -539
  268. package/src/mcp/server.ts +0 -338
  269. package/src/orchestration/detect.ts +0 -313
  270. package/src/orchestration/index.ts +0 -7
  271. package/src/orchestration/runner.ts +0 -283
  272. package/src/server.test.ts +0 -618
  273. package/src/server.ts +0 -1402
  274. package/src/types.ts +0 -451
  275. package/src/utils/detect-ai.test.ts +0 -44
  276. package/src/utils/detect-ai.ts +0 -84
  277. package/src/utils/detect-editors.test.ts +0 -48
  278. package/src/utils/detect-editors.ts +0 -57
  279. package/src/utils/git.test.ts +0 -74
  280. package/src/utils/git.ts +0 -117
  281. package/src/utils/local-ai.test.ts +0 -130
  282. package/src/utils/local-ai.ts +0 -116
  283. package/src/utils/multi-git.test.ts +0 -158
  284. package/src/utils/multi-git.ts +0 -405
  285. package/src/utils/prompts.ts +0 -209
  286. package/src/utils/session-finder.ts +0 -483
  287. package/src/utils/system-scanner.test.ts +0 -89
  288. package/src/utils/system-scanner.ts +0 -96
  289. package/src/utils/update-check.ts +0 -286
  290. package/src/utils/workflow-advisor.ts +0 -118
  291. package/src/utils/workflows.test.ts +0 -114
  292. package/src/utils/workflows.ts +0 -178
  293. package/tsconfig.json +0 -19
  294. package/vitest.config.ts +0 -14
package/gui/README.md DELETED
@@ -1,73 +0,0 @@
1
- # React + TypeScript + Vite
2
-
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
9
-
10
- ## React Compiler
11
-
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
-
14
- ## Expanding the ESLint configuration
15
-
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
-
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
25
-
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
32
-
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
42
- },
43
- ])
44
- ```
45
-
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
-
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
52
-
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
70
- },
71
- },
72
- ])
73
- ```
@@ -1,61 +0,0 @@
1
- import { test, expect, type Route } from '@playwright/test';
2
-
3
- /** Minimal API mocks so the redesigned shell can render without a backend. */
4
- async function mockApi(page: import('@playwright/test').Page) {
5
- const feature = {
6
- id: 'feature-x',
7
- branchName: 'feature-x',
8
- description: 'Test feature workspace',
9
- repos: ['C:/dev/api-gateway'],
10
- assistants: [],
11
- workspacePath: 'C:/ws/feature-x',
12
- createdAt: '2026-06-01T00:00:00.000Z',
13
- };
14
- const json = (body: unknown) => (route: Route) =>
15
- route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify(body) });
16
-
17
- await page.route('**/api/config', json({
18
- exists: true,
19
- config: { version: '0.2.19', devDir: 'C:/dev', workspacesDir: 'C:/ws', defaultAssistant: 'claude', scanDepth: 2 },
20
- }));
21
- await page.route('**/api/workspaces', json([feature]));
22
- await page.route('**/api/workspaces/status', json({
23
- 'feature-x': { id: 'feature-x', branchName: 'feature-x', changedFiles: 3, dirtyRepos: 1, runningServices: 0, syncStatus: 'up-to-date', pendingValidation: false },
24
- }));
25
- await page.route('**/api/ai-detect', json([]));
26
- await page.route('**/api/editor-detect', json([]));
27
- await page.route('**/api/update-status', json({ updateAvailable: false, currentVersion: '0.2.19', latestVersion: '0.2.19' }));
28
- await page.route('**/api/workflows/templates', json({ templates: [] }));
29
- await page.route('**/api/repos', json([]));
30
- await page.route('**/api/workspace/*/services', json({ services: [], orchestrationTools: [], runningState: [] }));
31
- await page.route('**/api/workspace/*/changes', json({ changes: [] }));
32
- }
33
-
34
- test.describe('Redesigned NexusFlow shell', () => {
35
- test('shows the dashboard overview with environment stats', async ({ page }) => {
36
- await mockApi(page);
37
- await page.goto('/');
38
-
39
- await expect(page.getByRole('heading', { name: 'Overview' })).toBeVisible();
40
- // Stat tiles + workspace row driven by the mocked status endpoint.
41
- await expect(page.getByText('With uncommitted changes')).toBeVisible();
42
- await expect(page.getByText('feature-x').first()).toBeVisible();
43
- await expect(page.getByText('3 changed').first()).toBeVisible();
44
- });
45
-
46
- test('navigates to the workspaces master-detail and opens a workspace via deep link', async ({ page }) => {
47
- await mockApi(page);
48
-
49
- // Sidebar navigation updates the route.
50
- await page.goto('/');
51
- await page.getByRole('button', { name: 'Workspaces' }).click();
52
- await expect(page).toHaveURL(/#\/workspaces/);
53
- await expect(page.getByRole('heading', { name: 'Workspaces' })).toBeVisible();
54
-
55
- // Deep link selects a workspace and shows the detail tabs.
56
- await page.goto('/#/workspaces/feature-x');
57
- await expect(page.getByRole('heading', { name: 'feature-x' })).toBeVisible();
58
- await expect(page.getByRole('tab', { name: 'Overview' })).toBeVisible();
59
- await expect(page.getByText('Test feature workspace')).toBeVisible();
60
- });
61
- });
@@ -1,346 +0,0 @@
1
- import { test, expect } from '@playwright/test';
2
-
3
- test.describe('NexusFlow E2E GUI Tests', () => {
4
-
5
- test('should run the onboarding flow when config does not exist', async ({ page }) => {
6
- // 1. Mock endpoints
7
- await page.route('**/api/config', async (route, request) => {
8
- if (request.method() === 'GET') {
9
- await route.fulfill({
10
- status: 200,
11
- contentType: 'application/json',
12
- body: JSON.stringify({
13
- exists: false,
14
- config: {
15
- version: '0.2.7',
16
- devDir: '',
17
- workspacesDir: '',
18
- defaultAssistant: null,
19
- scanDepth: 2,
20
- }
21
- }),
22
- });
23
- } else if (request.method() === 'POST') {
24
- const body = request.postDataJSON();
25
- expect(body.devDir).toBe('C:\\Users\\patro\\dev');
26
- expect(body.workspacesDir).toBe('C:\\Users\\patro\\dev\\workspaces');
27
- await route.fulfill({
28
- status: 200,
29
- contentType: 'application/json',
30
- body: JSON.stringify({ success: true, config: body }),
31
- });
32
- }
33
- });
34
-
35
- await page.route('**/api/ai-detect', async (route) => {
36
- await route.fulfill({
37
- status: 200,
38
- contentType: 'application/json',
39
- body: JSON.stringify([]),
40
- });
41
- });
42
-
43
- await page.route('**/api/editor-detect', async (route) => {
44
- await route.fulfill({
45
- status: 200,
46
- contentType: 'application/json',
47
- body: JSON.stringify([]),
48
- });
49
- });
50
-
51
- await page.route('**/api/workspaces', async (route) => {
52
- await route.fulfill({
53
- status: 200,
54
- contentType: 'application/json',
55
- body: JSON.stringify([]),
56
- });
57
- });
58
-
59
- await page.route('**/api/update-status', async (route) => {
60
- await route.fulfill({
61
- status: 200,
62
- contentType: 'application/json',
63
- body: JSON.stringify({ currentVersion: '0.2.7', latestVersion: '0.2.7', updateAvailable: false }),
64
- });
65
- });
66
-
67
- // 2. Open page
68
- await page.goto('/');
69
-
70
- // 3. Verify onboarding elements
71
- await expect(page.locator('h1')).toContainText('Welcome to NexusFlow');
72
- await expect(page.locator('h2')).toContainText('Initialize Config');
73
-
74
- // 4. Fill in paths
75
- await page.getByPlaceholder('e.g. C:\\Users\\username\\dev', { exact: true }).fill('C:\\Users\\patro\\dev');
76
- await page.getByPlaceholder('e.g. C:\\Users\\username\\dev\\workspaces', { exact: true }).fill('C:\\Users\\patro\\dev\\workspaces');
77
-
78
- // 5. Submit onboarding config
79
- await page.locator('button:has-text("Save & Get Started")').click();
80
-
81
- // Since mock switches status, we verify transition
82
- // (In a full app we'd mock the next GET config to return exists: true, but this proves the submit action completes)
83
- });
84
-
85
- test('should create a workspace via the wizard steps', async ({ page }) => {
86
- // 1. Mock EventSource globally to simulate build progress SSE
87
- await page.addInitScript(() => {
88
- class MockEventSource {
89
- url: string;
90
- listeners: Record<string, Array<(e: any) => void>> = {};
91
- onmessage: ((e: any) => void) | null = null;
92
-
93
- constructor(url: string) {
94
- this.url = url;
95
- setTimeout(() => {
96
- const eventPayload = {
97
- status: 'completed',
98
- progress: 100,
99
- workspacePath: 'C:\\Users\\patro\\dev\\workspaces\\feat-test-branch',
100
- steps: [
101
- { id: 'worktrees', name: 'Create Git Worktrees', status: 'completed', message: 'Done' },
102
- { id: 'analysis', name: 'Analyze Repositories', status: 'completed', message: 'Done' },
103
- { id: 'context', name: 'Generate AI Context Files', status: 'completed', message: 'Done' },
104
- { id: 'pack', name: 'Pack Codebase Context', status: 'completed', message: 'Done' },
105
- ],
106
- };
107
-
108
- const progressEvent = new MessageEvent('progress', {
109
- data: JSON.stringify(eventPayload),
110
- });
111
-
112
- if (this.listeners['progress']) {
113
- this.listeners['progress'].forEach((cb) => cb(progressEvent));
114
- }
115
- }, 300);
116
- }
117
-
118
- addEventListener(type: string, cb: (e: any) => void) {
119
- if (!this.listeners[type]) this.listeners[type] = [];
120
- this.listeners[type].push(cb);
121
- }
122
-
123
- close() {}
124
- }
125
- (window as any).EventSource = MockEventSource;
126
- });
127
-
128
- // 2. Mock API endpoints
129
- await page.route('**/api/config', async (route) => {
130
- await route.fulfill({
131
- status: 200,
132
- contentType: 'application/json',
133
- body: JSON.stringify({
134
- exists: true,
135
- config: {
136
- version: '0.2.7',
137
- devDir: 'C:\\Users\\patro\\dev',
138
- workspacesDir: 'C:\\Users\\patro\\dev\\workspaces',
139
- defaultAssistant: 'ANTIGRAVITY',
140
- scanDepth: 2,
141
- localLlm: {
142
- enabled: true,
143
- provider: 'ollama',
144
- endpoint: 'http://localhost:11434',
145
- model: 'qwen2.5-coder:1.5b'
146
- }
147
- }
148
- }),
149
- });
150
- });
151
-
152
- await page.route('**/api/repos', async (route) => {
153
- await route.fulfill({
154
- status: 200,
155
- contentType: 'application/json',
156
- body: JSON.stringify([
157
- { name: 'nexus-frontend', path: 'C:\\Users\\patro\\dev\\nexus-frontend', defaultBranch: 'main' },
158
- { name: 'nexus-backend', path: 'C:\\Users\\patro\\dev\\nexus-backend', defaultBranch: 'main' },
159
- ]),
160
- });
161
- });
162
-
163
- await page.route('**/api/ai-detect', async (route) => {
164
- await route.fulfill({
165
- status: 200,
166
- contentType: 'application/json',
167
- body: JSON.stringify([
168
- { name: 'claude', displayName: 'Claude CLI', detected: true },
169
- { name: 'antigravity', displayName: 'Antigravity', detected: true },
170
- ]),
171
- });
172
- });
173
-
174
- await page.route('**/api/editor-detect', async (route) => {
175
- await route.fulfill({
176
- status: 200,
177
- contentType: 'application/json',
178
- body: JSON.stringify([
179
- { name: 'VS Code', command: 'code', detected: true },
180
- ]),
181
- });
182
- });
183
-
184
- await page.route('**/api/workspaces', async (route) => {
185
- await route.fulfill({
186
- status: 200,
187
- contentType: 'application/json',
188
- body: JSON.stringify([]),
189
- });
190
- });
191
-
192
- await page.route('**/api/update-status', async (route) => {
193
- await route.fulfill({
194
- status: 200,
195
- contentType: 'application/json',
196
- body: JSON.stringify({ currentVersion: '0.2.7', latestVersion: '0.2.7', updateAvailable: false }),
197
- });
198
- });
199
-
200
- await page.route('**/api/workflows/templates', async (route) => {
201
- await route.fulfill({
202
- status: 200,
203
- contentType: 'application/json',
204
- body: JSON.stringify([
205
- {
206
- id: 'plan-implement-review',
207
- name: 'Plan Implement Review',
208
- description: 'Lead planner designs, Code Implementer subagent writes edits, and Code Reviewer subagent tests & reviews in a loop.',
209
- content: '# Plan Implement Review\n\nInstructions...',
210
- custom: false
211
- }
212
- ]),
213
- });
214
- });
215
-
216
- await page.route('**/api/workspace', async (route) => {
217
- await route.fulfill({
218
- status: 200,
219
- contentType: 'application/json',
220
- body: JSON.stringify({ success: true, jobId: 'feat-test-branch' }),
221
- });
222
- });
223
-
224
- // 3. Open dashboard
225
- await page.goto('/');
226
-
227
- // 4. Click New Workspace in the sidebar (scoped to avoid matching page-level buttons)
228
- await page.getByRole('complementary').getByRole('button', { name: 'New workspace' }).click();
229
-
230
- // 5. Fill Details
231
- await page.getByPlaceholder('e.g., feature/oauth-authentication-flow').fill('feat-test-branch');
232
- await page.getByPlaceholder('Describe what you want to build. This helps AI assistants analyze context and produce matching plans.').fill('Implement login page');
233
- await page.locator('button:has-text("Next Step")').click();
234
-
235
- // 6. Select a Repo
236
- await page.getByText('nexus-frontend', { exact: true }).click();
237
- await page.locator('button:has-text("Next Step")').click();
238
-
239
- // 6.5. Click Next Step on Assistant screen (new step)
240
- await page.locator('button:has-text("Next Step")').click();
241
-
242
- // 7. Click Build Workspace
243
- await page.locator('button:has-text("Build Workspace")').click();
244
-
245
- // 8. Assert Completion screen
246
- await expect(page.locator('h2')).toContainText('Workspace Generated!');
247
- await expect(page.locator('code').first()).toContainText('feat-test-branch');
248
- });
249
-
250
- test('should validate Local LLM configuration in settings', async ({ page }) => {
251
- let savedConfig: any = null;
252
-
253
- // 1. Mock API endpoints
254
- await page.route('**/api/config', async (route, request) => {
255
- if (request.method() === 'GET') {
256
- await route.fulfill({
257
- status: 200,
258
- contentType: 'application/json',
259
- body: JSON.stringify({
260
- exists: true,
261
- config: {
262
- version: '0.2.7',
263
- devDir: 'C:\\Users\\patro\\dev',
264
- workspacesDir: 'C:\\Users\\patro\\dev\\workspaces',
265
- defaultAssistant: 'ANTIGRAVITY',
266
- scanDepth: 2,
267
- localLlm: {
268
- enabled: false,
269
- provider: 'ollama',
270
- endpoint: 'http://localhost:11434',
271
- model: 'qwen2.5-coder:1.5b'
272
- }
273
- }
274
- }),
275
- });
276
- } else if (request.method() === 'POST') {
277
- savedConfig = request.postDataJSON();
278
- await route.fulfill({
279
- status: 200,
280
- contentType: 'application/json',
281
- body: JSON.stringify({ success: true, config: savedConfig }),
282
- });
283
- }
284
- });
285
-
286
- await page.route('**/api/ai-detect', async (route) => {
287
- await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify([]) });
288
- });
289
-
290
- await page.route('**/api/editor-detect', async (route) => {
291
- await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify([]) });
292
- });
293
-
294
- await page.route('**/api/workspaces', async (route) => {
295
- await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify([]) });
296
- });
297
-
298
- await page.route('**/api/update-status', async (route) => {
299
- await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ currentVersion: '0.2.7', latestVersion: '0.2.7', updateAvailable: false }) });
300
- });
301
-
302
- await page.route('**/api/updates/tools', async (route) => {
303
- await route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify([]) });
304
- });
305
-
306
- await page.route('**/api/local-llm/recommend', async (route) => {
307
- await route.fulfill({
308
- status: 200,
309
- contentType: 'application/json',
310
- body: JSON.stringify({ totalRamGb: 16, gpuName: 'NVIDIA RTX 4070', recommendedModel: 'qwen2.5-coder:7b' }),
311
- });
312
- });
313
-
314
- // 2. Open dashboard and go to Settings
315
- await page.goto('/');
316
- await page.locator('aside button:has-text("Settings")').click();
317
-
318
- // 3. Verify settings page loaded
319
- await expect(page.locator('h1')).toContainText('Global Settings');
320
-
321
- // 4. Toggle Local AI
322
- const toggleCheckbox = page.locator('#localLlmEnabled');
323
- await toggleCheckbox.click();
324
-
325
- // 5. Fill invalid endpoint URL
326
- const endpointInput = page.locator('label:has-text("Endpoint URL") + input');
327
- await endpointInput.fill('invalid-url-format');
328
-
329
- // 6. Assert "Save Configuration" is disabled due to invalid URL
330
- const saveButton = page.locator('button:has-text("Save Configuration")');
331
- await expect(saveButton).toBeDisabled();
332
-
333
- // 7. Fill valid endpoint URL
334
- await endpointInput.fill('http://localhost:11434');
335
-
336
- // 8. Assert "Save Configuration" is now enabled
337
- await expect(saveButton).toBeEnabled();
338
-
339
- // 9. Click Save
340
- await saveButton.click();
341
-
342
- // 10. Check if post request payload had localLlm enabled
343
- expect(savedConfig.localLlm.enabled).toBe(true);
344
- expect(savedConfig.localLlm.endpoint).toBe('http://localhost:11434');
345
- });
346
- });
@@ -1,26 +0,0 @@
1
- import js from '@eslint/js'
2
- import globals from 'globals'
3
- import reactHooks from 'eslint-plugin-react-hooks'
4
- import reactRefresh from 'eslint-plugin-react-refresh'
5
- import tseslint from 'typescript-eslint'
6
- import { defineConfig, globalIgnores } from 'eslint/config'
7
-
8
- export default defineConfig([
9
- globalIgnores(['dist']),
10
- {
11
- files: ['**/*.{ts,tsx}'],
12
- extends: [
13
- js.configs.recommended,
14
- tseslint.configs.recommended,
15
- reactHooks.configs.flat.recommended,
16
- reactRefresh.configs.vite,
17
- ],
18
- languageOptions: {
19
- globals: globals.browser,
20
- },
21
- rules: {
22
- '@typescript-eslint/no-explicit-any': 'off',
23
- 'react-hooks/set-state-in-effect': 'off',
24
- },
25
- },
26
- ])
package/gui/index.html DELETED
@@ -1,17 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>NexusFlow Dashboard</title>
8
- <!-- Premium Fonts -->
9
- <link rel="preconnect" href="https://fonts.googleapis.com">
10
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
- <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
12
- </head>
13
- <body>
14
- <div id="root"></div>
15
- <script type="module" src="/src/main.tsx"></script>
16
- </body>
17
- </html>