@braidhq/server 0.1.0 → 0.2.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 (385) hide show
  1. package/README.md +134 -106
  2. package/dist/app.d.ts +7 -15
  3. package/dist/app.d.ts.map +1 -1
  4. package/dist/app.js +72 -45
  5. package/dist/app.js.map +1 -1
  6. package/dist/authMode.d.ts +39 -0
  7. package/dist/authMode.d.ts.map +1 -0
  8. package/dist/authMode.js +50 -0
  9. package/dist/authMode.js.map +1 -0
  10. package/dist/composeApp.d.ts +79 -0
  11. package/dist/composeApp.d.ts.map +1 -0
  12. package/dist/composeApp.js +136 -0
  13. package/dist/composeApp.js.map +1 -0
  14. package/dist/composeFsApp.d.ts +27 -0
  15. package/dist/composeFsApp.d.ts.map +1 -0
  16. package/dist/{composeFs.js → composeFsApp.js} +118 -125
  17. package/dist/composeFsApp.js.map +1 -0
  18. package/dist/index.d.ts +3 -2
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/infrastructure/_shared/env.d.ts +10 -0
  23. package/dist/infrastructure/_shared/env.d.ts.map +1 -0
  24. package/dist/infrastructure/{env.js → _shared/env.js} +5 -6
  25. package/dist/infrastructure/_shared/env.js.map +1 -0
  26. package/dist/infrastructure/_shared/frontmatter.d.ts +13 -0
  27. package/dist/infrastructure/_shared/frontmatter.d.ts.map +1 -0
  28. package/dist/infrastructure/{fs → _shared}/frontmatter.js +5 -5
  29. package/dist/infrastructure/_shared/frontmatter.js.map +1 -0
  30. package/dist/infrastructure/_shared/jsonFileStore.d.ts.map +1 -0
  31. package/dist/infrastructure/_shared/jsonFileStore.js.map +1 -0
  32. package/dist/infrastructure/{fs → _shared}/paths.d.ts +17 -10
  33. package/dist/infrastructure/_shared/paths.d.ts.map +1 -0
  34. package/dist/infrastructure/{fs → _shared}/paths.js +27 -20
  35. package/dist/infrastructure/_shared/paths.js.map +1 -0
  36. package/dist/infrastructure/auth/AccessPolicy.d.ts +33 -58
  37. package/dist/infrastructure/auth/AccessPolicy.d.ts.map +1 -1
  38. package/dist/infrastructure/auth/AccessPolicy.js +35 -42
  39. package/dist/infrastructure/auth/AccessPolicy.js.map +1 -1
  40. package/dist/infrastructure/auth/SessionStore.d.ts +22 -12
  41. package/dist/infrastructure/auth/SessionStore.d.ts.map +1 -1
  42. package/dist/infrastructure/auth/SessionStore.js +15 -18
  43. package/dist/infrastructure/auth/SessionStore.js.map +1 -1
  44. package/dist/infrastructure/batch/FsBatchPlanRepository.d.ts +79 -0
  45. package/dist/infrastructure/batch/FsBatchPlanRepository.d.ts.map +1 -0
  46. package/dist/infrastructure/{fs → batch}/FsBatchPlanRepository.js +1 -1
  47. package/dist/infrastructure/batch/FsBatchPlanRepository.js.map +1 -0
  48. package/dist/infrastructure/history/GitWorkspaceHistory.d.ts.map +1 -0
  49. package/dist/infrastructure/{git → history}/GitWorkspaceHistory.js +31 -24
  50. package/dist/infrastructure/history/GitWorkspaceHistory.js.map +1 -0
  51. package/dist/infrastructure/history/commitMessage.d.ts.map +1 -0
  52. package/dist/infrastructure/history/commitMessage.js +90 -0
  53. package/dist/infrastructure/history/commitMessage.js.map +1 -0
  54. package/dist/infrastructure/hitl/FsClarificationRepository.d.ts +13 -0
  55. package/dist/infrastructure/hitl/FsClarificationRepository.d.ts.map +1 -0
  56. package/dist/infrastructure/{fs/FsClarifyTicketRepository.js → hitl/FsClarificationRepository.js} +15 -15
  57. package/dist/infrastructure/hitl/FsClarificationRepository.js.map +1 -0
  58. package/dist/infrastructure/hitl/FsProposalRepository.d.ts.map +1 -0
  59. package/dist/infrastructure/{fs → hitl}/FsProposalRepository.js +7 -8
  60. package/dist/infrastructure/hitl/FsProposalRepository.js.map +1 -0
  61. package/dist/infrastructure/hitl/StatusedJsonStore.d.ts +30 -0
  62. package/dist/infrastructure/hitl/StatusedJsonStore.d.ts.map +1 -0
  63. package/dist/infrastructure/{fs/FsStatusedJsonRepository.js → hitl/StatusedJsonStore.js} +3 -3
  64. package/dist/infrastructure/hitl/StatusedJsonStore.js.map +1 -0
  65. package/dist/infrastructure/model/FsModelSerializer.d.ts +96 -0
  66. package/dist/infrastructure/model/FsModelSerializer.d.ts.map +1 -0
  67. package/dist/infrastructure/{fs/FsGraphSerializer.js → model/FsModelSerializer.js} +11 -11
  68. package/dist/infrastructure/model/FsModelSerializer.js.map +1 -0
  69. package/dist/infrastructure/oauth/GoogleOAuth.d.ts +20 -38
  70. package/dist/infrastructure/oauth/GoogleOAuth.d.ts.map +1 -1
  71. package/dist/infrastructure/oauth/GoogleOAuth.js +21 -22
  72. package/dist/infrastructure/oauth/GoogleOAuth.js.map +1 -1
  73. package/dist/infrastructure/reactor/FsReactorCycleRepository.d.ts +29 -0
  74. package/dist/infrastructure/reactor/FsReactorCycleRepository.d.ts.map +1 -0
  75. package/dist/infrastructure/reactor/FsReactorCycleRepository.js +94 -0
  76. package/dist/infrastructure/reactor/FsReactorCycleRepository.js.map +1 -0
  77. package/dist/infrastructure/secrets/SecretStore.d.ts +11 -14
  78. package/dist/infrastructure/secrets/SecretStore.d.ts.map +1 -1
  79. package/dist/infrastructure/secrets/SecretStore.js +4 -4
  80. package/dist/infrastructure/secrets/SecretStore.js.map +1 -1
  81. package/dist/infrastructure/{fs → skill}/FsRunRepository.d.ts +5 -3
  82. package/dist/infrastructure/skill/FsRunRepository.d.ts.map +1 -0
  83. package/dist/infrastructure/{fs → skill}/FsRunRepository.js +11 -9
  84. package/dist/infrastructure/skill/FsRunRepository.js.map +1 -0
  85. package/dist/infrastructure/{fs → skill}/FsSkillRegistry.d.ts +4 -13
  86. package/dist/infrastructure/skill/FsSkillRegistry.d.ts.map +1 -0
  87. package/dist/infrastructure/{fs → skill}/FsSkillRegistry.js +28 -20
  88. package/dist/infrastructure/skill/FsSkillRegistry.js.map +1 -0
  89. package/dist/infrastructure/skill/SubprocessSkillRunner.d.ts +52 -0
  90. package/dist/infrastructure/skill/SubprocessSkillRunner.d.ts.map +1 -0
  91. package/dist/infrastructure/{agent → skill}/SubprocessSkillRunner.js +107 -55
  92. package/dist/infrastructure/skill/SubprocessSkillRunner.js.map +1 -0
  93. package/dist/infrastructure/skill/asyncQueue.d.ts +20 -0
  94. package/dist/infrastructure/skill/asyncQueue.d.ts.map +1 -0
  95. package/dist/infrastructure/{agent → skill}/asyncQueue.js +2 -3
  96. package/dist/infrastructure/{agent → skill}/asyncQueue.js.map +1 -1
  97. package/dist/infrastructure/skill/lineBuffer.d.ts +15 -0
  98. package/dist/infrastructure/skill/lineBuffer.d.ts.map +1 -0
  99. package/dist/infrastructure/{agent/streamJsonParser.js → skill/lineBuffer.js} +5 -17
  100. package/dist/infrastructure/skill/lineBuffer.js.map +1 -0
  101. package/dist/infrastructure/skill/orphanReaper.d.ts +20 -0
  102. package/dist/infrastructure/skill/orphanReaper.d.ts.map +1 -0
  103. package/dist/infrastructure/{orphanReaper.js → skill/orphanReaper.js} +7 -5
  104. package/dist/infrastructure/skill/orphanReaper.js.map +1 -0
  105. package/dist/infrastructure/skill/subprocessEventStream.d.ts +16 -0
  106. package/dist/infrastructure/skill/subprocessEventStream.d.ts.map +1 -0
  107. package/dist/infrastructure/skill/subprocessEventStream.js +29 -0
  108. package/dist/infrastructure/skill/subprocessEventStream.js.map +1 -0
  109. package/dist/infrastructure/source/FsSourceUnitDigest.d.ts +19 -0
  110. package/dist/infrastructure/source/FsSourceUnitDigest.d.ts.map +1 -0
  111. package/dist/infrastructure/{fs → source}/FsSourceUnitDigest.js +9 -9
  112. package/dist/infrastructure/source/FsSourceUnitDigest.js.map +1 -0
  113. package/dist/infrastructure/source/FsSourceUnitObservationRepository.d.ts +31 -0
  114. package/dist/infrastructure/source/FsSourceUnitObservationRepository.d.ts.map +1 -0
  115. package/dist/infrastructure/{fs/FsSourceUnitStateRepository.js → source/FsSourceUnitObservationRepository.js} +18 -17
  116. package/dist/infrastructure/source/FsSourceUnitObservationRepository.js.map +1 -0
  117. package/dist/infrastructure/{fs → source}/intentScan.d.ts +4 -0
  118. package/dist/infrastructure/source/intentScan.d.ts.map +1 -0
  119. package/dist/infrastructure/{fs → source}/intentScan.js +18 -16
  120. package/dist/infrastructure/source/intentScan.js.map +1 -0
  121. package/dist/infrastructure/users/UserDirectoryFromRegistry.d.ts +2 -2
  122. package/dist/infrastructure/users/UserDirectoryFromRegistry.js +2 -2
  123. package/dist/infrastructure/users/UserRegistryFile.d.ts +4 -5
  124. package/dist/infrastructure/users/UserRegistryFile.d.ts.map +1 -1
  125. package/dist/infrastructure/users/UserRegistryFile.js +6 -8
  126. package/dist/infrastructure/users/UserRegistryFile.js.map +1 -1
  127. package/dist/infrastructure/users/ensureWorkspaceOwners.d.ts +9 -6
  128. package/dist/infrastructure/users/ensureWorkspaceOwners.d.ts.map +1 -1
  129. package/dist/infrastructure/users/ensureWorkspaceOwners.js +10 -7
  130. package/dist/infrastructure/users/ensureWorkspaceOwners.js.map +1 -1
  131. package/dist/infrastructure/workspace/FsWorkspaceRepository.d.ts.map +1 -0
  132. package/dist/infrastructure/{fs → workspace}/FsWorkspaceRepository.js +7 -6
  133. package/dist/infrastructure/workspace/FsWorkspaceRepository.js.map +1 -0
  134. package/dist/infrastructure/workspace/WorkspaceDiscovery.d.ts +18 -0
  135. package/dist/infrastructure/workspace/WorkspaceDiscovery.d.ts.map +1 -0
  136. package/dist/infrastructure/{fs → workspace}/WorkspaceDiscovery.js +15 -11
  137. package/dist/infrastructure/workspace/WorkspaceDiscovery.js.map +1 -0
  138. package/dist/infrastructure/{fs → workspace}/WorkspaceRegistryFile.d.ts +10 -9
  139. package/dist/infrastructure/workspace/WorkspaceRegistryFile.d.ts.map +1 -0
  140. package/dist/infrastructure/{fs → workspace}/WorkspaceRegistryFile.js +15 -17
  141. package/dist/infrastructure/workspace/WorkspaceRegistryFile.js.map +1 -0
  142. package/dist/infrastructure/workspace/productManifestWriter.d.ts +24 -0
  143. package/dist/infrastructure/workspace/productManifestWriter.d.ts.map +1 -0
  144. package/dist/infrastructure/{fs → workspace}/productManifestWriter.js +14 -26
  145. package/dist/infrastructure/workspace/productManifestWriter.js.map +1 -0
  146. package/dist/middleware/auth.d.ts +27 -17
  147. package/dist/middleware/auth.d.ts.map +1 -1
  148. package/dist/middleware/auth.js +59 -53
  149. package/dist/middleware/auth.js.map +1 -1
  150. package/dist/middleware/cors.d.ts.map +1 -1
  151. package/dist/middleware/cors.js +4 -1
  152. package/dist/middleware/cors.js.map +1 -1
  153. package/dist/middleware/error.d.ts.map +1 -1
  154. package/dist/middleware/error.js +15 -13
  155. package/dist/middleware/error.js.map +1 -1
  156. package/dist/middleware/workspaceAccess.d.ts +23 -19
  157. package/dist/middleware/workspaceAccess.d.ts.map +1 -1
  158. package/dist/middleware/workspaceAccess.js +31 -26
  159. package/dist/middleware/workspaceAccess.js.map +1 -1
  160. package/dist/policy/CapabilityCheck.d.ts +5 -5
  161. package/dist/policy/PermissionRegistry.d.ts +11 -9
  162. package/dist/policy/PermissionRegistry.d.ts.map +1 -1
  163. package/dist/policy/PermissionRegistry.js +10 -8
  164. package/dist/policy/PermissionRegistry.js.map +1 -1
  165. package/dist/policy/ViewerContext.d.ts +13 -11
  166. package/dist/policy/ViewerContext.d.ts.map +1 -1
  167. package/dist/policy/checks.d.ts +9 -9
  168. package/dist/policy/checks.d.ts.map +1 -1
  169. package/dist/policy/checks.js +14 -11
  170. package/dist/policy/checks.js.map +1 -1
  171. package/dist/policy/defaultRegistry.d.ts +3 -4
  172. package/dist/policy/defaultRegistry.d.ts.map +1 -1
  173. package/dist/policy/defaultRegistry.js +3 -4
  174. package/dist/policy/defaultRegistry.js.map +1 -1
  175. package/dist/policy/index.d.ts +2 -2
  176. package/dist/policy/index.d.ts.map +1 -1
  177. package/dist/policy/index.js +1 -1
  178. package/dist/policy/index.js.map +1 -1
  179. package/dist/policy/resolveViewer.d.ts +9 -9
  180. package/dist/policy/resolveViewer.js +9 -9
  181. package/dist/routes/_shared.d.ts +93 -153
  182. package/dist/routes/_shared.d.ts.map +1 -1
  183. package/dist/routes/_shared.js +9 -5
  184. package/dist/routes/_shared.js.map +1 -1
  185. package/dist/routes/admin.d.ts +1 -1
  186. package/dist/routes/admin.d.ts.map +1 -1
  187. package/dist/routes/admin.js +13 -12
  188. package/dist/routes/admin.js.map +1 -1
  189. package/dist/routes/auth.d.ts +12 -10
  190. package/dist/routes/auth.d.ts.map +1 -1
  191. package/dist/routes/auth.js +32 -34
  192. package/dist/routes/auth.js.map +1 -1
  193. package/dist/routes/clarifications.d.ts +8 -0
  194. package/dist/routes/clarifications.d.ts.map +1 -0
  195. package/dist/routes/clarifications.js +243 -0
  196. package/dist/routes/clarifications.js.map +1 -0
  197. package/dist/routes/edges.d.ts.map +1 -1
  198. package/dist/routes/edges.js +2 -6
  199. package/dist/routes/edges.js.map +1 -1
  200. package/dist/routes/history.d.ts.map +1 -1
  201. package/dist/routes/history.js +12 -10
  202. package/dist/routes/history.js.map +1 -1
  203. package/dist/routes/nodes.d.ts.map +1 -1
  204. package/dist/routes/nodes.js +4 -8
  205. package/dist/routes/nodes.js.map +1 -1
  206. package/dist/routes/oauth.d.ts +6 -7
  207. package/dist/routes/oauth.d.ts.map +1 -1
  208. package/dist/routes/oauth.js +6 -7
  209. package/dist/routes/oauth.js.map +1 -1
  210. package/dist/routes/proposals.d.ts +2 -2
  211. package/dist/routes/proposals.d.ts.map +1 -1
  212. package/dist/routes/proposals.js +30 -28
  213. package/dist/routes/proposals.js.map +1 -1
  214. package/dist/routes/reactorCycles.d.ts +7 -0
  215. package/dist/routes/reactorCycles.d.ts.map +1 -0
  216. package/dist/routes/reactorCycles.js +60 -0
  217. package/dist/routes/reactorCycles.js.map +1 -0
  218. package/dist/routes/runs.d.ts.map +1 -1
  219. package/dist/routes/runs.js +22 -19
  220. package/dist/routes/runs.js.map +1 -1
  221. package/dist/routes/skillInputOptions.d.ts +2 -2
  222. package/dist/routes/skillInputOptions.d.ts.map +1 -1
  223. package/dist/routes/skillInputOptions.js +43 -45
  224. package/dist/routes/skillInputOptions.js.map +1 -1
  225. package/dist/routes/skills.d.ts +19 -1
  226. package/dist/routes/skills.d.ts.map +1 -1
  227. package/dist/routes/skills.js +139 -7
  228. package/dist/routes/skills.js.map +1 -1
  229. package/dist/routes/sourceLoaders.d.ts.map +1 -1
  230. package/dist/routes/sourceLoaders.js +1 -0
  231. package/dist/routes/sourceLoaders.js.map +1 -1
  232. package/dist/routes/sourceUnitObservations.d.ts +20 -0
  233. package/dist/routes/sourceUnitObservations.d.ts.map +1 -0
  234. package/dist/routes/sourceUnitObservations.js +80 -0
  235. package/dist/routes/sourceUnitObservations.js.map +1 -0
  236. package/dist/routes/sourceWebhooks.d.ts +26 -0
  237. package/dist/routes/sourceWebhooks.d.ts.map +1 -0
  238. package/dist/routes/sourceWebhooks.js +301 -0
  239. package/dist/routes/sourceWebhooks.js.map +1 -0
  240. package/dist/routes/users.d.ts +0 -2
  241. package/dist/routes/users.d.ts.map +1 -1
  242. package/dist/routes/users.js +15 -33
  243. package/dist/routes/users.js.map +1 -1
  244. package/dist/routes/workspaceEvents.d.ts +5 -4
  245. package/dist/routes/workspaceEvents.d.ts.map +1 -1
  246. package/dist/routes/workspaceEvents.js +7 -6
  247. package/dist/routes/workspaceEvents.js.map +1 -1
  248. package/dist/routes/workspaceMembers.d.ts +1 -1
  249. package/dist/routes/workspaceMembers.d.ts.map +1 -1
  250. package/dist/routes/workspaceMembers.js +2 -2
  251. package/dist/routes/workspaceMembers.js.map +1 -1
  252. package/dist/routes/workspaces.d.ts +21 -10
  253. package/dist/routes/workspaces.d.ts.map +1 -1
  254. package/dist/routes/workspaces.js +97 -69
  255. package/dist/routes/workspaces.js.map +1 -1
  256. package/dist/server.js +6 -70
  257. package/dist/server.js.map +1 -1
  258. package/dist/startServer.d.ts +17 -0
  259. package/dist/startServer.d.ts.map +1 -0
  260. package/dist/startServer.js +81 -0
  261. package/dist/startServer.js.map +1 -0
  262. package/dist/startup.d.ts +28 -0
  263. package/dist/startup.d.ts.map +1 -0
  264. package/dist/startup.js +94 -0
  265. package/dist/startup.js.map +1 -0
  266. package/package.json +9 -9
  267. package/dist/composeFs.d.ts +0 -55
  268. package/dist/composeFs.d.ts.map +0 -1
  269. package/dist/composeFs.js.map +0 -1
  270. package/dist/composition.d.ts +0 -133
  271. package/dist/composition.d.ts.map +0 -1
  272. package/dist/composition.js +0 -113
  273. package/dist/composition.js.map +0 -1
  274. package/dist/infrastructure/agent/SubprocessSkillRunner.d.ts +0 -75
  275. package/dist/infrastructure/agent/SubprocessSkillRunner.d.ts.map +0 -1
  276. package/dist/infrastructure/agent/SubprocessSkillRunner.js.map +0 -1
  277. package/dist/infrastructure/agent/asyncQueue.d.ts +0 -22
  278. package/dist/infrastructure/agent/asyncQueue.d.ts.map +0 -1
  279. package/dist/infrastructure/agent/mcpConfig.d.ts +0 -38
  280. package/dist/infrastructure/agent/mcpConfig.d.ts.map +0 -1
  281. package/dist/infrastructure/agent/mcpConfig.js +0 -55
  282. package/dist/infrastructure/agent/mcpConfig.js.map +0 -1
  283. package/dist/infrastructure/agent/streamJsonParser.d.ts +0 -20
  284. package/dist/infrastructure/agent/streamJsonParser.d.ts.map +0 -1
  285. package/dist/infrastructure/agent/streamJsonParser.js.map +0 -1
  286. package/dist/infrastructure/agent/subprocessEventStream.d.ts +0 -26
  287. package/dist/infrastructure/agent/subprocessEventStream.d.ts.map +0 -1
  288. package/dist/infrastructure/agent/subprocessEventStream.js +0 -112
  289. package/dist/infrastructure/agent/subprocessEventStream.js.map +0 -1
  290. package/dist/infrastructure/auth/ensureApprovedEmails.d.ts +0 -16
  291. package/dist/infrastructure/auth/ensureApprovedEmails.d.ts.map +0 -1
  292. package/dist/infrastructure/auth/ensureApprovedEmails.js +0 -20
  293. package/dist/infrastructure/auth/ensureApprovedEmails.js.map +0 -1
  294. package/dist/infrastructure/env.d.ts +0 -11
  295. package/dist/infrastructure/env.d.ts.map +0 -1
  296. package/dist/infrastructure/env.js.map +0 -1
  297. package/dist/infrastructure/fs/FsBatchPlanRepository.d.ts +0 -300
  298. package/dist/infrastructure/fs/FsBatchPlanRepository.d.ts.map +0 -1
  299. package/dist/infrastructure/fs/FsBatchPlanRepository.js.map +0 -1
  300. package/dist/infrastructure/fs/FsClarifyTicketRepository.d.ts +0 -13
  301. package/dist/infrastructure/fs/FsClarifyTicketRepository.d.ts.map +0 -1
  302. package/dist/infrastructure/fs/FsClarifyTicketRepository.js.map +0 -1
  303. package/dist/infrastructure/fs/FsDecisionRepository.d.ts +0 -13
  304. package/dist/infrastructure/fs/FsDecisionRepository.d.ts.map +0 -1
  305. package/dist/infrastructure/fs/FsDecisionRepository.js +0 -56
  306. package/dist/infrastructure/fs/FsDecisionRepository.js.map +0 -1
  307. package/dist/infrastructure/fs/FsGraphSerializer.d.ts +0 -629
  308. package/dist/infrastructure/fs/FsGraphSerializer.d.ts.map +0 -1
  309. package/dist/infrastructure/fs/FsGraphSerializer.js.map +0 -1
  310. package/dist/infrastructure/fs/FsProposalRepository.d.ts.map +0 -1
  311. package/dist/infrastructure/fs/FsProposalRepository.js.map +0 -1
  312. package/dist/infrastructure/fs/FsRunRepository.d.ts.map +0 -1
  313. package/dist/infrastructure/fs/FsRunRepository.js.map +0 -1
  314. package/dist/infrastructure/fs/FsSkillRegistry.d.ts.map +0 -1
  315. package/dist/infrastructure/fs/FsSkillRegistry.js.map +0 -1
  316. package/dist/infrastructure/fs/FsSourceUnitDigest.d.ts +0 -19
  317. package/dist/infrastructure/fs/FsSourceUnitDigest.d.ts.map +0 -1
  318. package/dist/infrastructure/fs/FsSourceUnitDigest.js.map +0 -1
  319. package/dist/infrastructure/fs/FsSourceUnitStateRepository.d.ts +0 -30
  320. package/dist/infrastructure/fs/FsSourceUnitStateRepository.d.ts.map +0 -1
  321. package/dist/infrastructure/fs/FsSourceUnitStateRepository.js.map +0 -1
  322. package/dist/infrastructure/fs/FsStatusedJsonRepository.d.ts +0 -35
  323. package/dist/infrastructure/fs/FsStatusedJsonRepository.d.ts.map +0 -1
  324. package/dist/infrastructure/fs/FsStatusedJsonRepository.js.map +0 -1
  325. package/dist/infrastructure/fs/FsWorkspaceRepository.d.ts.map +0 -1
  326. package/dist/infrastructure/fs/FsWorkspaceRepository.js.map +0 -1
  327. package/dist/infrastructure/fs/WorkspaceDiscovery.d.ts +0 -15
  328. package/dist/infrastructure/fs/WorkspaceDiscovery.d.ts.map +0 -1
  329. package/dist/infrastructure/fs/WorkspaceDiscovery.js.map +0 -1
  330. package/dist/infrastructure/fs/WorkspaceRegistryFile.d.ts.map +0 -1
  331. package/dist/infrastructure/fs/WorkspaceRegistryFile.js.map +0 -1
  332. package/dist/infrastructure/fs/frontmatter.d.ts +0 -13
  333. package/dist/infrastructure/fs/frontmatter.d.ts.map +0 -1
  334. package/dist/infrastructure/fs/frontmatter.js.map +0 -1
  335. package/dist/infrastructure/fs/intentScan.d.ts.map +0 -1
  336. package/dist/infrastructure/fs/intentScan.js.map +0 -1
  337. package/dist/infrastructure/fs/jsonFileStore.d.ts.map +0 -1
  338. package/dist/infrastructure/fs/jsonFileStore.js.map +0 -1
  339. package/dist/infrastructure/fs/paths.d.ts.map +0 -1
  340. package/dist/infrastructure/fs/paths.js.map +0 -1
  341. package/dist/infrastructure/fs/productManifestWriter.d.ts +0 -22
  342. package/dist/infrastructure/fs/productManifestWriter.d.ts.map +0 -1
  343. package/dist/infrastructure/fs/productManifestWriter.js.map +0 -1
  344. package/dist/infrastructure/git/GitWorkspaceHistory.d.ts.map +0 -1
  345. package/dist/infrastructure/git/GitWorkspaceHistory.js.map +0 -1
  346. package/dist/infrastructure/git/commitMessage.d.ts.map +0 -1
  347. package/dist/infrastructure/git/commitMessage.js +0 -71
  348. package/dist/infrastructure/git/commitMessage.js.map +0 -1
  349. package/dist/infrastructure/orphanReaper.d.ts +0 -18
  350. package/dist/infrastructure/orphanReaper.d.ts.map +0 -1
  351. package/dist/infrastructure/orphanReaper.js.map +0 -1
  352. package/dist/infrastructure/users/ensureLocalUser.d.ts +0 -15
  353. package/dist/infrastructure/users/ensureLocalUser.d.ts.map +0 -1
  354. package/dist/infrastructure/users/ensureLocalUser.js +0 -38
  355. package/dist/infrastructure/users/ensureLocalUser.js.map +0 -1
  356. package/dist/middleware/requireAdmin.d.ts +0 -10
  357. package/dist/middleware/requireAdmin.d.ts.map +0 -1
  358. package/dist/middleware/requireAdmin.js +0 -24
  359. package/dist/middleware/requireAdmin.js.map +0 -1
  360. package/dist/middleware/userId.d.ts +0 -16
  361. package/dist/middleware/userId.d.ts.map +0 -1
  362. package/dist/middleware/userId.js +0 -27
  363. package/dist/middleware/userId.js.map +0 -1
  364. package/dist/policy/Capability.d.ts +0 -12
  365. package/dist/policy/Capability.d.ts.map +0 -1
  366. package/dist/policy/Capability.js +0 -31
  367. package/dist/policy/Capability.js.map +0 -1
  368. package/dist/routes/clarify.d.ts +0 -9
  369. package/dist/routes/clarify.d.ts.map +0 -1
  370. package/dist/routes/clarify.js +0 -274
  371. package/dist/routes/clarify.js.map +0 -1
  372. package/dist/routes/decisions.d.ts +0 -7
  373. package/dist/routes/decisions.d.ts.map +0 -1
  374. package/dist/routes/decisions.js +0 -68
  375. package/dist/routes/decisions.js.map +0 -1
  376. package/dist/routes/sourceUnitStates.d.ts +0 -7
  377. package/dist/routes/sourceUnitStates.d.ts.map +0 -1
  378. package/dist/routes/sourceUnitStates.js +0 -45
  379. package/dist/routes/sourceUnitStates.js.map +0 -1
  380. /package/dist/infrastructure/{fs → _shared}/jsonFileStore.d.ts +0 -0
  381. /package/dist/infrastructure/{fs → _shared}/jsonFileStore.js +0 -0
  382. /package/dist/infrastructure/{git → history}/GitWorkspaceHistory.d.ts +0 -0
  383. /package/dist/infrastructure/{git → history}/commitMessage.d.ts +0 -0
  384. /package/dist/infrastructure/{fs → hitl}/FsProposalRepository.d.ts +0 -0
  385. /package/dist/infrastructure/{fs → workspace}/FsWorkspaceRepository.d.ts +0 -0
