-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreflexive.config.example.js
More file actions
117 lines (97 loc) · 2.85 KB
/
reflexive.config.example.js
File metadata and controls
117 lines (97 loc) · 2.85 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* Reflexive Configuration File
*
* Copy this file to reflexive.config.js and customize for your project.
* Configuration can also be provided via:
* - reflexive.config.mjs (ES modules)
* - reflexive.config.json
* - .reflexiverc
* - .reflexiverc.json
*
* CLI flags always take precedence over config file settings.
*/
export default {
/**
* Operating mode:
* - 'local' - Run app as child process (default)
* - 'sandbox' - Run in Vercel Sandbox (isolated)
* - 'hosted' - Multi-tenant hosted mode (production)
*/
mode: 'local',
/**
* Dashboard server port (default: 3099)
*/
port: 3099,
/**
* Capability flags control what the AI agent can do.
* All are opt-in for safety, except readFiles and restart.
*/
capabilities: {
// Read project files (default: true)
readFiles: true,
// Write/edit files (default: false, enable with --write)
writeFiles: false,
// Execute shell commands (default: false, enable with --shell)
shellAccess: false,
// Restart the process (default: true)
restart: true,
// Deep console/diagnostics injection (enable with --inject)
inject: false,
// Runtime code evaluation (enable with --eval, DANGEROUS)
eval: false,
// V8 Inspector debugging (enable with --debug)
debug: false,
},
/**
* Sandbox mode configuration
* Only used when mode: 'sandbox'
*/
sandbox: {
// Sandbox provider (currently only 'vercel' is supported)
provider: 'vercel',
// Number of virtual CPUs (1-4)
vcpus: 2,
// Memory in MB (128-8192)
memory: 2048,
// Maximum sandbox lifetime (e.g., '30m', '1h', or milliseconds)
timeout: '30m',
// Node.js runtime version
runtime: 'node22',
},
/**
* Hosted mode configuration
* Only used when mode: 'hosted' (multi-tenant production deployment)
*/
hosted: {
// Maximum concurrent sandboxes per instance
maxSandboxes: 10,
// Default sandbox timeout
defaultTimeout: '30m',
// Snapshot storage configuration
snapshotStorage: {
// Storage provider: 's3', 'r2', or 'memory'
provider: 's3',
// S3/R2 bucket name (required for s3/r2)
bucket: process.env.REFLEXIVE_SNAPSHOT_BUCKET || 'reflexive-snapshots',
// Custom S3-compatible endpoint (for R2, MinIO, etc.)
// endpoint: process.env.REFLEXIVE_S3_ENDPOINT,
},
},
/**
* Custom MCP tools to register with the AI agent.
* Tools must follow the MCP tool schema format with Zod validation.
*
* @example
* tools: [
* {
* name: 'get_user_count',
* description: 'Get the current number of active users',
* schema: { type: 'object', properties: {} },
* handler: async () => ({
* content: [{ type: 'text', text: `Active users: ${getActiveUserCount()}` }]
* })
* }
* ]
*/
tools: [],
};