wolverine-ai 6.1.0 → 6.1.1
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/README.md +55 -5
- package/package.json +1 -1
- package/src/brain/brain.js +4 -0
package/README.md
CHANGED
|
@@ -1307,12 +1307,62 @@ Wolverine minimizes AI spend through 7 techniques:
|
|
|
1307
1307
|
|
|
1308
1308
|
## Configuration
|
|
1309
1309
|
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1310
|
+
All settings are in `server/config/settings.json`. Each section has a `_` prefixed description field.
|
|
1311
|
+
|
|
1312
|
+
### Settings Reference
|
|
1313
|
+
|
|
1314
|
+
| Section | Key | Default | Description |
|
|
1315
|
+
|---------|-----|---------|-------------|
|
|
1316
|
+
| **models** | reasoning, coding, chat, tool, classifier, audit, compacting, research | `claude-sonnet-4-6` | AI model per task. Provider auto-detected from name. |
|
|
1317
|
+
| **embedding** | — | `text-embedding-3-small` | Vector embedding model for brain memory. |
|
|
1318
|
+
| **server** | port | `3000` | Server listen port. |
|
|
1319
|
+
| | maxRetries | `3` | Consecutive crashes before giving up. |
|
|
1320
|
+
| | maxMemoryMB | `512` | OOM kill threshold. |
|
|
1321
|
+
| **heal** | healTimeoutMs | `300000` (5 min) | Max time for entire heal attempt. |
|
|
1322
|
+
| | globalMaxHeals | `5` | Max heals across all errors per window. |
|
|
1323
|
+
| | globalWindowMs | `300000` (5 min) | Window for global heal rate limit. |
|
|
1324
|
+
| | loopMaxAttempts | `3` | Same-error failures before stop + bug report. |
|
|
1325
|
+
| | loopWindowMs | `600000` (10 min) | Window for loop guard. |
|
|
1326
|
+
| **agent** | aiCallTimeoutMs | `90000` (90 sec) | Timeout per AI API call. |
|
|
1327
|
+
| | maxTurns | `8` | Agent tool-use iterations per heal. |
|
|
1328
|
+
| | tokenBudget.simple | `20000` | Token budget for simple errors. |
|
|
1329
|
+
| | tokenBudget.moderate | `50000` | Token budget for moderate errors. |
|
|
1330
|
+
| | tokenBudget.complex | `100000` | Token budget for complex errors. |
|
|
1331
|
+
| **rateLimiting** | maxCallsPerWindow | `32` | AI calls allowed per window. |
|
|
1332
|
+
| | windowMs | `100000` | Rate limit window. |
|
|
1333
|
+
| | minGapMs | `5000` | Min delay between AI calls. |
|
|
1334
|
+
| | maxTokensPerHour | `1000000` | Hard token ceiling. |
|
|
1335
|
+
| **healthCheck** | intervalMs | `15000` (15 sec) | Health probe frequency. |
|
|
1336
|
+
| | timeoutMs | `5000` | Timeout per probe. |
|
|
1337
|
+
| | failThreshold | `3` | Consecutive failures before heal. |
|
|
1338
|
+
| | startDelayMs | `10000` | Grace period after boot. |
|
|
1339
|
+
| **errorMonitor** | defaultThreshold | `1` | 500 errors before triggering heal. |
|
|
1340
|
+
| | windowMs | `30000` | Error counting window. |
|
|
1341
|
+
| | cooldownMs | `60000` | Min time between heals on same route. |
|
|
1342
|
+
| **adaptiveLimiter** | thresholdYellow | `70` | CPU/memory % to start shedding 30% of requests. |
|
|
1343
|
+
| | thresholdRed | `85` | CPU/memory % to reject all non-essential requests. |
|
|
1344
|
+
| | reserveMB | `200` | Memory reserved for heal tools. |
|
|
1345
|
+
| **backup** | stabilityMs | `1800000` (30 min) | Time before backup marked STABLE. |
|
|
1346
|
+
| | retentionDays | `7` | Auto-delete old backups. |
|
|
1347
|
+
| | maxFileSizeMB | `10` | Skip files larger than this. |
|
|
1348
|
+
| **autoUpdate** | enabled | `false` | Auto-update framework from git. |
|
|
1349
|
+
| | intervalMs | `300000` (5 min) | Update check frequency. |
|
|
1350
|
+
| **telemetry** | enabled | `true` | Send heartbeats to dashboard. |
|
|
1351
|
+
| | heartbeatIntervalMs | `60000` (1 min) | Heartbeat frequency. |
|
|
1352
|
+
|
|
1353
|
+
All values accept environment variable overrides (e.g., `WOLVERINE_HEAL_TIMEOUT_MS=600000`).
|
|
1354
|
+
|
|
1355
|
+
### Secrets
|
|
1356
|
+
|
|
1357
|
+
Secrets go in `.env.local` (never committed):
|
|
1314
1358
|
|
|
1315
|
-
|
|
1359
|
+
```bash
|
|
1360
|
+
OPENAI_API_KEY= # Required for OpenAI models
|
|
1361
|
+
ANTHROPIC_API_KEY= # Required for Claude models
|
|
1362
|
+
WOLVERINE_ADMIN_KEY= # Dashboard agent command interface
|
|
1363
|
+
CDP_API_KEY_ID= # x402 payments (free at cdp.coinbase.com)
|
|
1364
|
+
CDP_API_KEY_SECRET= # x402 payments
|
|
1365
|
+
```
|
|
1316
1366
|
|
|
1317
1367
|
---
|
|
1318
1368
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wolverine-ai",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
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
|
@@ -201,6 +201,10 @@ const SEED_DOCS = [
|
|
|
201
201
|
text: "x402 troubleshooting — common issues and fixes. (1) 'Unauthorized' from CDP facilitator: the @coinbase/x402 package handles JWT auth internally using CDP_API_KEY_ID + CDP_API_KEY_SECRET from env vars — do NOT set a facilitator URL in settings.json. (2) '400 Bad Request': payload format mismatch — v2 uses x402Version:2, network:'eip155:8453', amount (not maxAmountRequired). Parse base64 JSON directly, don't use decodePayment(). (3) 'invalid_exact_evm_payload_signature': EIP-712 signature wrong — check domain (name:'USD Coin', version:'2', chainId:8453, verifyingContract:USDC). (4) USDC not moving: old middleware only verified without settling — must use x402ResourceServer.verifyPayment() + settlePayment() which goes through the CDP facilitator. (5) Frontend value as hex (0xf4240): must use decimal strings ('1000000'). (6) ESM errors: @coinbase/x402 needs Node 22+. (7) Packages disappearing after --update: they're in package.json dependencies + auto-installed on startup when vault exists. (8) Credits granted before settlement: verify+settle must both be in preHandler, not onSend. (9) v2 auth trick: pass @coinbase/x402's facilitator config to @x402/core HTTPFacilitatorClient — this gives v2 protocol with CDP auth that actually works.",
|
|
202
202
|
metadata: { topic: "x402-troubleshooting" },
|
|
203
203
|
},
|
|
204
|
+
{
|
|
205
|
+
text: "settings.json configuration — all wolverine behavior is configurable in server/config/settings.json. Sections: (1) models: 8 task-specific AI model slots (reasoning, coding, chat, tool, classifier, audit, compacting, research). Provider auto-detected from model name. (2) embedding: vector embedding model for brain. (3) server: port, maxRetries, maxMemoryMB. (4) heal: healTimeoutMs (default 300000/5min), globalMaxHeals (5 heals per globalWindowMs 300000/5min — prevents runaway costs), loopMaxAttempts (3 failed heals on same error in loopWindowMs 600000/10min = stop + bug report). (5) agent: aiCallTimeoutMs (90000/90s per AI call), maxTurns (8 agent iterations per heal), tokenBudget by complexity (simple: 20000, moderate: 50000, complex: 100000). (6) rateLimiting: maxCallsPerWindow (32), windowMs, minGapMs (5000), maxTokensPerHour (1000000). (7) healthCheck: intervalMs (15000), timeoutMs (5000), failThreshold (3), startDelayMs (10000). (8) errorMonitor: defaultThreshold (1 = single 500 triggers heal), windowMs (30000), cooldownMs (60000). (9) adaptiveLimiter: thresholdYellow (70% CPU/mem = start shedding 30% requests), thresholdRed (85% = reject all non-essential), reserveMB (200MB reserved for heal tools). (10) backup: stabilityMs (1800000/30min before STABLE), retentionDays (7), maxFileSizeMB (10). (11) autoUpdate: enabled, intervalMs. (12) telemetry: enabled, heartbeatIntervalMs. All values accept env var overrides (e.g. WOLVERINE_HEAL_TIMEOUT_MS). Description fields prefixed with _ explain each section inline.",
|
|
206
|
+
metadata: { topic: "configuration" },
|
|
207
|
+
},
|
|
204
208
|
{
|
|
205
209
|
text: "MCP integration: connect external tools via Model Context Protocol. Configure in .wolverine/mcp.json with per-server tool allowlists. Security: arg sanitization (secrets redacted before sending to MCP servers), result injection scanning, rate limiting per server, audit logging. Tools appear as mcp__server__tool in the agent. Supports stdio and HTTP transports.",
|
|
206
210
|
metadata: { topic: "mcp" },
|