jumbo-cli 2.0.0 → 2.0.2

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 (278) hide show
  1. package/LICENSE.txt +661 -661
  2. package/README.md +239 -239
  3. package/assets/claude-logo.svg +7 -7
  4. package/assets/codex-logo.svg +3 -3
  5. package/assets/cursor-logo.svg +31 -31
  6. package/assets/mistral-logo.svg +19 -19
  7. package/assets/skills/codify-jumbo-goal/SKILL.md +116 -116
  8. package/assets/skills/define-jumbo-goals/SKILL.md +193 -193
  9. package/assets/skills/refine-jumbo-goals/SKILL.md +156 -156
  10. package/assets/skills/reject-jumbo-goal/SKILL.md +58 -58
  11. package/assets/skills/review-jumbo-goal/SKILL.md +94 -94
  12. package/assets/skills/start-jumbo-goal/SKILL.md +86 -86
  13. package/assets/vscode-logo.svg +41 -41
  14. package/dist/application/context/telemetry/get/LocalGetTelemetryStatusGateway.d.ts.map +1 -1
  15. package/dist/application/context/telemetry/get/LocalGetTelemetryStatusGateway.js +4 -1
  16. package/dist/application/context/telemetry/get/LocalGetTelemetryStatusGateway.js.map +1 -1
  17. package/dist/application/context/telemetry/update/UpdateTelemetryConsentCommandHandler.d.ts.map +1 -1
  18. package/dist/application/context/telemetry/update/UpdateTelemetryConsentCommandHandler.js +1 -0
  19. package/dist/application/context/telemetry/update/UpdateTelemetryConsentCommandHandler.js.map +1 -1
  20. package/dist/application/settings/Settings.d.ts +8 -2
  21. package/dist/application/settings/Settings.d.ts.map +1 -1
  22. package/dist/domain/project/AgentFileReferenceContent.js +7 -7
  23. package/dist/domain/project/AgentsMdContent.js +74 -74
  24. package/dist/domain/project/CopilotInstructionsContent.js +38 -38
  25. package/dist/infrastructure/context/architecture/define/SqliteArchitectureDefinedProjector.js +5 -5
  26. package/dist/infrastructure/context/architecture/migrations/001-create-architecture-views.sql +16 -16
  27. package/dist/infrastructure/context/architecture/migrations/002-drop-dataflow-column.sql +4 -4
  28. package/dist/infrastructure/context/architecture/update/SqliteArchitectureUpdatedProjector.js +4 -4
  29. package/dist/infrastructure/context/audience-pains/add/SqliteAudiencePainAddedProjector.js +4 -4
  30. package/dist/infrastructure/context/audience-pains/migrations/001-create-audience-pain-views.sql +17 -17
  31. package/dist/infrastructure/context/audience-pains/update/SqliteAudiencePainUpdatedProjector.js +4 -4
  32. package/dist/infrastructure/context/audiences/add/SqliteAudienceAddedProjector.js +5 -5
  33. package/dist/infrastructure/context/audiences/migrations/001-create-audience-views.sql +17 -17
  34. package/dist/infrastructure/context/audiences/remove/SqliteAudienceRemovedProjector.js +6 -6
  35. package/dist/infrastructure/context/audiences/update/SqliteAudienceUpdatedProjector.js +4 -4
  36. package/dist/infrastructure/context/components/add/SqliteComponentAddedProjector.js +5 -5
  37. package/dist/infrastructure/context/components/deprecate/SqliteComponentDeprecatedProjector.js +7 -7
  38. package/dist/infrastructure/context/components/migrations/001-create-component-views.sql +21 -21
  39. package/dist/infrastructure/context/components/remove/SqliteComponentRemovedProjector.js +6 -6
  40. package/dist/infrastructure/context/components/rename/SqliteComponentRenamedProjector.js +4 -4
  41. package/dist/infrastructure/context/components/undeprecate/SqliteComponentUndeprecatedProjector.js +7 -7
  42. package/dist/infrastructure/context/components/update/SqliteComponentUpdatedProjector.js +4 -4
  43. package/dist/infrastructure/context/decisions/add/SqliteDecisionAddedProjector.js +6 -6
  44. package/dist/infrastructure/context/decisions/migrations/001-create-decision-views.sql +22 -22
  45. package/dist/infrastructure/context/decisions/restore/SqliteDecisionRestoredProjector.js +9 -9
  46. package/dist/infrastructure/context/decisions/reverse/SqliteDecisionReversedProjector.js +8 -8
  47. package/dist/infrastructure/context/decisions/supersede/SqliteDecisionSupersededProjector.js +7 -7
  48. package/dist/infrastructure/context/decisions/update/SqliteDecisionUpdatedProjector.js +10 -10
  49. package/dist/infrastructure/context/dependencies/add/SqliteDependencyAddedProjector.js +5 -5
  50. package/dist/infrastructure/context/dependencies/get/SqliteLegacyDependencyReader.js +5 -5
  51. package/dist/infrastructure/context/dependencies/migrations/001-create-dependency-views.sql +21 -21
  52. package/dist/infrastructure/context/dependencies/migrations/002-add-external-dependency-columns.sql +11 -11
  53. package/dist/infrastructure/context/dependencies/remove/SqliteDependencyRemovedProjector.js +8 -8
  54. package/dist/infrastructure/context/dependencies/update/SqliteDependencyUpdatedProjector.js +4 -4
  55. package/dist/infrastructure/context/goals/add/SqliteGoalAddedProjector.js +7 -7
  56. package/dist/infrastructure/context/goals/approve/SqliteGoalApprovedProjector.js +9 -9
  57. package/dist/infrastructure/context/goals/block/SqliteGoalBlockedProjector.js +7 -7
  58. package/dist/infrastructure/context/goals/close/SqliteGoalClosedProjector.js +9 -9
  59. package/dist/infrastructure/context/goals/codify/SqliteGoalCodifyingStartedProjector.js +9 -9
  60. package/dist/infrastructure/context/goals/commit/SqliteGoalCommittedProjector.js +9 -9
  61. package/dist/infrastructure/context/goals/complete/SqliteGoalCompletedProjector.js +9 -9
  62. package/dist/infrastructure/context/goals/migrate/SqliteGoalStatusMigratedProjector.js +7 -7
  63. package/dist/infrastructure/context/goals/migrations/001-create-goal-views.sql +20 -20
  64. package/dist/infrastructure/context/goals/migrations/002-add-embedded-context-columns.sql +11 -11
  65. package/dist/infrastructure/context/goals/migrations/003-add-next-goal-column.sql +4 -4
  66. package/dist/infrastructure/context/goals/migrations/004-add-claim-columns.sql +7 -7
  67. package/dist/infrastructure/context/goals/migrations/005-add-progress-column.sql +4 -4
  68. package/dist/infrastructure/context/goals/migrations/006-drop-boundaries-and-embedded-context-columns.sql +11 -11
  69. package/dist/infrastructure/context/goals/migrations/007-add-title-column.sql +2 -2
  70. package/dist/infrastructure/context/goals/migrations/008-add-prerequisite-goals-column.sql +1 -1
  71. package/dist/infrastructure/context/goals/migrations/009-add-review-issues-column.sql +1 -1
  72. package/dist/infrastructure/context/goals/pause/SqliteGoalPausedProjector.js +7 -7
  73. package/dist/infrastructure/context/goals/qualify/SqliteGoalQualifiedProjector.js +9 -9
  74. package/dist/infrastructure/context/goals/refine/SqliteGoalRefinedProjector.js +15 -15
  75. package/dist/infrastructure/context/goals/reject/SqliteGoalRejectedProjector.js +10 -10
  76. package/dist/infrastructure/context/goals/remove/SqliteGoalRemovedProjector.js +3 -3
  77. package/dist/infrastructure/context/goals/reset/SqliteGoalResetProjector.js +11 -11
  78. package/dist/infrastructure/context/goals/resume/SqliteGoalResumedProjector.js +10 -10
  79. package/dist/infrastructure/context/goals/review/SqliteGoalSubmittedForReviewProjector.js +9 -9
  80. package/dist/infrastructure/context/goals/start/SqliteGoalStartedProjector.js +9 -9
  81. package/dist/infrastructure/context/goals/submit/SqliteGoalSubmittedProjector.js +9 -9
  82. package/dist/infrastructure/context/goals/unblock/SqliteGoalUnblockedProjector.js +7 -7
  83. package/dist/infrastructure/context/goals/update/SqliteGoalUpdatedProjector.js +4 -4
  84. package/dist/infrastructure/context/goals/update-progress/SqliteGoalProgressUpdatedProjector.js +8 -8
  85. package/dist/infrastructure/context/guidelines/add/SqliteGuidelineAddedProjector.js +5 -5
  86. package/dist/infrastructure/context/guidelines/migrations/001-create-guideline-views.sql +22 -22
  87. package/dist/infrastructure/context/guidelines/remove/SqliteGuidelineRemovedProjector.js +8 -8
  88. package/dist/infrastructure/context/guidelines/update/SqliteGuidelineUpdatedProjector.js +4 -4
  89. package/dist/infrastructure/context/invariants/add/SqliteInvariantAddedProjector.js +5 -5
  90. package/dist/infrastructure/context/invariants/migrations/001-create-invariant-views.sql +16 -16
  91. package/dist/infrastructure/context/invariants/remove/SqliteInvariantRemovedProjector.js +2 -2
  92. package/dist/infrastructure/context/invariants/update/SqliteInvariantUpdatedProjector.js +9 -9
  93. package/dist/infrastructure/context/project/init/SqliteProjectInitializedProjector.js +5 -5
  94. package/dist/infrastructure/context/project/migrations/001-create-project-views.sql +13 -13
  95. package/dist/infrastructure/context/project/migrations/002-drop-boundaries-column.sql +4 -4
  96. package/dist/infrastructure/context/project/update/SqliteProjectUpdatedProjector.js +4 -4
  97. package/dist/infrastructure/context/relations/add/SqliteRelationAddedProjector.js +12 -12
  98. package/dist/infrastructure/context/relations/deactivate/SqliteRelationDeactivatedProjector.js +14 -14
  99. package/dist/infrastructure/context/relations/migrations/001-create-relation-views.sql +28 -28
  100. package/dist/infrastructure/context/relations/reactivate/SqliteRelationReactivatedProjector.js +14 -14
  101. package/dist/infrastructure/context/relations/remove/SqliteRelationRemovedProjector.js +14 -14
  102. package/dist/infrastructure/context/sessions/end/SqliteSessionEndedProjector.js +8 -8
  103. package/dist/infrastructure/context/sessions/migrations/001-create-session-views.sql +43 -43
  104. package/dist/infrastructure/context/sessions/migrations/002-add-goal-lifecycle-columns.sql +7 -7
  105. package/dist/infrastructure/context/sessions/migrations/003-remove-session-pause-status.sql +8 -8
  106. package/dist/infrastructure/context/sessions/migrations/004-drop-session-summary-views.sql +5 -5
  107. package/dist/infrastructure/context/sessions/start/SqliteSessionStartedProjector.js +5 -5
  108. package/dist/infrastructure/context/value-propositions/add/SqliteValuePropositionAddedProjector.js +5 -5
  109. package/dist/infrastructure/context/value-propositions/migrations/001-create-value-proposition-views.sql +19 -19
  110. package/dist/infrastructure/context/value-propositions/remove/SqliteValuePropositionRemovedProjector.js +2 -2
  111. package/dist/infrastructure/context/value-propositions/update/SqliteValuePropositionUpdatedProjector.js +4 -4
  112. package/dist/infrastructure/host/workers/migrations/001-create-workers.sql +12 -12
  113. package/dist/infrastructure/persistence/MigrationRunner.js +10 -10
  114. package/dist/infrastructure/settings/DefaultSettings.d.ts.map +1 -1
  115. package/dist/infrastructure/settings/DefaultSettings.js +2 -1
  116. package/dist/infrastructure/settings/DefaultSettings.js.map +1 -1
  117. package/dist/infrastructure/settings/FsSettingsInitializer.d.ts.map +1 -1
  118. package/dist/infrastructure/settings/FsSettingsInitializer.js +25 -23
  119. package/dist/infrastructure/settings/FsSettingsInitializer.js.map +1 -1
  120. package/dist/infrastructure/settings/FsSettingsReader.d.ts.map +1 -1
  121. package/dist/infrastructure/settings/FsSettingsReader.js +27 -25
  122. package/dist/infrastructure/settings/FsSettingsReader.js.map +1 -1
  123. package/dist/presentation/cli/commands/project/init/project.init.d.ts.map +1 -1
  124. package/dist/presentation/cli/commands/project/init/project.init.js +13 -6
  125. package/dist/presentation/cli/commands/project/init/project.init.js.map +1 -1
  126. package/package.json +89 -89
  127. package/dist/application/context/goals/complete/CompleteGoalCommand.d.ts +0 -8
  128. package/dist/application/context/goals/complete/CompleteGoalCommand.d.ts.map +0 -1
  129. package/dist/application/context/goals/complete/CompleteGoalCommand.js +0 -3
  130. package/dist/application/context/goals/complete/CompleteGoalCommand.js.map +0 -1
  131. package/dist/application/context/goals/complete/CompleteGoalCommandHandler.d.ts +0 -27
  132. package/dist/application/context/goals/complete/CompleteGoalCommandHandler.d.ts.map +0 -1
  133. package/dist/application/context/goals/complete/CompleteGoalCommandHandler.js +0 -52
  134. package/dist/application/context/goals/complete/CompleteGoalCommandHandler.js.map +0 -1
  135. package/dist/application/context/goals/complete/CompleteGoalController.d.ts +0 -9
  136. package/dist/application/context/goals/complete/CompleteGoalController.d.ts.map +0 -1
  137. package/dist/application/context/goals/complete/CompleteGoalController.js +0 -13
  138. package/dist/application/context/goals/complete/CompleteGoalController.js.map +0 -1
  139. package/dist/application/context/goals/complete/CompleteGoalRequest.d.ts +0 -10
  140. package/dist/application/context/goals/complete/CompleteGoalRequest.d.ts.map +0 -1
  141. package/dist/application/context/goals/complete/CompleteGoalRequest.js +0 -3
  142. package/dist/application/context/goals/complete/CompleteGoalRequest.js.map +0 -1
  143. package/dist/application/context/goals/complete/CompleteGoalResponse.d.ts +0 -17
  144. package/dist/application/context/goals/complete/CompleteGoalResponse.d.ts.map +0 -1
  145. package/dist/application/context/goals/complete/CompleteGoalResponse.js +0 -3
  146. package/dist/application/context/goals/complete/CompleteGoalResponse.js.map +0 -1
  147. package/dist/application/context/goals/complete/ICompleteGoalGateway.d.ts +0 -6
  148. package/dist/application/context/goals/complete/ICompleteGoalGateway.d.ts.map +0 -1
  149. package/dist/application/context/goals/complete/ICompleteGoalGateway.js +0 -3
  150. package/dist/application/context/goals/complete/ICompleteGoalGateway.js.map +0 -1
  151. package/dist/application/context/goals/complete/LocalCompleteGoalGateway.d.ts +0 -16
  152. package/dist/application/context/goals/complete/LocalCompleteGoalGateway.d.ts.map +0 -1
  153. package/dist/application/context/goals/complete/LocalCompleteGoalGateway.js +0 -49
  154. package/dist/application/context/goals/complete/LocalCompleteGoalGateway.js.map +0 -1
  155. package/dist/application/context/project/init/IInitializationProtocol.d.ts +0 -44
  156. package/dist/application/context/project/init/IInitializationProtocol.d.ts.map +0 -1
  157. package/dist/application/context/project/init/IInitializationProtocol.js +0 -14
  158. package/dist/application/context/project/init/IInitializationProtocol.js.map +0 -1
  159. package/dist/application/context/project/init/InitializationProtocol.d.ts +0 -32
  160. package/dist/application/context/project/init/InitializationProtocol.d.ts.map +0 -1
  161. package/dist/application/context/project/init/InitializationProtocol.js +0 -51
  162. package/dist/application/context/project/init/InitializationProtocol.js.map +0 -1
  163. package/dist/application/context/relations/get/GetRelationsQueryHandler.d.ts +0 -14
  164. package/dist/application/context/relations/get/GetRelationsQueryHandler.d.ts.map +0 -1
  165. package/dist/application/context/relations/get/GetRelationsQueryHandler.js +0 -19
  166. package/dist/application/context/relations/get/GetRelationsQueryHandler.js.map +0 -1
  167. package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.d.ts +0 -27
  168. package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.d.ts.map +0 -1
  169. package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.js +0 -32
  170. package/dist/application/context/value-propositions/list/ListValuePropositionsQueryHandler.js.map +0 -1
  171. package/dist/application/maintenance/repair/IRepairMaintenanceGateway.d.ts +0 -6
  172. package/dist/application/maintenance/repair/IRepairMaintenanceGateway.d.ts.map +0 -1
  173. package/dist/application/maintenance/repair/IRepairMaintenanceGateway.js +0 -3
  174. package/dist/application/maintenance/repair/IRepairMaintenanceGateway.js.map +0 -1
  175. package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.d.ts +0 -16
  176. package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.d.ts.map +0 -1
  177. package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.js +0 -90
  178. package/dist/application/maintenance/repair/LocalRepairMaintenanceGateway.js.map +0 -1
  179. package/dist/application/maintenance/repair/RepairMaintenanceController.d.ts +0 -9
  180. package/dist/application/maintenance/repair/RepairMaintenanceController.d.ts.map +0 -1
  181. package/dist/application/maintenance/repair/RepairMaintenanceController.js +0 -13
  182. package/dist/application/maintenance/repair/RepairMaintenanceController.js.map +0 -1
  183. package/dist/application/maintenance/repair/RepairMaintenanceRequest.d.ts +0 -6
  184. package/dist/application/maintenance/repair/RepairMaintenanceRequest.d.ts.map +0 -1
  185. package/dist/application/maintenance/repair/RepairMaintenanceRequest.js +0 -3
  186. package/dist/application/maintenance/repair/RepairMaintenanceRequest.js.map +0 -1
  187. package/dist/application/maintenance/repair/RepairMaintenanceResponse.d.ts +0 -9
  188. package/dist/application/maintenance/repair/RepairMaintenanceResponse.d.ts.map +0 -1
  189. package/dist/application/maintenance/repair/RepairMaintenanceResponse.js +0 -3
  190. package/dist/application/maintenance/repair/RepairMaintenanceResponse.js.map +0 -1
  191. package/dist/application/repair/IRepairGateway.d.ts +0 -6
  192. package/dist/application/repair/IRepairGateway.d.ts.map +0 -1
  193. package/dist/application/repair/IRepairGateway.js +0 -3
  194. package/dist/application/repair/IRepairGateway.js.map +0 -1
  195. package/dist/application/repair/LocalRepairGateway.d.ts +0 -16
  196. package/dist/application/repair/LocalRepairGateway.d.ts.map +0 -1
  197. package/dist/application/repair/LocalRepairGateway.js +0 -90
  198. package/dist/application/repair/LocalRepairGateway.js.map +0 -1
  199. package/dist/application/repair/RepairController.d.ts +0 -9
  200. package/dist/application/repair/RepairController.d.ts.map +0 -1
  201. package/dist/application/repair/RepairController.js +0 -13
  202. package/dist/application/repair/RepairController.js.map +0 -1
  203. package/dist/application/repair/RepairRequest.d.ts +0 -6
  204. package/dist/application/repair/RepairRequest.d.ts.map +0 -1
  205. package/dist/application/repair/RepairRequest.js +0 -3
  206. package/dist/application/repair/RepairRequest.js.map +0 -1
  207. package/dist/application/repair/RepairResponse.d.ts +0 -9
  208. package/dist/application/repair/RepairResponse.d.ts.map +0 -1
  209. package/dist/application/repair/RepairResponse.js +0 -3
  210. package/dist/application/repair/RepairResponse.js.map +0 -1
  211. package/dist/domain/project/AgentInstructions.d.ts +0 -67
  212. package/dist/domain/project/AgentInstructions.d.ts.map +0 -1
  213. package/dist/domain/project/AgentInstructions.js +0 -261
  214. package/dist/domain/project/AgentInstructions.js.map +0 -1
  215. package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.d.ts +0 -33
  216. package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.d.ts.map +0 -1
  217. package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.js +0 -66
  218. package/dist/infrastructure/context/goals/claims/FsGoalClaimStore.js.map +0 -1
  219. package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.d.ts +0 -10
  220. package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.d.ts.map +0 -1
  221. package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.js +0 -36
  222. package/dist/infrastructure/context/goals/get/LocalGetGoalsGateway.js.map +0 -1
  223. package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.d.ts +0 -10
  224. package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.d.ts.map +0 -1
  225. package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.js +0 -14
  226. package/dist/infrastructure/context/goals/get/LocalShowGoalGateway.js.map +0 -1
  227. package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.d.ts +0 -10
  228. package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.d.ts.map +0 -1
  229. package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.js +0 -18
  230. package/dist/infrastructure/context/relations/get/LocalGetRelationsGateway.js.map +0 -1
  231. package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.d.ts +0 -10
  232. package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.d.ts.map +0 -1
  233. package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.js +0 -14
  234. package/dist/infrastructure/context/sessions/get/LocalGetSessionsGateway.js.map +0 -1
  235. package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.d.ts +0 -29
  236. package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.d.ts.map +0 -1
  237. package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.js +0 -105
  238. package/dist/presentation/cli/commands/goals/complete/GoalCompleteOutputBuilder.js.map +0 -1
  239. package/dist/presentation/cli/commands/goals/complete/goal.complete.d.ts +0 -20
  240. package/dist/presentation/cli/commands/goals/complete/goal.complete.d.ts.map +0 -1
  241. package/dist/presentation/cli/commands/goals/complete/goal.complete.js +0 -58
  242. package/dist/presentation/cli/commands/goals/complete/goal.complete.js.map +0 -1
  243. package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.d.ts +0 -26
  244. package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.d.ts.map +0 -1
  245. package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.js +0 -68
  246. package/dist/presentation/cli/commands/maintenance/db/rebuild/db.rebuild.js.map +0 -1
  247. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.d.ts +0 -14
  248. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.d.ts.map +0 -1
  249. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.js +0 -61
  250. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/MigrateDependenciesOutputBuilder.js.map +0 -1
  251. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.d.ts +0 -23
  252. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.d.ts.map +0 -1
  253. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.js +0 -59
  254. package/dist/presentation/cli/commands/maintenance/migrate-dependencies/dependency.migrate.js.map +0 -1
  255. package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.d.ts +0 -24
  256. package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.d.ts.map +0 -1
  257. package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.js +0 -49
  258. package/dist/presentation/cli/commands/maintenance/repair/RepairOutputBuilder.js.map +0 -1
  259. package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.d.ts +0 -27
  260. package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.d.ts.map +0 -1
  261. package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.js +0 -85
  262. package/dist/presentation/cli/commands/maintenance/repair/maintenance.repair.js.map +0 -1
  263. package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.d.ts +0 -16
  264. package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.d.ts.map +0 -1
  265. package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.js +0 -40
  266. package/dist/presentation/cli/commands/maintenance/upgrade/UpgradeOutputBuilder.js.map +0 -1
  267. package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.d.ts +0 -26
  268. package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.d.ts.map +0 -1
  269. package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.js +0 -64
  270. package/dist/presentation/cli/commands/maintenance/upgrade/db.upgrade.js.map +0 -1
  271. package/dist/presentation/cli/commands/repair/RepairOutputBuilder.d.ts +0 -24
  272. package/dist/presentation/cli/commands/repair/RepairOutputBuilder.d.ts.map +0 -1
  273. package/dist/presentation/cli/commands/repair/RepairOutputBuilder.js +0 -50
  274. package/dist/presentation/cli/commands/repair/RepairOutputBuilder.js.map +0 -1
  275. package/dist/presentation/cli/commands/repair/repair.d.ts +0 -31
  276. package/dist/presentation/cli/commands/repair/repair.d.ts.map +0 -1
  277. package/dist/presentation/cli/commands/repair/repair.js +0 -88
  278. package/dist/presentation/cli/commands/repair/repair.js.map +0 -1
