vibeostheog 0.23.34 → 0.23.40
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
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.23.40
|
|
2
|
+
- fix: bypass remote selector for manual modes
|
|
3
|
+
- fix: ML pipeline — autoselect unification, branded mode passthrough, vibeultrax/vibeqmax MODE_DELTAS
|
|
4
|
+
- chore: v0.23.38
|
|
5
|
+
fix live thinking mode reset
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 0.23.37
|
|
9
|
+
Fix plan mode agent restore
|
|
10
|
+
|
|
11
|
+
|
|
1
12
|
## 0.23.34
|
|
2
13
|
- fix: restore footer ML-driven display + 6 integration tests calling _appendFooter directly to prevent regression from stale .ts compilation
|
|
3
14
|
- fix: wire ensureProjectSkill into tool.execute.before and trinity guard
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.40",
|
|
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",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"checkpoint:validate": "node scripts/checkpoint-validate.mjs",
|
|
15
15
|
"test:scripts": "node --test scripts/tests/checkpoint-validate.test.mjs tests/release-pack.test.mjs",
|
|
16
16
|
"ts:audit": "node scripts/ts-audit.mjs",
|
|
17
|
-
"test": "
|
|
18
|
-
"test:ci": "
|
|
17
|
+
"test": "node scripts/run-test-suite.mjs full",
|
|
18
|
+
"test:ci": "node scripts/run-test-suite.mjs ci",
|
|
19
19
|
"guard": "bash plugins/vibetheog-guard/scripts/run-guard.sh",
|
|
20
20
|
"guard:full": "VIBETHEOG_GUARD_FULL=1 bash plugins/vibetheog-guard/scripts/run-guard.sh",
|
|
21
21
|
"hook:precommit": "bash plugins/vibetheog-guard/hooks/pre-commit.sh",
|
|
@@ -204,8 +204,11 @@ export function syncControlSettings(cv, options = {}) {
|
|
|
204
204
|
writeIf("tdd_enforce", true);
|
|
205
205
|
writeIf("tdd_strict", cv.tdd_mode === "strict");
|
|
206
206
|
}
|
|
207
|
-
if (cv.thinking_mode
|
|
208
|
-
|
|
207
|
+
if (cv.thinking_mode) {
|
|
208
|
+
const nextThinking = cv.thinking_mode === "auto" ? "off" : cv.thinking_mode;
|
|
209
|
+
if (currentSel.thinking_level !== nextThinking)
|
|
210
|
+
writeIf("thinking_level", nextThinking);
|
|
211
|
+
}
|
|
209
212
|
if (persistOptimizationMode && cv.optimization_mode && userOptMode !== "auto") {
|
|
210
213
|
if (userOptMode !== cv.optimization_mode) {
|
|
211
214
|
writeIf("optimization_mode", cv.optimization_mode);
|
|
@@ -230,6 +233,9 @@ export function syncControlSettings(cv, options = {}) {
|
|
|
230
233
|
if (existsSync(OC_CONFIG)) {
|
|
231
234
|
const oc = safeJsonParse(readFileSync(OC_CONFIG, "utf-8"));
|
|
232
235
|
if (oc.default_agent !== cv.agent_mode) {
|
|
236
|
+
if (cv.agent_mode === "plan" && oc.default_agent && oc.default_agent !== "plan") {
|
|
237
|
+
writeSelection("previous_default_agent", oc.default_agent);
|
|
238
|
+
}
|
|
233
239
|
oc.default_agent = cv.agent_mode;
|
|
234
240
|
writeFileSync(OC_CONFIG, JSON.stringify(oc, null, 2) + "\n");
|
|
235
241
|
}
|
|
@@ -237,21 +243,20 @@ export function syncControlSettings(cv, options = {}) {
|
|
|
237
243
|
}
|
|
238
244
|
catch { }
|
|
239
245
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
246
|
+
else {
|
|
247
|
+
try {
|
|
248
|
+
const OC_CONFIG = TRINITY_OPENCODE_CONFIG || join(getOpenCodeHome(), "opencode.json");
|
|
249
|
+
if (existsSync(OC_CONFIG)) {
|
|
250
|
+
const oc = safeJsonParse(readFileSync(OC_CONFIG, "utf-8"));
|
|
251
|
+
const previousAgent = currentSel.previous_default_agent;
|
|
252
|
+
if (oc.default_agent === "plan" && previousAgent && previousAgent !== "plan") {
|
|
253
|
+
oc.default_agent = previousAgent;
|
|
254
|
+
writeFileSync(OC_CONFIG, JSON.stringify(oc, null, 2) + "\n");
|
|
255
|
+
writeSelection("previous_default_agent", null);
|
|
251
256
|
}
|
|
252
257
|
}
|
|
253
|
-
catch { }
|
|
254
258
|
}
|
|
259
|
+
catch { }
|
|
255
260
|
}
|
|
256
261
|
}
|
|
257
262
|
catch { /* noop -- non-critical sync */ }
|
|
@@ -42,7 +42,7 @@ function safeJsonParse(raw) {
|
|
|
42
42
|
throw e;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const DFLT_SEL = { enabled: true, active_slot: null, thinking_level: "off", flow_enabled: false, tdd_enforce: false, tdd_strict: false, tdd_quality: true, flow_enforce: false, delegation_enforce: true, onboarding_mode: null, selected_provider: null, selected_quality_tier: null, selected_model: null, executed_provider: null, executed_quality_tier: null, executed_model: null };
|
|
45
|
+
const DFLT_SEL = { enabled: true, active_slot: null, thinking_level: "off", flow_enabled: false, tdd_enforce: false, tdd_strict: false, tdd_quality: true, flow_enforce: false, delegation_enforce: true, onboarding_mode: null, selected_provider: null, selected_quality_tier: null, selected_model: null, executed_provider: null, executed_quality_tier: null, executed_model: null, previous_default_agent: null };
|
|
46
46
|
export function loadSelection() {
|
|
47
47
|
const TIERS_FILE = join(getVibeOSHome(), "model-tiers.json");
|
|
48
48
|
try {
|
|
@@ -73,6 +73,7 @@ export function loadSelection() {
|
|
|
73
73
|
executed_provider: j?.selection?.executed_provider || null,
|
|
74
74
|
executed_quality_tier: j?.selection?.executed_quality_tier || null,
|
|
75
75
|
executed_model: j?.selection?.executed_model || null,
|
|
76
|
+
previous_default_agent: j?.selection?.previous_default_agent || null,
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
catch {
|
package/src/lib/trinity-tool.js
CHANGED
|
@@ -753,7 +753,8 @@ export function createTrinityTool(deps) {
|
|
|
753
753
|
if (_fp) {
|
|
754
754
|
try {
|
|
755
755
|
deps.ensureProjectSkill(deps.directory, _fp);
|
|
756
|
-
}
|
|
756
|
+
}
|
|
757
|
+
catch (_e) { }
|
|
757
758
|
}
|
|
758
759
|
if (result.created.length === 0 && result.skipped.length > 0) {
|
|
759
760
|
return `AGENTS.md and README.md already exist. Use \`trinity guard\` to check for missing features.`;
|
package/src/lib/turn-classify.js
CHANGED
|
@@ -9,6 +9,7 @@ export { scoreStress, estimateContextBudget, classifyTurnSimple, tokenizeWords,
|
|
|
9
9
|
function getVibeOSHome() {
|
|
10
10
|
return process.env.VIBEOS_HOME || join(process.env.HOME || "", ".claude");
|
|
11
11
|
}
|
|
12
|
+
const QUALITY_STRESS_THRESHOLD = 1.5;
|
|
12
13
|
function autoSelectMode(subRegime, stressMultiplier) {
|
|
13
14
|
const regime = String(subRegime || "INIT").toUpperCase();
|
|
14
15
|
const stress = Number(stressMultiplier ?? 0);
|
|
@@ -18,17 +19,17 @@ function autoSelectMode(subRegime, stressMultiplier) {
|
|
|
18
19
|
return "speed";
|
|
19
20
|
if (regime === "CONVERGING" || regime === "CLOSED")
|
|
20
21
|
return "quality";
|
|
21
|
-
if (stress >
|
|
22
|
+
if (stress > QUALITY_STRESS_THRESHOLD)
|
|
22
23
|
return "quality";
|
|
23
24
|
return "budget";
|
|
24
25
|
}
|
|
25
26
|
export function resolveOptimizationMode(subRegime, stressMultiplier, optimizationMode) {
|
|
26
27
|
const normalized = String(optimizationMode || "auto").toLowerCase();
|
|
27
|
-
if (
|
|
28
|
+
if (normalized === "auto" || normalized === "")
|
|
28
29
|
return autoSelectMode(subRegime || "INIT", stressMultiplier);
|
|
29
|
-
if (
|
|
30
|
-
return
|
|
31
|
-
if (normalized === "balanced" || normalized === "budget" || normalized === "quality" || normalized === "speed" || normalized === "longrun") {
|
|
30
|
+
if (isApiFallback())
|
|
31
|
+
return "budget";
|
|
32
|
+
if (normalized === "balanced" || normalized === "budget" || normalized === "quality" || normalized === "speed" || normalized === "longrun" || normalized === "audit" || normalized === "forensic" || normalized === "vibeultrax" || normalized === "vibeqmax" || normalized === "vibemax") {
|
|
32
33
|
return normalized;
|
|
33
34
|
}
|
|
34
35
|
return "budget";
|
|
@@ -69,18 +70,19 @@ export function bootstrapOptimizationSession() {
|
|
|
69
70
|
return { mode: resolvedMode, slot: resolvedSlot };
|
|
70
71
|
}
|
|
71
72
|
export async function selectOptimizationModeRemote(subRegime, stressMultiplier, fallbackMode) {
|
|
73
|
+
const normalizedRequestedMode = String(fallbackMode || "auto").toLowerCase();
|
|
72
74
|
const fallback = resolveOptimizationMode(subRegime, stressMultiplier, fallbackMode);
|
|
73
|
-
if (
|
|
74
|
-
return
|
|
75
|
+
if (normalizedRequestedMode !== "auto" && normalizedRequestedMode !== "")
|
|
76
|
+
return fallback;
|
|
77
|
+
if (isApiFallback())
|
|
78
|
+
return fallback;
|
|
75
79
|
try {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return selected;
|
|
83
|
-
}
|
|
80
|
+
const client = getApiClient();
|
|
81
|
+
if (client) {
|
|
82
|
+
const res = await client.blackboxSelectMode(subRegime || "INIT", Number(stressMultiplier ?? 0));
|
|
83
|
+
const selected = String(res?.mode || "").toLowerCase();
|
|
84
|
+
if (selected === "balanced" || selected === "budget" || selected === "quality" || selected === "speed" || selected === "longrun" || selected === "audit" || selected === "forensic" || selected === "vibeultrax" || selected === "vibeqmax" || selected === "vibemax") {
|
|
85
|
+
return selected;
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
}
|
|
@@ -93,7 +95,7 @@ function computeControlVector(_state, _action, _optimizationMode) {
|
|
|
93
95
|
const isRelaxed = mode === "budget" || mode === "speed";
|
|
94
96
|
const subRegime = _state?.sub_regime || "INIT";
|
|
95
97
|
const stress = Number(_state?.latest_stress_multiplier ?? 0);
|
|
96
|
-
const tierBias = stress >
|
|
98
|
+
const tierBias = stress > QUALITY_STRESS_THRESHOLD ? "brain"
|
|
97
99
|
: subRegime === "CONVERGING" || subRegime === "CLOSED" ? "brain"
|
|
98
100
|
: subRegime === "REFINING" || subRegime === "LOOPING" ? "medium"
|
|
99
101
|
: mode === "quality" || mode === "longrun" ? "brain"
|
|
@@ -112,7 +114,7 @@ function computeControlVector(_state, _action, _optimizationMode) {
|
|
|
112
114
|
stress_multiplier: 1.0,
|
|
113
115
|
context7_urgency: isStrict ? "required" : "preferred",
|
|
114
116
|
wbp_verbosity: isStrict ? "verbose" : isRelaxed ? "minimal" : "normal",
|
|
115
|
-
agent_mode: (subRegime === "REFINING" || subRegime === "CONVERGING" || subRegime === "CLOSED") && stress <=
|
|
117
|
+
agent_mode: (subRegime === "REFINING" || subRegime === "CONVERGING" || subRegime === "CLOSED") && stress <= QUALITY_STRESS_THRESHOLD ? "plan" : undefined,
|
|
116
118
|
optimization_mode: mode,
|
|
117
119
|
directives: [],
|
|
118
120
|
};
|
|
@@ -98,6 +98,7 @@ const REGIME_CONTROL = {
|
|
|
98
98
|
},
|
|
99
99
|
};
|
|
100
100
|
const DEFAULT_CONTROL = REGIME_CONTROL.EXPLORING;
|
|
101
|
+
const QUALITY_STRESS_THRESHOLD = 1.5;
|
|
101
102
|
const MODE_DELTAS = {
|
|
102
103
|
balanced: {},
|
|
103
104
|
budget: {
|
|
@@ -175,14 +176,43 @@ const MODE_DELTAS = {
|
|
|
175
176
|
api_enrichment: true,
|
|
176
177
|
outcome_detection: true,
|
|
177
178
|
},
|
|
179
|
+
vibeultrax: {
|
|
180
|
+
tier_bias: "brain",
|
|
181
|
+
thinking_mode: "full",
|
|
182
|
+
tdd_mode: "quality",
|
|
183
|
+
tdd_focus: ["full-coverage", "edge-cases", "property-based"],
|
|
184
|
+
flow_mode: "strict",
|
|
185
|
+
flow_focus: ["write-edit-check", "no-untouched-files", "no-lgtm", "suggest-alternative"],
|
|
186
|
+
enforcement_mode: "strict",
|
|
187
|
+
wbp_verbosity: "detailed",
|
|
188
|
+
context7_urgency: "required",
|
|
189
|
+
stress_multiplier: 2.5,
|
|
190
|
+
loop_threshold: 0.3,
|
|
191
|
+
api_enrichment: true,
|
|
192
|
+
outcome_detection: true,
|
|
193
|
+
},
|
|
194
|
+
vibeqmax: {
|
|
195
|
+
tier_bias: "brain",
|
|
196
|
+
thinking_mode: "full",
|
|
197
|
+
tdd_mode: "quality",
|
|
198
|
+
tdd_focus: ["skeleton-on-write", "assertion-check", "edge-cases"],
|
|
199
|
+
flow_mode: "strict",
|
|
200
|
+
flow_focus: ["write-edit-check", "no-lgtm", "check-debug-artifacts"],
|
|
201
|
+
enforcement_mode: "strict",
|
|
202
|
+
wbp_verbosity: "normal",
|
|
203
|
+
context7_urgency: "required",
|
|
204
|
+
stress_multiplier: 1.5,
|
|
205
|
+
loop_threshold: 0.5,
|
|
206
|
+
api_enrichment: true,
|
|
207
|
+
outcome_detection: true,
|
|
208
|
+
},
|
|
178
209
|
};
|
|
179
210
|
export function autoSelectMode(subRegime, stressMultiplier) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
if (stressMultiplier && stressMultiplier >
|
|
185
|
-
return "quality";
|
|
211
|
+
const regime = String(subRegime || "INIT").toUpperCase();
|
|
212
|
+
if (regime === "AUDIT" || regime === "FORENSIC") return regime.toLowerCase();
|
|
213
|
+
if (regime === "LOOPING") return "speed";
|
|
214
|
+
if (regime === "CONVERGING" || regime === "CLOSED") return "quality";
|
|
215
|
+
if (stressMultiplier && stressMultiplier > QUALITY_STRESS_THRESHOLD) return "quality";
|
|
186
216
|
return "budget";
|
|
187
217
|
}
|
|
188
218
|
export function computeControlVector(state, action, optimizationMode) {
|