feat(platform): Phase 118 scheduled CSV mesh + auditExportCsvMeta view (v0.8.82)

_runScheduledAuditExportIfDue now calls pushAuditExportCsvToMesh when
pushSignedCsvToMesh is enabled. View exposes auditExportCsvMeta for the
audit modal HMAC signature badge.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-22 07:32:19 -04:00
co-authored by Cursor
parent 3cd74e9989
commit aae290258d
+20 -2
View File
@@ -6452,9 +6452,24 @@ class PearcordPlatform extends EventEmitter {
limit: 200, limit: 200,
gossip: true gossip: true
}) })
let csvMesh = null
if (schedule.pushSignedCsvToMesh !== false) {
try {
csvMesh = await this.pushAuditExportCsvToMesh({
filter: schedule.filter,
limit: 200
})
await this.deliveryReceipts.setAuditExportSchedule({
lastCsvMeshPushAt: csvMesh.exportedAt || Date.now()
})
} catch {
csvMesh = null
}
}
await this.deliveryReceipts.setAuditExportSchedule({ lastExportAt: out.exportedAt }) await this.deliveryReceipts.setAuditExportSchedule({ lastExportAt: out.exportedAt })
this.emit('audit-export-scheduled', { ...out, schedule }) const nextSchedule = await this.deliveryReceipts.getAuditExportSchedule()
return out this.emit('audit-export-scheduled', { ...out, csvMesh, schedule: nextSchedule })
return { ...out, csvMesh, schedule: nextSchedule }
} }
async _initWorkerReleaseHints () { async _initWorkerReleaseHints () {
@@ -8030,6 +8045,7 @@ class PearcordPlatform extends EventEmitter {
let automationDigestExportSchedule = null let automationDigestExportSchedule = null
let automationDigestExportSnapshots = [] let automationDigestExportSnapshots = []
let auditExportArchives = [] let auditExportArchives = []
let auditExportCsvMeta = null
let automationScheduleDashboard = null let automationScheduleDashboard = null
let automationHealthDashboard = null let automationHealthDashboard = null
let automationDigestNotifyPrefs = null let automationDigestNotifyPrefs = null
@@ -8045,6 +8061,7 @@ class PearcordPlatform extends EventEmitter {
automationDigestExportSchedule = await this.getAutomationDigestExportSchedule() automationDigestExportSchedule = await this.getAutomationDigestExportSchedule()
automationDigestExportSnapshots = await this.listAutomationDigestExportSnapshots(3) automationDigestExportSnapshots = await this.listAutomationDigestExportSnapshots(3)
auditExportArchives = await this.listAuditExportArchives(6) auditExportArchives = await this.listAuditExportArchives(6)
auditExportCsvMeta = await this.getAuditExportCsvExport().catch(() => null)
automationHealthDashboard = await this.getAutomationHealthDashboard() automationHealthDashboard = await this.getAutomationHealthDashboard()
automationScheduleDashboard = automationHealthDashboard automationScheduleDashboard = automationHealthDashboard
automationDigestNotifyPrefs = await this.getAutomationDigestNotifyPrefs() automationDigestNotifyPrefs = await this.getAutomationDigestNotifyPrefs()
@@ -8225,6 +8242,7 @@ class PearcordPlatform extends EventEmitter {
automationDigestExportSchedule, automationDigestExportSchedule,
automationDigestExportSnapshots, automationDigestExportSnapshots,
auditExportArchives, auditExportArchives,
auditExportCsvMeta,
automationScheduleDashboard, automationScheduleDashboard,
automationHealthDashboard, automationHealthDashboard,
automationDigestNotifyPrefs, automationDigestNotifyPrefs,