@@ -1,300 +0,0 @@
1
- import type { BatchPlanRepository, Workspace } from '@braidhq/core';
2
- import { BatchPlan } from '@braidhq/core';
3
- import { z } from 'zod';
4
- export declare const BATCH_PLAN_VERSION = 1;
5
- export declare const BatchPlanFile: z.ZodObject<{
6
- version: z.ZodNumber;
7
- plan: z.ZodObject<{
8
- id: z.ZodBranded<z.ZodString, "BatchPlanId">;
9
- workspaceId: z.ZodBranded<z.ZodString, "WorkspaceId">;
10
- createdAt: z.ZodString;
11
- updatedAt: z.ZodString;
12
- mode: z.ZodEnum<["intent", "derive"]>;
13
- status: z.ZodEnum<["idle", "deriving", "running", "completed", "failed", "stopped", "archived"]>;
14
- autoApply: z.ZodBoolean;
15
- baselineTag: z.ZodOptional<z.ZodString>;
16
- units: z.ZodArray<z.ZodObject<{
17
- id: z.ZodBranded<z.ZodString, "PlanUnitId">;
18
- name: z.ZodString;
19
- description: z.ZodString;
20
- sourceId: z.ZodOptional<z.ZodBranded<z.ZodString, "SourceId">>;
21
- scopeHint: z.ZodOptional<z.ZodString>;
22
- status: z.ZodEnum<["pending", "running", "completed", "failed", "skipped"]>;
23
- skillRunId: z.ZodOptional<z.ZodBranded<z.ZodString, "SkillRunId">>;
24
- startedAt: z.ZodOptional<z.ZodString>;
25
- completedAt: z.ZodOptional<z.ZodString>;
26
- proposalIds: z.ZodDefault<z.ZodArray<z.ZodBranded<z.ZodString, "ProposalId">, "many">>;
27
- clarifyTicketIds: z.ZodDefault<z.ZodArray<z.ZodBranded<z.ZodString, "ClarifyTicketId">, "many">>;
28
- error: z.ZodOptional<z.ZodString>;
29
- }, "strip", z.ZodTypeAny, {
30
- description: string;
31
- status: "pending" | "running" | "completed" | "failed" | "skipped";
32
- id: string & z.BRAND<"PlanUnitId">;
33
- name: string;
34
- proposalIds: (string & z.BRAND<"ProposalId">)[];
35
- clarifyTicketIds: (string & z.BRAND<"ClarifyTicketId">)[];
36
- sourceId?: (string & z.BRAND<"SourceId">) | undefined;
37
- scopeHint?: string | undefined;
38
- skillRunId?: (string & z.BRAND<"SkillRunId">) | undefined;
39
- startedAt?: string | undefined;
40
- completedAt?: string | undefined;
41
- error?: string | undefined;
42
- }, {
43
- description: string;
44
- status: "pending" | "running" | "completed" | "failed" | "skipped";
45
- id: string;
46
- name: string;
47
- sourceId?: string | undefined;
48
- scopeHint?: string | undefined;
49
- skillRunId?: string | undefined;
50
- startedAt?: string | undefined;
51
- completedAt?: string | undefined;
52
- proposalIds?: string[] | undefined;
53
- clarifyTicketIds?: string[] | undefined;
54
- error?: string | undefined;
55
- }>, "many">;
56
- running: z.ZodOptional<z.ZodObject<{
57
- unitId: z.ZodBranded<z.ZodString, "PlanUnitId">;
58
- skillRunId: z.ZodBranded<z.ZodString, "SkillRunId">;
59
- }, "strip", z.ZodTypeAny, {
60
- skillRunId: string & z.BRAND<"SkillRunId">;
61
- unitId: string & z.BRAND<"PlanUnitId">;
62
- }, {
63
- skillRunId: string;
64
- unitId: string;
65
- }>>;
66
- error: z.ZodOptional<z.ZodString>;
67
- checkpointPhases: z.ZodDefault<z.ZodArray<z.ZodObject<{
68
- status: z.ZodEnum<["running", "completed", "failed"]>;
69
- unitIds: z.ZodArray<z.ZodBranded<z.ZodString, "PlanUnitId">, "many">;
70
- startedAt: z.ZodOptional<z.ZodString>;
71
- completedAt: z.ZodOptional<z.ZodString>;
72
- skillRunId: z.ZodOptional<z.ZodBranded<z.ZodString, "SkillRunId">>;
73
- error: z.ZodOptional<z.ZodString>;
74
- }, "strip", z.ZodTypeAny, {
75
- status: "running" | "completed" | "failed";
76
- unitIds: (string & z.BRAND<"PlanUnitId">)[];
77
- skillRunId?: (string & z.BRAND<"SkillRunId">) | undefined;
78
- startedAt?: string | undefined;
79
- completedAt?: string | undefined;
80
- error?: string | undefined;
81
- }, {
82
- status: "running" | "completed" | "failed";
83
- unitIds: string[];
84
- skillRunId?: string | undefined;
85
- startedAt?: string | undefined;
86
- completedAt?: string | undefined;
87
- error?: string | undefined;
88
- }>, "many">>;
89
- batchPolicy: z.ZodOptional<z.ZodObject<{
90
- perUnitSkillId: z.ZodBranded<z.ZodString, "SkillId">;
91
- perUnitLabel: z.ZodOptional<z.ZodString>;
92
- checkpointSkillId: z.ZodOptional<z.ZodBranded<z.ZodString, "SkillId">>;
93
- checkpointLabel: z.ZodOptional<z.ZodString>;
94
- checkpointChunkSize: z.ZodOptional<z.ZodNumber>;
95
- checkpointRunAtEnd: z.ZodOptional<z.ZodBoolean>;
96
- }, "strip", z.ZodTypeAny, {
97
- perUnitSkillId: string & z.BRAND<"SkillId">;
98
- perUnitLabel?: string | undefined;
99
- checkpointSkillId?: (string & z.BRAND<"SkillId">) | undefined;
100
- checkpointLabel?: string | undefined;
101
- checkpointChunkSize?: number | undefined;
102
- checkpointRunAtEnd?: boolean | undefined;
103
- }, {
104
- perUnitSkillId: string;
105
- perUnitLabel?: string | undefined;
106
- checkpointSkillId?: string | undefined;
107
- checkpointLabel?: string | undefined;
108
- checkpointChunkSize?: number | undefined;
109
- checkpointRunAtEnd?: boolean | undefined;
110
- }>>;
111
- }, "strip", z.ZodTypeAny, {
112
- status: "running" | "completed" | "failed" | "idle" | "deriving" | "stopped" | "archived";
113
- id: string & z.BRAND<"BatchPlanId">;
114
- workspaceId: string & z.BRAND<"WorkspaceId">;
115
- createdAt: string;
116
- updatedAt: string;
117
- mode: "intent" | "derive";
118
- autoApply: boolean;
119
- units: {
120
- description: string;
121
- status: "pending" | "running" | "completed" | "failed" | "skipped";
122
- id: string & z.BRAND<"PlanUnitId">;
123
- name: string;
124
- proposalIds: (string & z.BRAND<"ProposalId">)[];
125
- clarifyTicketIds: (string & z.BRAND<"ClarifyTicketId">)[];
126
- sourceId?: (string & z.BRAND<"SourceId">) | undefined;
127
- scopeHint?: string | undefined;
128
- skillRunId?: (string & z.BRAND<"SkillRunId">) | undefined;
129
- startedAt?: string | undefined;
130
- completedAt?: string | undefined;
131
- error?: string | undefined;
132
- }[];
133
- checkpointPhases: {
134
- status: "running" | "completed" | "failed";
135
- unitIds: (string & z.BRAND<"PlanUnitId">)[];
136
- skillRunId?: (string & z.BRAND<"SkillRunId">) | undefined;
137
- startedAt?: string | undefined;
138
- completedAt?: string | undefined;
139
- error?: string | undefined;
140
- }[];
141
- running?: {
142
- skillRunId: string & z.BRAND<"SkillRunId">;
143
- unitId: string & z.BRAND<"PlanUnitId">;
144
- } | undefined;
145
- error?: string | undefined;
146
- baselineTag?: string | undefined;
147
- batchPolicy?: {
148
- perUnitSkillId: string & z.BRAND<"SkillId">;
149
- perUnitLabel?: string | undefined;
150
- checkpointSkillId?: (string & z.BRAND<"SkillId">) | undefined;
151
- checkpointLabel?: string | undefined;
152
- checkpointChunkSize?: number | undefined;
153
- checkpointRunAtEnd?: boolean | undefined;
154
- } | undefined;
155
- }, {
156
- status: "running" | "completed" | "failed" | "idle" | "deriving" | "stopped" | "archived";
157
- id: string;
158
- workspaceId: string;
159
- createdAt: string;
160
- updatedAt: string;
161
- mode: "intent" | "derive";
162
- autoApply: boolean;
163
- units: {
164
- description: string;
165
- status: "pending" | "running" | "completed" | "failed" | "skipped";
166
- id: string;
167
- name: string;
168
- sourceId?: string | undefined;
169
- scopeHint?: string | undefined;
170
- skillRunId?: string | undefined;
171
- startedAt?: string | undefined;
172
- completedAt?: string | undefined;
173
- proposalIds?: string[] | undefined;
174
- clarifyTicketIds?: string[] | undefined;
175
- error?: string | undefined;
176
- }[];
177
- running?: {
178
- skillRunId: string;
179
- unitId: string;
180
- } | undefined;
181
- error?: string | undefined;
182
- baselineTag?: string | undefined;
183
- checkpointPhases?: {
184
- status: "running" | "completed" | "failed";
185
- unitIds: string[];
186
- skillRunId?: string | undefined;
187
- startedAt?: string | undefined;
188
- completedAt?: string | undefined;
189
- error?: string | undefined;
190
- }[] | undefined;
191
- batchPolicy?: {
192
- perUnitSkillId: string;
193
- perUnitLabel?: string | undefined;
194
- checkpointSkillId?: string | undefined;
195
- checkpointLabel?: string | undefined;
196
- checkpointChunkSize?: number | undefined;
197
- checkpointRunAtEnd?: boolean | undefined;
198
- } | undefined;
199
- }>;
200
- }, "strip", z.ZodTypeAny, {
201
- version: number;
202
- plan: {
203
- status: "running" | "completed" | "failed" | "idle" | "deriving" | "stopped" | "archived";
204
- id: string & z.BRAND<"BatchPlanId">;
205
- workspaceId: string & z.BRAND<"WorkspaceId">;
206
- createdAt: string;
207
- updatedAt: string;
208
- mode: "intent" | "derive";
209
- autoApply: boolean;
210
- units: {
211
- description: string;
212
- status: "pending" | "running" | "completed" | "failed" | "skipped";
213
- id: string & z.BRAND<"PlanUnitId">;
214
- name: string;
215
- proposalIds: (string & z.BRAND<"ProposalId">)[];
216
- clarifyTicketIds: (string & z.BRAND<"ClarifyTicketId">)[];
217
- sourceId?: (string & z.BRAND<"SourceId">) | undefined;
218
- scopeHint?: string | undefined;
219
- skillRunId?: (string & z.BRAND<"SkillRunId">) | undefined;
220
- startedAt?: string | undefined;
221
- completedAt?: string | undefined;
222
- error?: string | undefined;
223
- }[];
224
- checkpointPhases: {
225
- status: "running" | "completed" | "failed";
226
- unitIds: (string & z.BRAND<"PlanUnitId">)[];
227
- skillRunId?: (string & z.BRAND<"SkillRunId">) | undefined;
228
- startedAt?: string | undefined;
229
- completedAt?: string | undefined;
230
- error?: string | undefined;
231
- }[];
232
- running?: {
233
- skillRunId: string & z.BRAND<"SkillRunId">;
234
- unitId: string & z.BRAND<"PlanUnitId">;
235
- } | undefined;
236
- error?: string | undefined;
237
- baselineTag?: string | undefined;
238
- batchPolicy?: {
239
- perUnitSkillId: string & z.BRAND<"SkillId">;
240
- perUnitLabel?: string | undefined;
241
- checkpointSkillId?: (string & z.BRAND<"SkillId">) | undefined;
242
- checkpointLabel?: string | undefined;
243
- checkpointChunkSize?: number | undefined;
244
- checkpointRunAtEnd?: boolean | undefined;
245
- } | undefined;
246
- };
247
- }, {
248
- version: number;
249
- plan: {
250
- status: "running" | "completed" | "failed" | "idle" | "deriving" | "stopped" | "archived";
251
- id: string;
252
- workspaceId: string;
253
- createdAt: string;
254
- updatedAt: string;
255
- mode: "intent" | "derive";
256
- autoApply: boolean;
257
- units: {
258
- description: string;
259
- status: "pending" | "running" | "completed" | "failed" | "skipped";
260
- id: string;
261
- name: string;
262
- sourceId?: string | undefined;
263
- scopeHint?: string | undefined;
264
- skillRunId?: string | undefined;
265
- startedAt?: string | undefined;
266
- completedAt?: string | undefined;
267
- proposalIds?: string[] | undefined;
268
- clarifyTicketIds?: string[] | undefined;
269
- error?: string | undefined;
270
- }[];
271
- running?: {
272
- skillRunId: string;
273
- unitId: string;
274
- } | undefined;
275
- error?: string | undefined;
276
- baselineTag?: string | undefined;
277
- checkpointPhases?: {
278
- status: "running" | "completed" | "failed";
279
- unitIds: string[];
280
- skillRunId?: string | undefined;
281
- startedAt?: string | undefined;
282
- completedAt?: string | undefined;
283
- error?: string | undefined;
284
- }[] | undefined;
285
- batchPolicy?: {
286
- perUnitSkillId: string;
287
- perUnitLabel?: string | undefined;
288
- checkpointSkillId?: string | undefined;
289
- checkpointLabel?: string | undefined;
290
- checkpointChunkSize?: number | undefined;
291
- checkpointRunAtEnd?: boolean | undefined;
292
- } | undefined;
293
- };
294
- }>;
295
- export declare class FsBatchPlanRepository implements BatchPlanRepository {
296
- load(workspace: Workspace): Promise<BatchPlan | null>;
297
- save(workspace: Workspace, plan: BatchPlan): Promise<void>;
298
- clear(workspace: Workspace): Promise<void>;
299
- }
300
- //# sourceMappingURL=FsBatchPlanRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FsBatchPlanRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/fs/FsBatchPlanRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGnE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAEnC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QACtE,MAAM,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACzB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,SAAoB;QAC9B,MAAM,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;IAC9D,CAAC;CACF"}
@@ -1,13 +0,0 @@
1
- import type { AbsolutePath, ClarifyFilter, ClarifyTicketId, WorkspaceId } from '@braidhq/schema';
2
- import { ClarifyTicket, type ClarifyTicketRepository } from '@braidhq/core';
3
- export interface FsClarifyTicketRepositoryOptions {
4
- readonly workspaceRoots: () => Promise<ReadonlyMap<WorkspaceId, AbsolutePath>>;
5
- }
6
- export declare class FsClarifyTicketRepository implements ClarifyTicketRepository {
7
- private readonly base;
8
- constructor(options: FsClarifyTicketRepositoryOptions);
9
- list(filter?: ClarifyFilter): Promise<ClarifyTicket[]>;
10
- load(clarifyTicketId: ClarifyTicketId): Promise<ClarifyTicket>;
11
- save(ticket: ClarifyTicket): Promise<void>;
12
- }
13
- //# sourceMappingURL=FsClarifyTicketRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FsClarifyTicketRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/fs/FsClarifyTicketRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,EACZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,aAAa,EAAE,KAAK,uBAAuB,EAAY,MAAM,eAAe,CAAA;AAKrF,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;CAC/E;AAED,qBAA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;SAC5C,EACD,OAAO,CAAC,cAAc,CACvB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAsB;QAC/B,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACjC,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjF,GAAG,CAAC,MAAM,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC,CAAA;QACF,mEAAmE;QACnE,sDAAsD;QACtD,IAAI,MAAM,EAAE,QAAQ,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAA;YAChC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAChC,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,QAAQ,CAC3F,CAAA;QACH,CAAC;QACD,OAAO,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACzD,CAAC;IAED,IAAI,CAAC,eAAgC;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,CAAC,MAAqB;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC/B,CAAC;CACF"}
@@ -1,13 +0,0 @@
1
- import type { AbsolutePath, Decision, DecisionFilter, DecisionId, WorkspaceId } from '@braidhq/schema';
2
- import { type DecisionRepository } from '@braidhq/core';
3
- export interface FsDecisionRepositoryOptions {
4
- readonly workspaceRoots: () => Promise<ReadonlyMap<WorkspaceId, AbsolutePath>>;
5
- }
6
- export declare class FsDecisionRepository implements DecisionRepository {
7
- private readonly options;
8
- constructor(options: FsDecisionRepositoryOptions);
9
- append(decision: Decision): Promise<void>;
10
- list(filter?: DecisionFilter): Promise<Decision[]>;
11
- load(decisionId: DecisionId): Promise<Decision>;
12
- }
13
- //# sourceMappingURL=FsDecisionRepository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FsDecisionRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/fs/FsDecisionRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAEtG,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,eAAe,CAAA;AAKtE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;CAC/E;AAED,qBAAa,oBAAqB,YAAW,kBAAkB;IACjD,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,2BAA2B;IAE3D,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IASzC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAuBlD,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC;CAetD"}
@@ -1,56 +0,0 @@
1
- import { join } from 'node:path';
2
- import { NotFoundError } from '@braidhq/core';
3
- import { Decision as DecisionSchema } from '@braidhq/schema';
4
- import { listJsonFiles, readJsonFile, writeJsonFile } from './jsonFileStore.js';
5
- import { decisionsDir } from './paths.js';
6
- export class FsDecisionRepository {
7
- options;
8
- constructor(options) {
9
- this.options = options;
10
- }
11
- async append(decision) {
12
- const roots = await this.options.workspaceRoots();
13
- const root = roots.get(decision.workspaceId);
14
- if (!root)
15
- throw new NotFoundError(`Workspace "${decision.workspaceId}" not registered`);
16
- const targetPath = join(decisionsDir(root), `${decision.id}.json`);
17
- await writeJsonFile(targetPath, decision);
18
- }
19
- async list(filter) {
20
- const roots = await this.options.workspaceRoots();
21
- const candidateWorkspaces = filter?.workspaceId
22
- ? new Map([[filter.workspaceId, roots.get(filter.workspaceId)]].filter(([, path]) => path))
23
- : roots;
24
- let decisions = [];
25
- for (const [, root] of candidateWorkspaces) {
26
- const files = await listJsonFiles(decisionsDir(root));
27
- for (const file of files) {
28
- const data = await readJsonFile(file);
29
- decisions.push(DecisionSchema.parse(data));
30
- }
31
- }
32
- if (filter?.actions && filter.actions.length > 0) {
33
- const actions = filter.actions;
34
- decisions = decisions.filter(decision => actions.includes(decision.action));
35
- }
36
- const start = filter?.offset ?? 0;
37
- const end = filter?.limit !== undefined ? start + filter.limit : undefined;
38
- return decisions.slice(start, end);
39
- }
40
- async load(decisionId) {
41
- const roots = await this.options.workspaceRoots();
42
- for (const [, root] of roots) {
43
- const path = join(decisionsDir(root), `${decisionId}.json`);
44
- try {
45
- const data = await readJsonFile(path);
46
- return DecisionSchema.parse(data);
47
- }
48
- catch (error) {
49
- if (error.code !== 'ENOENT')
50
- throw error;
51
- }
52
- }
53
- throw new NotFoundError(`Decision "${decisionId}" not found`);
54
- }
55
- }
56
- //# sourceMappingURL=FsDecisionRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FsDecisionRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/fs/FsDecisionRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAA2B,aAAa,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE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