macsync/web/vite.config.ts
Natalie 242d7cd1a8 feat(send-queue): burst-friendly outbound send-rate cap (default 10/5min)
The /client/imessage/send-queue/pending endpoint released up to 50 queued
sends per poll, so an enqueued burst all fired at once. Add a configurable
release cap: the endpoint now returns at most (maxSends − sent-in-window)
queued items, so a burst queues and drips out at the configured rate.

- macsync.send_rate_config single-row table, default max_sends=10,
  window_seconds=300 (10 per 5 min).
- entities/send-queue repo: getSendRateConfig / setSendRateConfig /
  countSentWithin.
- Admin control: GET/PUT /admin/send-rate-limit (service-token auth) so the
  cap is adjustable at runtime (wired to MCP via quinn.api separately).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:35:18 -04:00

40 lines
871 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
server: {
proxy: {
'/my': {
target: 'http://localhost:3201',
changeOrigin: true,
},
// Settings API served by the Mac agent's local web server
'/api': {
target: 'http://localhost:8765',
changeOrigin: false,
},
},
},
build: {
outDir: 'dist',
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
react: ['react', 'react-dom'],
query: ['@tanstack/react-query'],
},
},
},
},
});