@@ -88,6 +88,8 @@ export interface ProjectConfigRaw {
8888 agentEngineSettings ?: Record < string , EngineSettings > ;
8989 runLinksEnabled ?: boolean ;
9090 maxInFlightItems ?: number ;
91+ snapshotEnabled ?: boolean ;
92+ snapshotTtlMs ?: number ;
9193 trello ?: {
9294 boardId : string ;
9395 lists : Record < string , string > ;
@@ -130,6 +132,8 @@ type ProjectRow = {
130132 agentEngineSettings : EngineSettings | null ;
131133 runLinksEnabled : boolean ;
132134 maxInFlightItems : number | null ;
135+ snapshotEnabled : boolean | null ;
136+ snapshotTtlMs : number | null ;
133137} ;
134138
135139export function buildAgentMaps ( configs : AgentConfigRow [ ] ) : {
@@ -190,6 +194,30 @@ function buildAgentEngineConfig(
190194 } ;
191195}
192196
197+ function buildBaseProjectFields ( row : ProjectRow , pmType : 'trello' | 'jira' ) : ProjectConfigRaw {
198+ return {
199+ id : row . id ,
200+ orgId : row . orgId ,
201+ name : row . name ,
202+ repo : row . repo ?? undefined ,
203+ baseBranch : row . baseBranch ?? 'main' ,
204+ branchPrefix : row . branchPrefix ?? 'feature/' ,
205+ pm : { type : pmType } ,
206+ model : row . model ?? undefined ,
207+ maxIterations : row . maxIterations ?? undefined ,
208+ watchdogTimeoutMs : row . watchdogTimeoutMs ?? undefined ,
209+ progressModel : row . progressModel ?? undefined ,
210+ progressIntervalMinutes : numericOrUndefined ( row . progressIntervalMinutes ) ,
211+ workItemBudgetUsd : numericOrUndefined ( row . workItemBudgetUsd ) ,
212+ engineSettings : row . agentEngineSettings ?? undefined ,
213+ squintDbUrl : row . squintDbUrl ?? undefined ,
214+ runLinksEnabled : row . runLinksEnabled ?? false ,
215+ maxInFlightItems : row . maxInFlightItems ?? undefined ,
216+ snapshotEnabled : row . snapshotEnabled ?? undefined ,
217+ snapshotTtlMs : row . snapshotTtlMs ?? undefined ,
218+ } ;
219+ }
220+
193221// ---------------------------------------------------------------------------
194222// Public mapping functions
195223// ---------------------------------------------------------------------------
@@ -226,27 +254,11 @@ export function mapProjectRow({
226254 const pmType = jiraConfig ? 'jira' : 'trello' ;
227255
228256 const project : ProjectConfigRaw = {
229- id : row . id ,
230- orgId : row . orgId ,
231- name : row . name ,
232- repo : row . repo ?? undefined ,
233- baseBranch : row . baseBranch ?? 'main' ,
234- branchPrefix : row . branchPrefix ?? 'feature/' ,
235- pm : { type : pmType } ,
236- model : row . model ?? undefined ,
257+ ...buildBaseProjectFields ( row , pmType ) ,
237258 agentModels : orUndefined ( models ) ,
238- maxIterations : row . maxIterations ?? undefined ,
239- watchdogTimeoutMs : row . watchdogTimeoutMs ?? undefined ,
240- progressModel : row . progressModel ?? undefined ,
241- progressIntervalMinutes : numericOrUndefined ( row . progressIntervalMinutes ) ,
242- workItemBudgetUsd : numericOrUndefined ( row . workItemBudgetUsd ) ,
243- engineSettings : row . agentEngineSettings ?? undefined ,
244259 agentEngineSettings : orUndefined ( agentEngineSettingsMap ) as
245260 | Record < string , EngineSettings >
246261 | undefined ,
247- squintDbUrl : row . squintDbUrl ?? undefined ,
248- runLinksEnabled : row . runLinksEnabled ?? false ,
249- maxInFlightItems : row . maxInFlightItems ?? undefined ,
250262 } ;
251263
252264 if ( trelloConfig ) {
0 commit comments