vibeostheog 0.22.7 → 0.22.11

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,17 @@
1
+ ## 0.22.11
2
+ - fix: harden blackbox pivot detection and add regression coverage
3
+
4
+ ## 0.22.10
5
+ - fix: append enforcement tags (ENF, FLOW, TDD, LOCK) to live footer
6
+ - fix: flow-todo-queue path inconsistency and loadRules loop bug (#105)
7
+ - chore: bump to 0.22.8 (#106)
8
+
9
+
10
+ ## 0.22.8
11
+ - fix: flow-todo-queue path inconsistency (missing dot prefix broke trinity todo visibility)
12
+ - fix: getSessionFlowCounts calling loadRules() inside loop (redundant statSync per entry)
13
+ - chore: bump to 0.22.8
14
+
1
15
  ## 0.22.6
2
16
  - feat: wire CostAnomalyDetector into tool-execute hook
3
17
  - feat: replace TokenAnomalyDetector with CostAnomalyDetector
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibeostheog",
3
- "version": "0.22.7",
3
+ "version": "0.22.11",
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",
@@ -291,6 +291,7 @@ async function _appendFooter(input, output, directory) {
291
291
  }
292
292
  if (modeLabel)
293
293
  vibeLine += ` | ${formatQualityName(modeLabel)}`;
294
+ vibeLine += enfSuffixFooter;
294
295
  vibeLine += ` | VIBE${flashIcon ? " ⚡" : ""}`;
295
296
  if (_footerStress > 0.4) {
296
297
  const stressLabel = _footerStress > 0.7 ? "high" : "elevated";
@@ -52,6 +52,10 @@ export class ResolutionTracker {
52
52
  return state;
53
53
  }
54
54
  detectPivotSignal(current, previous) {
55
+ if (!current.embedding || !previous.embedding) {
56
+ return false;
57
+ }
58
+ const embeddingDelta = 1.0 - cosineSimilarity(current.embedding, previous.embedding);
55
59
  const drift = this.history.length >= 4
56
60
  ? this.computeIntentState().drift_rate
57
61
  : 0;
@@ -60,8 +64,8 @@ export class ResolutionTracker {
60
64
  const lengthRatio = previous.text.length > 0
61
65
  ? Math.abs(current.text.length - previous.text.length) / previous.text.length
62
66
  : 0;
63
- const pivotScore = drift * 0.35 + repeatRatio * 0.15 + instructionChange * 0.25 + lengthRatio * 0.25;
64
- return pivotScore > 0.45;
67
+ const pivotScore = drift * 0.2 + embeddingDelta * 0.35 + repeatRatio * 0.1 + instructionChange * 0.15 + lengthRatio * 0.2;
68
+ return pivotScore > 0.4;
65
69
  }
66
70
  computeState() {
67
71
  const n = this.history.length;
@@ -144,7 +144,7 @@ function getStateFile() {
144
144
  return join(getVibeOSHome(), "delegation-state.json");
145
145
  }
146
146
  function getFlowTodoFile() {
147
- return join(getVibeOSHome(), "flow-todo-queue.jsonl");
147
+ return join(getVibeOSHome(), ".flow-todo-queue.jsonl");
148
148
  }
149
149
  const FLOW_DEDUP_FILE = join(getVibeOSHome(), ".flow-dedup-keys.json");
150
150
  const MAX_FLOW_TODOS = 200;
@@ -295,8 +295,8 @@ export function getFlowWarns() {
295
295
  }
296
296
  export function getSessionFlowCounts() {
297
297
  const counts = { warn: 0, hint: 0, flag: 0 };
298
+ const rules = loadRules();
298
299
  for (const key of _flowWarnsSeen) {
299
- const rules = loadRules();
300
300
  const [ruleId] = key.split("::");
301
301
  const rule = rules.find((r) => r.id === ruleId);
302
302
  if (rule && counts[rule.severity] !== undefined)
@@ -369,7 +369,7 @@ export function recordFlowTodo({ filePath, content }) {
369
369
  }
370
370
  }
371
371
  catch { }
372
- console.error(`[flow-enforcer] 📋 Extracted ${todos.length} TODO(s) from ${filePath} → flow-todo-queue.jsonl`);
372
+ console.error(`[flow-enforcer] 📋 Extracted ${todos.length} TODO(s) from ${filePath} → .flow-todo-queue.jsonl`);
373
373
  return todos.length;
374
374
  }
375
375
  catch {