vibeostheog 0.22.25 โ 0.23.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 +15 -8
- package/package.json +1 -1
- package/src/lib/hooks/footer.js +14 -25
- package/src/lib/pricing.js +14 -0
- package/src/lib/state.js +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# vibeOS for OpenCode
|
|
2
2
|
|
|
3
|
-
Cost-aware control plane for OpenCode Desktop.
|
|
3
|
+
Cost-aware control plane for OpenCode Desktop.
|
|
4
|
+
|
|
5
|
+
> ## v0.23.0 โ Disintegration Milestone
|
|
6
|
+
> Compact footer format: `๐ฆ brain | Deepseek | V4 Pro | $12.57 | VibeMaX โก Budget`
|
|
7
|
+
> VibeMaX is now the default optimization mode. Model display names cleaned up (V4 Pro, Sonnet, 2.5 Flash).
|
|
8
|
+
> Install: `npx vibeostheog setup --project` or `npx vibeostheog setup`
|
|
9
|
+
Keeps expensive models on strategy, routes implementation to cheaper tiers, surfaces savings in real time.
|
|
4
10
|
|
|
5
11
|
For teams, vibeOS adds practical guardrails: delegation enforcement, flow and TDD controls, pattern learning, stress-aware routing, VibeBoX decision tracking, reporting, and remote API protection for the core algorithms.
|
|
6
12
|
|
|
@@ -51,7 +57,7 @@ Benchmarked on the DeepSeek v4 family. Prices based on 700 input + 300 output to
|
|
|
51
57
|
|
|
52
58
|
**Raw Brain** โ v4 Pro (no framework). Baseline for all comparisons. 100% quality at 1.00x cost.
|
|
53
59
|
|
|
54
|
-
**VibeMaX (ML-Optimized, Default)** โ Intelligent cost-quality sweet spot. Routes through v4 Flash (medium) and uses a random forest classifier (29 trees, gini-split, trained on telemetry) to decide each turn. Classifies on 11 derived features: message length, code block density, urgency, complexity, repetition, question ratio, and more. Benchmarked at ~75% of Brain quality at 18% of cost.
|
|
60
|
+
**VibeMaX (ML-Optimized, v0.23 Default)** โ Intelligent cost-quality sweet spot. Routes through v4 Flash (medium) and uses a random forest classifier (29 trees, gini-split, trained on telemetry) to decide each turn. Classifies on 11 derived features: message length, code block density, urgency, complexity, repetition, question ratio, and more. Benchmarked at ~75% of Brain quality at 18% of cost.
|
|
55
61
|
|
|
56
62
|
**Budget** โ DeepSeek Chat. Direct routing. ~40% quality at 0.00x cost. 100% savings.
|
|
57
63
|
|
|
@@ -92,7 +98,7 @@ Benchmarked on 1000 simulated questions across 20 runs, using model accuracies f
|
|
|
92
98
|
| Feature | What it does |
|
|
93
99
|
|---------|-------------|
|
|
94
100
|
| **Delegation enforcement** | Blocks write/edit on brain tier. Routes to medium or cheap. |
|
|
95
|
-
| **Live savings footer** |
|
|
101
|
+
| **Live savings footer** | Compact format: tier icon, provider, short model name, total savings, VibeBrand + mode. |
|
|
96
102
|
| **Web dashboard** | SolidJS SPA with SSE real-time push. Model split, savings, session history, trinity controls. |
|
|
97
103
|
| **Trinity runtime** | Switch tiers mid-session. Change optimization mode. Flow/TDD/enforcement toggles. |
|
|
98
104
|
| **Flow enforcer** | Pattern-rule checks on write/edit. Extracts TODO/FIXME into append-only queue. |
|
|
@@ -147,8 +153,9 @@ To use **MagicCoder:7b** or other local models with vibeOS and OpenCode Desktop:
|
|
|
147
153
|
## Install
|
|
148
154
|
|
|
149
155
|
```bash
|
|
150
|
-
npx vibeostheog setup --project
|
|
151
|
-
npx vibeostheog setup
|
|
156
|
+
npx vibeostheog setup --project # per-project
|
|
157
|
+
npx vibeostheog setup # global ~/.config/opencode/
|
|
158
|
+
npx vibeostheog setup --help # full usage
|
|
152
159
|
```
|
|
153
160
|
|
|
154
161
|
One-command setup: deploys plugin files and registers in opencode.json. Restart OpenCode Desktop.
|
|
@@ -193,10 +200,10 @@ Local dev checkout:
|
|
|
193
200
|
## Live Footer
|
|
194
201
|
|
|
195
202
|
```
|
|
196
|
-
โ
|
|
203
|
+
โ ๐ฆ brain | Deepseek | V4 Pro | $12.57 | VibeMaX โก Budget
|
|
197
204
|
```
|
|
198
205
|
|
|
199
|
-
|
|
206
|
+
Tier icon + lowercase quality (๐ฆ brain / โ medium / โก cheap), provider label, cleaned model name, total savings, VibeBrand + flash icon + mode. Persisted in ~/.claude/delegation-state.json.
|
|
200
207
|
|
|
201
208
|
## Architecture
|
|
202
209
|
|
|
@@ -237,7 +244,7 @@ Regime -> mode mapping via syncControlSettings():
|
|
|
237
244
|
|
|
238
245
|
| Regime | Mode | Enforce | Flow | TDD | Tier | Think |
|
|
239
246
|
|--------|------|---------|------|-----|------|-------|
|
|
240
|
-
| INIT / DIVERGENT / EXPLORING / REFINING |
|
|
247
|
+
| INIT / DIVERGENT / EXPLORING / REFINING | vibemax (default) | relaxed | audit | lazy | cheap | off |
|
|
241
248
|
| CONVERGING / CLOSED | quality | strict | strict | quality | brain | full |
|
|
242
249
|
| LOOPING | speed | relaxed | audit | lazy | medium | off |
|
|
243
250
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Cost-aware delegation enforcer for OpenCode. Tracks model usage, routes Task subagents to cheaper tiers, surfaces cumulative savings in chat. Includes research audit, reporting framework, project memory, progressive scratchpad decadence, and trinity CLI for brain/medium/cheap slot switching.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"release": "node scripts/release.mjs",
|
package/src/lib/hooks/footer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { readFileSync, appendFileSync, mkdirSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { classify, _refreshModel, readConfig, resolveDisplayModelId, TRINITY_BRAIN, TRINITY_MEDIUM, TRINITY_CHEAP, shortModelName, roundUsd, formatUsd, resolveExecutionIdentity,
|
|
4
|
+
import { classify, _refreshModel, readConfig, resolveDisplayModelId, TRINITY_BRAIN, TRINITY_MEDIUM, TRINITY_CHEAP, shortModelName, roundUsd, formatUsd, resolveExecutionIdentity, modelDisplayName } from "../pricing.js";
|
|
5
5
|
import { latestUserIntent } from "./chat-transform.js";
|
|
6
6
|
import { scoreStress, resolveEnforcementMode, detectOutcomeSignal, getBlackboxTracker, syncOutcomeToApi, loadOptimizationMode, classifyTurnSimple } from "../turn-classify.js";
|
|
7
7
|
import { peekBudgetFirstMode, recordBudgetFirstOutcome } from "../mode-policy.js";
|
|
@@ -23,15 +23,15 @@ let _cachedAutoMode = null;
|
|
|
23
23
|
let _cachedAutoModeTs = 0;
|
|
24
24
|
const AUTO_CACHE_TTL = 60000;
|
|
25
25
|
const DEFAULT_REGIME_MAP = {
|
|
26
|
-
LOOPING: "
|
|
27
|
-
EXPLORING: "
|
|
28
|
-
REFINING: "
|
|
26
|
+
LOOPING: "vibemax", DIVERGENT: "vibemax",
|
|
27
|
+
EXPLORING: "vibemax", INIT: "vibemax",
|
|
28
|
+
REFINING: "vibemax",
|
|
29
29
|
CONVERGING: "quality", CLOSED: "quality",
|
|
30
30
|
};
|
|
31
31
|
function regimeToMode(regime, stress) {
|
|
32
32
|
if (stress > 1.5)
|
|
33
33
|
return "quality";
|
|
34
|
-
return DEFAULT_REGIME_MAP[regime] || "
|
|
34
|
+
return DEFAULT_REGIME_MAP[regime] || "vibemax";
|
|
35
35
|
}
|
|
36
36
|
async function apiAutoSelectMode(regime, stress) {
|
|
37
37
|
const now = Date.now();
|
|
@@ -269,7 +269,6 @@ async function _appendFooter(input, output, directory) {
|
|
|
269
269
|
enfSuffixFooter = ` QA:${Math.round(quality_avg)}% ${enfTagsFooter.join(" ")}`;
|
|
270
270
|
}
|
|
271
271
|
// Optimization mode resolver โ keep the dopamine footer format.
|
|
272
|
-
const flashIcon = isApiConnected() ? "โก" : "";
|
|
273
272
|
const resolvedMode = peekBudgetFirstMode({
|
|
274
273
|
requestedMode: optModeFooter,
|
|
275
274
|
subRegime: _latestBlackboxState?.sub_regime || classifyTurnSimple(latestUserIntent || ""),
|
|
@@ -279,28 +278,18 @@ async function _appendFooter(input, output, directory) {
|
|
|
279
278
|
if (stripped !== text)
|
|
280
279
|
return;
|
|
281
280
|
const ltTotal = ltTasks + ltCache;
|
|
281
|
+
const modeCapitalized = (mode) => mode.charAt(0).toUpperCase() + mode.slice(1);
|
|
282
282
|
const optMode = (resolvedMode || "budget").toLowerCase();
|
|
283
|
-
const
|
|
284
|
-
|
|
283
|
+
const vibeBrand = optMode === "vibemax" ? "VibeMaX" : optMode === "vibeultrax" ? "VibeUltraX" : optMode === "quality" ? "VibeQMaX" : "VibeMaX";
|
|
284
|
+
const modeLabel = modeCapitalized(optMode);
|
|
285
|
+
const qualityIcon = execution.quality === "brain" ? "๐ง " : execution.quality === "medium" ? "โ" : "โก";
|
|
286
|
+
const flashIcon = isApiConnected() ? " โก" : "";
|
|
287
|
+
let vibeLine = `โ ${qualityIcon} ${execution.quality} | ${execution.provider_label} | ${modelDisplayName(execution.model)}`;
|
|
285
288
|
if (ltTotal > 0) {
|
|
286
|
-
vibeLine += ` | $${formatUsd(ltTotal)}
|
|
289
|
+
vibeLine += ` | $${formatUsd(ltTotal)}`;
|
|
287
290
|
}
|
|
288
|
-
if (
|
|
289
|
-
vibeLine += ` |
|
|
290
|
-
}
|
|
291
|
-
if (stableStreak > 0) {
|
|
292
|
-
vibeLine += ` | streak ${stableStreak}`;
|
|
293
|
-
}
|
|
294
|
-
else if (problemStreak > 0) {
|
|
295
|
-
vibeLine += ` | recovery ${problemStreak}`;
|
|
296
|
-
}
|
|
297
|
-
if (modeLabel)
|
|
298
|
-
vibeLine += ` | ${formatQualityName(modeLabel)}`;
|
|
299
|
-
vibeLine += enfSuffixFooter;
|
|
300
|
-
vibeLine += ` | VIBE${flashIcon ? " โก" : ""}`;
|
|
301
|
-
if (_footerStress > 0.4) {
|
|
302
|
-
const stressLabel = _footerStress > 0.7 ? "high" : "elevated";
|
|
303
|
-
vibeLine += ` ยท ${stressLabel}`;
|
|
291
|
+
if (isApiConnected()) {
|
|
292
|
+
vibeLine += ` | ${vibeBrand}${flashIcon} ${modeLabel}`;
|
|
304
293
|
}
|
|
305
294
|
const footerText = stripped + `\n\n${vibeLine} โ`;
|
|
306
295
|
if (_blackboxEnabled) {
|
package/src/lib/pricing.js
CHANGED
|
@@ -255,6 +255,17 @@ export function shortModelName(modelId) {
|
|
|
255
255
|
const parts = raw.split("/");
|
|
256
256
|
return parts[parts.length - 1] || raw;
|
|
257
257
|
}
|
|
258
|
+
const MODEL_DISPLAY_PREFIXES = /^(deepseek|claude|gemini|gpt|davinci|llama|qwq|qwen)-/i;
|
|
259
|
+
export function modelDisplayName(modelId) {
|
|
260
|
+
const short = shortModelName(modelId);
|
|
261
|
+
const cleaned = short.replace(MODEL_DISPLAY_PREFIXES, "");
|
|
262
|
+
if (!cleaned)
|
|
263
|
+
return short;
|
|
264
|
+
return cleaned
|
|
265
|
+
.split(/[-_]/)
|
|
266
|
+
.map(w => w.charAt(0).toUpperCase() + w.slice(1))
|
|
267
|
+
.join(" ");
|
|
268
|
+
}
|
|
258
269
|
export function trendDisplay(sesTrend) {
|
|
259
270
|
const t = sesTrend === "up" || sesTrend === "down" ? sesTrend : "stable";
|
|
260
271
|
const icon = t === "up" ? "โ" : t === "down" ? "โ" : "โ";
|
|
@@ -1001,6 +1012,9 @@ export function loadTrinitySlotsFromTiersFile() {
|
|
|
1001
1012
|
// Refresh currentModel/currentTier from disk config.
|
|
1002
1013
|
// Called per-hook so trinity slot changes take effect without restart.
|
|
1003
1014
|
export const PLACEHOLDER_RE = /^[^/]+\/[a-z-]+-model$/i;
|
|
1015
|
+
// Test-only exports for regression coverage
|
|
1016
|
+
export function _resolveConfiguredModelId(model, configs = []) { return resolveConfiguredModelId(model, configs); }
|
|
1017
|
+
export function _collectConfiguredProviderModelsFromConfig(cfg) { return collectConfiguredProviderModelsFromConfig(cfg); }
|
|
1004
1018
|
export function getTrinitySlotOrder(tiersData = null) {
|
|
1005
1019
|
const configured = Array.isArray(tiersData?.selection?.slot_order)
|
|
1006
1020
|
? tiersData.selection.slot_order
|
package/src/lib/state.js
CHANGED
|
@@ -386,8 +386,8 @@ function roundUsd(v) {
|
|
|
386
386
|
return Math.round((Number(v) || 0) * 10000) / 10000;
|
|
387
387
|
}
|
|
388
388
|
// โโ Tier regexes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
389
|
-
const FALLBACK_HIGH = /opus|gemini-.*-pro|deepseek\/deepseek-v4-pro|gpt-5|(^|\/)o[134]($|-|\/)/i;
|
|
390
|
-
const FALLBACK_MID = /deepseek\/deepseek-v4-flash|claude.*sonnet|gemini-.*-flash|gpt-4o(?!-mini)/i;
|
|
389
|
+
const FALLBACK_HIGH = /opus|gemini-.*-pro|deepseek\/deepseek-v4-pro|\bdeepseek-v4-pro\b|gpt-5|(^|\/)o[134]($|-|\/)/i;
|
|
390
|
+
const FALLBACK_MID = /deepseek\/deepseek-v4-flash|\bdeepseek-v4-flash\b|claude.*sonnet|gemini-.*-flash|gpt-4o(?!-mini)/i;
|
|
391
391
|
export function _safeRegex(cfg, fallback, label) {
|
|
392
392
|
if (!cfg)
|
|
393
393
|
return fallback;
|