vibeostheog 0.23.59 → 0.23.60
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 +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/index.js +49 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 0.23.60
|
|
2
|
+
- fix: computeControlVector tier_bias, AUDIT/FORENSIC regex, litex slot (#118)
|
|
3
|
+
- fix: align footer with blackbox session slot
|
|
4
|
+
Merge pull request #117 from DrunkkToys/fix/audit-forensic-ml-routing
|
|
5
|
+
|
|
6
|
+
|
|
1
7
|
## 0.23.59
|
|
2
8
|
- chore: soften footer enforcement copy
|
|
3
9
|
- chore: align medium icon legend
|
package/README.md
CHANGED
|
@@ -209,7 +209,7 @@ Tier icon + lowercase quality (🦠 brain / ⚙ medium / ⚡ cheap), provider la
|
|
|
209
209
|
|
|
210
210
|
### Plugin Source
|
|
211
211
|
|
|
212
|
-
Single-file runtime `src/index.js` (
|
|
212
|
+
Single-file runtime `src/index.js` (generated from `src/index.ts`). TypeScript source of truth at `src/index.ts`, `src/vibeOS-lib/*.ts`, and `src/utils/*.ts`. Build: `npm run build` (tsc compile + sync-ts-build + deploy script).
|
|
213
213
|
|
|
214
214
|
### State Files (~/.claude/)
|
|
215
215
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.60",
|
|
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
|
@@ -166,11 +166,11 @@ async function _seedModelTiersIfMissing(directory) {
|
|
|
166
166
|
let medium = ranked?.medium?.id || brain;
|
|
167
167
|
let cheap = ranked?.cheap?.id || medium || brain;
|
|
168
168
|
if (!brain) {
|
|
169
|
-
brain
|
|
169
|
+
brain = "deepseek/deepseek-v4-pro";
|
|
170
170
|
medium = "deepseek/deepseek-v4-flash";
|
|
171
|
-
cheap
|
|
171
|
+
cheap = "deepseek/deepseek-chat";
|
|
172
172
|
console.error("[vibeOS] no providers detected — using default model tiers (brain=v4-pro, medium=v4-flash, cheap=v4-chat)");
|
|
173
|
-
|
|
173
|
+
}
|
|
174
174
|
const tiers = {
|
|
175
175
|
selection: {
|
|
176
176
|
enabled: true,
|
|
@@ -287,7 +287,10 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
287
287
|
console.error(`[vibeOS] LOADED cwd=${directory}`);
|
|
288
288
|
const hookHome = process.env.HOME || USER_HOME;
|
|
289
289
|
const hookFp = projectFingerprint(directory || "");
|
|
290
|
-
if (!globalThis.__vibeOS_sessionId) {
|
|
290
|
+
if (!globalThis.__vibeOS_sessionId) {
|
|
291
|
+
globalThis.__vibeOS_sessionId = `opencode-${process.pid || "x"}-${Date.now()}`;
|
|
292
|
+
}
|
|
293
|
+
const hookSessionId = globalThis.__vibeOS_sessionId;
|
|
291
294
|
setVibeOSHomeContext(join(hookHome, ".claude"));
|
|
292
295
|
setCurrentSessionId(hookSessionId);
|
|
293
296
|
if (hookFp) {
|
|
@@ -411,12 +414,14 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
411
414
|
_runDeferredStartupBootstrap = () => { };
|
|
412
415
|
// ── Plugin hooks ──────────────────────────────────────────────────
|
|
413
416
|
// trinity tool dependency injection
|
|
414
|
-
const _tiersData = (() => {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
417
|
+
const _tiersData = (() => {
|
|
418
|
+
try {
|
|
419
|
+
return safeJsonParse(readFileSync(getTiersFile(), "utf-8"));
|
|
420
|
+
}
|
|
421
|
+
catch {
|
|
422
|
+
return {};
|
|
423
|
+
}
|
|
424
|
+
})();
|
|
420
425
|
const trinityDeps = {
|
|
421
426
|
tool, _lazyRefresh, _readAuth, _tiersData,
|
|
422
427
|
_loadOpenCodeProviders, _modelCost, _modelTier,
|
|
@@ -457,7 +462,8 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
457
462
|
try {
|
|
458
463
|
ensureProjectSkill(directory, hookFp);
|
|
459
464
|
_skillsEnsured.add(hookFp);
|
|
460
|
-
}
|
|
465
|
+
}
|
|
466
|
+
catch (_e) { }
|
|
461
467
|
}
|
|
462
468
|
onToolExecuteBefore._directory = directory;
|
|
463
469
|
return onToolExecuteBefore(input, output);
|
|
@@ -654,12 +660,14 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
654
660
|
getState: () => ({
|
|
655
661
|
...buildStatusPayload({
|
|
656
662
|
selection: loadSelection(),
|
|
657
|
-
tiersData: (() => {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
+
tiersData: (() => {
|
|
664
|
+
try {
|
|
665
|
+
return safeJsonParse(readFileSync(getTiersFile(), "utf-8"));
|
|
666
|
+
}
|
|
667
|
+
catch {
|
|
668
|
+
return {};
|
|
669
|
+
}
|
|
670
|
+
})(),
|
|
663
671
|
currentModel: currentModel || "",
|
|
664
672
|
creditPercent: loadCredit(),
|
|
665
673
|
version: readPackageVersion(),
|
|
@@ -737,9 +745,12 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
737
745
|
saveBlackboxVector: (vector) => {
|
|
738
746
|
const state = loadBlackboxState() || {};
|
|
739
747
|
const sid = getCurrentSessionId() || _OC_SID;
|
|
740
|
-
if (!state.sessions)
|
|
741
|
-
|
|
742
|
-
if (!state.sessions[sid]
|
|
748
|
+
if (!state.sessions)
|
|
749
|
+
state.sessions = {};
|
|
750
|
+
if (!state.sessions[sid])
|
|
751
|
+
state.sessions[sid] = {};
|
|
752
|
+
if (!state.sessions[sid].dashboard_vectors)
|
|
753
|
+
state.sessions[sid].dashboard_vectors = [];
|
|
743
754
|
state.sessions[sid].dashboard_vectors.push({
|
|
744
755
|
timestamp: Date.now(),
|
|
745
756
|
received_at: new Date().toISOString(),
|
|
@@ -750,9 +761,12 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
750
761
|
saveBlackboxOutcome: (outcome) => {
|
|
751
762
|
const state = loadBlackboxState() || {};
|
|
752
763
|
const sid = getCurrentSessionId() || _OC_SID;
|
|
753
|
-
if (!state.sessions)
|
|
754
|
-
|
|
755
|
-
if (!state.sessions[sid]
|
|
764
|
+
if (!state.sessions)
|
|
765
|
+
state.sessions = {};
|
|
766
|
+
if (!state.sessions[sid])
|
|
767
|
+
state.sessions[sid] = {};
|
|
768
|
+
if (!state.sessions[sid].dashboard_outcomes)
|
|
769
|
+
state.sessions[sid].dashboard_outcomes = [];
|
|
756
770
|
state.sessions[sid].dashboard_outcomes.push({
|
|
757
771
|
timestamp: Date.now(),
|
|
758
772
|
received_at: new Date().toISOString(),
|
|
@@ -760,7 +774,6 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
760
774
|
});
|
|
761
775
|
saveBlackboxState(state);
|
|
762
776
|
},
|
|
763
|
-
|
|
764
777
|
});
|
|
765
778
|
}
|
|
766
779
|
const mcpServer = await _mcpServerRuntime.start(port);
|
|
@@ -773,14 +786,18 @@ export async function DelegationEnforcer({ client, directory } = {}) {
|
|
|
773
786
|
console.error(`[vibeOS] Dashboard at http://127.0.0.1:${actualPort}/`);
|
|
774
787
|
if (!_mcpServerHooked) {
|
|
775
788
|
_mcpServerHooked = true;
|
|
776
|
-
process.on("SIGTERM", () => {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
789
|
+
process.on("SIGTERM", () => {
|
|
790
|
+
try {
|
|
791
|
+
_mcpServerRuntime?.close();
|
|
792
|
+
}
|
|
793
|
+
catch { }
|
|
794
|
+
});
|
|
795
|
+
process.on("SIGINT", () => {
|
|
796
|
+
try {
|
|
797
|
+
_mcpServerRuntime?.close();
|
|
798
|
+
}
|
|
799
|
+
catch { }
|
|
800
|
+
});
|
|
784
801
|
}
|
|
785
802
|
}
|
|
786
803
|
catch (err) {
|