@mrpatronz/nexusflow 0.2.17 → 0.2.19

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 (320) hide show
  1. package/.agents/skills/ccc/SKILL.md +71 -0
  2. package/.agents/skills/ccc/references/management.md +110 -0
  3. package/.agents/skills/ccc/references/settings.md +126 -0
  4. package/.github/dependabot.yml +52 -52
  5. package/.github/workflows/ci.yml +44 -0
  6. package/.github/workflows/dependabot-merge.yml +53 -53
  7. package/.github/workflows/release-desktop.yml +67 -0
  8. package/.github/workflows/release-npm.yml +65 -0
  9. package/.github/workflows/release-vscode.yml +61 -0
  10. package/.vscode/launch.json +17 -17
  11. package/.vscode/tasks.json +17 -17
  12. package/GETTING_STARTED.md +114 -114
  13. package/README.md +364 -336
  14. package/desktop/build-installer.js +228 -228
  15. package/desktop/build.js +118 -118
  16. package/desktop/installer/nexusflow.iss +35 -35
  17. package/desktop/neutralino.config.json +38 -38
  18. package/desktop/package-lock.json +1060 -1060
  19. package/desktop/package.json +14 -14
  20. package/dist/commands/adapter.d.ts +27 -0
  21. package/dist/commands/adapter.d.ts.map +1 -0
  22. package/dist/commands/adapter.js +318 -0
  23. package/dist/commands/adapter.js.map +1 -0
  24. package/dist/commands/add-repo.d.ts.map +1 -1
  25. package/dist/commands/add-repo.js +0 -1
  26. package/dist/commands/add-repo.js.map +1 -1
  27. package/dist/commands/commands.test.js +2 -2
  28. package/dist/commands/commands.test.js.map +1 -1
  29. package/dist/commands/config.d.ts +22 -0
  30. package/dist/commands/config.d.ts.map +1 -0
  31. package/dist/commands/config.js +50 -0
  32. package/dist/commands/config.js.map +1 -0
  33. package/dist/commands/create.d.ts.map +1 -1
  34. package/dist/commands/create.js +14 -17
  35. package/dist/commands/create.js.map +1 -1
  36. package/dist/commands/doctor.d.ts.map +1 -1
  37. package/dist/commands/doctor.js +11 -0
  38. package/dist/commands/doctor.js.map +1 -1
  39. package/dist/commands/refresh.d.ts +1 -0
  40. package/dist/commands/refresh.d.ts.map +1 -1
  41. package/dist/commands/refresh.js +2 -14
  42. package/dist/commands/refresh.js.map +1 -1
  43. package/dist/commands/sync.d.ts.map +1 -1
  44. package/dist/commands/sync.js +36 -54
  45. package/dist/commands/sync.js.map +1 -1
  46. package/dist/commands/tui.d.ts.map +1 -1
  47. package/dist/commands/tui.js +63 -10
  48. package/dist/commands/tui.js.map +1 -1
  49. package/dist/core/adapters/local-storage.d.ts +14 -0
  50. package/dist/core/adapters/local-storage.d.ts.map +1 -0
  51. package/dist/core/adapters/local-storage.js +58 -0
  52. package/dist/core/adapters/local-storage.js.map +1 -0
  53. package/dist/core/adapters/obsidian-storage.d.ts +28 -0
  54. package/dist/core/adapters/obsidian-storage.d.ts.map +1 -0
  55. package/dist/core/adapters/obsidian-storage.js +135 -0
  56. package/dist/core/adapters/obsidian-storage.js.map +1 -0
  57. package/dist/core/adapters/registry.d.ts +8 -0
  58. package/dist/core/adapters/registry.d.ts.map +1 -0
  59. package/dist/core/adapters/registry.js +37 -0
  60. package/dist/core/adapters/registry.js.map +1 -0
  61. package/dist/core/adapters/storage.test.d.ts +2 -0
  62. package/dist/core/adapters/storage.test.d.ts.map +1 -0
  63. package/dist/core/adapters/storage.test.js +106 -0
  64. package/dist/core/adapters/storage.test.js.map +1 -0
  65. package/dist/core/adapters/vault-storage.d.ts +16 -0
  66. package/dist/core/adapters/vault-storage.d.ts.map +1 -0
  67. package/dist/core/adapters/vault-storage.js +77 -0
  68. package/dist/core/adapters/vault-storage.js.map +1 -0
  69. package/dist/core/config.d.ts.map +1 -1
  70. package/dist/core/config.js +28 -4
  71. package/dist/core/config.js.map +1 -1
  72. package/dist/core/plugins/index.d.ts +14 -0
  73. package/dist/core/plugins/index.d.ts.map +1 -0
  74. package/dist/core/plugins/index.js +2 -0
  75. package/dist/core/plugins/index.js.map +1 -0
  76. package/dist/core/plugins/loader.d.ts +2 -0
  77. package/dist/core/plugins/loader.d.ts.map +1 -0
  78. package/dist/core/plugins/loader.js +34 -0
  79. package/dist/core/plugins/loader.js.map +1 -0
  80. package/dist/core/ports/storage.d.ts +59 -0
  81. package/dist/core/ports/storage.d.ts.map +1 -0
  82. package/dist/core/ports/storage.js +10 -0
  83. package/dist/core/ports/storage.js.map +1 -0
  84. package/dist/core/storage.d.ts +10 -0
  85. package/dist/core/storage.d.ts.map +1 -0
  86. package/dist/core/storage.js +29 -0
  87. package/dist/core/storage.js.map +1 -0
  88. package/dist/core/sync.d.ts +44 -0
  89. package/dist/core/sync.d.ts.map +1 -0
  90. package/dist/core/sync.js +82 -0
  91. package/dist/core/sync.js.map +1 -0
  92. package/dist/core/workspace-state.d.ts +51 -0
  93. package/dist/core/workspace-state.d.ts.map +1 -0
  94. package/dist/core/workspace-state.js +108 -0
  95. package/dist/core/workspace-state.js.map +1 -0
  96. package/dist/core/workspace-state.test.d.ts +2 -0
  97. package/dist/core/workspace-state.test.d.ts.map +1 -0
  98. package/dist/core/workspace-state.test.js +84 -0
  99. package/dist/core/workspace-state.test.js.map +1 -0
  100. package/dist/core/workspace.d.ts.map +1 -1
  101. package/dist/core/workspace.js +110 -16
  102. package/dist/core/workspace.js.map +1 -1
  103. package/dist/generators/base.d.ts.map +1 -1
  104. package/dist/generators/base.js +80 -79
  105. package/dist/generators/base.js.map +1 -1
  106. package/dist/generators/codex.js +11 -11
  107. package/dist/generators/copilot.js +17 -17
  108. package/dist/generators/cursor.js +5 -5
  109. package/dist/generators/diff-context.d.ts +6 -0
  110. package/dist/generators/diff-context.d.ts.map +1 -0
  111. package/dist/generators/diff-context.js +68 -0
  112. package/dist/generators/diff-context.js.map +1 -0
  113. package/dist/generators/index.d.ts +1 -1
  114. package/dist/generators/index.d.ts.map +1 -1
  115. package/dist/generators/index.js +125 -68
  116. package/dist/generators/index.js.map +1 -1
  117. package/dist/generators/map-generator.d.ts.map +1 -1
  118. package/dist/generators/map-generator.js +21 -25
  119. package/dist/generators/map-generator.js.map +1 -1
  120. package/dist/generators/plan-generator.d.ts.map +1 -1
  121. package/dist/generators/plan-generator.js +3 -5
  122. package/dist/generators/plan-generator.js.map +1 -1
  123. package/dist/generators/skills-generator.js +28 -28
  124. package/dist/gui/assets/index-Bdbld6yY.css +1 -0
  125. package/dist/gui/assets/index-D8iJPvnk.js +26 -0
  126. package/dist/gui/icons.svg +24 -24
  127. package/dist/gui/index.html +18 -18
  128. package/dist/index.js +131 -20
  129. package/dist/index.js.map +1 -1
  130. package/dist/mcp/server.d.ts.map +1 -1
  131. package/dist/mcp/server.js +42 -0
  132. package/dist/mcp/server.js.map +1 -1
  133. package/dist/server.d.ts.map +1 -1
  134. package/dist/server.js +140 -56
  135. package/dist/server.js.map +1 -1
  136. package/dist/server.test.js +105 -48
  137. package/dist/server.test.js.map +1 -1
  138. package/dist/types.d.ts +38 -2
  139. package/dist/types.d.ts.map +1 -1
  140. package/dist/utils/local-ai.d.ts.map +1 -1
  141. package/dist/utils/local-ai.js +7 -3
  142. package/dist/utils/local-ai.js.map +1 -1
  143. package/dist/utils/multi-git.d.ts +33 -8
  144. package/dist/utils/multi-git.d.ts.map +1 -1
  145. package/dist/utils/multi-git.js +91 -19
  146. package/dist/utils/multi-git.js.map +1 -1
  147. package/dist/utils/multi-git.test.d.ts +2 -0
  148. package/dist/utils/multi-git.test.d.ts.map +1 -0
  149. package/dist/utils/multi-git.test.js +125 -0
  150. package/dist/utils/multi-git.test.js.map +1 -0
  151. package/dist/utils/update-check.d.ts.map +1 -1
  152. package/dist/utils/update-check.js +0 -28
  153. package/dist/utils/update-check.js.map +1 -1
  154. package/dist/utils/workflow-advisor.d.ts +16 -0
  155. package/dist/utils/workflow-advisor.d.ts.map +1 -0
  156. package/dist/utils/workflow-advisor.js +100 -0
  157. package/dist/utils/workflow-advisor.js.map +1 -0
  158. package/extension/package-lock.json +6044 -2673
  159. package/extension/package.json +117 -108
  160. package/extension/src/extension.ts +653 -631
  161. package/extension/tsconfig.json +21 -21
  162. package/gui/README.md +73 -73
  163. package/gui/e2e/dashboard.spec.ts +61 -0
  164. package/gui/e2e/wizard.spec.ts +346 -346
  165. package/gui/eslint.config.js +26 -26
  166. package/gui/index.html +17 -17
  167. package/gui/package-lock.json +3137 -3079
  168. package/gui/package.json +37 -36
  169. package/gui/playwright.config.ts +41 -41
  170. package/gui/public/icons.svg +24 -24
  171. package/gui/src/App.css +1 -1
  172. package/gui/src/App.tsx +3573 -3407
  173. package/gui/src/app/AppSidebar.tsx +69 -0
  174. package/gui/src/assets/vite.svg +1 -1
  175. package/gui/src/components/AddRepoPicker.tsx +81 -0
  176. package/gui/src/components/ui/Button.tsx +40 -0
  177. package/gui/src/components/ui/Card.tsx +6 -0
  178. package/gui/src/components/ui/EmptyState.tsx +22 -0
  179. package/gui/src/components/ui/Input.tsx +21 -0
  180. package/gui/src/components/ui/Menu.tsx +71 -0
  181. package/gui/src/components/ui/Modal.tsx +39 -0
  182. package/gui/src/components/ui/PageHeader.tsx +21 -0
  183. package/gui/src/components/ui/RepoStatusStrip.tsx +33 -0
  184. package/gui/src/components/ui/Skeleton.tsx +5 -0
  185. package/gui/src/components/ui/StatusPill.tsx +36 -0
  186. package/gui/src/components/ui/Tabs.tsx +40 -0
  187. package/gui/src/components/ui/cn.ts +4 -0
  188. package/gui/src/components/ui/index.ts +16 -0
  189. package/gui/src/features/changes/ChangesViewer.tsx +388 -388
  190. package/gui/src/features/knowledge/KnowledgeBase.tsx +84 -84
  191. package/gui/src/features/onboarding/OnboardingWizard.tsx +230 -230
  192. package/gui/src/features/plan/ImplementationPlan.tsx +32 -32
  193. package/gui/src/features/services/ServiceConsole.tsx +215 -250
  194. package/gui/src/features/sessions/SessionHistory.tsx +195 -195
  195. package/gui/src/index.css +167 -152
  196. package/gui/src/lib/status.ts +24 -0
  197. package/gui/src/main.tsx +94 -94
  198. package/gui/src/pages/DashboardPage.tsx +129 -0
  199. package/gui/src/pages/WorkspacesPage.tsx +352 -0
  200. package/gui/src/types.ts +81 -62
  201. package/gui/tsconfig.app.json +25 -25
  202. package/gui/tsconfig.json +7 -7
  203. package/gui/tsconfig.node.json +24 -24
  204. package/gui/vite.config.ts +12 -12
  205. package/package.json +55 -56
  206. package/resources/workflows/plan-implement-review.md +8 -8
  207. package/resources/workflows/research-verify.md +6 -6
  208. package/resources/workflows/solo-developer.md +3 -3
  209. package/scripts/simulate-workspaces.ts +55 -55
  210. package/skills-lock.json +11 -0
  211. package/src/analyzers/detect-apis.ts +290 -290
  212. package/src/analyzers/detect-deps.ts +315 -315
  213. package/src/analyzers/detect-existing.ts +74 -74
  214. package/src/analyzers/detect-ports.ts +110 -110
  215. package/src/analyzers/index.ts +97 -97
  216. package/src/analyzers/messaging-analyzer.ts +254 -254
  217. package/src/analyzers/readme-summarizer.ts +102 -102
  218. package/src/analyzers/run-analyzer.ts +269 -269
  219. package/src/analyzers/tech-stack.ts +283 -283
  220. package/src/commands/adapter.ts +348 -0
  221. package/src/commands/add-repo.ts +156 -157
  222. package/src/commands/commands.test.ts +156 -155
  223. package/src/commands/commit.ts +131 -131
  224. package/src/commands/config.ts +52 -0
  225. package/src/commands/create.ts +204 -207
  226. package/src/commands/desktop.ts +128 -128
  227. package/src/commands/diff.ts +125 -125
  228. package/src/commands/doctor.ts +370 -357
  229. package/src/commands/handoff.ts +266 -266
  230. package/src/commands/init.ts +134 -134
  231. package/src/commands/list.ts +46 -46
  232. package/src/commands/logs.ts +63 -63
  233. package/src/commands/mcp.ts +94 -92
  234. package/src/commands/open.ts +129 -129
  235. package/src/commands/refresh.ts +137 -147
  236. package/src/commands/remove.ts +98 -98
  237. package/src/commands/start.ts +117 -117
  238. package/src/commands/status.ts +54 -54
  239. package/src/commands/stop.ts +55 -55
  240. package/src/commands/sync.ts +125 -151
  241. package/src/commands/tui.ts +484 -424
  242. package/src/commands/ui.ts +111 -111
  243. package/src/core/adapters/local-storage.ts +66 -0
  244. package/src/core/adapters/obsidian-storage.ts +151 -0
  245. package/src/core/adapters/registry.ts +44 -0
  246. package/src/core/adapters/storage.test.ts +174 -0
  247. package/src/core/adapters/vault-storage.ts +86 -0
  248. package/src/core/config.test.ts +96 -96
  249. package/src/core/config.ts +140 -115
  250. package/src/core/graph.ts +344 -344
  251. package/src/core/plugins/index.ts +17 -0
  252. package/src/core/plugins/loader.ts +36 -0
  253. package/src/core/ports/storage.ts +71 -0
  254. package/src/core/scanner.test.ts +61 -61
  255. package/src/core/scanner.ts +91 -91
  256. package/src/core/storage.ts +37 -0
  257. package/src/core/sync.ts +121 -0
  258. package/src/core/workspace-state.test.ts +108 -0
  259. package/src/core/workspace-state.ts +130 -0
  260. package/src/core/workspace.ts +487 -380
  261. package/src/core/worktree.ts +120 -120
  262. package/src/generators/antigravity.ts +32 -32
  263. package/src/generators/base.ts +243 -240
  264. package/src/generators/claude.ts +34 -34
  265. package/src/generators/codex.ts +48 -48
  266. package/src/generators/copilot.ts +56 -56
  267. package/src/generators/cursor.ts +44 -44
  268. package/src/generators/diff-context.ts +75 -0
  269. package/src/generators/index.ts +322 -250
  270. package/src/generators/map-generator.test.ts +159 -159
  271. package/src/generators/map-generator.ts +539 -542
  272. package/src/generators/plan-generator.ts +483 -481
  273. package/src/generators/skills-generator.ts +259 -259
  274. package/src/index.ts +539 -426
  275. package/src/mcp/server.ts +338 -294
  276. package/src/orchestration/detect.ts +313 -313
  277. package/src/orchestration/index.ts +7 -7
  278. package/src/orchestration/runner.ts +283 -283
  279. package/src/server.test.ts +618 -555
  280. package/src/server.ts +1402 -1308
  281. package/src/types.ts +451 -408
  282. package/src/utils/detect-ai.test.ts +44 -44
  283. package/src/utils/detect-ai.ts +84 -84
  284. package/src/utils/detect-editors.test.ts +48 -48
  285. package/src/utils/detect-editors.ts +57 -57
  286. package/src/utils/git.test.ts +74 -74
  287. package/src/utils/git.ts +117 -117
  288. package/src/utils/local-ai.test.ts +130 -130
  289. package/src/utils/local-ai.ts +116 -111
  290. package/src/utils/multi-git.test.ts +158 -0
  291. package/src/utils/multi-git.ts +405 -313
  292. package/src/utils/prompts.ts +209 -209
  293. package/src/utils/session-finder.ts +483 -483
  294. package/src/utils/system-scanner.test.ts +89 -89
  295. package/src/utils/system-scanner.ts +96 -96
  296. package/src/utils/update-check.ts +286 -309
  297. package/src/utils/workflow-advisor.ts +118 -0
  298. package/src/utils/workflows.test.ts +114 -114
  299. package/src/utils/workflows.ts +178 -178
  300. package/tsconfig.json +19 -19
  301. package/vitest.config.ts +14 -14
  302. package/.github/workflows/release.yml +0 -112
  303. package/dist/commands/pack.d.ts +0 -7
  304. package/dist/commands/pack.d.ts.map +0 -1
  305. package/dist/commands/pack.js +0 -64
  306. package/dist/commands/pack.js.map +0 -1
  307. package/dist/core/packer.d.ts +0 -14
  308. package/dist/core/packer.d.ts.map +0 -1
  309. package/dist/core/packer.js +0 -87
  310. package/dist/core/packer.js.map +0 -1
  311. package/dist/core/packer.test.d.ts +0 -2
  312. package/dist/core/packer.test.d.ts.map +0 -1
  313. package/dist/core/packer.test.js +0 -82
  314. package/dist/core/packer.test.js.map +0 -1
  315. package/dist/gui/assets/index-Ct3qq-X4.js +0 -25
  316. package/dist/gui/assets/index-P_ZrgHXg.css +0 -1
  317. package/gui/src/features/workspace/WorkspaceList.tsx +0 -666
  318. package/src/commands/pack.ts +0 -73
  319. package/src/core/packer.test.ts +0 -99
  320. package/src/core/packer.ts +0 -107
