omnius 1.0.312 → 1.0.314
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 +40 -5
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -556271,6 +556271,37 @@ function nowIso2(now2 = /* @__PURE__ */ new Date()) {
|
|
|
556271
556271
|
function cleanText(value2, max = 600) {
|
|
556272
556272
|
return String(value2 ?? "").replace(/\s+/g, " ").trim().slice(0, max);
|
|
556273
556273
|
}
|
|
556274
|
+
function convertPipesToUnicode(text2) {
|
|
556275
|
+
return text2.replace(/\|/g, "│");
|
|
556276
|
+
}
|
|
556277
|
+
function wrapText(text2, width = 120) {
|
|
556278
|
+
const lines = text2.split("\n");
|
|
556279
|
+
const wrapped = [];
|
|
556280
|
+
for (const line of lines) {
|
|
556281
|
+
if (line.length <= width) {
|
|
556282
|
+
wrapped.push(line);
|
|
556283
|
+
continue;
|
|
556284
|
+
}
|
|
556285
|
+
const words = line.split(/\s+/);
|
|
556286
|
+
let current = "";
|
|
556287
|
+
for (const word2 of words) {
|
|
556288
|
+
if (current.length === 0) {
|
|
556289
|
+
current = word2;
|
|
556290
|
+
} else if (current.length + 1 + word2.length <= width) {
|
|
556291
|
+
current += " " + word2;
|
|
556292
|
+
} else {
|
|
556293
|
+
wrapped.push(current);
|
|
556294
|
+
current = word2;
|
|
556295
|
+
}
|
|
556296
|
+
}
|
|
556297
|
+
if (current.length > 0)
|
|
556298
|
+
wrapped.push(current);
|
|
556299
|
+
}
|
|
556300
|
+
return wrapped.join("\n");
|
|
556301
|
+
}
|
|
556302
|
+
function formatEvidenceSummary(summary) {
|
|
556303
|
+
return wrapText(convertPipesToUnicode(summary), 120);
|
|
556304
|
+
}
|
|
556274
556305
|
function nextId2(prefix, count) {
|
|
556275
556306
|
return `${prefix}_${String(count + 1).padStart(4, "0")}`;
|
|
556276
556307
|
}
|
|
@@ -556421,7 +556452,7 @@ function buildCriticPacketFromLedger(ledger) {
|
|
|
556421
556452
|
lines.push("- none recorded");
|
|
556422
556453
|
for (const evidence of ledger.evidence.slice(-40)) {
|
|
556423
556454
|
const status = evidence.success === true ? "ok" : evidence.success === false ? "failed" : "unknown";
|
|
556424
|
-
lines.push(`- ${evidence.id} [${status}] ${evidence.kind}${evidence.toolName ? `/${evidence.toolName}` : ""}: ${evidence.summary}`);
|
|
556455
|
+
lines.push(`- ${evidence.id} [${status}] ${evidence.kind}${evidence.toolName ? `/${evidence.toolName}` : ""}: ${formatEvidenceSummary(evidence.summary)}`);
|
|
556425
556456
|
}
|
|
556426
556457
|
if (latestCritique) {
|
|
556427
556458
|
lines.push("");
|
|
@@ -556436,7 +556467,7 @@ function buildCriticPacketFromLedger(ledger) {
|
|
|
556436
556467
|
lines.push("- none recorded");
|
|
556437
556468
|
for (const evidence of evidenceSinceCritique) {
|
|
556438
556469
|
const status = evidence.success === true ? "ok" : evidence.success === false ? "failed" : "unknown";
|
|
556439
|
-
lines.push(`- ${evidence.id} [${status}] ${evidence.summary}`);
|
|
556470
|
+
lines.push(`- ${evidence.id} [${status}] ${formatEvidenceSummary(evidence.summary)}`);
|
|
556440
556471
|
}
|
|
556441
556472
|
}
|
|
556442
556473
|
if (ledger.unresolved.length > 0) {
|
|
@@ -580760,6 +580791,8 @@ ${result}`
|
|
|
580760
580791
|
return true;
|
|
580761
580792
|
if (/NATS.*timeout|relay.*timeout|invoke.*timeout/i.test(msg))
|
|
580762
580793
|
return true;
|
|
580794
|
+
if (/maximum context length|context length|Please reduce/i.test(msg))
|
|
580795
|
+
return true;
|
|
580763
580796
|
return false;
|
|
580764
580797
|
}
|
|
580765
580798
|
isGpuSlotUnavailableError(err) {
|
|
@@ -582987,6 +583020,8 @@ var init_cascadeBackend = __esm({
|
|
|
582987
583020
|
return true;
|
|
582988
583021
|
if (/remote inference failed|timed out/i.test(msg))
|
|
582989
583022
|
return true;
|
|
583023
|
+
if (/maximum context length|context length|Please reduce/i.test(msg))
|
|
583024
|
+
return true;
|
|
582990
583025
|
return false;
|
|
582991
583026
|
}
|
|
582992
583027
|
/**
|
|
@@ -610387,7 +610422,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
610387
610422
|
// amber — cohere
|
|
610388
610423
|
});
|
|
610389
610424
|
}
|
|
610390
|
-
const tokInRaw = m2.promptTokens > 0 ? m2.promptTokens : Math.max(m2.estimatedContextTokens, 0);
|
|
610425
|
+
const tokInRaw = m2.promptTokens > 0 ? m2.promptTokens + (this.isStreaming ? this._streamingTokens : 0) : Math.max(m2.estimatedContextTokens, 0);
|
|
610391
610426
|
const effectiveOut = this.effectiveCompletionTokens;
|
|
610392
610427
|
const tokOutRaw = effectiveOut > 0 ? effectiveOut : Math.ceil(
|
|
610393
610428
|
m2.totalTokens > 0 ? m2.totalTokens - m2.promptTokens : m2.estimatedContextTokens * 0.3
|
|
@@ -613316,7 +613351,7 @@ import { promisify as promisify6 } from "node:util";
|
|
|
613316
613351
|
import { existsSync as existsSync112, writeFileSync as writeFileSync58, readFileSync as readFileSync93, appendFileSync as appendFileSync10, mkdirSync as mkdirSync67 } from "node:fs";
|
|
613317
613352
|
import { join as join127 } from "node:path";
|
|
613318
613353
|
import { homedir as homedir41, platform as platform5 } from "node:os";
|
|
613319
|
-
function
|
|
613354
|
+
function wrapText2(value2, width) {
|
|
613320
613355
|
const words = value2.split(/\s+/).filter(Boolean);
|
|
613321
613356
|
const lines = [];
|
|
613322
613357
|
let line = "";
|
|
@@ -614761,7 +614796,7 @@ ${c3.cyan(OMNIUS_FIRST_RUN_BANNER)}
|
|
|
614761
614796
|
};
|
|
614762
614797
|
const boxWrappedDimLine = (content, indent = " ") => {
|
|
614763
614798
|
const formatted = formatMarkdownBlock(content);
|
|
614764
|
-
const lines =
|
|
614799
|
+
const lines = wrapText2(formatted, Math.max(1, boxW - visibleLen2(indent)));
|
|
614765
614800
|
for (const line of lines) {
|
|
614766
614801
|
process.stdout.write(boxLine(`${indent}${c3.dim(line)}`));
|
|
614767
614802
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.314",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.314",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
|
@@ -2573,9 +2573,9 @@
|
|
|
2573
2573
|
"license": "MIT"
|
|
2574
2574
|
},
|
|
2575
2575
|
"node_modules/better-sqlite3": {
|
|
2576
|
-
"version": "12.
|
|
2577
|
-
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.
|
|
2578
|
-
"integrity": "sha512-
|
|
2576
|
+
"version": "12.11.1",
|
|
2577
|
+
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",
|
|
2578
|
+
"integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",
|
|
2579
2579
|
"hasInstallScript": true,
|
|
2580
2580
|
"license": "MIT",
|
|
2581
2581
|
"optional": true,
|
package/package.json
CHANGED