vibeostheog 0.23.17 → 0.23.18
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/lib/mode-policy.js +1 -17
- package/src/lib/turn-classify.js +4 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.18",
|
|
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/mode-policy.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BLACKBOX_STATE_FILE, _OC_SID, loadBlackboxState, saveBlackboxState, wit
|
|
|
2
2
|
const BASELINE_MODE = "budget";
|
|
3
3
|
const LOOP_REGIMES = new Set(["LOOPING", "DIVERGENT"]);
|
|
4
4
|
const QUALITY_REGIMES = new Set(["CONVERGING", "CLOSED"]);
|
|
5
|
-
const MANUAL_MODES = new Set(["balanced", "quality", "speed", "longrun"
|
|
5
|
+
const MANUAL_MODES = new Set(["balanced", "quality", "speed", "longrun"]);
|
|
6
6
|
function normalizeMode(mode) {
|
|
7
7
|
const normalized = String(mode || BASELINE_MODE).toLowerCase();
|
|
8
8
|
if (normalized === "auto" || normalized === "")
|
|
@@ -82,14 +82,6 @@ function persistSessionPolicy(state, session, policy, mode) {
|
|
|
82
82
|
}
|
|
83
83
|
export function peekBudgetFirstMode(input = {}) {
|
|
84
84
|
const requestedMode = normalizeMode(input.requestedMode);
|
|
85
|
-
if (isManualOverride(requestedMode)) {
|
|
86
|
-
return {
|
|
87
|
-
active: false,
|
|
88
|
-
mode: requestedMode,
|
|
89
|
-
reason: "manual",
|
|
90
|
-
shouldPersistRequestedMode: true,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
85
|
const { policy } = loadSessionPolicy();
|
|
94
86
|
if (policy.active && policy.active_mode && normalizeMode(policy.active_mode) !== BASELINE_MODE) {
|
|
95
87
|
return {
|
|
@@ -108,14 +100,6 @@ export function peekBudgetFirstMode(input = {}) {
|
|
|
108
100
|
}
|
|
109
101
|
export function applyBudgetFirstMode(input = {}) {
|
|
110
102
|
const requestedMode = normalizeMode(input.requestedMode);
|
|
111
|
-
if (isManualOverride(requestedMode)) {
|
|
112
|
-
return {
|
|
113
|
-
active: false,
|
|
114
|
-
mode: requestedMode,
|
|
115
|
-
reason: "manual",
|
|
116
|
-
shouldPersistRequestedMode: true,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
103
|
return withFileLock(BLACKBOX_STATE_FILE, () => {
|
|
120
104
|
const { state, session, policy } = loadSessionPolicy();
|
|
121
105
|
const regime = normalizeRegime(input.subRegime || policy.last_sub_regime);
|
package/src/lib/turn-classify.js
CHANGED
|
@@ -22,9 +22,11 @@ function autoSelectMode(subRegime, stressMultiplier) {
|
|
|
22
22
|
}
|
|
23
23
|
export function resolveOptimizationMode(subRegime, stressMultiplier, optimizationMode) {
|
|
24
24
|
const normalized = String(optimizationMode || "auto").toLowerCase();
|
|
25
|
-
if (
|
|
25
|
+
if (!isApiFallback())
|
|
26
26
|
return autoSelectMode(subRegime || "INIT", stressMultiplier);
|
|
27
|
-
if (normalized === "
|
|
27
|
+
if (normalized === "auto" || normalized === "" || normalized === "vibeultrax" || normalized === "vibeqmax" || normalized === "vibemax")
|
|
28
|
+
return autoSelectMode(subRegime || "INIT", stressMultiplier);
|
|
29
|
+
if (normalized === "balanced" || normalized === "budget" || normalized === "quality" || normalized === "speed" || normalized === "longrun") {
|
|
28
30
|
return normalized;
|
|
29
31
|
}
|
|
30
32
|
return "budget";
|