feat(server): wire outbox + read features into app + my surface

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-29 11:35:13 -04:00
parent 9f7c9f4533
commit 1de0ccdfd6
2 changed files with 8 additions and 0 deletions

View file

@ -8,6 +8,7 @@ import { calendarSendItemMigrations } from '@/entities/calendarSendItem';
import { callMigrations } from '@/entities/call';
import { contactMigrations } from '@/entities/contact';
import { conversationMigrations } from '@/entities/conversation';
import { conversationReadMigrations } from '@/entities/conversation-read';
import { devicePermissionsMigrations, DevicePermissionsRepo } from '@/entities/device-permissions';
import { deviceMigrations } from '@/entities/device';
import { eventMigrations } from '@/entities/event';
@ -31,6 +32,7 @@ import { adminSurface } from '@/surfaces/admin';
import { openDb, runMigrations, pgRun, getDb } from '@/shared/db';
import { logger } from '@/shared/logger';
import { startEmbeddingWorker } from '@/features/embedding/worker';
import { startOutboxSweep } from '@/features/outbox';
import { loadConfig } from './config';
import { deviceTokenAuth, serviceTokenAuth } from './middleware/auth';
@ -69,6 +71,7 @@ export async function createApp() {
...prospectMigrations,
...outreachMigrations,
...outboxMigrations,
...conversationReadMigrations,
]);
// Start incremental embedding worker — fire and forget; crashes reconnect automatically
@ -76,6 +79,9 @@ export async function createApp() {
logger.error('failed to start embedding worker', { err: String(err) });
});
// Outbox retry backstop: reclaim rows wedged in `sending` (Handoff 03).
startOutboxSweep();
const app = new Hono()
.onError(errorHandler)
.use('*', bodyLimit({ maxSize: 100 * 1024 * 1024 })) // 100MB for large iMessage batch uploads

View file

@ -9,6 +9,7 @@ import { notesMyRouter } from './notes';
import { outboxMyRouter } from './outbox';
import { photosMyRouter } from './photos';
import { prospectsMyRouter } from './prospects';
import { readMyRouter } from './read';
import { remindersMyRouter } from './reminders';
import { searchMyRouter } from './search';
@ -21,6 +22,7 @@ export const mySurface = new Hono()
.route('/reminders', remindersMyRouter)
.route('/notes', notesMyRouter)
.route('/outbox', outboxMyRouter)
.route('/read', readMyRouter)
.route('/search', searchMyRouter)
.route('/contacts', contactsMyRouter)
.route('/prospects', prospectsMyRouter);