wolverine-ai 2.1.1 → 2.2.0
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 +19 -8
- package/package.json +1 -1
- package/src/brain/brain.js +7 -7
package/README.md
CHANGED
|
@@ -290,16 +290,26 @@ Secured with `WOLVERINE_ADMIN_KEY` + IP allowlist (localhost + `WOLVERINE_ADMIN_
|
|
|
290
290
|
|
|
291
291
|
## 10-Model Configuration (OpenAI + Anthropic)
|
|
292
292
|
|
|
293
|
-
Every AI task has its own model slot.
|
|
293
|
+
Every AI task has its own model slot. Three provider presets in `server/config/settings.json`:
|
|
294
294
|
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"provider": "hybrid", // "openai" | "anthropic" | "hybrid"
|
|
298
|
+
"openai_settings": { ... }, // all OpenAI models
|
|
299
|
+
"anthropic_settings": { ... }, // all Anthropic models
|
|
300
|
+
"hybrid_settings": { // best of both
|
|
301
|
+
"reasoning": "claude-sonnet-4-6",
|
|
302
|
+
"coding": "claude-opus-4-6",
|
|
303
|
+
"tool": "claude-opus-4-6",
|
|
304
|
+
"chat": "claude-haiku-4-5",
|
|
305
|
+
"audit": "gpt-4o-mini", // cheap OpenAI for bulk scans
|
|
306
|
+
"embedding": "text-embedding-3-small" // always OpenAI
|
|
307
|
+
}
|
|
308
|
+
}
|
|
301
309
|
```
|
|
302
310
|
|
|
311
|
+
Change one line to switch all models: `"provider": "anthropic"`. Or override per-role with env vars.
|
|
312
|
+
|
|
303
313
|
| Env Variable | Role | Needs Tools? | Example Models |
|
|
304
314
|
|---|---|---|---|
|
|
305
315
|
| `REASONING_MODEL` | Multi-file agent | Yes | `claude-sonnet-4`, `gpt-5.4` |
|
|
@@ -315,7 +325,8 @@ AUDIT_MODEL=claude-haiku-4-20250414
|
|
|
315
325
|
**Notes:**
|
|
316
326
|
- Embeddings always use OpenAI (Anthropic doesn't have an embedding API)
|
|
317
327
|
- Tools (all 18) work identically on both providers — normalized at the client level
|
|
318
|
-
- Telemetry tracks
|
|
328
|
+
- Telemetry tracks per-model KPIs: latency, success rate, tokens/sec, cost/call
|
|
329
|
+
- Usage aggregated by model, category, tool, AND provider (`openai` / `anthropic`)
|
|
319
330
|
- Any future model from either provider works automatically — just set the model name
|
|
320
331
|
|
|
321
332
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wolverine-ai",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
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
|
@@ -64,11 +64,11 @@ const SEED_DOCS = [
|
|
|
64
64
|
metadata: { topic: "verification" },
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
text: "Wolverine multi-file agent: 15-turn agent loop with tools.
|
|
67
|
+
text: "Wolverine multi-file agent: 15-turn agent loop with 18 tools across 7 categories. FILE: read_file (offset/limit), write_file (creates dirs), edit_file (find-and-replace), glob_files (pattern search), grep_code (regex with context), list_dir (directory listing with sizes), move_file (rename/relocate). SHELL: bash_exec (30s default, 60s cap), git_log, git_diff. DATABASE: inspect_db (tables/schema/SELECT on SQLite), run_db_fix (UPDATE/DELETE/ALTER with auto-backup). DIAGNOSTICS: check_port (find what uses a port), check_env (env vars, values redacted). DEPS: audit_deps (full npm health check), check_migration (known upgrade paths). RESEARCH: web_fetch. CONTROL: done. Used when fast path fails. Token budget 50k max.",
|
|
68
68
|
metadata: { topic: "agent" },
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
text: "Wolverine supports
|
|
71
|
+
text: "Wolverine supports dual providers: OpenAI (Chat Completions + Responses API) and Anthropic (Messages API). Provider auto-detected from model name: claude-* → Anthropic, gpt-*/o1-*/codex → OpenAI. All responses normalized to same {content, toolCalls, usage} shape — downstream code doesn't know which provider was used. Tool definitions auto-converted between formats. Every call tracked with latencyMs, success/failure, input/output tokens. Three provider modes in settings.json: openai_settings, anthropic_settings, hybrid_settings (Anthropic for heavy tasks, OpenAI for cheap tasks + embeddings).",
|
|
72
72
|
metadata: { topic: "api-support" },
|
|
73
73
|
},
|
|
74
74
|
{
|
|
@@ -108,7 +108,7 @@ const SEED_DOCS = [
|
|
|
108
108
|
metadata: { topic: "sub-agent-workflow" },
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
text: "Sub-agent tool restrictions
|
|
111
|
+
text: "Sub-agent tool restrictions: explore gets read_file/glob/grep/git_log/git_diff/list_dir/check_env/check_port/inspect_db/audit_deps. plan gets read_file/glob/grep/list_dir/inspect_db/check_env/audit_deps/check_migration/search_brain. fix gets read_file/write_file/edit_file/glob/grep/bash_exec/move_file/run_db_fix/audit_deps. verify gets read_file/glob/grep/bash_exec/inspect_db/check_port. research gets read_file/grep/web_fetch/search_brain. security gets read_file/glob/grep/inspect_db. database gets read_file/write_file/edit_file/glob/grep/bash_exec/inspect_db/run_db_fix. Each type gets only the tools it needs.",
|
|
112
112
|
metadata: { topic: "sub-agent-tools" },
|
|
113
113
|
},
|
|
114
114
|
{
|
|
@@ -160,7 +160,7 @@ const SEED_DOCS = [
|
|
|
160
160
|
metadata: { topic: "smart-edit" },
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
|
-
text: "Token tracking: every AI call tracked with input/output tokens
|
|
163
|
+
text: "Token tracking: every AI call tracked with input/output tokens, USD cost, latencyMs, and success/failure. Per-model KPIs: avgLatencyMs, minLatencyMs, maxLatencyMs, tokensPerSecond, successRate, costPerCall, successes, failures. Aggregated by model, by category, by tool, by provider (openai/anthropic). Persisted to .wolverine/usage.json + .wolverine/usage-history.jsonl. Pricing includes both OpenAI (gpt-5.x, o4, codex) and Anthropic (opus-4, sonnet-4, haiku-4) families. Customizable via .wolverine/pricing.json. Telemetry sends all per-model performance data to platform backend for fleet-wide cost:speed:reliability analysis.",
|
|
164
164
|
metadata: { topic: "token-tracking" },
|
|
165
165
|
},
|
|
166
166
|
{
|
|
@@ -184,7 +184,7 @@ const SEED_DOCS = [
|
|
|
184
184
|
metadata: { topic: "demos" },
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
|
-
text: "10 configurable
|
|
187
|
+
text: "10 model slots configurable per provider. settings.json has 3 presets: openai_settings, anthropic_settings, hybrid_settings. Set 'provider' to switch all at once. Slots: REASONING_MODEL (agent), CODING_MODEL (repair), CHAT_MODEL (text), TOOL_MODEL (function calling), CLASSIFIER_MODEL (routing), AUDIT_MODEL (injection), COMPACTING_MODEL (brain), RESEARCH_MODEL (deep research), TEXT_EMBEDDING_MODEL (vectors, always OpenAI). Hybrid mode uses Anthropic for heavy tasks (reasoning/coding/tool/research) and OpenAI for cheap tasks (audit/compacting/embedding). Every call tracked per-model with latencyMs, successRate, tokensPerSecond, costPerCall for performance comparison.",
|
|
188
188
|
metadata: { topic: "model-slots" },
|
|
189
189
|
},
|
|
190
190
|
{
|
|
@@ -216,8 +216,8 @@ const SEED_DOCS = [
|
|
|
216
216
|
metadata: { topic: "error-monitor" },
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
|
-
text: "Agent tool
|
|
220
|
-
metadata: { topic: "agent-tools-
|
|
219
|
+
text: "Agent tool details: read_file supports offset/limit for large files. edit_file does surgical find-and-replace (preferred for small fixes). glob_files discovers files by pattern (**/*.js). grep_code does regex search with context lines. list_dir shows directory contents with file sizes. move_file relocates/renames files. bash_exec runs shell commands (30s default timeout, 60s hard cap, dangerous commands blocked: rm -rf /, git push --force, npm publish). inspect_db reads SQLite: action=tables (list), action=schema (CREATE statements), action=query (SELECT/PRAGMA only). run_db_fix writes SQLite: UPDATE/DELETE/INSERT/ALTER, auto-backs up db file first. check_port finds what process is using a port (netstat/lsof). check_env lists environment variables with values redacted. audit_deps runs full npm health check (vulnerabilities, outdated, peer deps, unused, lock file). check_migration returns known upgrade paths with before/after code patterns. web_fetch retrieves URL content.",
|
|
220
|
+
metadata: { topic: "agent-tools-detail" },
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
text: "Server problem categories the agent can fix: CODE BUGS (SyntaxError, TypeError, ReferenceError → edit_file), DEPENDENCIES (Cannot find module → npm install, corrupted node_modules → rm + reinstall), DATABASE (invalid entries → run_db_fix UPDATE, missing table → CREATE TABLE, schema mismatch → ALTER TABLE, constraint violation → fix data or schema), CONFIG (invalid JSON → edit_file, missing env vars → write .env, wrong port → edit config), FILESYSTEM (misplaced files → move_file, missing directories → bash_exec mkdir, wrong permissions → chmod), NETWORK (port conflict → check_port + kill, service down → restart, connection refused → check config), STATE (corrupted cache → delete + restart, stale locks → remove lock file, git conflicts → resolve markers), IDEMPOTENCY (double-fire → add idempotencyGuard middleware, missing idempotency key → add X-Idempotency-Key header support, duplicate DB entries → add UNIQUE constraint or use db.idempotent()). The agent investigates before fixing — reads files, checks directories, inspects databases, never guesses.",
|