vibeostheog 0.15.5 → 0.15.6

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,7 @@
1
+ ## 0.15.6
2
+ - fix: auto mode cache with TTL 60s, preserve last mode on API failure
3
+
4
+
1
5
  ## 0.15.5
2
6
  - fix: trinity set now clears session slot + refreshes model in footer
3
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeostheog",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
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/index.js CHANGED
@@ -6690,14 +6690,23 @@ var onSystemTransform = async (_input, output) => {
6690
6690
  };
6691
6691
 
6692
6692
  // src/lib/hooks/footer.js
6693
+ var _cachedAutoMode = null;
6694
+ var _cachedAutoModeTs = 0;
6695
+ var AUTO_CACHE_TTL = 6e4;
6693
6696
  async function apiAutoSelectMode(regime, stress) {
6697
+ const now = Date.now();
6698
+ if (_cachedAutoMode && now - _cachedAutoModeTs < AUTO_CACHE_TTL) return _cachedAutoMode;
6694
6699
  try {
6695
6700
  const res = await remoteCall("blackboxSelectMode", [regime, stress], null);
6696
- if (res?.mode)
6701
+ if (res?.mode) {
6702
+ _cachedAutoMode = res.mode;
6703
+ _cachedAutoModeTs = now;
6697
6704
  return res.mode;
6698
- } catch {
6705
+ }
6706
+ } catch (e) {
6707
+ console.error("[vibeOS] apiAutoSelectMode error:", e.message);
6699
6708
  }
6700
- return "balanced";
6709
+ return _cachedAutoMode || "balanced";
6701
6710
  }
6702
6711
  var USER_HOME7 = (() => {
6703
6712
  try {