@mrpatronz/nexusflow 0.2.13 → 0.2.17

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