- @tokenvault/rtk-bridge: Reads ~/Library/Application Support/rtk/history.db and syncs new commands to /v1/rtk/stats (stateful, batched, idempotent) - Core: rtk_commands table + 4 endpoints (/v1/rtk/stats, /rtk/commands, /rtk/hosts) - Dashboard: new RTK Savings tab with 6 KPI cards + top commands + host breakdown - Multi-host aggregation: sync from Mac Studio, Mac Mini, MacBooks etc. - First sync: 753 commands, 3.5M tokens saved aggregated RTK is MIT-licensed (github.com/rtk-ai/rtk) — we use it as the compression engine and add the missing pieces: central tracking, team attribution, cross-machine dashboards, long-term trend analysis.
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
module.exports = {
|
|
apps: [
|
|
{
|
|
name: 'tokenvault',
|
|
script: 'packages/core/dist/server.js',
|
|
cwd: '/opt/tokenvault',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
TOKENVAULT_PORT: '3350',
|
|
TOKENVAULT_HOST: '0.0.0.0',
|
|
DB_HOST: '127.0.0.1',
|
|
DB_PORT: '5432',
|
|
DB_NAME: 'tokenvault',
|
|
DB_USER: 'tokenvault',
|
|
QDRANT_URL: 'http://localhost:6333',
|
|
OLLAMA_URL: 'https://ollama.fichtmueller.org',
|
|
},
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
max_memory_restart: '512M',
|
|
error_file: '/opt/tokenvault/logs/error.log',
|
|
out_file: '/opt/tokenvault/logs/out.log',
|
|
merge_logs: true,
|
|
time: true,
|
|
watch: false,
|
|
autorestart: true,
|
|
max_restarts: 10,
|
|
restart_delay: 5000,
|
|
},
|
|
{
|
|
name: 'tokenvault-dashboard',
|
|
script: 'packages/dashboard/dist/server.js',
|
|
cwd: '/opt/tokenvault',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
PORT: '3301',
|
|
TOKENVAULT_CORE_URL: 'http://localhost:3350',
|
|
},
|
|
instances: 1,
|
|
exec_mode: 'fork',
|
|
max_memory_restart: '256M',
|
|
error_file: '/opt/tokenvault/logs/dashboard-error.log',
|
|
out_file: '/opt/tokenvault/logs/dashboard-out.log',
|
|
merge_logs: true,
|
|
time: true,
|
|
watch: false,
|
|
autorestart: true,
|
|
},
|
|
],
|
|
};
|