Use configured CultMesh publication handles in RTS readers

This commit is contained in:
Meta Vens 2026-06-27 17:14:51 +01:00
commit 3981c7be9e
3 changed files with 12 additions and 5 deletions

View file

@ -40,7 +40,10 @@ export class AetheriaLocalPublicationReader {
schemaId: string,
documentId: string,
): Promise<unknown> {
return CultMesh.documentFromSingleFile(path, schemaId, {
return CultMesh.documentFromPublication({
kind: "single-file",
path,
}, schemaId, documentId, {
documentId,
sourceId: documentId,
}).latest();

View file

@ -46,8 +46,12 @@ export class AetheriaRemotePublicationReader {
}
private async readSingleDocument(schemaId: string, recordKey: string): Promise<unknown> {
return CultMesh.documentFromPeerSnapshot(
() => this.peer(),
return CultMesh.documentFromPublication(
{
kind: "peer-snapshot",
peer: () => this.peer(),
endpoint: this.endpoint,
},
schemaId,
recordKey,
{

View file

@ -491,9 +491,9 @@ foreach ($symbol in $requiredProjectionSymbols) {
}
}
& rg -q 'CultMesh.documentFromSingleFile' Electron/aetheria-local-publication-reader.ts
& rg -q 'CultMesh.documentFromPublication' Electron/aetheria-local-publication-reader.ts
if ($LASTEXITCODE -ne 0) {
Write-Error "Stage 7B verifier failed: local publications should be read through CultMesh document handles."
Write-Error "Stage 7B verifier failed: local publications should be read through configured CultMesh document handles."
}
$forbiddenLocalPublicationReaderPlumbing = & rg -n 'SingleFileMessagePackBackingStore|decode\(|pullAll\(' Electron/aetheria-local-publication-reader.ts 2>$null