-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
30 lines (27 loc) · 1.17 KB
/
config.js
File metadata and controls
30 lines (27 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import 'dotenv/config';
const config = {
apiUrl: process.env.CRUSTOCEAN_API_URL || 'https://api.crustocean.chat',
agentToken: process.env.CRUSTOCEAN_AGENT_TOKEN,
anthropicApiKey: process.env.ANTHROPIC_API_KEY,
model: process.env.ANTHROPIC_MODEL || 'claude-opus-4-6',
handle: (process.env.BEN_HANDLE || 'ben').trim().toLowerCase(),
agencies: (process.env.BEN_AGENCIES || 'lobby')
.split(',')
.map((s) => s.trim())
.filter(Boolean),
cycleMinMinutes: Math.max(1, parseInt(process.env.BEN_CYCLE_MIN_MINUTES || '20', 10)),
cycleMaxMinutes: Math.max(2, parseInt(process.env.BEN_CYCLE_MAX_MINUTES || '45', 10)),
maxActionsPerCycle: parseInt(process.env.BEN_MAX_ACTIONS || '36', 10),
maxActionsPerReaction: parseInt(process.env.BEN_MAX_REACTION_ACTIONS || '18', 10),
dataDir: process.env.BEN_DATA_DIR || './data',
minCycleGapMinutes: Math.max(1, parseInt(process.env.BEN_MIN_CYCLE_GAP_MINUTES || '8', 10)),
};
if (!config.agentToken) {
console.error('Missing CRUSTOCEAN_AGENT_TOKEN — see .env.example');
process.exit(1);
}
if (!config.anthropicApiKey) {
console.error('Missing ANTHROPIC_API_KEY — see .env.example');
process.exit(1);
}
export default config;