vibeostheog 0.25.4 → 0.25.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__VIBEOS_DASHBOARD_BASE__ = "http://127.0.0.1:
|
|
1
|
+
window.__VIBEOS_DASHBOARD_BASE__ = "http://127.0.0.1:59486";
|
package/dist/vibeOS.js
CHANGED
|
@@ -5211,6 +5211,7 @@ function setApiBootstrapToken(newToken) {
|
|
|
5211
5211
|
}
|
|
5212
5212
|
}
|
|
5213
5213
|
var _apiClient = null;
|
|
5214
|
+
var _startupProbeDone = false;
|
|
5214
5215
|
var _apiFallbackMode = false;
|
|
5215
5216
|
var _apiFallbackSince = null;
|
|
5216
5217
|
var _bootstrapExchangeInFlight = null;
|
|
@@ -5229,6 +5230,16 @@ function tryResetFallbackCooldown() {
|
|
|
5229
5230
|
}
|
|
5230
5231
|
return false;
|
|
5231
5232
|
}
|
|
5233
|
+
function confirmReconnection() {
|
|
5234
|
+
_apiFallbackMode = false;
|
|
5235
|
+
_apiFallbackSince = null;
|
|
5236
|
+
markApiConnected();
|
|
5237
|
+
console.warn("[vibeOS] API reconnected \u2014 health probe passed");
|
|
5238
|
+
}
|
|
5239
|
+
function denyReconnection(detail) {
|
|
5240
|
+
_apiFallbackSince = (/* @__PURE__ */ new Date()).toISOString();
|
|
5241
|
+
console.warn(`[vibeOS] API health probe failed during reconnect: ${detail} \u2014 staying in fallback`);
|
|
5242
|
+
}
|
|
5232
5243
|
function recordBackendVersion(payload) {
|
|
5233
5244
|
if (!payload || typeof payload !== "object")
|
|
5234
5245
|
return;
|
|
@@ -5348,14 +5359,53 @@ function isApiConnected2() {
|
|
|
5348
5359
|
function getBackendVersion() {
|
|
5349
5360
|
return _backendVersion;
|
|
5350
5361
|
}
|
|
5362
|
+
function getApiFallbackSince() {
|
|
5363
|
+
return _apiFallbackSince;
|
|
5364
|
+
}
|
|
5351
5365
|
async function remoteCall(method, args, fallbackFn) {
|
|
5366
|
+
if (!_startupProbeDone && !_apiFallbackMode) {
|
|
5367
|
+
_startupProbeDone = true;
|
|
5368
|
+
try {
|
|
5369
|
+
syncApiTokenFromDisk();
|
|
5370
|
+
if (VIBEOS_API_ENABLED) {
|
|
5371
|
+
const probeClient = getApiClient2();
|
|
5372
|
+
if (probeClient) {
|
|
5373
|
+
await probeClient.health();
|
|
5374
|
+
confirmReconnection();
|
|
5375
|
+
}
|
|
5376
|
+
}
|
|
5377
|
+
} catch {
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5352
5380
|
syncApiTokenFromDisk();
|
|
5353
5381
|
if (!VIBEOS_API_TOKEN && VIBEOS_API_BOOTSTRAP_TOKEN) {
|
|
5354
5382
|
await ensureBootstrapExchange();
|
|
5355
5383
|
syncApiTokenFromDisk();
|
|
5356
5384
|
}
|
|
5357
|
-
if (
|
|
5358
|
-
|
|
5385
|
+
if (_apiFallbackMode && _apiFallbackSince) {
|
|
5386
|
+
const elapsed = Date.now() - new Date(_apiFallbackSince).getTime();
|
|
5387
|
+
if (elapsed > FALLBACK_COOLDOWN_MS) {
|
|
5388
|
+
try {
|
|
5389
|
+
const probeClient = getApiClient2();
|
|
5390
|
+
if (probeClient) {
|
|
5391
|
+
await probeClient.health();
|
|
5392
|
+
confirmReconnection();
|
|
5393
|
+
} else {
|
|
5394
|
+
denyReconnection("no client");
|
|
5395
|
+
if (fallbackFn)
|
|
5396
|
+
return fallbackFn();
|
|
5397
|
+
return null;
|
|
5398
|
+
}
|
|
5399
|
+
} catch (probeErr) {
|
|
5400
|
+
const probeStatus = probeErr?.statusCode || probeErr?.status || 0;
|
|
5401
|
+
const probeBody = probeErr?.response?.body || probeErr?.body || "";
|
|
5402
|
+
const probePreview = typeof probeBody === "string" ? probeBody.substring(0, 80) : String(probeBody).substring(0, 80);
|
|
5403
|
+
denyReconnection(probeStatus ? `status=${probeStatus} body=${probePreview}` : `message=${probeErr?.message || probeErr}`);
|
|
5404
|
+
if (fallbackFn)
|
|
5405
|
+
return fallbackFn();
|
|
5406
|
+
return null;
|
|
5407
|
+
}
|
|
5408
|
+
}
|
|
5359
5409
|
}
|
|
5360
5410
|
if (!VIBEOS_API_ENABLED || _apiFallbackMode) {
|
|
5361
5411
|
if (fallbackFn)
|
|
@@ -15098,7 +15148,6 @@ function ensureDeferredBootstrap() {
|
|
|
15098
15148
|
} catch {
|
|
15099
15149
|
}
|
|
15100
15150
|
}
|
|
15101
|
-
var _apiFallbackSince2 = null;
|
|
15102
15151
|
var activeJob2 = null;
|
|
15103
15152
|
var fp = "";
|
|
15104
15153
|
var _mcpServerRuntime = null;
|
|
@@ -15398,7 +15447,7 @@ async function ensureMcpServerRunning() {
|
|
|
15398
15447
|
backendHealthUrl: `${VIBEOS_API_URL}/health`,
|
|
15399
15448
|
backendVersion: getBackendVersion(),
|
|
15400
15449
|
apiFallbackMode: isApiFallback2(),
|
|
15401
|
-
apiFallbackSince:
|
|
15450
|
+
apiFallbackSince: getApiFallbackSince(),
|
|
15402
15451
|
modelLocked: _modelLocked,
|
|
15403
15452
|
lockedSlot: _lockedSlot,
|
|
15404
15453
|
lockedModel: _lockedModel
|
|
@@ -15785,7 +15834,7 @@ async function DelegationEnforcer({ client: client2, directory: directory3 } = {
|
|
|
15785
15834
|
saveBlackboxState,
|
|
15786
15835
|
isApiFallback: () => isApiFallback2(),
|
|
15787
15836
|
get _apiFallbackSince() {
|
|
15788
|
-
return
|
|
15837
|
+
return getApiFallbackSince();
|
|
15789
15838
|
},
|
|
15790
15839
|
reportsIndex: reportsIndexStable,
|
|
15791
15840
|
saveReportsIndex: saveReportsIndexStable,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.5",
|
|
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",
|