@@ -12,13 +12,13 @@ class SqliteGoalUnblockedProjector {
12
12
  this.db = db;
13
13
  }
14
14
  async applyGoalUnblocked(event) {
15
- const stmt = this.db.prepare(`
16
- UPDATE goal_views
17
- SET status = ?,
18
- note = ?,
19
- version = ?,
20
- updatedAt = ?
21
- WHERE goalId = ?
15
+ const stmt = this.db.prepare(`
16
+ UPDATE goal_views
17
+ SET status = ?,
18
+ note = ?,
19
+ version = ?,
20
+ updatedAt = ?
21
+ WHERE goalId = ?
22
22
  `);
23
23
  stmt.run(event.payload.status, event.payload.note || null, event.version, event.timestamp, event.aggregateId);
24
24
  }
@@ -50,10 +50,10 @@ class SqliteGoalUpdatedProjector {
50
50
  values.push(event.version, event.timestamp);
51
51
  // Add WHERE clause parameter
52
52
  values.push(event.aggregateId);
53
- const stmt = this.db.prepare(`
54
- UPDATE goal_views
55
- SET ${updates.join(", ")}
56
- WHERE goalId = ?
53
+ const stmt = this.db.prepare(`
54
+ UPDATE goal_views
55
+ SET ${updates.join(", ")}
56
+ WHERE goalId = ?
57
57
  `);
58
58
  stmt.run(...values);
59
59
  }
@@ -13,8 +13,8 @@ class SqliteGoalProgressUpdatedProjector {
13
13
  }
14
14
  async applyGoalProgressUpdated(event) {
15
15
  // First, read the current progress array
16
- const selectStmt = this.db.prepare(`
17
- SELECT progress FROM goal_views WHERE goalId = ?
16
+ const selectStmt = this.db.prepare(`
17
+ SELECT progress FROM goal_views WHERE goalId = ?
18
18
  `);
19
19
  const row = selectStmt.get(event.aggregateId);
20
20
  // Parse existing progress or start with empty array
@@ -22,12 +22,12 @@ class SqliteGoalProgressUpdatedProjector {
22
22
  // Append the new task description
23
23
  currentProgress.push(event.payload.taskDescription);
24
24
  // Update the goal view with the new progress array
25
- const updateStmt = this.db.prepare(`
26
- UPDATE goal_views
27
- SET progress = ?,
28
- version = ?,
29
- updatedAt = ?
30
- WHERE goalId = ?
25
+ const updateStmt = this.db.prepare(`
26
+ UPDATE goal_views
27
+ SET progress = ?,
28
+ version = ?,
29
+ updatedAt = ?
30
+ WHERE goalId = ?
31
31
  `);
32
32
  updateStmt.run(JSON.stringify(currentProgress), event.version, event.timestamp, event.aggregateId);
33
33
  }
@@ -9,11 +9,11 @@ class SqliteGuidelineAddedProjector {
9
9
  this.db = db;
10
10
  }
11
11
  async applyGuidelineAdded(event) {
12
- const stmt = this.db.prepare(`
13
- INSERT OR REPLACE INTO guideline_views (
14
- guidelineId, category, title, description, rationale,
15
- enforcement, examples, version, createdAt, updatedAt
16
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
12
+ const stmt = this.db.prepare(`
13
+ INSERT OR REPLACE INTO guideline_views (
14
+ guidelineId, category, title, description, rationale,
15
+ enforcement, examples, version, createdAt, updatedAt
16
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
17
17
  `);
18
18
  stmt.run(event.aggregateId, event.payload.category, event.payload.title, event.payload.description, event.payload.rationale, event.payload.enforcement, JSON.stringify(event.payload.examples), event.version, event.timestamp, event.timestamp);
19
19
  }
@@ -1,22 +1,22 @@
1
- -- Guideline views table for materialized projections
2
- -- Namespace: solution/guidelines
3
-
4
- CREATE TABLE IF NOT EXISTS guideline_views (
5
- guidelineId TEXT PRIMARY KEY,
6
- category TEXT NOT NULL,
7
- title TEXT NOT NULL,
8
- description TEXT NOT NULL,
9
- rationale TEXT NOT NULL,
10
- enforcement TEXT NOT NULL,
11
- examples TEXT NOT NULL, -- JSON array
12
- isRemoved INTEGER NOT NULL DEFAULT 0,
13
- removedAt TEXT,
14
- removalReason TEXT,
15
- version INTEGER NOT NULL,
16
- createdAt TEXT NOT NULL,
17
- updatedAt TEXT NOT NULL
18
- );
19
-
20
- -- Indexes for common queries
21
- CREATE INDEX IF NOT EXISTS idx_guideline_category ON guideline_views(category);
22
- CREATE INDEX IF NOT EXISTS idx_guideline_removed ON guideline_views(isRemoved);
1
+ -- Guideline views table for materialized projections
2
+ -- Namespace: solution/guidelines
3
+
4
+ CREATE TABLE IF NOT EXISTS guideline_views (
5
+ guidelineId TEXT PRIMARY KEY,
6
+ category TEXT NOT NULL,
7
+ title TEXT NOT NULL,
8
+ description TEXT NOT NULL,
9
+ rationale TEXT NOT NULL,
10
+ enforcement TEXT NOT NULL,
11
+ examples TEXT NOT NULL, -- JSON array
12
+ isRemoved INTEGER NOT NULL DEFAULT 0,
13
+ removedAt TEXT,
14
+ removalReason TEXT,
15
+ version INTEGER NOT NULL,
16
+ createdAt TEXT NOT NULL,
17
+ updatedAt TEXT NOT NULL
18
+ );
19
+
20
+ -- Indexes for common queries
21
+ CREATE INDEX IF NOT EXISTS idx_guideline_category ON guideline_views(category);
22
+ CREATE INDEX IF NOT EXISTS idx_guideline_removed ON guideline_views(isRemoved);
@@ -9,14 +9,14 @@ class SqliteGuidelineRemovedProjector {
9
9
  this.db = db;
10
10
  }
11
11
  async applyGuidelineRemoved(event) {
12
- const stmt = this.db.prepare(`
13
- UPDATE guideline_views
14
- SET isRemoved = 1,
15
- removedAt = ?,
16
- removalReason = ?,
17
- version = ?,
18
- updatedAt = ?
19
- WHERE guidelineId = ?
12
+ const stmt = this.db.prepare(`
13
+ UPDATE guideline_views
14
+ SET isRemoved = 1,
15
+ removedAt = ?,
16
+ removalReason = ?,
17
+ version = ?,
18
+ updatedAt = ?
19
+ WHERE guidelineId = ?
20
20
  `);
21
21
  stmt.run(event.payload.removedAt, event.payload.reason || null, event.version, event.timestamp, event.aggregateId);
22
22
  }
@@ -40,10 +40,10 @@ class SqliteGuidelineUpdatedProjector {
40
40
  updates.push("updatedAt = ?");
41
41
  params.push(event.timestamp);
42
42
  params.push(event.aggregateId);
43
- const stmt = this.db.prepare(`
44
- UPDATE guideline_views
45
- SET ${updates.join(", ")}
46
- WHERE guidelineId = ?
43
+ const stmt = this.db.prepare(`
44
+ UPDATE guideline_views
45
+ SET ${updates.join(", ")}
46
+ WHERE guidelineId = ?
47
47
  `);
48
48
  stmt.run(...params);
49
49
  }
@@ -9,11 +9,11 @@ class SqliteInvariantAddedProjector {
9
9
  this.db = db;
10
10
  }
11
11
  async applyInvariantAdded(event) {
12
- const stmt = this.db.prepare(`
13
- INSERT OR REPLACE INTO invariant_views (
14
- invariantId, title, description, rationale, enforcement,
15
- version, createdAt, updatedAt
16
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
12
+ const stmt = this.db.prepare(`
13
+ INSERT OR REPLACE INTO invariant_views (
14
+ invariantId, title, description, rationale, enforcement,
15
+ version, createdAt, updatedAt
16
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
17
17
  `);
18
18
  stmt.run(event.aggregateId, event.payload.title, event.payload.description, event.payload.rationale, event.payload.enforcement, event.version, event.timestamp, event.timestamp);
19
19
  }
@@ -1,16 +1,16 @@
1
- -- Invariant views table for materialized projections
2
- -- Namespace: solution/invariants
3
-
4
- CREATE TABLE IF NOT EXISTS invariant_views (
5
- invariantId TEXT PRIMARY KEY,
6
- title TEXT NOT NULL,
7
- description TEXT NOT NULL,
8
- rationale TEXT,
9
- enforcement TEXT NOT NULL,
10
- version INTEGER NOT NULL,
11
- createdAt TEXT NOT NULL,
12
- updatedAt TEXT NOT NULL
13
- );
14
-
15
- -- Indexes for common queries
16
- CREATE INDEX IF NOT EXISTS idx_invariant_title ON invariant_views(title);
1
+ -- Invariant views table for materialized projections
2
+ -- Namespace: solution/invariants
3
+
4
+ CREATE TABLE IF NOT EXISTS invariant_views (
5
+ invariantId TEXT PRIMARY KEY,
6
+ title TEXT NOT NULL,
7
+ description TEXT NOT NULL,
8
+ rationale TEXT,
9
+ enforcement TEXT NOT NULL,
10
+ version INTEGER NOT NULL,
11
+ createdAt TEXT NOT NULL,
12
+ updatedAt TEXT NOT NULL
13
+ );
14
+
15
+ -- Indexes for common queries
16
+ CREATE INDEX IF NOT EXISTS idx_invariant_title ON invariant_views(title);
@@ -9,8 +9,8 @@ class SqliteInvariantRemovedProjector {
9
9
  this.db = db;
10
10
  }
11
11
  async applyInvariantRemoved(event) {
12
- const stmt = this.db.prepare(`
13
- DELETE FROM invariant_views WHERE invariantId = ?
12
+ const stmt = this.db.prepare(`
13
+ DELETE FROM invariant_views WHERE invariantId = ?
14
14
  `);
15
15
  stmt.run(event.aggregateId);
16
16
  }
@@ -9,15 +9,15 @@ class SqliteInvariantUpdatedProjector {
9
9
  this.db = db;
10
10
  }
11
11
  async applyInvariantUpdated(event) {
12
- const stmt = this.db.prepare(`
13
- UPDATE invariant_views
14
- SET title = COALESCE(?, title),
15
- description = COALESCE(?, description),
16
- rationale = COALESCE(?, rationale),
17
- enforcement = COALESCE(?, enforcement),
18
- version = ?,
19
- updatedAt = ?
20
- WHERE invariantId = ?
12
+ const stmt = this.db.prepare(`
13
+ UPDATE invariant_views
14
+ SET title = COALESCE(?, title),
15
+ description = COALESCE(?, description),
16
+ rationale = COALESCE(?, rationale),
17
+ enforcement = COALESCE(?, enforcement),
18
+ version = ?,
19
+ updatedAt = ?
20
+ WHERE invariantId = ?
21
21
  `);
22
22
  stmt.run(event.payload.title !== undefined ? event.payload.title : null, event.payload.description !== undefined ? event.payload.description : null, event.payload.rationale !== undefined ? event.payload.rationale : null, event.payload.enforcement !== undefined ? event.payload.enforcement : null, event.version, event.timestamp, event.aggregateId);
23
23
  }
@@ -9,11 +9,11 @@ class SqliteProjectInitializedProjector {
9
9
  this.db = db;
10
10
  }
11
11
  async applyProjectInitialized(event) {
12
- const stmt = this.db.prepare(`
13
- INSERT OR REPLACE INTO project_views (
14
- projectId, name, purpose,
15
- version, createdAt, updatedAt
16
- ) VALUES (?, ?, ?, ?, ?, ?)
12
+ const stmt = this.db.prepare(`
13
+ INSERT OR REPLACE INTO project_views (
14
+ projectId, name, purpose,
15
+ version, createdAt, updatedAt
16
+ ) VALUES (?, ?, ?, ?, ?, ?)
17
17
  `);
18
18
  stmt.run(event.aggregateId, event.payload.name, event.payload.purpose, event.version, event.timestamp, event.timestamp);
19
19
  }
@@ -1,13 +1,13 @@
1
- -- Project views table for materialized projections
2
- -- Namespace: project-knowledge/project
3
-
4
- CREATE TABLE IF NOT EXISTS project_views (
5
- projectId TEXT PRIMARY KEY,
6
- name TEXT NOT NULL,
7
- tagline TEXT,
8
- purpose TEXT,
9
- boundaries TEXT NOT NULL, -- JSON array
10
- version INTEGER NOT NULL,
11
- createdAt TEXT NOT NULL,
12
- updatedAt TEXT NOT NULL
13
- );
1
+ -- Project views table for materialized projections
2
+ -- Namespace: project-knowledge/project
3
+
4
+ CREATE TABLE IF NOT EXISTS project_views (
5
+ projectId TEXT PRIMARY KEY,
6
+ name TEXT NOT NULL,
7
+ tagline TEXT,
8
+ purpose TEXT,
9
+ boundaries TEXT NOT NULL, -- JSON array
10
+ version INTEGER NOT NULL,
11
+ createdAt TEXT NOT NULL,
12
+ updatedAt TEXT NOT NULL
13
+ );
@@ -1,4 +1,4 @@
1
- -- Drop boundaries column from project_views table
2
- -- This column is no longer needed after boundaries property removal
3
-
4
- ALTER TABLE project_views DROP COLUMN boundaries;
1
+ -- Drop boundaries column from project_views table
2
+ -- This column is no longer needed after boundaries property removal
3
+
4
+ ALTER TABLE project_views DROP COLUMN boundaries;
@@ -18,10 +18,10 @@ class SqliteProjectUpdatedProjector {
18
18
  updates.push("version = ?", "updatedAt = ?");
19
19
  params.push(event.version, event.timestamp);
20
20
  params.push(event.aggregateId);
21
- const stmt = this.db.prepare(`
22
- UPDATE project_views
23
- SET ${updates.join(", ")}
24
- WHERE projectId = ?
21
+ const stmt = this.db.prepare(`
22
+ UPDATE project_views
23
+ SET ${updates.join(", ")}
24
+ WHERE projectId = ?
25
25
  `);
26
26
  stmt.run(...params);
27
27
  }
@@ -12,22 +12,22 @@ class SqliteRelationAddedProjector {
12
12
  this.db = db;
13
13
  }
14
14
  async applyRelationAdded(event) {
15
- const stmt = this.db.prepare(`
16
- INSERT OR REPLACE INTO relation_views (
17
- relationId, fromEntityType, fromEntityId, toEntityType, toEntityId,
18
- relationType, strength, description, status, version, createdAt, updatedAt
19
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
15
+ const stmt = this.db.prepare(`
16
+ INSERT OR REPLACE INTO relation_views (
17
+ relationId, fromEntityType, fromEntityId, toEntityType, toEntityId,
18
+ relationType, strength, description, status, version, createdAt, updatedAt
19
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
20
20
  `);
21
21
  stmt.run(event.aggregateId, event.payload.fromEntityType, event.payload.fromEntityId, event.payload.toEntityType, event.payload.toEntityId, event.payload.relationType, event.payload.strength, event.payload.description, 'active', event.version, event.timestamp, event.timestamp);
22
22
  }
23
23
  async findByEntities(fromEntityType, fromEntityId, toEntityType, toEntityId, relationType) {
24
- const row = this.db.prepare(`
25
- SELECT * FROM relation_views
26
- WHERE fromEntityType = ?
27
- AND fromEntityId = ?
28
- AND toEntityType = ?
29
- AND toEntityId = ?
30
- AND relationType = ?
24
+ const row = this.db.prepare(`
25
+ SELECT * FROM relation_views
26
+ WHERE fromEntityType = ?
27
+ AND fromEntityId = ?
28
+ AND toEntityType = ?
29
+ AND toEntityId = ?
30
+ AND relationType = ?
31
31
  `).get(fromEntityType, fromEntityId, toEntityType, toEntityId, relationType);
32
32
  return row ? this.mapRowToView(row) : null;
33
33
  }
@@ -6,12 +6,12 @@ class SqliteRelationDeactivatedProjector {
6
6
  this.db = db;
7
7
  }
8
8
  async applyRelationDeactivated(event) {
9
- const stmt = this.db.prepare(`
10
- UPDATE relation_views
11
- SET status = 'deactivated',
12
- version = ?,
13
- updatedAt = ?
14
- WHERE relationId = ?
9
+ const stmt = this.db.prepare(`
10
+ UPDATE relation_views
11
+ SET status = 'deactivated',
12
+ version = ?,
13
+ updatedAt = ?
14
+ WHERE relationId = ?
15
15
  `);
16
16
  stmt.run(event.version, event.timestamp, event.aggregateId);
17
17
  }
@@ -20,18 +20,18 @@ class SqliteRelationDeactivatedProjector {
20
20
  return row ? this.mapRowToView(row) : null;
21
21
  }
22
22
  async findByFromEntity(entityType, entityId) {
23
- const rows = this.db.prepare(`
24
- SELECT * FROM relation_views
25
- WHERE fromEntityType = ? AND fromEntityId = ?
26
- ORDER BY createdAt ASC
23
+ const rows = this.db.prepare(`
24
+ SELECT * FROM relation_views
25
+ WHERE fromEntityType = ? AND fromEntityId = ?
26
+ ORDER BY createdAt ASC
27
27
  `).all(entityType, entityId);
28
28
  return rows.map(row => this.mapRowToView(row));
29
29
  }
30
30
  async findByToEntity(entityType, entityId) {
31
- const rows = this.db.prepare(`
32
- SELECT * FROM relation_views
33
- WHERE toEntityType = ? AND toEntityId = ?
34
- ORDER BY createdAt ASC
31
+ const rows = this.db.prepare(`
32
+ SELECT * FROM relation_views
33
+ WHERE toEntityType = ? AND toEntityId = ?
34
+ ORDER BY createdAt ASC
35
35
  `).all(entityType, entityId);
36
36
  return rows.map(row => this.mapRowToView(row));
37
37
  }
@@ -1,28 +1,28 @@
1
- -- Relation views table for materialized projections
2
- -- Namespace: relations
3
-
4
- CREATE TABLE IF NOT EXISTS relation_views (
5
- relationId TEXT PRIMARY KEY,
6
- fromEntityType TEXT NOT NULL,
7
- fromEntityId TEXT NOT NULL,
8
- toEntityType TEXT NOT NULL,
9
- toEntityId TEXT NOT NULL,
10
- relationType TEXT NOT NULL,
11
- strength TEXT,
12
- description TEXT NOT NULL,
13
- status TEXT NOT NULL DEFAULT 'active',
14
- version INTEGER NOT NULL,
15
- createdAt TEXT NOT NULL,
16
- updatedAt TEXT NOT NULL
17
- );
18
-
19
- -- Indexes for efficient graph traversal
20
- CREATE INDEX IF NOT EXISTS idx_relation_from ON relation_views(fromEntityType, fromEntityId);
21
- CREATE INDEX IF NOT EXISTS idx_relation_to ON relation_views(toEntityType, toEntityId);
22
- CREATE INDEX IF NOT EXISTS idx_relation_type ON relation_views(relationType);
23
- CREATE INDEX IF NOT EXISTS idx_relation_status ON relation_views(status);
24
-
25
- -- Composite index for finding specific relations
26
- CREATE UNIQUE INDEX IF NOT EXISTS idx_relation_unique ON relation_views(
27
- fromEntityType, fromEntityId, toEntityType, toEntityId, relationType
28
- );
1
+ -- Relation views table for materialized projections
2
+ -- Namespace: relations
3
+
4
+ CREATE TABLE IF NOT EXISTS relation_views (
5
+ relationId TEXT PRIMARY KEY,
6
+ fromEntityType TEXT NOT NULL,
7
+ fromEntityId TEXT NOT NULL,
8
+ toEntityType TEXT NOT NULL,
9
+ toEntityId TEXT NOT NULL,
10
+ relationType TEXT NOT NULL,
11
+ strength TEXT,
12
+ description TEXT NOT NULL,
13
+ status TEXT NOT NULL DEFAULT 'active',
14
+ version INTEGER NOT NULL,
15
+ createdAt TEXT NOT NULL,
16
+ updatedAt TEXT NOT NULL
17
+ );
18
+
19
+ -- Indexes for efficient graph traversal
20
+ CREATE INDEX IF NOT EXISTS idx_relation_from ON relation_views(fromEntityType, fromEntityId);
21
+ CREATE INDEX IF NOT EXISTS idx_relation_to ON relation_views(toEntityType, toEntityId);
22
+ CREATE INDEX IF NOT EXISTS idx_relation_type ON relation_views(relationType);
23
+ CREATE INDEX IF NOT EXISTS idx_relation_status ON relation_views(status);
24
+
25
+ -- Composite index for finding specific relations
26
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_relation_unique ON relation_views(
27
+ fromEntityType, fromEntityId, toEntityType, toEntityId, relationType
28
+ );
@@ -6,12 +6,12 @@ class SqliteRelationReactivatedProjector {
6
6
  this.db = db;
7
7
  }
8
8
  async applyRelationReactivated(event) {
9
- const stmt = this.db.prepare(`
10
- UPDATE relation_views
11
- SET status = 'active',
12
- version = ?,
13
- updatedAt = ?
14
- WHERE relationId = ?
9
+ const stmt = this.db.prepare(`
10
+ UPDATE relation_views
11
+ SET status = 'active',
12
+ version = ?,
13
+ updatedAt = ?
14
+ WHERE relationId = ?
15
15
  `);
16
16
  stmt.run(event.version, event.timestamp, event.aggregateId);
17
17
  }
@@ -20,18 +20,18 @@ class SqliteRelationReactivatedProjector {
20
20
  return row ? this.mapRowToView(row) : null;
21
21
  }
22
22
  async findByFromEntity(entityType, entityId) {
23
- const rows = this.db.prepare(`
24
- SELECT * FROM relation_views
25
- WHERE fromEntityType = ? AND fromEntityId = ?
26
- ORDER BY createdAt ASC
23
+ const rows = this.db.prepare(`
24
+ SELECT * FROM relation_views
25
+ WHERE fromEntityType = ? AND fromEntityId = ?
26
+ ORDER BY createdAt ASC
27
27
  `).all(entityType, entityId);
28
28
  return rows.map(row => this.mapRowToView(row));
29
29
  }
30
30
  async findByToEntity(entityType, entityId) {
31
- const rows = this.db.prepare(`
32
- SELECT * FROM relation_views
33
- WHERE toEntityType = ? AND toEntityId = ?
34
- ORDER BY createdAt ASC
31
+ const rows = this.db.prepare(`
32
+ SELECT * FROM relation_views
33
+ WHERE toEntityType = ? AND toEntityId = ?
34
+ ORDER BY createdAt ASC
35
35
  `).all(entityType, entityId);
36
36
  return rows.map(row => this.mapRowToView(row));
37
37
  }
@@ -13,12 +13,12 @@ class SqliteRelationRemovedProjector {
13
13
  }
14
14
  async applyRelationRemoved(event) {
15
15
  // Soft delete: mark as removed rather than hard delete
16
- const stmt = this.db.prepare(`
17
- UPDATE relation_views
18
- SET status = 'removed',
19
- version = ?,
20
- updatedAt = ?
21
- WHERE relationId = ?
16
+ const stmt = this.db.prepare(`
17
+ UPDATE relation_views
18
+ SET status = 'removed',
19
+ version = ?,
20
+ updatedAt = ?
21
+ WHERE relationId = ?
22
22
  `);
23
23
  stmt.run(event.version, event.timestamp, event.aggregateId);
24
24
  }
@@ -27,18 +27,18 @@ class SqliteRelationRemovedProjector {
27
27
  return row ? this.mapRowToView(row) : null;
28
28
  }
29
29
  async findByFromEntity(entityType, entityId) {
30
- const rows = this.db.prepare(`
31
- SELECT * FROM relation_views
32
- WHERE fromEntityType = ? AND fromEntityId = ?
33
- ORDER BY createdAt ASC
30
+ const rows = this.db.prepare(`
31
+ SELECT * FROM relation_views
32
+ WHERE fromEntityType = ? AND fromEntityId = ?
33
+ ORDER BY createdAt ASC
34
34
  `).all(entityType, entityId);
35
35
  return rows.map(row => this.mapRowToView(row));
36
36
  }
37
37
  async findByToEntity(entityType, entityId) {
38
- const rows = this.db.prepare(`
39
- SELECT * FROM relation_views
40
- WHERE toEntityType = ? AND toEntityId = ?
41
- ORDER BY createdAt ASC
38
+ const rows = this.db.prepare(`
39
+ SELECT * FROM relation_views
40
+ WHERE toEntityType = ? AND toEntityId = ?
41
+ ORDER BY createdAt ASC
42
42
  `).all(entityType, entityId);
43
43
  return rows.map(row => this.mapRowToView(row));
44
44
  }
@@ -13,14 +13,14 @@ class SqliteSessionEndedProjector {
13
13
  this.db = db;
14
14
  }
15
15
  async applySessionEnded(event) {
16
- const stmt = this.db.prepare(`
17
- UPDATE session_views
18
- SET focus = ?,
19
- status = ?,
20
- endedAt = ?,
21
- version = ?,
22
- updatedAt = ?
23
- WHERE sessionId = ?
16
+ const stmt = this.db.prepare(`
17
+ UPDATE session_views
18
+ SET focus = ?,
19
+ status = ?,
20
+ endedAt = ?,
21
+ version = ?,
22
+ updatedAt = ?
23
+ WHERE sessionId = ?
24
24
  `);
25
25
  stmt.run(event.payload.focus, Constants_js_1.SessionStatus.ENDED, event.timestamp, event.version, event.timestamp, event.aggregateId);
26
26
  }