wolverine-ai 4.5.3 → 4.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/package.json +1 -1
- package/src/brain/brain.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wolverine-ai",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"description": "Self-healing Node.js server framework powered by AI. Catches crashes, diagnoses errors, generates fixes, verifies, and restarts — automatically.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/brain/brain.js
CHANGED
|
@@ -42,7 +42,7 @@ const SEED_DOCS = [
|
|
|
42
42
|
metadata: { topic: "backup-system" },
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
text: "Wolverine security:
|
|
45
|
+
text: "Wolverine security: multi-layer defense. (1) File sandbox — restricts reads/writes to project dir, vault paths blocked. (2) Injection detector — ~50 regex patterns scan errors BEFORE AI sees them: prompt override, role hijack, code exec, env leak, bash escape, reverse shell, data exfiltration, destructive commands, framework source writes. Blocks heal entirely on detection. (3) Bash sandbox escape — _detectSandboxEscape checks every bash_exec: blocks cd outside project, writes to absolute paths, subshell escapes, curl @file exfil, pipe to tee outside project. (4) BLOCKED_COMMANDS — 18 patterns: rm -rf, mkfs, dd, shutdown, git push --force, npm publish, curl|bash, wget|sh, curl $(), cat .env, writes to src/. (5) Secret redactor — scrubs API keys, hex keys, vault paths from all output. (6) Rate limiter — sliding window + exponential backoff. (7) Adaptive rate limiter — auto-throttles server at 70%/85% CPU/memory thresholds.",
|
|
46
46
|
metadata: { topic: "security" },
|
|
47
47
|
},
|
|
48
48
|
{
|
|
@@ -86,7 +86,7 @@ const SEED_DOCS = [
|
|
|
86
86
|
metadata: { topic: "server-best-practices" },
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
text: "Wolverine editable scope: only files inside server/ can be modified by the agent. src/, bin/, tests/, .env, package.json, node_modules/ are all protected. The agent's _isProtectedPath guard blocks
|
|
89
|
+
text: "Wolverine editable scope: only files inside server/ can be modified by the agent. src/, bin/, tests/, .env, package.json, node_modules/, .wolverine/vault/ are all protected. The agent's _isProtectedPath guard blocks write_file/edit_file/move_file to protected paths. bash_exec additionally runs through _detectSandboxEscape which blocks shell commands that write outside the project via redirection, cp, mv, tee, or subshell. Vault files (master.key, eth.vault) are blocked by both sandbox and _isProtectedPath.",
|
|
90
90
|
metadata: { topic: "editable-scope" },
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -110,7 +110,7 @@ const SEED_DOCS = [
|
|
|
110
110
|
metadata: { topic: "sub-agent-workflow" },
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
text: "Sub-agent tool restrictions: explore gets read_file/glob/grep/git_log/git_diff/list_dir/check_env/check_port/check_memory/check_network/list_processes/inspect_db/audit_deps. plan gets read_file/glob/grep/list_dir/inspect_db/check_env/inspect_env/audit_deps/check_migration. fix gets read_file/write_file/edit_file/glob/grep/bash_exec/move_file/run_db_fix/audit_deps/restart_service. verify gets read_file/glob/grep/bash_exec/inspect_db/check_port/check_memory/check_logs. research gets read_file/grep/web_fetch/check_logs. security gets read_file/glob/grep/inspect_db/inspect_env. database gets read_file/write_file/edit_file/glob/grep/bash_exec/inspect_db/run_db_fix.
|
|
113
|
+
text: "Sub-agent tool restrictions: explore gets read_file/glob/grep/git_log/git_diff/list_dir/check_env/check_port/check_memory/check_network/list_processes/inspect_db/audit_deps/check_file_descriptors/inspect_cache. plan gets read_file/glob/grep/list_dir/inspect_db/check_env/inspect_env/audit_deps/check_migration/check_event_loop. fix gets read_file/write_file/edit_file/glob/grep/bash_exec/move_file/run_db_fix/audit_deps/restart_service/verify_node_modules/disk_cleanup. verify gets read_file/glob/grep/bash_exec/inspect_db/check_port/check_memory/check_logs/check_websocket/inspect_certificate. research gets read_file/grep/web_fetch/check_logs. security gets read_file/glob/grep/inspect_db/inspect_env/check_event_loop/inspect_certificate. database gets read_file/write_file/edit_file/glob/grep/bash_exec/inspect_db/run_db_fix/inspect_cache. 31 tools total across 9 categories.",
|
|
114
114
|
metadata: { topic: "sub-agent-tools" },
|
|
115
115
|
},
|
|
116
116
|
{
|
|
@@ -226,11 +226,11 @@ const SEED_DOCS = [
|
|
|
226
226
|
metadata: { topic: "error-monitor" },
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
|
-
text: "Agent tool details: read_file
|
|
229
|
+
text: "Agent tool details — FILE: read_file (offset/limit for large files), edit_file (surgical find-and-replace, single match), glob_files (pattern discovery, **/*.js), grep_code (regex search with context, sandbox-enforced reads), list_dir (directory listing with sizes, sandbox-checked), move_file (relocate/rename). SHELL: bash_exec (30s default, 60s cap, 18 blocked command patterns, sandbox escape detection for writes outside project, SSRF-protected). DATABASE: inspect_db (SQLite: tables/schema/query, no stacked queries via ; block), run_db_fix (auto-snapshots before/after, existence check before backup). DIAGNOSTICS: check_port (platform-aware, netstat/lsof), check_env (values redacted, secrets always show SET only), check_memory (RSS/heap/system, OOM warning), list_processes (platform-aware node processes), check_logs (journalctl/logfile with grep filter, capped 1-1000 lines), check_network (DNS/port/URL with sanitized inputs), inspect_env (names only, grouped by category). SERVER: restart_service (flag-file, not direct restart). DEPS: audit_deps (npm health score), check_migration (known upgrade paths). RESEARCH: web_fetch (SSRF blocklist for private IPs/metadata). ADVANCED: verify_node_modules (integrity vs package-lock, broken .bin, cross-platform), inspect_certificate (TLS connect, expiry/SAN/chain/self-signed), inspect_cache (Redis PING/INFO via raw TCP), disk_cleanup (safe targets: old backups + npm cache, dry-run default), check_file_descriptors (Linux /proc/fd count vs ulimit), check_event_loop (static scan for readFileSync/execSync/pbkdf2Sync patterns), check_websocket (real WS upgrade handshake test).",
|
|
230
230
|
metadata: { topic: "agent-tools-detail" },
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
|
-
text: "Server problem categories the agent can fix: CODE BUGS (SyntaxError
|
|
233
|
+
text: "Server problem categories the agent can fix: CODE BUGS (SyntaxError/TypeError/ReferenceError → edit_file). DEPENDENCIES (Cannot find module → npm install, corrupted node_modules → verify_node_modules then rm + reinstall). DATABASE (invalid entries → inspect_db then run_db_fix, schema issues → ALTER TABLE, pool exhaustion → inspect_cache for Redis). CONFIG (invalid JSON → edit_file, missing env vars → inspect_env to check then write .env, wrong port → edit config). FILESYSTEM (misplaced files → move_file, missing dirs → bash_exec mkdir, EACCES → chmod, ENOSPC → disk_cleanup). NETWORK (port conflict → check_port + kill, ECONNREFUSED → check_network for DNS/connectivity, Redis down → inspect_cache). SSL/TLS (CERT_EXPIRED → inspect_certificate for details, self-signed → check chain). MEMORY (OOM/SIGKILL → check_memory for pressure, EMFILE → check_file_descriptors, event loop block → check_event_loop scan). WEBSOCKET (1006/disconnect → check_websocket handshake test). STATE (corrupted cache → delete + restart_service, stale locks → remove lock file). The agent investigates before fixing — reads files, checks diagnostics, inspects databases, never guesses.",
|
|
234
234
|
metadata: { topic: "server-problems" },
|
|
235
235
|
},
|
|
236
236
|
{
|