vibeostheog 0.24.29 → 0.24.31
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 -15
- package/dist/vibeOS.js +61 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
## 0.24.
|
|
2
|
-
-
|
|
3
|
-
-
|
|
4
|
-
- test: add live
|
|
5
|
-
- chore: v0.24.28
|
|
6
|
-
Merge pull request #160 from DrunkkToys/codex/release-patch-0.24.28
|
|
7
|
-
Fix clean CI sync for generated modules
|
|
8
|
-
Fix CI sync for generated modules
|
|
9
|
-
Fix CI artifact sync
|
|
10
|
-
Sync generated flow rules
|
|
11
|
-
Merge remote-tracking branch 'origin/master' into codex/release-patch-0.24.28
|
|
12
|
-
Fix release CI regressions
|
|
13
|
-
Merge pull request #159 from DrunkkToys/codex/release-patch-0.24.28
|
|
14
|
-
Strengthen cascade lifecycle coverage
|
|
15
|
-
Merge branch 'master' of https://github.com/DrunkkToys/vibeOS into codex/release-patch-0.24.28
|
|
1
|
+
## 0.24.31
|
|
2
|
+
- fix: make footer state truthful
|
|
3
|
+
- fix: quiet greetings should not inherit stale tdd tags
|
|
4
|
+
- test: add live regression for stale config footer mismatch
|
|
16
5
|
|
|
17
6
|
|
|
18
7
|
## 0.24.25
|
package/dist/vibeOS.js
CHANGED
|
@@ -11272,6 +11272,30 @@ function thinkingDirective(level) {
|
|
|
11272
11272
|
}
|
|
11273
11273
|
return `[thinking policy] Reasoning depth: OFF (manually set, ${creditNote}). Respond directly, avoid extra scratch work, and reserve extended thinking for when the user asks for it.`;
|
|
11274
11274
|
}
|
|
11275
|
+
function regimeAwareToolStyleDirective(regime, mode, stress) {
|
|
11276
|
+
const normalizedRegime = String(regime || "INIT").toUpperCase();
|
|
11277
|
+
const normalizedMode = String(mode || "budget").toLowerCase();
|
|
11278
|
+
const stressLabel = stress > 1.5 ? "high stress" : stress > 0.4 ? "elevated stress" : "calm";
|
|
11279
|
+
const regimeTone = (() => {
|
|
11280
|
+
if (normalizedRegime === "LOOPING") {
|
|
11281
|
+
return "The session is looping, so keep descriptions verification-first, state-aware, and loop-breaking.";
|
|
11282
|
+
}
|
|
11283
|
+
if (normalizedRegime === "CONVERGING" || normalizedRegime === "CLOSED") {
|
|
11284
|
+
return "The session is converging, so keep descriptions closure-oriented, exact, and ready for final verification.";
|
|
11285
|
+
}
|
|
11286
|
+
if (normalizedRegime === "REFINING" || normalizedRegime === "IMPLEMENTING") {
|
|
11287
|
+
return "The session is building, so keep descriptions action-oriented, concrete, and tied to the next visible code step.";
|
|
11288
|
+
}
|
|
11289
|
+
if (normalizedRegime === "REVIEWING" || normalizedRegime === "AUDIT" || normalizedRegime === "FORENSIC") {
|
|
11290
|
+
return "The session is reviewing evidence, so keep descriptions investigative, traceable, and focused on proof.";
|
|
11291
|
+
}
|
|
11292
|
+
if (normalizedRegime === "RESEARCH" || normalizedRegime === "DESIGNING" || normalizedRegime === "EXPLORING" || normalizedRegime === "DIVERGENT" || normalizedRegime === "INIT") {
|
|
11293
|
+
return "The session is exploring, so keep descriptions discovery-oriented, specific, and lightweight.";
|
|
11294
|
+
}
|
|
11295
|
+
return "The session should stay aligned to the active regime and avoid generic filler.";
|
|
11296
|
+
})();
|
|
11297
|
+
return `[tool style: dopamine] Active regime: ${normalizedRegime}; mode: ${normalizedMode}; stress: ${stressLabel}. When calling the bash tool, use a short, calm, progress-focused description that matches the current regime. ${regimeTone} Name the user-visible milestone being advanced, keep the wording human, and avoid hype or raw technical labels. Combine independent bash commands into a single call with && or ;.`;
|
|
11298
|
+
}
|
|
11275
11299
|
function flowTodosDirective() {
|
|
11276
11300
|
const pendingTodos = loadTodos().filter((t) => t.status === "pending").length;
|
|
11277
11301
|
if (pendingTodos === 0)
|
|
@@ -11529,7 +11553,7 @@ var onSystemTransform = async (_input, output) => {
|
|
|
11529
11553
|
pushSystem(output, "[vibeOS dashboard display] When the trinity tool returns output starting with '[vibeOS-dashboard]', use the question tool to display that data in a clean, human-readable format. Use the question field (not the header) to show the dashboard data. Format it with clear sections separated by blank lines, aligned columns with spaces, and plain text only. The header should be 'vibeOS Dashboard'. Include only one option in options: {label: 'Dismiss', description: ''}. Strip the '[vibeOS-dashboard]' marker line before displaying.");
|
|
11530
11554
|
}
|
|
11531
11555
|
if (!oneShot("vibeos_dopamine_style_" + fp2)) {
|
|
11532
|
-
pushSystem(output,
|
|
11556
|
+
pushSystem(output, regimeAwareToolStyleDirective(currentSubRegime, displayMode, stressScore));
|
|
11533
11557
|
}
|
|
11534
11558
|
} catch (err) {
|
|
11535
11559
|
console.error(`[vibeOS] system.transform failed: ${err.message}`);
|
|
@@ -11633,7 +11657,7 @@ function formatSavingsPulse(amountUsd, trend) {
|
|
|
11633
11657
|
}
|
|
11634
11658
|
function buildEnforcementTags(opts) {
|
|
11635
11659
|
const tags = [];
|
|
11636
|
-
if (opts.bbMode === "relaxed") {
|
|
11660
|
+
if (opts.quietIntent || opts.bbMode === "relaxed") {
|
|
11637
11661
|
tags.push("[Q&A]");
|
|
11638
11662
|
} else {
|
|
11639
11663
|
if (opts.delegationEnforce)
|
|
@@ -11703,6 +11727,10 @@ function loadSelection3() {
|
|
|
11703
11727
|
return { active_slot: "medium", enabled: true, delegation_enforce: true, flow_enabled: true, flow_enforce: true, tdd_enforce: false, tdd_strict: false };
|
|
11704
11728
|
}
|
|
11705
11729
|
}
|
|
11730
|
+
function isGreetingLike(text) {
|
|
11731
|
+
const value = String(text || "").trim().toLowerCase();
|
|
11732
|
+
return value === "hi" || value === "hello" || value === "hey" || value === "yo" || /^hi[!.?\s]*$/.test(value) || /^hello[!.?\s]*$/.test(value) || /^hey[!.?\s]*$/.test(value);
|
|
11733
|
+
}
|
|
11706
11734
|
function readLifetimeSavings2() {
|
|
11707
11735
|
try {
|
|
11708
11736
|
reconcileStateFromLedger();
|
|
@@ -11901,14 +11929,15 @@ async function _appendFooter(input, output, directory3) {
|
|
|
11901
11929
|
}
|
|
11902
11930
|
const selNowFooter = loadSelection3();
|
|
11903
11931
|
const normalizedIntent = classifyTurnSimple2(latestUserIntent || "");
|
|
11904
|
-
const
|
|
11932
|
+
const currentSubRegime2 = _latestBlackboxState?.sub_regime || normalizedIntent;
|
|
11905
11933
|
const bbMode = resolveEnforcementMode();
|
|
11906
11934
|
const enfTags = buildEnforcementTags({
|
|
11907
11935
|
delegationEnforce: selNowFooter.delegation_enforce,
|
|
11908
11936
|
flowEnforce: selNowFooter.flow_enforce,
|
|
11909
11937
|
tddEnforce: selNowFooter.tdd_enforce,
|
|
11910
11938
|
bbMode,
|
|
11911
|
-
modelLocked: _modelLocked
|
|
11939
|
+
modelLocked: _modelLocked,
|
|
11940
|
+
quietIntent: isGreetingLike(latestUserIntent || "")
|
|
11912
11941
|
});
|
|
11913
11942
|
const stripped = text.replace(/\u2014 [^\u2014]+ \u2014\s*/g, "").trimEnd();
|
|
11914
11943
|
if (stripped !== text)
|
|
@@ -11918,8 +11947,8 @@ async function _appendFooter(input, output, directory3) {
|
|
|
11918
11947
|
const ltTotal = ltTasks + ltCache;
|
|
11919
11948
|
const activeSlot = selNowFooter.active_slot || "brain";
|
|
11920
11949
|
const flashIcon = isApiConnected2() ? " \u26A1" : "";
|
|
11921
|
-
const
|
|
11922
|
-
const vibeBrand = resolveBrand(loadOptimizationMode() ||
|
|
11950
|
+
const displayMode2 = autoSelectMode2(currentSubRegime2, _footerStress);
|
|
11951
|
+
const vibeBrand = resolveBrand(loadOptimizationMode() || displayMode2, activeSlot);
|
|
11923
11952
|
const vibeLine = buildFooterLine({
|
|
11924
11953
|
activeSlot,
|
|
11925
11954
|
providerLabel: execution.provider_label,
|
|
@@ -11927,12 +11956,12 @@ async function _appendFooter(input, output, directory3) {
|
|
|
11927
11956
|
ltTotal,
|
|
11928
11957
|
ltTrend: sesTrend,
|
|
11929
11958
|
vibeBrand,
|
|
11930
|
-
optMode:
|
|
11959
|
+
optMode: displayMode2,
|
|
11931
11960
|
flashIcon,
|
|
11932
11961
|
enfTags,
|
|
11933
11962
|
sessionSlot,
|
|
11934
11963
|
vectorChangedSlot: selNowFooter?.vector_changed_slot,
|
|
11935
|
-
subRegime:
|
|
11964
|
+
subRegime: currentSubRegime2
|
|
11936
11965
|
});
|
|
11937
11966
|
const footerText = stripped + `
|
|
11938
11967
|
|
|
@@ -11990,7 +12019,7 @@ import { writeFileSync as writeFileSync14, appendFileSync as appendFileSync6, ex
|
|
|
11990
12019
|
import { join as join17, dirname as dirname12, basename as basename4 } from "node:path";
|
|
11991
12020
|
import { createHash as createHash5 } from "node:crypto";
|
|
11992
12021
|
|
|
11993
|
-
// src/lib/cost-anomaly.
|
|
12022
|
+
// src/lib/cost-anomaly.js
|
|
11994
12023
|
var COST_WINDOW_SIZE = 20;
|
|
11995
12024
|
var COST_ANOMALY_THRESHOLD = 3;
|
|
11996
12025
|
var COST_WARMUP_SAMPLES = 5;
|
|
@@ -12001,21 +12030,26 @@ var CostAnomalyDetector = class {
|
|
|
12001
12030
|
currentAnomalyCost = 0;
|
|
12002
12031
|
currentAnomalyMean = 0;
|
|
12003
12032
|
record(cost) {
|
|
12004
|
-
if (this.disabled)
|
|
12033
|
+
if (this.disabled)
|
|
12034
|
+
return;
|
|
12005
12035
|
this.costHistory.push(cost);
|
|
12006
12036
|
if (this.costHistory.length > COST_WINDOW_SIZE) {
|
|
12007
12037
|
this.costHistory.shift();
|
|
12008
12038
|
}
|
|
12009
12039
|
}
|
|
12010
12040
|
get mean() {
|
|
12011
|
-
if (this.costHistory.length === 0)
|
|
12041
|
+
if (this.costHistory.length === 0)
|
|
12042
|
+
return 0;
|
|
12012
12043
|
return this.costHistory.reduce((a, b) => a + b, 0) / this.costHistory.length;
|
|
12013
12044
|
}
|
|
12014
12045
|
checkAnomaly(model, cost) {
|
|
12015
|
-
if (this.disabled)
|
|
12016
|
-
|
|
12046
|
+
if (this.disabled)
|
|
12047
|
+
return false;
|
|
12048
|
+
if (this.costHistory.length < COST_WARMUP_SAMPLES)
|
|
12049
|
+
return false;
|
|
12017
12050
|
const avg = this.mean;
|
|
12018
|
-
if (avg <= 0 || cost <= avg)
|
|
12051
|
+
if (avg <= 0 || cost <= avg)
|
|
12052
|
+
return false;
|
|
12019
12053
|
const ratio = cost / avg;
|
|
12020
12054
|
if (ratio > COST_ANOMALY_THRESHOLD) {
|
|
12021
12055
|
this.currentAnomalyModel = model;
|
|
@@ -12037,7 +12071,8 @@ var CostAnomalyDetector = class {
|
|
|
12037
12071
|
};
|
|
12038
12072
|
var _costDetector = null;
|
|
12039
12073
|
function getCostAnomalyDetector() {
|
|
12040
|
-
if (!_costDetector)
|
|
12074
|
+
if (!_costDetector)
|
|
12075
|
+
_costDetector = new CostAnomalyDetector();
|
|
12041
12076
|
return _costDetector;
|
|
12042
12077
|
}
|
|
12043
12078
|
|
|
@@ -13370,6 +13405,10 @@ function buildTestReminder(filePath) {
|
|
|
13370
13405
|
}
|
|
13371
13406
|
|
|
13372
13407
|
// src/lib/hooks/tool-execute.js
|
|
13408
|
+
function isGreetingLike2(text) {
|
|
13409
|
+
const value = String(text || "").trim().toLowerCase();
|
|
13410
|
+
return value === "hi" || value === "hello" || value === "hey" || value === "yo" || /^hi[!.?\s]*$/.test(value) || /^hello[!.?\s]*$/.test(value) || /^hey[!.?\s]*$/.test(value);
|
|
13411
|
+
}
|
|
13373
13412
|
var BYTES_PER_TOKEN2 = 4;
|
|
13374
13413
|
var DEBUG_INTERNALS2 = process.env.VIBEOS_DEBUG_INTERNALS === "1";
|
|
13375
13414
|
var IS_CLI_RUNTIME2 = Boolean(process.stdout?.isTTY || process.stderr?.isTTY || process.stdin?.isTTY);
|
|
@@ -14010,18 +14049,19 @@ var onToolExecuteAfter = async (input, output) => {
|
|
|
14010
14049
|
}
|
|
14011
14050
|
const execution = resolveExecutionIdentity(input?.args?.model || resolvedModel || "", projectDirectory);
|
|
14012
14051
|
const currentSid = _OC_SID;
|
|
14013
|
-
const
|
|
14052
|
+
const currentSubRegime2 = loadBlackboxState()?.sessions?.[currentSid]?.sub_regime || classifyTurnSimple2(latestUserIntent || "");
|
|
14014
14053
|
const bbMode = resolveEnforcementMode();
|
|
14015
14054
|
const enfTags = buildEnforcementTags({
|
|
14016
14055
|
delegationEnforce: selNow.delegation_enforce,
|
|
14017
14056
|
flowEnforce: selNow.flow_enforce,
|
|
14018
14057
|
tddEnforce: selNow.tdd_enforce,
|
|
14019
14058
|
bbMode,
|
|
14020
|
-
modelLocked: _modelLocked
|
|
14059
|
+
modelLocked: _modelLocked,
|
|
14060
|
+
quietIntent: isGreetingLike2(latestUserIntent || "")
|
|
14021
14061
|
});
|
|
14022
14062
|
const activeSlot = selNow.active_slot || (execution.quality === "brain" ? "brain" : execution.quality === "medium" ? "medium" : "cheap");
|
|
14023
|
-
const
|
|
14024
|
-
const vibeBrand = resolveBrand(
|
|
14063
|
+
const displayMode2 = autoSelectMode2(currentSubRegime2, latestUserIntent ? scoreStress(latestUserIntent) : 0);
|
|
14064
|
+
const vibeBrand = resolveBrand(displayMode2, activeSlot);
|
|
14025
14065
|
const sessionSlot = loadSessionSlot(currentSid);
|
|
14026
14066
|
const flashIcon = isApiConnected2() ? " \u26A1" : "";
|
|
14027
14067
|
_footerText = buildFooterLine({
|
|
@@ -14031,12 +14071,12 @@ var onToolExecuteAfter = async (input, output) => {
|
|
|
14031
14071
|
ltTotal,
|
|
14032
14072
|
ltTrend: sesTrend || "",
|
|
14033
14073
|
vibeBrand,
|
|
14034
|
-
optMode:
|
|
14074
|
+
optMode: displayMode2,
|
|
14035
14075
|
flashIcon,
|
|
14036
14076
|
enfTags,
|
|
14037
14077
|
sessionSlot,
|
|
14038
14078
|
vectorChangedSlot: selNow.vector_changed_slot,
|
|
14039
|
-
subRegime:
|
|
14079
|
+
subRegime: currentSubRegime2
|
|
14040
14080
|
}) + "\n\n";
|
|
14041
14081
|
const footerTarget = _payload(output);
|
|
14042
14082
|
output.title = _footerText.trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.31",
|
|
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",
|