omnius 1.0.279 → 1.0.280

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/dist/index.js CHANGED
@@ -647216,7 +647216,7 @@ function computeDPrime(signalScores, noiseScores) {
647216
647216
  const varSignal = variance(signalScores, muSignal);
647217
647217
  const varNoise = variance(noiseScores, muNoise);
647218
647218
  const pooledStd = Math.sqrt((varSignal + varNoise) / 2);
647219
- if (pooledStd === 0) return muSignal > muNoise ? 3 : 0;
647219
+ if (pooledStd < 0.01) return muSignal > muNoise ? (muSignal - muNoise) / 0.01 : 0;
647220
647220
  return (muSignal - muNoise) / pooledStd;
647221
647221
  }
647222
647222
  function computeSparsity(entries) {
@@ -647284,23 +647284,36 @@ var init_snr_engine = __esm({
647284
647284
  const scores = contextEntries.map((entry) => {
647285
647285
  const entryTerms = entry.toLowerCase().split(/\s+/).filter((w) => w.length > 3).map((w) => w.replace(/[^a-z0-9]/g, ""));
647286
647286
  const matchCount = entryTerms.filter((t2) => taskTerms.has(t2)).length;
647287
- const score2 = entryTerms.length > 0 ? matchCount / Math.sqrt(entryTerms.length) : 0;
647287
+ let partialMatch = 0;
647288
+ for (const et of entryTerms) {
647289
+ for (const tt of taskTerms) {
647290
+ if (et.length >= 4 && tt.includes(et)) {
647291
+ partialMatch++;
647292
+ break;
647293
+ }
647294
+ }
647295
+ }
647296
+ const effectiveMatch = Math.max(matchCount, partialMatch);
647297
+ const score2 = entryTerms.length > 0 ? effectiveMatch / Math.sqrt(entryTerms.length) : 0;
647288
647298
  return { entry, score: score2 };
647289
647299
  });
647290
647300
  const allScores = scores.map((s2) => s2.score);
647291
647301
  const mean = allScores.reduce((a2, b) => a2 + b, 0) / allScores.length;
647292
647302
  const std = Math.sqrt(allScores.reduce((a2, v) => a2 + (v - mean) ** 2, 0) / allScores.length);
647293
- const threshold = mean + 0.5 * std;
647303
+ const threshold = Math.max(0.1, mean + 0.5 * std);
647294
647304
  const signalScores = allScores.filter((s2) => s2 >= threshold);
647295
647305
  const noiseScores = allScores.filter((s2) => s2 < threshold);
647296
647306
  const dPrime = computeDPrime(
647297
647307
  signalScores.length > 0 ? signalScores : [mean],
647298
647308
  noiseScores.length > 0 ? noiseScores : [0]
647299
647309
  );
647310
+ const hasSentinelSignal = signalScores.length === 0;
647311
+ const hasSentinelNoise = noiseScores.length === 0;
647312
+ const dPrimeAdjusted = hasSentinelSignal || hasSentinelNoise ? dPrime * 0.5 : dPrime;
647300
647313
  const sparsity = computeSparsity(contextEntries);
647301
647314
  const signalProportion = signalScores.length / allScores.length;
647302
647315
  const dPrimeNorm = Math.min(1, Math.max(0, dPrime / 3));
647303
- const ratio = 0.5 * signalProportion + 0.3 * dPrimeNorm + 0.2 * sparsity;
647316
+ const ratio = 0.5 * signalProportion + 0.3 * Math.min(1, Math.max(0, dPrimeAdjusted / 3)) + 0.2 * sparsity;
647304
647317
  const capacityWarning = contextSlots ? contextEntries.length > Math.floor(contextSlots * 0.138) : false;
647305
647318
  const score = this.makeScore(
647306
647319
  ratio,
@@ -647413,9 +647426,12 @@ Call task_complete with the JSON array when done.`,
647413
647426
  signalEntries.length > 0 ? signalEntries : [mean],
647414
647427
  noiseEntries.length > 0 ? noiseEntries : [0.1]
647415
647428
  );
647429
+ const hasSentinelSignal = signalEntries.length === 0;
647430
+ const hasSentinelNoise = noiseEntries.length === 0;
647431
+ const dPrimeAdjusted = hasSentinelSignal || hasSentinelNoise ? dPrime * 0.5 : dPrime;
647416
647432
  const sparsity = computeSparsity(entries.map((e2) => e2.value));
647417
647433
  const signalProportion = signalEntries.length / combinedScores.length;
647418
- const dPrimeNorm = Math.min(1, Math.max(0, dPrime / 3));
647434
+ const dPrimeNorm = Math.min(1, Math.max(0, dPrimeAdjusted / 3));
647419
647435
  const ratio = 0.5 * signalProportion + 0.3 * dPrimeNorm + 0.2 * sparsity;
647420
647436
  const evaluators = [
647421
647437
  relevanceResult.status === "fulfilled" ? "relevance-agent" : "relevance-failed",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.279",
3
+ "version": "1.0.280",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.279",
9
+ "version": "1.0.280",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.279",
3
+ "version": "1.0.280",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",