@@ -0,0 +1,14 @@
1
+ import type { StoragePort } from '../ports/storage.js';
2
+ export type { StoragePort, StorageAdapterMeta, AdapterConfigField } from '../ports/storage.js';
3
+ export interface PluginRegistryContext {
4
+ /** Registers a custom storage provider/adapter. The provider must include a `meta` property. */
5
+ registerStorageProvider(name: string, provider: StoragePort): void;
6
+ /** Registers a custom commander CLI subcommand. */
7
+ registerCommand(commandBuilder: (program: any) => void): void;
8
+ }
9
+ export interface NexusFlowPlugin {
10
+ name: string;
11
+ version: string;
12
+ register(context: PluginRegistryContext): void | Promise<void>;
13
+ }
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE/F,MAAM,WAAW,qBAAqB;IACpC,gGAAgG;IAChG,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAEnE,mDAAmD;IACnD,eAAe,CAAC,cAAc,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;CAC/D;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/plugins/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare function loadPlugins(program: any, pluginsList: string[]): Promise<void>;
2
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/loader.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BpF"}
@@ -0,0 +1,34 @@
1
+ import * as path from 'node:path';
2
+ import { registerStorageProvider } from '../adapters/registry.js';
3
+ export async function loadPlugins(program, pluginsList) {
4
+ const context = {
5
+ registerStorageProvider(name, provider) {
6
+ registerStorageProvider(name, provider);
7
+ },
8
+ registerCommand(commandBuilder) {
9
+ commandBuilder(program);
10
+ }
11
+ };
12
+ for (const pluginPath of pluginsList) {
13
+ try {
14
+ let resolvedPath = pluginPath;
15
+ if (pluginPath.startsWith('.') || path.isAbsolute(pluginPath)) {
16
+ resolvedPath = path.resolve(pluginPath);
17
+ }
18
+ // Dynamic import works with file:// URLs on Windows
19
+ const fileUrl = resolvedPath.startsWith('file://') ? resolvedPath : `file:///${resolvedPath.replace(/\\/g, '/')}`;
20
+ const module = await import(fileUrl);
21
+ const plugin = module.default || module.plugin;
22
+ if (plugin && typeof plugin.register === 'function') {
23
+ await plugin.register(context);
24
+ }
25
+ else {
26
+ console.warn(`Warning: Plugin at "${pluginPath}" does not export a valid NexusFlowPlugin.`);
27
+ }
28
+ }
29
+ catch (error) {
30
+ console.error(`Failed to load plugin "${pluginPath}":`, error.message);
31
+ }
32
+ }
33
+ }
34
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../src/core/plugins/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAAY,EAAE,WAAqB;IACnE,MAAM,OAAO,GAA0B;QACrC,uBAAuB,CAAC,IAAI,EAAE,QAAQ;YACpC,uBAAuB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,eAAe,CAAC,cAAc;YAC5B,cAAc,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC;KACF,CAAC;IAEF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,CAAC;YACH,IAAI,YAAY,GAAG,UAAU,CAAC;YAC9B,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9D,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAC1C,CAAC;YAED,oDAAoD;YACpD,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YAClH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;YACrC,MAAM,MAAM,GAAoB,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC;YAEhE,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;gBACpD,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAI,CAAC,uBAAuB,UAAU,4CAA4C,CAAC,CAAC;YAC9F,CAAC;QACH,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,0BAA0B,UAAU,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @module core/ports/storage
3
+ * Storage Port defining the interface for workspace document persistence.
4
+ *
5
+ * Adapters implement this interface to provide different storage backends.
6
+ * Each adapter is self-describing via the `meta` property, which enables
7
+ * automatic discovery in CLI, GUI, and plugin systems.
8
+ */
9
+ /** Describes a single configurable field for an adapter. */
10
+ export interface AdapterConfigField {
11
+ /** Machine-readable key, stored in config.json. */
12
+ key: string;
13
+ /** Human-readable label for CLI prompts and GUI forms. */
14
+ label: string;
15
+ /** Value type — 'path' renders a file picker in the GUI. */
16
+ type: 'string' | 'boolean' | 'number' | 'path';
17
+ /** Whether the field must be set before the adapter can be used. */
18
+ required?: boolean;
19
+ /** Default value when not explicitly configured. */
20
+ default?: unknown;
21
+ /** Help text shown in CLI prompts and GUI tooltips. */
22
+ description?: string;
23
+ }
24
+ /** Metadata that makes an adapter self-describing and discoverable. */
25
+ export interface StorageAdapterMeta {
26
+ /** Unique machine-readable identifier (e.g. 'obsidian'). */
27
+ name: string;
28
+ /** Human-readable name for CLI tables and GUI dropdowns (e.g. 'Obsidian Vault'). */
29
+ displayName: string;
30
+ /** One-line description of what this adapter does. */
31
+ description: string;
32
+ /** Configuration fields this adapter accepts. Empty array = no config needed. */
33
+ configFields: AdapterConfigField[];
34
+ }
35
+ export interface StoragePort {
36
+ /** Adapter metadata — who am I, what do I need? */
37
+ readonly meta: StorageAdapterMeta;
38
+ /** Called once after registration with the user's per-adapter settings. */
39
+ configure?(settings: Record<string, unknown>): void;
40
+ /** Writes a workspace context/metadata document. */
41
+ writeWorkspaceFile(workspacePath: string, featureId: string, filename: string, content: string): Promise<void>;
42
+ /** Reads a workspace context/metadata document. */
43
+ readWorkspaceFile(workspacePath: string, featureId: string, filename: string): Promise<string>;
44
+ /** Checks if a workspace context/metadata document exists. */
45
+ workspaceFileExists(workspacePath: string, featureId: string, filename: string): Promise<boolean>;
46
+ /** Resolves the human-readable path or link to the workspace document for the AI assistant. */
47
+ resolveWorkspaceFileUrl(workspacePath: string, featureId: string, filename: string): string;
48
+ /** Writes a base-layer context document (stable maps/conventions across workspaces). */
49
+ writeBaseFile(workspacePath: string, repoName: string, filename: string, content: string): Promise<void>;
50
+ /** Reads a base-layer context document. */
51
+ readBaseFile(workspacePath: string, repoName: string, filename: string): Promise<string>;
52
+ /** Checks if a base-layer context document exists. */
53
+ baseFileExists(workspacePath: string, repoName: string, filename: string): Promise<boolean>;
54
+ /** Resolves the human-readable path or link to the base document. */
55
+ resolveBaseFileUrl(workspacePath: string, repoName: string, filename: string): string;
56
+ /** Cleanly deletes all workspace-specific documents from the storage backend. */
57
+ deleteWorkspace(workspacePath: string, featureId: string): Promise<void>;
58
+ }
59
+ //# sourceMappingURL=storage.d.ts.map
@@ -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mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAElG,+FAA+F;IAC/F,uBAAuB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5F,wFAAwF;IACxF,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzG,2CAA2C;IAC3C,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzF,sDAAsD;IACtD,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5F,qEAAqE;IACrE,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtF,iFAAiF;IACjF,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module core/ports/storage
3
+ * Storage Port defining the interface for workspace document persistence.
4
+ *
5
+ * Adapters implement this interface to provide different storage backends.
6
+ * Each adapter is self-describing via the `meta` property, which enables
7
+ * automatic discovery in CLI, GUI, and plugin systems.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/core/ports/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,10 @@
1
+ export declare function writeWorkspaceFile(workspacePath: string, featureId: string, filename: string, content: string): Promise<void>;
2
+ export declare function readWorkspaceFile(workspacePath: string, featureId: string, filename: string): Promise<string>;
3
+ export declare function workspaceFileExists(workspacePath: string, featureId: string, filename: string): Promise<boolean>;
4
+ export declare function resolveWorkspaceFileUrl(workspacePath: string, featureId: string, filename: string): string;
5
+ export declare function writeBaseFile(workspacePath: string, repoName: string, filename: string, content: string): Promise<void>;
6
+ export declare function readBaseFile(workspacePath: string, repoName: string, filename: string): Promise<string>;
7
+ export declare function baseFileExists(workspacePath: string, repoName: string, filename: string): Promise<boolean>;
8
+ export declare function resolveBaseFileUrl(workspacePath: string, repoName: string, filename: string): string;
9
+ export declare function deleteWorkspaceFiles(workspacePath: string, featureId: string): Promise<void>;
10
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/core/storage.ts"],"names":[],"mappings":"AAEA,wBAAsB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnI;AAED,wBAAsB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnH;AAED,wBAAsB,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEtH;AAED,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1G;AAED,wBAAsB,aAAa,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7H;AAED,wBAAsB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7G;AAED,wBAAsB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEhH;AAED,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpG;AAED,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAElG"}
@@ -0,0 +1,29 @@
1
+ import { getActiveStorageProvider } from './adapters/registry.js';
2
+ export async function writeWorkspaceFile(workspacePath, featureId, filename, content) {
3
+ await getActiveStorageProvider().writeWorkspaceFile(workspacePath, featureId, filename, content);
4
+ }
5
+ export async function readWorkspaceFile(workspacePath, featureId, filename) {
6
+ return await getActiveStorageProvider().readWorkspaceFile(workspacePath, featureId, filename);
7
+ }
8
+ export async function workspaceFileExists(workspacePath, featureId, filename) {
9
+ return await getActiveStorageProvider().workspaceFileExists(workspacePath, featureId, filename);
10
+ }
11
+ export function resolveWorkspaceFileUrl(workspacePath, featureId, filename) {
12
+ return getActiveStorageProvider().resolveWorkspaceFileUrl(workspacePath, featureId, filename);
13
+ }
14
+ export async function writeBaseFile(workspacePath, repoName, filename, content) {
15
+ await getActiveStorageProvider().writeBaseFile(workspacePath, repoName, filename, content);
16
+ }
17
+ export async function readBaseFile(workspacePath, repoName, filename) {
18
+ return await getActiveStorageProvider().readBaseFile(workspacePath, repoName, filename);
19
+ }
20
+ export async function baseFileExists(workspacePath, repoName, filename) {
21
+ return await getActiveStorageProvider().baseFileExists(workspacePath, repoName, filename);
22
+ }
23
+ export function resolveBaseFileUrl(workspacePath, repoName, filename) {
24
+ return getActiveStorageProvider().resolveBaseFileUrl(workspacePath, repoName, filename);
25
+ }
26
+ export async function deleteWorkspaceFiles(workspacePath, featureId) {
27
+ await getActiveStorageProvider().deleteWorkspace(workspacePath, featureId);
28
+ }
29
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/core/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,aAAqB,EAAE,SAAiB,EAAE,QAAgB,EAAE,OAAe;IAClH,MAAM,wBAAwB,EAAE,CAAC,kBAAkB,CAAC,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACnG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,aAAqB,EAAE,SAAiB,EAAE,QAAgB;IAChG,OAAO,MAAM,wBAAwB,EAAE,CAAC,iBAAiB,CAAC,aAAa,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAChG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,aAAqB,EAAE,SAAiB,EAAE,QAAgB;IAClG,OAAO,MAAM,wBAAwB,EAAE,CAAC,mBAAmB,CAAC,aAAa,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,aAAqB,EAAE,SAAiB,EAAE,QAAgB;IAChG,OAAO,wBAAwB,EAAE,CAAC,uBAAuB,CAAC,aAAa,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAChG,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,aAAqB,EAAE,QAAgB,EAAE,QAAgB,EAAE,OAAe;IAC5G,MAAM,wBAAwB,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,aAAqB,EAAE,QAAgB,EAAE,QAAgB;IAC1F,OAAO,MAAM,wBAAwB,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,aAAqB,EAAE,QAAgB,EAAE,QAAgB;IAC5F,OAAO,MAAM,wBAAwB,EAAE,CAAC,cAAc,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,aAAqB,EAAE,QAAgB,EAAE,QAAgB;IAC1F,OAAO,wBAAwB,EAAE,CAAC,kBAAkB,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,aAAqB,EAAE,SAAiB;IACjF,MAAM,wBAAwB,EAAE,CAAC,eAAe,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @module core/sync
3
+ * Headless workspace sync — rebases every repo in a workspace onto its base
4
+ * branch, records the per-repo outcome to workspace state, and regenerates
5
+ * context files. Produces no console output, so it can back the CLI, the HTTP
6
+ * API, and the MCP tool alike.
7
+ */
8
+ import type { SyncStatus } from '../types.js';
9
+ /** Sync outcome for a single repo. */
10
+ export interface RepoSyncReport {
11
+ /** Directory name of the repo. */
12
+ name: string;
13
+ /** Classified outcome. */
14
+ status: SyncStatus;
15
+ /** Human-readable message. */
16
+ message: string;
17
+ /** Conflict stderr — populated only for `status === 'conflict'`. */
18
+ conflict?: string;
19
+ }
20
+ /** Aggregated result of syncing an entire workspace. */
21
+ export interface SyncReport {
22
+ /** Absolute path to the workspace. */
23
+ workspacePath: string;
24
+ /** Feature branch name being synced. */
25
+ branchName: string;
26
+ /** Per-repo outcomes, in workspace order. */
27
+ repos: RepoSyncReport[];
28
+ /** Count of repos that landed cleanly (up-to-date, rebased, or stash-conflict). */
29
+ syncedCount: number;
30
+ /** Count of repos with a genuine merge conflict. */
31
+ conflictCount: number;
32
+ /** Count of repos that failed for infrastructure reasons (fetch/auth, etc.). */
33
+ errorCount: number;
34
+ }
35
+ /**
36
+ * Syncs all repos in a workspace. Throws if the workspace configuration cannot
37
+ * be loaded; individual repo failures are captured in the returned report
38
+ * rather than thrown.
39
+ *
40
+ * @param workspacePath - Absolute path to the workspace root.
41
+ * @returns A structured report of every repo's outcome.
42
+ */
43
+ export declare function syncWorkspace(workspacePath: string): Promise<SyncReport>;
44
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/core/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AAEhE,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wDAAwD;AACxD,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAC;CACpB;AAOD;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CA8D9E"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @module core/sync
3
+ * Headless workspace sync — rebases every repo in a workspace onto its base
4
+ * branch, records the per-repo outcome to workspace state, and regenerates
5
+ * context files. Produces no console output, so it can back the CLI, the HTTP
6
+ * API, and the MCP tool alike.
7
+ */
8
+ import * as path from 'node:path';
9
+ import { loadFeatureConfig } from './workspace.js';
10
+ import { recordRepoSync } from './workspace-state.js';
11
+ import { getWorkspaceRepos, rebaseRepo } from '../utils/multi-git.js';
12
+ import { analyzeAllRepos } from '../analyzers/index.js';
13
+ import { generateContextFiles } from '../generators/index.js';
14
+ /** A sync status counts as "synced" when the rebase itself landed. */
15
+ function isSynced(status) {
16
+ return status === 'up-to-date' || status === 'rebased' || status === 'stash-conflict';
17
+ }
18
+ /**
19
+ * Syncs all repos in a workspace. Throws if the workspace configuration cannot
20
+ * be loaded; individual repo failures are captured in the returned report
21
+ * rather than thrown.
22
+ *
23
+ * @param workspacePath - Absolute path to the workspace root.
24
+ * @returns A structured report of every repo's outcome.
25
+ */
26
+ export async function syncWorkspace(workspacePath) {
27
+ const feature = await loadFeatureConfig(workspacePath);
28
+ if (!feature) {
29
+ throw new Error(`Failed to load workspace configuration. Ensure nexusflow.json exists at ${workspacePath}.`);
30
+ }
31
+ const repos = await getWorkspaceRepos(workspacePath);
32
+ const repoReports = [];
33
+ let syncedCount = 0;
34
+ let conflictCount = 0;
35
+ let errorCount = 0;
36
+ for (const repo of repos) {
37
+ const defaultBranch = repo.defaultBranch || 'main';
38
+ const result = await rebaseRepo(repo.path, defaultBranch);
39
+ await recordRepoSync(workspacePath, repo.name, {
40
+ status: result.status,
41
+ message: result.message,
42
+ });
43
+ repoReports.push({
44
+ name: repo.name,
45
+ status: result.status,
46
+ message: result.message,
47
+ conflict: result.conflict,
48
+ });
49
+ if (isSynced(result.status))
50
+ syncedCount++;
51
+ else if (result.status === 'conflict')
52
+ conflictCount++;
53
+ else
54
+ errorCount++;
55
+ }
56
+ // Regenerate maps/context when anything synced. A regen failure must never
57
+ // fail the sync itself — the rebases already happened.
58
+ if (syncedCount > 0) {
59
+ try {
60
+ const allRepos = feature.repos.map((r) => ({
61
+ name: path.basename(r),
62
+ path: r,
63
+ defaultBranch: 'main',
64
+ }));
65
+ const analysis = await analyzeAllRepos(allRepos);
66
+ const ctx = { feature, repos: allRepos, analysis };
67
+ await generateContextFiles(ctx, feature.assistants, workspacePath);
68
+ }
69
+ catch {
70
+ // Best-effort regeneration; ignore failures.
71
+ }
72
+ }
73
+ return {
74
+ workspacePath,
75
+ branchName: feature.branchName,
76
+ repos: repoReports,
77
+ syncedCount,
78
+ conflictCount,
79
+ errorCount,
80
+ };
81
+ }
82
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/core/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AA+B9D,sEAAsE;AACtE,SAAS,QAAQ,CAAC,MAAkB;IAClC,OAAO,MAAM,KAAK,YAAY,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,gBAAgB,CAAC;AACxF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,C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,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACzC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACtB,IAAI,EAAE,CAAC;gBACP,aAAa,EAAE,MAAM;aACtB,CAAC,CAAC,CAAC;YAEJ,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;YACjD,MAAM,GAAG,GAAqB,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;YACrE,MAAM,oBAAoB,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QACrE,CAAC;QAAC,MAAM,CAAC;YACP,6CAA6C;QAC/C,CAAC;IACH,CAAC;IAED,OAAO;QACL,aAAa;QACb,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,KAAK,EAAE,WAAW;QAClB,WAAW;QACX,aAAa;QACb,UAAU;KACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @module core/workspace-state
3
+ * Persists per-repo sync/validation state for a workspace in a single
4
+ * `.nexusflow-state.json` file at the workspace root.
5
+ *
6
+ * Mirrors the lightweight state-file pattern used by `orchestration/runner.ts`
7
+ * for running services. Tracks, per repo: when it was last synced, the
8
+ * classified result, whether it is pending re-validation, and the last
9
+ * validation outcome — so agents no longer need to hand-roll their own state.
10
+ */
11
+ import type { RepoSyncState, SyncStatus, WorkspaceState } from '../types.js';
12
+ /**
13
+ * Loads the workspace state from disk, returning an empty skeleton when the
14
+ * file does not exist or cannot be parsed.
15
+ *
16
+ * @param workspacePath - Absolute path to the workspace root.
17
+ */
18
+ export declare function loadWorkspaceState(workspacePath: string): Promise<WorkspaceState>;
19
+ /**
20
+ * Saves the workspace state to disk.
21
+ *
22
+ * @param state - The state to persist. Its `updatedAt` is refreshed on write.
23
+ */
24
+ export declare function saveWorkspaceState(state: WorkspaceState): Promise<void>;
25
+ /**
26
+ * Records the outcome of a sync attempt for a single repo and persists it.
27
+ *
28
+ * Sets `pendingValidation` to true when new commits were pulled in
29
+ * (`status === 'rebased'`), signalling that the repo should be re-validated.
30
+ *
31
+ * @param workspacePath - Absolute path to the workspace root.
32
+ * @param repoName - Directory name of the repo.
33
+ * @param result - The classified sync status and message.
34
+ * @returns The updated per-repo state entry.
35
+ */
36
+ export declare function recordRepoSync(workspacePath: string, repoName: string, result: {
37
+ status: SyncStatus;
38
+ message: string;
39
+ }): Promise<RepoSyncState>;
40
+ /**
41
+ * Records the result of a validation run (e.g. tests/e2e) for a repo and clears
42
+ * its pending-validation flag. Provided for the validation flow that consumes
43
+ * `pendingValidation`.
44
+ *
45
+ * @param workspacePath - Absolute path to the workspace root.
46
+ * @param repoName - Directory name of the repo.
47
+ * @param result - Whether validation passed or failed.
48
+ * @returns The updated per-repo state entry.
49
+ */
50
+ export declare function markValidated(workspacePath: string, repoName: string, result: 'pass' | 'fail'): Promise<RepoSyncState>;
51
+ //# sourceMappingURL=workspace-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../../src/core/workspace-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAY7E;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,cAAc,CAAC,CAiBzB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7E;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAClC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9C,OAAO,CAAC,aAAa,CAAC,CAmBxB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GAAG,MAAM,GACtB,OAAO,CAAC,aAAa,CAAC,CAexB"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @module core/workspace-state
3
+ * Persists per-repo sync/validation state for a workspace in a single
4
+ * `.nexusflow-state.json` file at the workspace root.
5
+ *
6
+ * Mirrors the lightweight state-file pattern used by `orchestration/runner.ts`
7
+ * for running services. Tracks, per repo: when it was last synced, the
8
+ * classified result, whether it is pending re-validation, and the last
9
+ * validation outcome — so agents no longer need to hand-roll their own state.
10
+ */
11
+ import * as fs from 'node:fs/promises';
12
+ import * as path from 'node:path';
13
+ /** Name of the per-repo state file, written at the workspace root. */
14
+ const STATE_FILE = '.nexusflow-state.json';
15
+ /**
16
+ * Returns the path to the workspace state file.
17
+ */
18
+ function getStatePath(workspacePath) {
19
+ return path.join(workspacePath, STATE_FILE);
20
+ }
21
+ /**
22
+ * Loads the workspace state from disk, returning an empty skeleton when the
23
+ * file does not exist or cannot be parsed.
24
+ *
25
+ * @param workspacePath - Absolute path to the workspace root.
26
+ */
27
+ export async function loadWorkspaceState(workspacePath) {
28
+ try {
29
+ const raw = await fs.readFile(getStatePath(workspacePath), 'utf-8');
30
+ const state = JSON.parse(raw);
31
+ // Defend against a malformed/legacy file lacking the repos map.
32
+ if (!state.repos || typeof state.repos !== 'object') {
33
+ state.repos = {};
34
+ }
35
+ state.workspacePath = workspacePath;
36
+ return state;
37
+ }
38
+ catch {
39
+ return {
40
+ workspacePath,
41
+ repos: {},
42
+ updatedAt: new Date().toISOString(),
43
+ };
44
+ }
45
+ }
46
+ /**
47
+ * Saves the workspace state to disk.
48
+ *
49
+ * @param state - The state to persist. Its `updatedAt` is refreshed on write.
50
+ */
51
+ export async function saveWorkspaceState(state) {
52
+ const toWrite = { ...state, updatedAt: new Date().toISOString() };
53
+ const data = JSON.stringify(toWrite, null, 2) + '\n';
54
+ await fs.writeFile(getStatePath(state.workspacePath), data, 'utf-8');
55
+ }
56
+ /**
57
+ * Records the outcome of a sync attempt for a single repo and persists it.
58
+ *
59
+ * Sets `pendingValidation` to true when new commits were pulled in
60
+ * (`status === 'rebased'`), signalling that the repo should be re-validated.
61
+ *
62
+ * @param workspacePath - Absolute path to the workspace root.
63
+ * @param repoName - Directory name of the repo.
64
+ * @param result - The classified sync status and message.
65
+ * @returns The updated per-repo state entry.
66
+ */
67
+ export async function recordRepoSync(workspacePath, repoName, result) {
68
+ const state = await loadWorkspaceState(workspacePath);
69
+ const existing = state.repos[repoName] ?? { repoName };
70
+ const updated = {
71
+ ...existing,
72
+ repoName,
73
+ lastSyncedAt: new Date().toISOString(),
74
+ lastSyncStatus: result.status,
75
+ lastSyncMessage: result.message,
76
+ // New commits landed → the repo needs re-validation. Preserve an existing
77
+ // pending flag otherwise (a no-op sync doesn't clear prior pending work).
78
+ pendingValidation: result.status === 'rebased' ? true : existing.pendingValidation ?? false,
79
+ };
80
+ state.repos[repoName] = updated;
81
+ await saveWorkspaceState(state);
82
+ return updated;
83
+ }
84
+ /**
85
+ * Records the result of a validation run (e.g. tests/e2e) for a repo and clears
86
+ * its pending-validation flag. Provided for the validation flow that consumes
87
+ * `pendingValidation`.
88
+ *
89
+ * @param workspacePath - Absolute path to the workspace root.
90
+ * @param repoName - Directory name of the repo.
91
+ * @param result - Whether validation passed or failed.
92
+ * @returns The updated per-repo state entry.
93
+ */
94
+ export async function markValidated(workspacePath, repoName, result) {
95
+ const state = await loadWorkspaceState(workspacePath);
96
+ const existing = state.repos[repoName] ?? { repoName };
97
+ const updated = {
98
+ ...existing,
99
+ repoName,
100
+ lastValidationResult: result,
101
+ lastValidatedAt: new Date().toISOString(),
102
+ pendingValidation: false,
103
+ };
104
+ state.repos[repoName] = updated;
105
+ await saveWorkspaceState(state);
106
+ return updated;
107
+ }
108
+ //# sourceMappingURL=workspace-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-state.js","sourceRoot":"","sources":["../../src/core/workspace-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,sEAAsE;AACtE,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAE3C;;GAEG;AACH,SAAS,YAAY,CAAC,aAAqB;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,aAAqB;IAErB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAmB,CAAC;QAChD,gEAAgE;QAChE,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACpD,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QACnB,CAAC;QACD,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,aAAa;YACb,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAqB;IAC5D,MAAM,OAAO,GAAmB,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IAClF,MAAM,IAAI,GAAG,IAA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GAAG,QAAQ;QACX,QAAQ;QACR,oBAAoB,EAAE,MAAM;QAC5B,eAAe,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACzC,iBAAiB,EAAE,KAAK;KACzB,CAAC;IAEF,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;IAChC,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workspace-state.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-state.test.d.ts","sourceRoot":"","sources":["../../src/core/workspace-state.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,84 @@
1
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
2
+ import * as fs from 'node:fs/promises';
3
+ import { loadWorkspaceState, recordRepoSync, markValidated, } from './workspace-state.js';
4
+ vi.mock('node:fs/promises');
5
+ /** Parses the JSON written by the most recent writeFile call. */
6
+ function lastWritten() {
7
+ const calls = vi.mocked(fs.writeFile).mock.calls;
8
+ const data = calls[calls.length - 1][1];
9
+ return JSON.parse(data);
10
+ }
11
+ describe('workspace-state', () => {
12
+ beforeEach(() => {
13
+ vi.clearAllMocks();
14
+ vi.mocked(fs.writeFile).mockResolvedValue(undefined);
15
+ });
16
+ describe('loadWorkspaceState', () => {
17
+ it('returns an empty skeleton when the file is absent', async () => {
18
+ vi.mocked(fs.readFile).mockRejectedValue(new Error('ENOENT'));
19
+ const state = await loadWorkspaceState('/ws');
20
+ expect(state.workspacePath).toBe('/ws');
21
+ expect(state.repos).toEqual({});
22
+ });
23
+ it('round-trips an existing state file', async () => {
24
+ const existing = {
25
+ workspacePath: '/ws',
26
+ repos: { api: { repoName: 'api', lastSyncStatus: 'rebased' } },
27
+ updatedAt: '2026-01-01T00:00:00.000Z',
28
+ };
29
+ vi.mocked(fs.readFile).mockResolvedValue(JSON.stringify(existing));
30
+ const state = await loadWorkspaceState('/ws');
31
+ expect(state.repos.api.lastSyncStatus).toBe('rebased');
32
+ });
33
+ });
34
+ describe('recordRepoSync', () => {
35
+ beforeEach(() => {
36
+ vi.mocked(fs.readFile).mockRejectedValue(new Error('ENOENT'));
37
+ });
38
+ it('sets pendingValidation when a repo was rebased', async () => {
39
+ const entry = await recordRepoSync('/ws', 'api', {
40
+ status: 'rebased',
41
+ message: 'Rebased onto latest base',
42
+ });
43
+ expect(entry.pendingValidation).toBe(true);
44
+ expect(entry.lastSyncStatus).toBe('rebased');
45
+ expect(entry.lastSyncedAt).toBeTruthy();
46
+ expect(lastWritten().repos.api.pendingValidation).toBe(true);
47
+ });
48
+ it('does not set pendingValidation for an up-to-date repo', async () => {
49
+ const entry = await recordRepoSync('/ws', 'api', {
50
+ status: 'up-to-date',
51
+ message: 'Up to date',
52
+ });
53
+ expect(entry.pendingValidation).toBe(false);
54
+ });
55
+ it('preserves a prior pending flag on a later no-op sync', async () => {
56
+ const existing = {
57
+ workspacePath: '/ws',
58
+ repos: { api: { repoName: 'api', pendingValidation: true } },
59
+ updatedAt: '2026-01-01T00:00:00.000Z',
60
+ };
61
+ vi.mocked(fs.readFile).mockResolvedValue(JSON.stringify(existing));
62
+ const entry = await recordRepoSync('/ws', 'api', {
63
+ status: 'up-to-date',
64
+ message: 'Up to date',
65
+ });
66
+ expect(entry.pendingValidation).toBe(true);
67
+ });
68
+ });
69
+ describe('markValidated', () => {
70
+ it('records the result and clears the pending flag', async () => {
71
+ const existing = {
72
+ workspacePath: '/ws',
73
+ repos: { api: { repoName: 'api', pendingValidation: true } },
74
+ updatedAt: '2026-01-01T00:00:00.000Z',
75
+ };
76
+ vi.mocked(fs.readFile).mockResolvedValue(JSON.stringify(existing));
77
+ const entry = await markValidated('/ws', 'api', 'pass');
78
+ expect(entry.lastValidationResult).toBe('pass');
79
+ expect(entry.pendingValidation).toBe(false);
80
+ expect(entry.lastValidatedAt).toBeTruthy();
81
+ });
82
+ });
83
+ });
84
+ //# sourceMappingURL=workspace-state.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-state.test.js","sourceRoot":"","sources":["../../src/core/workspace-state.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAC;AAG9B,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAE5B,iEAAiE;AACjE,SAAS,WAAW;IAClB,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACjD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAW,CAAC;IAClD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAmB,CAAC;AAC5C,CAAC;AAED,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,UAAU,CAAC,GAAG,EAAE;QACd,EAAE,CAAC,aAAa,EAAE,CAAC;QACnB,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,mDAAmD,EAAE,KAAK,IAAI,EAAE;YACjE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;YAE9D,MAAM,KAAK,GAAG,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAE9C,MAAM,CAAC,KAA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