aggroot 1.5.2 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +10 -93
- package/README.md +27 -1
- package/dist/cli.cjs +4 -0
- package/dist/index.cjs +2050 -1495
- package/dist/web-tree-sitter.wasm +0 -0
- package/package.json +9 -6
- package/scripts/build-all.mjs +42 -0
- package/scripts/obfuscate.mjs +10 -2
- package/dist/native/better_sqlite3.node +0 -0
package/.env.example
CHANGED
|
@@ -3,24 +3,23 @@
|
|
|
3
3
|
# ============================================
|
|
4
4
|
# This is a template file. Copy to .env and fill in your actual values.
|
|
5
5
|
# Never commit .env file to version control.
|
|
6
|
+
#
|
|
7
|
+
# NOTE: Non-model parameters are now configured in settings.json.
|
|
8
|
+
# Run `aggroot` once to generate ~/.aggroot/settings.json with all options.
|
|
9
|
+
# See ~/.aggroot/settings.json for shell, browser, session, security, etc. settings.
|
|
6
10
|
|
|
7
11
|
# Application Environment
|
|
8
12
|
# ----------------------
|
|
9
|
-
# Options: development, production, test
|
|
10
13
|
NODE_ENV=development
|
|
11
14
|
|
|
12
15
|
# AggRoot Home Directory (optional)
|
|
13
16
|
# ------------------------------
|
|
14
17
|
# Override the default ~/.aggroot data directory.
|
|
15
|
-
# Useful for running multiple isolated instances:
|
|
16
|
-
# AGGROOT_HOME=~/.aggroot-project-a aggroot -d /path/to/project-a
|
|
17
|
-
# AGGROOT_HOME=~/.aggroot-project-b aggroot -d /path/to/project-b
|
|
18
18
|
# Default: ~/.aggroot
|
|
19
19
|
# AGGROOT_HOME=
|
|
20
20
|
|
|
21
21
|
# Logging Configuration
|
|
22
22
|
# ---------------------
|
|
23
|
-
# Log level: debug, info, warn, error, fatal
|
|
24
23
|
LOG_LEVEL=info
|
|
25
24
|
|
|
26
25
|
# AI Provider Configuration
|
|
@@ -41,9 +40,6 @@ OPENAI_BASE_URL=https://api.openai.com/v1
|
|
|
41
40
|
HONCHO_API_KEY=your_honcho_api_key_here
|
|
42
41
|
#HONCHO_BASE_URL=https://api.honcho.dev
|
|
43
42
|
#HONCHO_WORKSPACE_ID=default
|
|
44
|
-
AGGROOT_FLAG_MEMORY_PROVIDER=honcho
|
|
45
|
-
#AGGROOT_FLAG_MEMORY_NUDGE_ENABLED=true
|
|
46
|
-
#AGGROOT_FLAG_MEMORY_NUDGE_INTERVAL=10
|
|
47
43
|
|
|
48
44
|
# ZhipuGLM API (智谱 AI)
|
|
49
45
|
ZHIPU_API_KEY=your_zhipu_api_key_here
|
|
@@ -78,91 +74,6 @@ NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1
|
|
|
78
74
|
# Examples:
|
|
79
75
|
# NVIDIA_API_KEY_Z_AI_GLM_51=nvapi-xxxx
|
|
80
76
|
# NVIDIA_API_KEY_DEEPSEEK_AI_DEEPSEEK_R1=nvapi-xxxx
|
|
81
|
-
# NVIDIA_API_KEY_META_LLAMA_3_3_70B_INSTRUCT=nvapi-xxxx
|
|
82
|
-
# NVIDIA_API_KEY_NVIDIA_LLAMA_3_1_NEMOTRON_70B_INSTRUCT=nvapi-xxxx
|
|
83
|
-
# NVIDIA_API_KEY_QWEN_QWEN25_72B_INSTRUCT=nvapi-xxxx
|
|
84
|
-
# NVIDIA_API_KEY_QWEN_QWEN25_CODER_32B_INSTRUCT=nvapi-xxxx
|
|
85
|
-
# Per-model base URLs (optional, override NVIDIA_BASE_URL)
|
|
86
|
-
# NVIDIA_BASE_URL_QWEN_QWEN25_CODER_32B_INSTRUCT=https://integrate.api.nvidia.com/v1
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
# Shell Configuration
|
|
90
|
-
# -------------------
|
|
91
|
-
# Default shell for command execution
|
|
92
|
-
# Options: auto (platform default), powershell, cmd, bash, nushell, wsl
|
|
93
|
-
# auto: uses powershell on Windows, bash on Linux/Mac
|
|
94
|
-
DEFAULT_SHELL=nushell
|
|
95
|
-
|
|
96
|
-
# Execution Timeouts
|
|
97
|
-
# ------------------
|
|
98
|
-
# Maximum execution time for shell commands (milliseconds)
|
|
99
|
-
SHELL_TIMEOUT=30000
|
|
100
|
-
|
|
101
|
-
# Maximum execution time for code execution (seconds)
|
|
102
|
-
CODE_EXECUTION_TIMEOUT=30
|
|
103
|
-
|
|
104
|
-
# Web Tools Configuration
|
|
105
|
-
# -----------------------
|
|
106
|
-
# Browser type for web automation: chromium, firefox, webkit
|
|
107
|
-
BROWSER_TYPE=chromium
|
|
108
|
-
|
|
109
|
-
# Headless mode for browser (true/false)
|
|
110
|
-
BROWSER_HEADLESS=true
|
|
111
|
-
|
|
112
|
-
# Domain Reputation Check APIs
|
|
113
|
-
# ----------------------------
|
|
114
|
-
# Google Safe Browsing API Key (https://console.cloud.google.com/apis/api/safebrowsing.googleapis.com)
|
|
115
|
-
GOOGLE_SAFE_BROWSING_API_KEY=
|
|
116
|
-
|
|
117
|
-
# VirusTotal API Key (https://www.virustotal.com/gui/my-apikey)
|
|
118
|
-
VIRUSTOTAL_API_KEY=
|
|
119
|
-
|
|
120
|
-
# PhishTank API Key (optional, https://www.phishtank.com/developer_info.php)
|
|
121
|
-
PHISHTANK_API_KEY=
|
|
122
|
-
|
|
123
|
-
# OWASP ZAP Configuration
|
|
124
|
-
# -----------------------
|
|
125
|
-
# ZAP API URL (default: http://localhost:8080)
|
|
126
|
-
ZAP_API_URL=http://localhost:8080
|
|
127
|
-
|
|
128
|
-
# ZAP API Key (if configured)
|
|
129
|
-
ZAP_API_KEY=
|
|
130
|
-
|
|
131
|
-
# Session Management
|
|
132
|
-
# ------------------
|
|
133
|
-
# Maximum session history to keep (number of messages)
|
|
134
|
-
MAX_SESSION_HISTORY=50
|
|
135
|
-
|
|
136
|
-
# Session timeout (minutes)
|
|
137
|
-
SESSION_TIMEOUT=60
|
|
138
|
-
|
|
139
|
-
# File Operations
|
|
140
|
-
# ---------------
|
|
141
|
-
# Maximum file size to read (bytes)
|
|
142
|
-
MAX_FILE_SIZE=10485760 # 10MB
|
|
143
|
-
|
|
144
|
-
# Allowed file extensions for code execution
|
|
145
|
-
ALLOWED_FILE_EXTENSIONS=.js,.ts,.py,.json,.txt,.md
|
|
146
|
-
|
|
147
|
-
# Security Settings
|
|
148
|
-
# -----------------
|
|
149
|
-
# Enable safe mode for code execution (true/false)
|
|
150
|
-
SAFE_MODE=true
|
|
151
|
-
|
|
152
|
-
NODE_OPTIONS=--max-old-space-size=4096
|
|
153
|
-
|
|
154
|
-
# List of dangerous commands to block
|
|
155
|
-
DANGEROUS_COMMANDS=rm -rf,format,del /f /q,shutdown,reboot
|
|
156
|
-
|
|
157
|
-
# Development Settings
|
|
158
|
-
# --------------------
|
|
159
|
-
# Enable debug mode for verbose output
|
|
160
|
-
DEBUG=false
|
|
161
|
-
|
|
162
|
-
AGGROOT_UI="ink-custom"
|
|
163
|
-
|
|
164
|
-
# Enable experimental features
|
|
165
|
-
EXPERIMENTAL_FEATURES=false
|
|
166
77
|
|
|
167
78
|
# Vision Service (Image Understanding)
|
|
168
79
|
# ------------------------------------
|
|
@@ -181,9 +92,15 @@ VISION_API_KEY=
|
|
|
181
92
|
# Vision model name
|
|
182
93
|
VISION_MODEL=Qwen/Qwen3-VL-8B-Instruct
|
|
183
94
|
|
|
95
|
+
# Node.js Runtime
|
|
96
|
+
# ----------------
|
|
97
|
+
NODE_OPTIONS=--max-old-space-size=4096
|
|
98
|
+
|
|
184
99
|
# ============================================
|
|
185
100
|
# Notes:
|
|
186
101
|
# 1. Copy this file to .env and fill in your actual values
|
|
187
102
|
# 2. Never commit .env file to version control
|
|
188
103
|
# 3. Required variables: DEEPSEEK_API_KEY or OPENAI_API_KEY
|
|
104
|
+
# 4. For non-model settings (shell, browser, session, etc.),
|
|
105
|
+
# edit ~/.aggroot/settings.json instead
|
|
189
106
|
# ============================================
|
package/README.md
CHANGED
|
@@ -108,10 +108,36 @@ AggRoot provides a modern terminal UI with a split-screen layout:
|
|
|
108
108
|
# Install globally via npm
|
|
109
109
|
npm install -g aggroot
|
|
110
110
|
|
|
111
|
-
# Run the assistant
|
|
111
|
+
# Run the assistant (CLI mode)
|
|
112
112
|
aggroot
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
### Web Gateway Mode
|
|
116
|
+
|
|
117
|
+
Start the web gateway server with built-in frontend:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Start gateway (serves frontend + API on port 8642)
|
|
121
|
+
aggroot gateway
|
|
122
|
+
|
|
123
|
+
# Custom port and host
|
|
124
|
+
aggroot gateway --port 8080 --host 0.0.0.0
|
|
125
|
+
|
|
126
|
+
# Disable frontend static serving (API only)
|
|
127
|
+
aggroot gateway --no-static
|
|
128
|
+
|
|
129
|
+
# Custom static directory
|
|
130
|
+
aggroot gateway --static-dir /path/to/frontend/dist
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
| Endpoint | Description |
|
|
134
|
+
|----------|-------------|
|
|
135
|
+
| `http://localhost:8642` | Web frontend (SPA) |
|
|
136
|
+
| `http://localhost:8642/health` | Health check |
|
|
137
|
+
| `http://localhost:8642/v1/chat/completions` | OpenAI-compatible chat API |
|
|
138
|
+
| `http://localhost:8642/v1/models` | Available models |
|
|
139
|
+
| `ws://localhost:8642/ws` | WebSocket chat |
|
|
140
|
+
|
|
115
141
|
## Configuration
|
|
116
142
|
|
|
117
143
|
### Environment Variables
|
package/dist/cli.cjs
CHANGED
|
@@ -16,6 +16,10 @@ if (heapLimitMB < 3500 && !process.env.AGGROOT_SPAWNED) {
|
|
|
16
16
|
stdio: 'inherit',
|
|
17
17
|
env: { ...process.env, AGGROOT_SPAWNED: '1' },
|
|
18
18
|
});
|
|
19
|
+
child.on('error', (err) => {
|
|
20
|
+
console.error('Failed to re-spawn with larger heap:', err.message);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
});
|
|
19
23
|
child.on('exit', (code) => process.exit(code ?? 0));
|
|
20
24
|
} else {
|
|
21
25
|
require('./index.cjs');
|