@mrpatronz/nexusflow 0.2.19 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/README.md +27 -3
  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/commands.test.js +20 -6
  7. package/dist/commands/commands.test.js.map +1 -1
  8. package/dist/commands/commit.d.ts +2 -0
  9. package/dist/commands/commit.d.ts.map +1 -1
  10. package/dist/commands/commit.js +27 -5
  11. package/dist/commands/commit.js.map +1 -1
  12. package/dist/commands/diff.d.ts +9 -2
  13. package/dist/commands/diff.d.ts.map +1 -1
  14. package/dist/commands/diff.js +36 -12
  15. package/dist/commands/diff.js.map +1 -1
  16. package/dist/commands/doctor.js +2 -2
  17. package/dist/commands/doctor.js.map +1 -1
  18. package/dist/commands/handoff.js +2 -2
  19. package/dist/commands/handoff.js.map +1 -1
  20. package/dist/commands/refresh.d.ts +4 -2
  21. package/dist/commands/refresh.d.ts.map +1 -1
  22. package/dist/commands/refresh.js +20 -36
  23. package/dist/commands/refresh.js.map +1 -1
  24. package/dist/commands/schedule.d.ts +35 -0
  25. package/dist/commands/schedule.d.ts.map +1 -0
  26. package/dist/commands/schedule.js +151 -0
  27. package/dist/commands/schedule.js.map +1 -0
  28. package/dist/commands/sync.d.ts.map +1 -1
  29. package/dist/commands/sync.js +28 -7
  30. package/dist/commands/sync.js.map +1 -1
  31. package/dist/core/analysis-cache.d.ts +58 -0
  32. package/dist/core/analysis-cache.d.ts.map +1 -0
  33. package/dist/core/analysis-cache.js +116 -0
  34. package/dist/core/analysis-cache.js.map +1 -0
  35. package/dist/core/analysis-cache.test.d.ts +2 -0
  36. package/dist/core/analysis-cache.test.d.ts.map +1 -0
  37. package/dist/core/analysis-cache.test.js +108 -0
  38. package/dist/core/analysis-cache.test.js.map +1 -0
  39. package/dist/core/refresh.d.ts +41 -0
  40. package/dist/core/refresh.d.ts.map +1 -0
  41. package/dist/core/refresh.js +60 -0
  42. package/dist/core/refresh.js.map +1 -0
  43. package/dist/core/scheduler.d.ts +117 -0
  44. package/dist/core/scheduler.d.ts.map +1 -0
  45. package/dist/core/scheduler.js +247 -0
  46. package/dist/core/scheduler.js.map +1 -0
  47. package/dist/core/scheduler.test.d.ts +2 -0
  48. package/dist/core/scheduler.test.d.ts.map +1 -0
  49. package/dist/core/scheduler.test.js +111 -0
  50. package/dist/core/scheduler.test.js.map +1 -0
  51. package/dist/core/sync.d.ts +6 -0
  52. package/dist/core/sync.d.ts.map +1 -1
  53. package/dist/core/sync.js +15 -5
  54. package/dist/core/sync.js.map +1 -1
  55. package/dist/generators/index.d.ts +7 -1
  56. package/dist/generators/index.d.ts.map +1 -1
  57. package/dist/generators/index.js +14 -1
  58. package/dist/generators/index.js.map +1 -1
  59. package/dist/index.js +107 -4
  60. package/dist/index.js.map +1 -1
  61. package/dist/server.d.ts.map +1 -1
  62. package/dist/server.js +81 -0
  63. package/dist/server.js.map +1 -1
  64. package/dist/server.test.js +66 -0
  65. package/dist/server.test.js.map +1 -1
  66. package/dist/utils/multi-git.d.ts +21 -0
  67. package/dist/utils/multi-git.d.ts.map +1 -1
  68. package/dist/utils/multi-git.js +40 -4
  69. package/dist/utils/multi-git.js.map +1 -1
  70. package/package.json +13 -1
  71. package/.agents/skills/ccc/SKILL.md +0 -71
  72. package/.agents/skills/ccc/references/management.md +0 -110
  73. package/.agents/skills/ccc/references/settings.md +0 -126
  74. package/.github/dependabot.yml +0 -52
  75. package/.github/workflows/ci.yml +0 -44
  76. package/.github/workflows/dependabot-merge.yml +0 -53
  77. package/.github/workflows/release-desktop.yml +0 -67
  78. package/.github/workflows/release-npm.yml +0 -65
  79. package/.github/workflows/release-vscode.yml +0 -61
  80. package/.vscode/launch.json +0 -17
  81. package/.vscode/tasks.json +0 -17
  82. package/GETTING_STARTED.md +0 -114
  83. package/desktop/build-installer.js +0 -228
  84. package/desktop/build.js +0 -118
  85. package/desktop/installer/nexusflow.iss +0 -35
  86. package/desktop/neutralino.config.json +0 -39
  87. package/desktop/package-lock.json +0 -1060
  88. package/desktop/package.json +0 -14
  89. package/extension/media/icon.svg +0 -1
  90. package/extension/package-lock.json +0 -6044
  91. package/extension/package.json +0 -117
  92. package/extension/src/extension.ts +0 -653
  93. package/extension/tsconfig.json +0 -21
  94. package/gui/README.md +0 -73
  95. package/gui/e2e/dashboard.spec.ts +0 -61
  96. package/gui/e2e/wizard.spec.ts +0 -346
  97. package/gui/eslint.config.js +0 -26
  98. package/gui/index.html +0 -17
  99. package/gui/package-lock.json +0 -3137
  100. package/gui/package.json +0 -37
  101. package/gui/playwright.config.ts +0 -41
  102. package/gui/public/app_logo.png +0 -0
  103. package/gui/public/favicon.svg +0 -1
  104. package/gui/public/icons.svg +0 -24
  105. package/gui/src/App.css +0 -1
  106. package/gui/src/App.tsx +0 -3573
  107. package/gui/src/app/AppSidebar.tsx +0 -69
  108. package/gui/src/assets/hero.png +0 -0
  109. package/gui/src/assets/react.svg +0 -1
  110. package/gui/src/assets/vite.svg +0 -1
  111. package/gui/src/components/AddRepoPicker.tsx +0 -81
  112. package/gui/src/components/ui/Button.tsx +0 -40
  113. package/gui/src/components/ui/Card.tsx +0 -6
  114. package/gui/src/components/ui/EmptyState.tsx +0 -22
  115. package/gui/src/components/ui/Input.tsx +0 -21
  116. package/gui/src/components/ui/Menu.tsx +0 -71
  117. package/gui/src/components/ui/Modal.tsx +0 -39
  118. package/gui/src/components/ui/PageHeader.tsx +0 -21
  119. package/gui/src/components/ui/RepoStatusStrip.tsx +0 -33
  120. package/gui/src/components/ui/Skeleton.tsx +0 -5
  121. package/gui/src/components/ui/StatusPill.tsx +0 -36
  122. package/gui/src/components/ui/Tabs.tsx +0 -40
  123. package/gui/src/components/ui/cn.ts +0 -4
  124. package/gui/src/components/ui/index.ts +0 -16
  125. package/gui/src/features/changes/ChangesViewer.tsx +0 -388
  126. package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
  127. package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
  128. package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
  129. package/gui/src/features/services/ServiceConsole.tsx +0 -215
  130. package/gui/src/features/sessions/SessionHistory.tsx +0 -195
  131. package/gui/src/index.css +0 -167
  132. package/gui/src/lib/status.ts +0 -24
  133. package/gui/src/main.tsx +0 -94
  134. package/gui/src/pages/DashboardPage.tsx +0 -129
  135. package/gui/src/pages/WorkspacesPage.tsx +0 -352
  136. package/gui/src/types.ts +0 -81
  137. package/gui/tsconfig.app.json +0 -25
  138. package/gui/tsconfig.json +0 -7
  139. package/gui/tsconfig.node.json +0 -24
  140. package/gui/vite.config.ts +0 -12
  141. package/resources/workflows/plan-implement-review.md +0 -8
  142. package/resources/workflows/research-verify.md +0 -6
  143. package/resources/workflows/solo-developer.md +0 -3
  144. package/scripts/simulate-workspaces.ts +0 -55
  145. package/skills-lock.json +0 -11
  146. package/src/analyzers/detect-apis.ts +0 -290
  147. package/src/analyzers/detect-deps.ts +0 -315
  148. package/src/analyzers/detect-existing.ts +0 -74
  149. package/src/analyzers/detect-ports.ts +0 -110
  150. package/src/analyzers/index.ts +0 -97
  151. package/src/analyzers/messaging-analyzer.ts +0 -254
  152. package/src/analyzers/readme-summarizer.ts +0 -102
  153. package/src/analyzers/run-analyzer.ts +0 -269
  154. package/src/analyzers/tech-stack.ts +0 -283
  155. package/src/commands/adapter.ts +0 -348
  156. package/src/commands/add-repo.ts +0 -156
  157. package/src/commands/commands.test.ts +0 -156
  158. package/src/commands/commit.ts +0 -131
  159. package/src/commands/config.ts +0 -52
  160. package/src/commands/create.ts +0 -204
  161. package/src/commands/desktop.ts +0 -128
  162. package/src/commands/diff.ts +0 -125
  163. package/src/commands/doctor.ts +0 -370
  164. package/src/commands/handoff.ts +0 -266
  165. package/src/commands/init.ts +0 -134
  166. package/src/commands/list.ts +0 -46
  167. package/src/commands/logs.ts +0 -63
  168. package/src/commands/mcp.ts +0 -94
  169. package/src/commands/open.ts +0 -129
  170. package/src/commands/refresh.ts +0 -137
  171. package/src/commands/remove.ts +0 -98
  172. package/src/commands/start.ts +0 -117
  173. package/src/commands/status.ts +0 -54
  174. package/src/commands/stop.ts +0 -55
  175. package/src/commands/sync.ts +0 -125
  176. package/src/commands/tui.ts +0 -484
  177. package/src/commands/ui.ts +0 -111
  178. package/src/core/adapters/local-storage.ts +0 -66
  179. package/src/core/adapters/obsidian-storage.ts +0 -151
  180. package/src/core/adapters/registry.ts +0 -44
  181. package/src/core/adapters/storage.test.ts +0 -174
  182. package/src/core/adapters/vault-storage.ts +0 -86
  183. package/src/core/config.test.ts +0 -96
  184. package/src/core/config.ts +0 -140
  185. package/src/core/graph.ts +0 -344
  186. package/src/core/plugins/index.ts +0 -17
  187. package/src/core/plugins/loader.ts +0 -36
  188. package/src/core/ports/storage.ts +0 -71
  189. package/src/core/scanner.test.ts +0 -61
  190. package/src/core/scanner.ts +0 -91
  191. package/src/core/storage.ts +0 -37
  192. package/src/core/sync.ts +0 -121
  193. package/src/core/workspace-state.test.ts +0 -108
  194. package/src/core/workspace-state.ts +0 -130
  195. package/src/core/workspace.ts +0 -487
  196. package/src/core/worktree.ts +0 -120
  197. package/src/generators/antigravity.ts +0 -32
  198. package/src/generators/base.ts +0 -243
  199. package/src/generators/claude.ts +0 -34
  200. package/src/generators/codex.ts +0 -48
  201. package/src/generators/copilot.ts +0 -56
  202. package/src/generators/cursor.ts +0 -44
  203. package/src/generators/diff-context.ts +0 -75
  204. package/src/generators/index.ts +0 -322
  205. package/src/generators/map-generator.test.ts +0 -159
  206. package/src/generators/map-generator.ts +0 -539
  207. package/src/generators/plan-generator.ts +0 -483
  208. package/src/generators/skills-generator.ts +0 -259
  209. package/src/index.ts +0 -539
  210. package/src/mcp/server.ts +0 -338
  211. package/src/orchestration/detect.ts +0 -313
  212. package/src/orchestration/index.ts +0 -7
  213. package/src/orchestration/runner.ts +0 -283
  214. package/src/server.test.ts +0 -618
  215. package/src/server.ts +0 -1402
  216. package/src/types.ts +0 -451
  217. package/src/utils/detect-ai.test.ts +0 -44
  218. package/src/utils/detect-ai.ts +0 -84
  219. package/src/utils/detect-editors.test.ts +0 -48
  220. package/src/utils/detect-editors.ts +0 -57
  221. package/src/utils/git.test.ts +0 -74
  222. package/src/utils/git.ts +0 -117
  223. package/src/utils/local-ai.test.ts +0 -130
  224. package/src/utils/local-ai.ts +0 -116
  225. package/src/utils/multi-git.test.ts +0 -158
  226. package/src/utils/multi-git.ts +0 -405
  227. package/src/utils/prompts.ts +0 -209
  228. package/src/utils/session-finder.ts +0 -483
  229. package/src/utils/system-scanner.test.ts +0 -89
  230. package/src/utils/system-scanner.ts +0 -96
  231. package/src/utils/update-check.ts +0 -286
  232. package/src/utils/workflow-advisor.ts +0 -118
  233. package/src/utils/workflows.test.ts +0 -114
  234. package/src/utils/workflows.ts +0 -178
  235. package/tsconfig.json +0 -19
  236. 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>