Add the optional Immich integration and manual gallery push

Immich connections stay server-side with an encrypted API key, albums can be
imported, and photos are only sent back when an event's push button is pressed:
originals upload once, edited photos re-render, and edits hashes plus checksums
skip anything already in Immich. This also lands the accompanying editor, cloud
and administration work that was still uncommitted.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-25 17:43:05 +00:00
parent e0c76ba965
commit 0b3ab76405
26 changed files with 4323 additions and 144 deletions
+10 -2
View File
@@ -11,6 +11,7 @@ import crypto from 'node:crypto';
import { BRIDGE_SECRET, BRIDGE_TTL_HOURS, GLENLOCH_URL } from './config.mjs';
import { db, removeEvent, removePhoto, saveEvent, savePhoto } from './db.mjs';
import { removeAsset } from './storage.mjs';
import { open, seal } from './secrets.mjs';
const VERSION = 'g1';
@@ -119,7 +120,14 @@ export function bridgePhotoId(sourcePhotoId) {
}
export function bridgeForEvent(eventId) {
return bridgeGet.get(eventId) ?? null;
const row = bridgeGet.get(eventId);
if (!row) return null;
try {
return { ...row, token: open(row.token) };
} catch (err) {
console.error(`[luminary] could not decrypt the bridge token for ${eventId}: ${err.message}`);
return { ...row, token: '' };
}
}
/** Deletes an imported event, its rows and any cached previews/thumbnails. */
@@ -208,7 +216,7 @@ export async function importBridgeEvent({ serviceToken, sessionId, ownerId = ''
bridgeInsert.run(
eventId,
sessionId,
serviceToken,
seal(serviceToken),
GLENLOCH_URL,
listing.event.id,
returnUrl,