Add session timeline logging and admin sessions view

This commit is contained in:
Remi
2025-09-21 23:08:10 +02:00
parent 10cae457f9
commit ba93c494c9
18 changed files with 1303 additions and 808 deletions

View File

@@ -19,6 +19,8 @@ export interface DecisionFlowDocument extends mongoose.Document {
phases: string[]
layout?: DecisionFlowLayout
metadata?: DecisionFlowMetadata
entryMode?: 'parallel' | 'linear'
isMain?: boolean
createdAt: Date
updatedAt: Date
}
@@ -37,6 +39,8 @@ const decisionFlowSchema = new mongoose.Schema<DecisionFlowDocument>(
hooks: { type: mongoose.Schema.Types.Mixed, default: () => ({}) },
roles: { type: [String], default: () => [] },
phases: { type: [String], default: () => [] },
entryMode: { type: String, enum: ['parallel', 'linear'], default: 'parallel' },
isMain: { type: Boolean, default: false },
layout: {
type: new mongoose.Schema<DecisionFlowLayout>(
{

View File

@@ -10,6 +10,7 @@ export interface TransmissionLogDocument extends mongoose.Document {
text: string
normalized?: string
metadata?: Record<string, any>
sessionId?: string
createdAt: Date
}
@@ -21,6 +22,7 @@ const transmissionSchema = new mongoose.Schema<TransmissionLogDocument>({
text: { type: String, required: true },
normalized: { type: String },
metadata: { type: Schema.Types.Mixed },
sessionId: { type: String, index: true },
createdAt: { type: Date, default: () => new Date() },
})