@mrpatronz/nexusflow 0.2.18 → 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 +58 -50
  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 +50 -0
  52. package/dist/core/sync.d.ts.map +1 -0
  53. package/dist/core/sync.js +92 -0
  54. package/dist/core/sync.js.map +1 -0
  55. package/dist/core/workspace-state.d.ts +51 -0
  56. package/dist/core/workspace-state.d.ts.map +1 -0
  57. package/dist/core/workspace-state.js +108 -0
  58. package/dist/core/workspace-state.js.map +1 -0
  59. package/dist/core/workspace-state.test.d.ts +2 -0
  60. package/dist/core/workspace-state.test.d.ts.map +1 -0
  61. package/dist/core/workspace-state.test.js +84 -0
  62. package/dist/core/workspace-state.test.js.map +1 -0
  63. package/dist/generators/index.d.ts +7 -1
  64. package/dist/generators/index.d.ts.map +1 -1
  65. package/dist/generators/index.js +14 -1
  66. package/dist/generators/index.js.map +1 -1
  67. package/dist/gui/assets/index-Bdbld6yY.css +1 -0
  68. package/dist/gui/assets/index-D8iJPvnk.js +26 -0
  69. package/dist/gui/index.html +2 -2
  70. package/dist/index.js +107 -4
  71. package/dist/index.js.map +1 -1
  72. package/dist/mcp/server.d.ts.map +1 -1
  73. package/dist/mcp/server.js +42 -0
  74. package/dist/mcp/server.js.map +1 -1
  75. package/dist/server.d.ts.map +1 -1
  76. package/dist/server.js +175 -13
  77. package/dist/server.js.map +1 -1
  78. package/dist/server.test.js +66 -0
  79. package/dist/server.test.js.map +1 -1
  80. package/dist/types.d.ts +31 -0
  81. package/dist/types.d.ts.map +1 -1
  82. package/dist/utils/multi-git.d.ts +54 -8
  83. package/dist/utils/multi-git.d.ts.map +1 -1
  84. package/dist/utils/multi-git.js +129 -21
  85. package/dist/utils/multi-git.js.map +1 -1
  86. package/dist/utils/multi-git.test.d.ts +2 -0
  87. package/dist/utils/multi-git.test.d.ts.map +1 -0
  88. package/dist/utils/multi-git.test.js +125 -0
  89. package/dist/utils/multi-git.test.js.map +1 -0
  90. package/package.json +13 -1
  91. package/.agents/skills/ccc/SKILL.md +0 -71
  92. package/.agents/skills/ccc/references/management.md +0 -110
  93. package/.agents/skills/ccc/references/settings.md +0 -126
  94. package/.github/dependabot.yml +0 -52
  95. package/.github/workflows/ci.yml +0 -44
  96. package/.github/workflows/dependabot-merge.yml +0 -53
  97. package/.github/workflows/release-desktop.yml +0 -67
  98. package/.github/workflows/release-npm.yml +0 -65
  99. package/.github/workflows/release-vscode.yml +0 -61
  100. package/.vscode/launch.json +0 -17
  101. package/.vscode/tasks.json +0 -17
  102. package/GETTING_STARTED.md +0 -114
  103. package/desktop/build-installer.js +0 -228
  104. package/desktop/build.js +0 -118
  105. package/desktop/installer/nexusflow.iss +0 -35
  106. package/desktop/neutralino.config.json +0 -39
  107. package/desktop/package-lock.json +0 -1060
  108. package/desktop/package.json +0 -14
  109. package/dist/gui/assets/index-CB-jWded.css +0 -1
  110. package/dist/gui/assets/index-DDXpZZu3.js +0 -25
  111. package/extension/media/icon.svg +0 -1
  112. package/extension/package-lock.json +0 -6044
  113. package/extension/package.json +0 -117
  114. package/extension/src/extension.ts +0 -653
  115. package/extension/tsconfig.json +0 -21
  116. package/gui/README.md +0 -73
  117. package/gui/e2e/wizard.spec.ts +0 -346
  118. package/gui/eslint.config.js +0 -26
  119. package/gui/index.html +0 -17
  120. package/gui/package-lock.json +0 -3079
  121. package/gui/package.json +0 -36
  122. package/gui/playwright.config.ts +0 -41
  123. package/gui/public/app_logo.png +0 -0
  124. package/gui/public/favicon.svg +0 -1
  125. package/gui/public/icons.svg +0 -24
  126. package/gui/src/App.css +0 -1
  127. package/gui/src/App.tsx +0 -3632
  128. package/gui/src/assets/hero.png +0 -0
  129. package/gui/src/assets/react.svg +0 -1
  130. package/gui/src/assets/vite.svg +0 -1
  131. package/gui/src/features/changes/ChangesViewer.tsx +0 -388
  132. package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
  133. package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
  134. package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
  135. package/gui/src/features/services/ServiceConsole.tsx +0 -250
  136. package/gui/src/features/sessions/SessionHistory.tsx +0 -195
  137. package/gui/src/features/workspace/WorkspaceList.tsx +0 -666
  138. package/gui/src/index.css +0 -152
  139. package/gui/src/main.tsx +0 -94
  140. package/gui/src/types.ts +0 -62
  141. package/gui/tsconfig.app.json +0 -25
  142. package/gui/tsconfig.json +0 -7
  143. package/gui/tsconfig.node.json +0 -24
  144. package/gui/vite.config.ts +0 -12
  145. package/resources/workflows/plan-implement-review.md +0 -8
  146. package/resources/workflows/research-verify.md +0 -6
  147. package/resources/workflows/solo-developer.md +0 -3
  148. package/scripts/simulate-workspaces.ts +0 -55
  149. package/skills-lock.json +0 -11
  150. package/src/analyzers/detect-apis.ts +0 -290
  151. package/src/analyzers/detect-deps.ts +0 -315
  152. package/src/analyzers/detect-existing.ts +0 -74
  153. package/src/analyzers/detect-ports.ts +0 -110
  154. package/src/analyzers/index.ts +0 -97
  155. package/src/analyzers/messaging-analyzer.ts +0 -254
  156. package/src/analyzers/readme-summarizer.ts +0 -102
  157. package/src/analyzers/run-analyzer.ts +0 -269
  158. package/src/analyzers/tech-stack.ts +0 -283
  159. package/src/commands/adapter.ts +0 -348
  160. package/src/commands/add-repo.ts +0 -156
  161. package/src/commands/commands.test.ts +0 -156
  162. package/src/commands/commit.ts +0 -131
  163. package/src/commands/config.ts +0 -52
  164. package/src/commands/create.ts +0 -204
  165. package/src/commands/desktop.ts +0 -128
  166. package/src/commands/diff.ts +0 -125
  167. package/src/commands/doctor.ts +0 -370
  168. package/src/commands/handoff.ts +0 -266
  169. package/src/commands/init.ts +0 -134
  170. package/src/commands/list.ts +0 -46
  171. package/src/commands/logs.ts +0 -63
  172. package/src/commands/mcp.ts +0 -94
  173. package/src/commands/open.ts +0 -129
  174. package/src/commands/refresh.ts +0 -137
  175. package/src/commands/remove.ts +0 -98
  176. package/src/commands/start.ts +0 -117
  177. package/src/commands/status.ts +0 -54
  178. package/src/commands/stop.ts +0 -55
  179. package/src/commands/sync.ts +0 -147
  180. package/src/commands/tui.ts +0 -484
  181. package/src/commands/ui.ts +0 -111
  182. package/src/core/adapters/local-storage.ts +0 -66
  183. package/src/core/adapters/obsidian-storage.ts +0 -151
  184. package/src/core/adapters/registry.ts +0 -44
  185. package/src/core/adapters/storage.test.ts +0 -174
  186. package/src/core/adapters/vault-storage.ts +0 -86
  187. package/src/core/config.test.ts +0 -96
  188. package/src/core/config.ts +0 -140
  189. package/src/core/graph.ts +0 -344
  190. package/src/core/plugins/index.ts +0 -17
  191. package/src/core/plugins/loader.ts +0 -36
  192. package/src/core/ports/storage.ts +0 -71
  193. package/src/core/scanner.test.ts +0 -61
  194. package/src/core/scanner.ts +0 -91
  195. package/src/core/storage.ts +0 -37
  196. package/src/core/workspace.ts +0 -487
  197. package/src/core/worktree.ts +0 -120
  198. package/src/generators/antigravity.ts +0 -32
  199. package/src/generators/base.ts +0 -243
  200. package/src/generators/claude.ts +0 -34
  201. package/src/generators/codex.ts +0 -48
  202. package/src/generators/copilot.ts +0 -56
  203. package/src/generators/cursor.ts +0 -44
  204. package/src/generators/diff-context.ts +0 -75
  205. package/src/generators/index.ts +0 -322
  206. package/src/generators/map-generator.test.ts +0 -159
  207. package/src/generators/map-generator.ts +0 -539
  208. package/src/generators/plan-generator.ts +0 -483
  209. package/src/generators/skills-generator.ts +0 -259
  210. package/src/index.ts +0 -539
  211. package/src/mcp/server.ts +0 -294
  212. package/src/orchestration/detect.ts +0 -313
  213. package/src/orchestration/index.ts +0 -7
  214. package/src/orchestration/runner.ts +0 -283
  215. package/src/server.test.ts +0 -618
  216. package/src/server.ts +0 -1314
  217. package/src/types.ts +0 -415
  218. package/src/utils/detect-ai.test.ts +0 -44
  219. package/src/utils/detect-ai.ts +0 -84
  220. package/src/utils/detect-editors.test.ts +0 -48
  221. package/src/utils/detect-editors.ts +0 -57
  222. package/src/utils/git.test.ts +0 -74
  223. package/src/utils/git.ts +0 -117
  224. package/src/utils/local-ai.test.ts +0 -130
  225. package/src/utils/local-ai.ts +0 -116
  226. package/src/utils/multi-git.ts +0 -313
  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/src/types.ts DELETED
@@ -1,415 +0,0 @@
1
- /**
2
- * @module types
3
- * Shared interfaces and types for NexusFlow.
4
- */
5
-
6
- /** Supported AI assistant identifiers. */
7
- export type AIAssistant = 'claude' | 'antigravity' | 'codex' | 'copilot' | 'cursor';
8
-
9
- export interface LocalLlmConfig {
10
- enabled: boolean;
11
- provider: 'ollama' | 'openai-compatible';
12
- endpoint: string;
13
- model: string;
14
- apiKey?: string;
15
- }
16
-
17
- /** Top-level NexusFlow configuration stored in ~/.nexusflow/config.json. */
18
- export interface NexusFlowConfig {
19
- /** Semantic version of the NexusFlow config schema. */
20
- version: string;
21
-
22
- /** Root development directory. Default: ~/dev */
23
- devDir: string;
24
-
25
- /** Directory where workspaces are created. Default: ~/dev/workspaces */
26
- workspacesDir: string;
27
-
28
- /** The user's preferred AI assistant, or null if none chosen yet. */
29
- defaultAssistant: AIAssistant | null;
30
-
31
- /** The user's preferred editor command, or null if none chosen yet. */
32
- defaultEditor?: string | null;
33
-
34
- /** How many directory levels deep to scan for git repos. Default: 2 */
35
- scanDepth: number;
36
-
37
- /** Global patterns to exclude when packing/analyzing repositories. */
38
- excludePatterns?: string[];
39
-
40
- /** Active storage provider name. Default: 'local' */
41
- storageProvider?: string;
42
-
43
- /** Per-adapter settings keyed by adapter name. */
44
- adapterConfig?: Record<string, Record<string, unknown>>;
45
-
46
- /** List of plugin paths or npm packages to load. */
47
- plugins?: string[];
48
-
49
- /** ISO timestamp of the last update check. */
50
- lastUpdateCheck?: string;
51
-
52
- /** The last checked latest version from NPM. */
53
- latestVersion?: string;
54
- latestDownloadUrl?: string | null;
55
- latestReleaseNotes?: string;
56
-
57
- /** Local LLM settings for delegating simple tasks. */
58
- localLlm?: LocalLlmConfig;
59
- }
60
-
61
- /** Result of probing for an AI assistant on the system. */
62
- export interface DetectedAI {
63
- /** Canonical assistant identifier. */
64
- name: AIAssistant;
65
-
66
- /** Human-readable label shown in prompts. */
67
- displayName: string;
68
-
69
- /** Whether the assistant's CLI was found. */
70
- detected: boolean;
71
-
72
- /** The CLI command that was detected (e.g. 'claude', 'antigravity'). */
73
- command?: string;
74
- }
75
-
76
- /** Result of probing for a code editor on the system. */
77
- export interface DetectedEditor {
78
- /** Human-readable editor name. */
79
- name: string;
80
-
81
- /** CLI command used to launch the editor. */
82
- command: string;
83
-
84
- /** Whether the editor's CLI was found in PATH. */
85
- detected: boolean;
86
- }
87
-
88
- /** Metadata about a discovered git repository. */
89
- export interface RepoInfo {
90
- /** Directory name of the repo. */
91
- name: string;
92
-
93
- /** Absolute path to the repo root. */
94
- path: string;
95
-
96
- /** Default branch — typically 'main' or 'master'. */
97
- defaultBranch: string;
98
- }
99
-
100
- /** Metadata about a past AI session. */
101
- export interface AISession {
102
- id: string;
103
- assistant: AIAssistant;
104
- title: string;
105
- createdAt: string;
106
- updatedAt: string;
107
- messageCount: number;
108
- workspacePath: string;
109
- }
110
-
111
- /** A single chat message in a session transcript. */
112
- export interface ChatMessage {
113
- role: 'user' | 'assistant';
114
- content: string;
115
- timestamp?: string;
116
- }
117
-
118
-
119
- /** Configuration for resuming the active session. */
120
- export interface ResumptionConfig {
121
- /** The command to run verification tests. */
122
- testCommand?: string;
123
- /** The command to spin up dev databases/mocks/caches. */
124
- mockCommand?: string;
125
- /** The command to start workspace services manually if needed. */
126
- startCommand?: string;
127
- }
128
-
129
- /** A feature workspace that spans one or more repos. */
130
- export interface Feature {
131
- /** Unique identifier — the git branch name. */
132
- id: string;
133
-
134
- /** Git branch name created for this feature. */
135
- branchName: string;
136
-
137
- /** Short human-readable description of the feature. */
138
- description: string;
139
-
140
- /** Absolute paths to the repos included in this feature. */
141
- repos: string[];
142
-
143
- /** Absolute paths to the original repositories. */
144
- originalRepos?: string[];
145
-
146
- /** AI assistants enabled for this feature workspace. */
147
- assistants: AIAssistant[];
148
-
149
- /** Absolute path to the workspace directory on disk. */
150
- workspacePath: string;
151
-
152
- /** ISO-8601 timestamp of when the feature was created. */
153
- createdAt: string;
154
-
155
- /** Resumption configuration. */
156
- resumption?: ResumptionConfig;
157
-
158
- /** Whether the Local LLM Co-processor is active for this workspace. */
159
- localLlmEnabled?: boolean;
160
-
161
- /** Custom teamwork coordination instructions for the agent team. */
162
- teamworkInstructions?: string;
163
- }
164
-
165
- /** Runtime context for an active workspace — now includes analysis data. */
166
- export interface WorkspaceContext {
167
- /** The feature definition. */
168
- feature: Feature;
169
-
170
- /** Full repo metadata for every repo in the feature. */
171
- repos: RepoInfo[];
172
-
173
- /** Analysis results for each repo (keyed by repo path). */
174
- analysis?: Map<string, ProjectAnalysis>;
175
-
176
- /** The global local LLM config, to provide model context. */
177
- localLlm?: LocalLlmConfig;
178
- }
179
-
180
- // ─── Phase 2: Project Analysis Types ──────────────────────────────────────
181
-
182
- /** Recognized language/runtime. */
183
- export type Language =
184
- | 'typescript'
185
- | 'javascript'
186
- | 'csharp'
187
- | 'python'
188
- | 'go'
189
- | 'java'
190
- | 'rust'
191
- | 'ruby'
192
- | 'php'
193
- | 'other';
194
-
195
- /** Recognized framework. */
196
- export type Framework =
197
- | 'react'
198
- | 'nextjs'
199
- | 'angular'
200
- | 'vue'
201
- | 'svelte'
202
- | 'express'
203
- | 'nestjs'
204
- | 'fastify'
205
- | 'hono'
206
- | 'aspnet'
207
- | 'blazor'
208
- | 'django'
209
- | 'flask'
210
- | 'fastapi'
211
- | 'gin'
212
- | 'spring'
213
- | 'rails'
214
- | 'laravel'
215
- | 'other';
216
-
217
- /** Recognized project type. */
218
- export type ProjectType =
219
- | 'frontend'
220
- | 'backend'
221
- | 'fullstack'
222
- | 'library'
223
- | 'api'
224
- | 'cli'
225
- | 'worker'
226
- | 'other';
227
-
228
- /** Detected tech stack for a repo. */
229
- export interface TechStack {
230
- languages: Language[];
231
- frameworks: Framework[];
232
- buildTools: string[];
233
- projectType: ProjectType;
234
- }
235
-
236
- /** A detected API endpoint or route. */
237
- export interface ApiEndpoint {
238
- method: string;
239
- path: string;
240
- source?: string;
241
- }
242
-
243
- /** An inter-repo dependency reference. */
244
- export interface RepoDependency {
245
- /** Name of the dependency (npm package, NuGet package, etc.). */
246
- name: string;
247
- /** Type of dependency. */
248
- type: 'npm' | 'nuget' | 'pip' | 'go' | 'other';
249
- /** Version constraint if known. */
250
- version?: string;
251
- }
252
-
253
- /** Port/service configuration detected in a repo. */
254
- export interface ServicePort {
255
- port: number;
256
- protocol: 'http' | 'https' | 'grpc' | 'other';
257
- source: string;
258
- }
259
-
260
- /** Full analysis result for a single project/repo. */
261
- export interface ProjectAnalysis {
262
- /** Repo name. */
263
- name: string;
264
- /** Repo path. */
265
- path: string;
266
- /** Detected tech stack. */
267
- techStack: TechStack;
268
- /** Detected API endpoints. */
269
- endpoints: ApiEndpoint[];
270
- /** Detected dependencies. */
271
- dependencies: RepoDependency[];
272
- /** Detected ports/services. */
273
- ports: ServicePort[];
274
- /** Summary from README.md if found. */
275
- readmeSummary: string | null;
276
- /** Existing AI config files found in the repo. */
277
- existingAIConfigs: ExistingAIConfig[];
278
- /** Produced/published packages by this repo. */
279
- produces?: { name: string; type: 'npm' | 'nuget' | 'other'; version?: string; contributing?: string[] }[];
280
- /** NuGet feeds detected in the repo's NuGet.config files. */
281
- nugetFeeds?: { name: string; url: string }[];
282
- /** Detected messaging topology. */
283
- messaging?: MessagingTopology;
284
- /** Detected run configurations. */
285
- runConfig?: RunConfig;
286
- }
287
-
288
- export interface MessagePublisher {
289
- contractType: string;
290
- topicOrQueue: string;
291
- publisherFile: string;
292
- }
293
-
294
- export interface MessageSubscriber {
295
- contractType: string;
296
- handlerFile: string;
297
- registrationFile: string;
298
- }
299
-
300
- export interface MessagingTopology {
301
- publishers: MessagePublisher[];
302
- subscribers: MessageSubscriber[];
303
- }
304
-
305
- export interface RunConfigEntryPoint {
306
- projectPath: string;
307
- type: string;
308
- command?: string;
309
- port?: number;
310
- }
311
-
312
- export interface RunConfigDatabase {
313
- provider: string;
314
- host: string;
315
- configFile: string;
316
- }
317
-
318
- export interface RunConfigSharedInfraWarning {
319
- resource: string;
320
- host: string;
321
- configFile: string;
322
- warning: string;
323
- }
324
-
325
- export interface RunConfigSecret {
326
- file: string;
327
- lineHint: string;
328
- }
329
-
330
- export interface RunConfig {
331
- entryPoints: RunConfigEntryPoint[];
332
- databases: RunConfigDatabase[];
333
- sharedInfraWarnings: RunConfigSharedInfraWarning[];
334
- committedSecrets: RunConfigSecret[];
335
- externalDependencies: string[];
336
- }
337
-
338
- /** An existing AI configuration file found in a repo. */
339
- export interface ExistingAIConfig {
340
- /** Which assistant this config is for. */
341
- assistant: AIAssistant | 'agents';
342
- /** File path relative to repo root. */
343
- relativePath: string;
344
- /** First 500 chars of the content for context. */
345
- contentPreview: string;
346
- }
347
-
348
- // ─── Phase 3: Service Orchestration Types ─────────────────────────────────
349
-
350
- /** How to start a single service/project. */
351
- export interface ServiceConfig {
352
- /** Display name for the service. */
353
- name: string;
354
- /** Absolute path to the project directory. */
355
- cwd: string;
356
- /** The command to run (e.g., 'npm', 'dotnet', 'python'). */
357
- command: string;
358
- /** Arguments for the command. */
359
- args: string[];
360
- /** Optional port the service listens on. */
361
- port?: number;
362
- /** How the start command was detected. */
363
- source: 'package.json' | 'dotnet' | 'docker-compose' | 'aspire' | 'python' | 'go' | 'makefile' | 'manual';
364
- }
365
-
366
- /** Detected orchestration tool in a workspace. */
367
- export interface OrchestrationDetection {
368
- /** Which tool was found. */
369
- tool: 'docker-compose' | 'aspire' | 'tilt' | 'procfile' | 'makefile';
370
- /** Path to the config file. */
371
- configPath: string;
372
- /** Start command for this tool. */
373
- startCommand: string;
374
- /** Stop command for this tool. */
375
- stopCommand: string;
376
- }
377
-
378
- /** A currently running service process. */
379
- export interface RunningService {
380
- /** Service name. */
381
- name: string;
382
- /** Process ID. */
383
- pid: number;
384
- /** Service config used to start it. */
385
- config: ServiceConfig;
386
- /** Timestamp when started. */
387
- startedAt: string;
388
- }
389
-
390
- /** State file saved to track running services. */
391
- export interface RunningState {
392
- /** Workspace path this state belongs to. */
393
- workspacePath: string;
394
- /** List of running services. */
395
- services: RunningService[];
396
- /** Timestamp when the state was last updated. */
397
- updatedAt: string;
398
- }
399
-
400
- // ─── Phase 3: Dependency Graph Types ──────────────────────────────────────
401
-
402
- /** A node in the workspace dependency graph. */
403
- export interface DependencyNode {
404
- /** Repository name. */
405
- repoName: string;
406
- /** Absolute path to the repository. */
407
- repoPath: string;
408
- /** Names of repos this one depends on. */
409
- dependsOn: string[];
410
- /** Names of repos that depend on this one. */
411
- dependedOnBy: string[];
412
- }
413
-
414
- /** The full dependency graph for a workspace. */
415
- export type DependencyGraph = Map<string, DependencyNode>;
@@ -1,44 +0,0 @@
1
- import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- import { execa } from 'execa';
3
- import { detectAIAssistants } from './detect-ai.js';
4
-
5
- vi.mock('execa');
6
-
7
- describe('detectAIAssistants', () => {
8
- beforeEach(() => {
9
- vi.clearAllMocks();
10
- });
11
-
12
- it('should detect claude and antigravity when commands exit with 0', async () => {
13
- vi.mocked(execa).mockImplementation((command: any, args?: any, options?: any): any => {
14
- if (command === 'claude' || command === 'agy') {
15
- return Promise.resolve({ exitCode: 0 } as any);
16
- }
17
- return Promise.resolve({ exitCode: 1 } as any);
18
- });
19
-
20
- const result = await detectAIAssistants();
21
-
22
- expect(result).toEqual([
23
- { name: 'claude', displayName: 'Claude Code', detected: true, command: 'claude' },
24
- { name: 'antigravity', displayName: 'Antigravity', detected: true, command: 'agy' },
25
- { name: 'codex', displayName: 'OpenAI Codex', detected: false },
26
- { name: 'copilot', displayName: 'GitHub Copilot', detected: true },
27
- { name: 'cursor', displayName: 'Cursor', detected: false },
28
- ]);
29
- });
30
-
31
- it('should handle failures gracefully and set detected to false', async () => {
32
- vi.mocked(execa).mockRejectedValue(new Error('Spawn error'));
33
-
34
- const result = await detectAIAssistants();
35
-
36
- expect(result).toEqual([
37
- { name: 'claude', displayName: 'Claude Code', detected: false },
38
- { name: 'antigravity', displayName: 'Antigravity', detected: false },
39
- { name: 'codex', displayName: 'OpenAI Codex', detected: false },
40
- { name: 'copilot', displayName: 'GitHub Copilot', detected: true },
41
- { name: 'cursor', displayName: 'Cursor', detected: false },
42
- ]);
43
- });
44
- });
@@ -1,84 +0,0 @@
1
- /**
2
- * @module utils/detect-ai
3
- * Detects which AI coding assistants are available on the system.
4
- */
5
-
6
- import { execa } from 'execa';
7
-
8
- import type { AIAssistant, DetectedAI } from '../types.js';
9
-
10
- /**
11
- * Attempts to run `<command> --version` and returns `true` if the process
12
- * exits successfully (exit code 0).
13
- */
14
- async function commandExists(command: string): Promise<boolean> {
15
- try {
16
- const result = await execa(command, ['--version'], {
17
- reject: false,
18
- shell: process.platform === 'win32',
19
- });
20
- return result.exitCode === 0;
21
- } catch {
22
- // The command could not be spawned at all (not in PATH).
23
- return false;
24
- }
25
- }
26
-
27
- /**
28
- * Probes the system for known AI coding assistants and returns their status.
29
- *
30
- * Detection rules:
31
- * - **Claude**: detected if `claude` *or* `antigravity` is on PATH.
32
- * When Antigravity is found it is labelled as `'claude'` because it
33
- * generates `CLAUDE.md` context files.
34
- * - **Codex**: detected if `codex` is on PATH.
35
- * - **Copilot**: always shown as an option (convention-based via
36
- * `.github/copilot-instructions.md`).
37
- * - **Cursor**: detected if `cursor` is on PATH.
38
- *
39
- * @returns An array of {@link DetectedAI} results, one per assistant.
40
- */
41
- export async function detectAIAssistants(): Promise<DetectedAI[]> {
42
- // Run all probes concurrently.
43
- const [hasClaude, hasAntigravity, hasCodex, hasCursor] = await Promise.all([
44
- commandExists('claude'),
45
- commandExists('agy'),
46
- commandExists('codex'),
47
- commandExists('cursor'),
48
- ]);
49
-
50
- const results: DetectedAI[] = [
51
- {
52
- name: 'claude' as AIAssistant,
53
- displayName: 'Claude Code',
54
- detected: hasClaude,
55
- ...(hasClaude ? { command: 'claude' } : {}),
56
- },
57
- {
58
- name: 'antigravity' as AIAssistant,
59
- displayName: 'Antigravity',
60
- detected: hasAntigravity,
61
- ...(hasAntigravity ? { command: 'agy' } : {}),
62
- },
63
- {
64
- name: 'codex' as AIAssistant,
65
- displayName: 'OpenAI Codex',
66
- detected: hasCodex,
67
- ...(hasCodex ? { command: 'codex' } : {}),
68
- },
69
- {
70
- name: 'copilot' as AIAssistant,
71
- displayName: 'GitHub Copilot',
72
- // Copilot is convention-based; always available as an option.
73
- detected: true,
74
- },
75
- {
76
- name: 'cursor' as AIAssistant,
77
- displayName: 'Cursor',
78
- detected: hasCursor,
79
- ...(hasCursor ? { command: 'cursor' } : {}),
80
- },
81
- ];
82
-
83
- return results;
84
- }
@@ -1,48 +0,0 @@
1
- import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- import { execa } from 'execa';
3
- import { detectEditors } from './detect-editors.js';
4
-
5
- vi.mock('execa');
6
-
7
- describe('detectEditors', () => {
8
- beforeEach(() => {
9
- vi.clearAllMocks();
10
- });
11
-
12
- it('should return detected = true for editors whose commands exit with 0', async () => {
13
- vi.mocked(execa).mockImplementation((command: any, args?: any, options?: any): any => {
14
- if (command === 'code' || command === 'cursor') {
15
- return Promise.resolve({ exitCode: 0 } as any);
16
- }
17
- return Promise.resolve({ exitCode: 1 } as any);
18
- });
19
-
20
- const result = await detectEditors();
21
-
22
- expect(result).toEqual([
23
- { name: 'VS Code', command: 'code', detected: true },
24
- { name: 'VS Code Insiders', command: 'code-insiders', detected: false },
25
- { name: 'Cursor', command: 'cursor', detected: true },
26
- { name: 'Antigravity', command: 'antigravity', detected: false },
27
- ]);
28
-
29
- const isWin = process.platform === 'win32';
30
- expect(execa).toHaveBeenCalledWith('code', ['--version'], { reject: false, shell: isWin });
31
- expect(execa).toHaveBeenCalledWith('code-insiders', ['--version'], { reject: false, shell: isWin });
32
- expect(execa).toHaveBeenCalledWith('cursor', ['--version'], { reject: false, shell: isWin });
33
- expect(execa).toHaveBeenCalledWith('antigravity', ['--version'], { reject: false, shell: isWin });
34
- });
35
-
36
- it('should return detected = false for all editors if execa throws an error', async () => {
37
- vi.mocked(execa).mockRejectedValue(new Error('Spawn error'));
38
-
39
- const result = await detectEditors();
40
-
41
- expect(result).toEqual([
42
- { name: 'VS Code', command: 'code', detected: false },
43
- { name: 'VS Code Insiders', command: 'code-insiders', detected: false },
44
- { name: 'Cursor', command: 'cursor', detected: false },
45
- { name: 'Antigravity', command: 'antigravity', detected: false },
46
- ]);
47
- });
48
- });
@@ -1,57 +0,0 @@
1
- /**
2
- * @module utils/detect-editors
3
- * Detects which code editors are available on the system.
4
- */
5
-
6
- import { execa } from 'execa';
7
-
8
- import type { DetectedEditor } from '../types.js';
9
-
10
- /** Editor definitions we probe for. */
11
- const EDITOR_CANDIDATES: ReadonlyArray<{ name: string; command: string }> = [
12
- { name: 'VS Code', command: 'code' },
13
- { name: 'VS Code Insiders', command: 'code-insiders' },
14
- { name: 'Cursor', command: 'cursor' },
15
- { name: 'Antigravity', command: 'antigravity' },
16
- ];
17
-
18
- /**
19
- * Attempts to run `<command> --version` and returns `true` if the process
20
- * exits successfully (exit code 0).
21
- */
22
- async function commandExists(command: string): Promise<boolean> {
23
- try {
24
- const result = await execa(command, ['--version'], {
25
- reject: false,
26
- shell: process.platform === 'win32',
27
- });
28
- return result.exitCode === 0;
29
- } catch {
30
- return false;
31
- }
32
- }
33
-
34
- /**
35
- * Probes the system for known code editors by checking whether their CLI
36
- * commands are available on PATH.
37
- *
38
- * Currently checks for:
39
- * - **VS Code** (`code`)
40
- * - **VS Code Insiders** (`code-insiders`)
41
- * - **Cursor** (`cursor`)
42
- * - **Antigravity** (`antigravity`)
43
- *
44
- * @returns An array of {@link DetectedEditor} results, one per editor.
45
- */
46
- export async function detectEditors(): Promise<DetectedEditor[]> {
47
- const probes = EDITOR_CANDIDATES.map(async (editor) => {
48
- const detected = await commandExists(editor.command);
49
- return {
50
- name: editor.name,
51
- command: editor.command,
52
- detected,
53
- } satisfies DetectedEditor;
54
- });
55
-
56
- return Promise.all(probes);
57
- }