omnius 1.0.312 → 1.0.313
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 +36 -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) {
|
|
@@ -610387,7 +610418,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
610387
610418
|
// amber — cohere
|
|
610388
610419
|
});
|
|
610389
610420
|
}
|
|
610390
|
-
const tokInRaw = m2.promptTokens > 0 ? m2.promptTokens : Math.max(m2.estimatedContextTokens, 0);
|
|
610421
|
+
const tokInRaw = m2.promptTokens > 0 ? m2.promptTokens + (this.isStreaming ? this._streamingTokens : 0) : Math.max(m2.estimatedContextTokens, 0);
|
|
610391
610422
|
const effectiveOut = this.effectiveCompletionTokens;
|
|
610392
610423
|
const tokOutRaw = effectiveOut > 0 ? effectiveOut : Math.ceil(
|
|
610393
610424
|
m2.totalTokens > 0 ? m2.totalTokens - m2.promptTokens : m2.estimatedContextTokens * 0.3
|
|
@@ -613316,7 +613347,7 @@ import { promisify as promisify6 } from "node:util";
|
|
|
613316
613347
|
import { existsSync as existsSync112, writeFileSync as writeFileSync58, readFileSync as readFileSync93, appendFileSync as appendFileSync10, mkdirSync as mkdirSync67 } from "node:fs";
|
|
613317
613348
|
import { join as join127 } from "node:path";
|
|
613318
613349
|
import { homedir as homedir41, platform as platform5 } from "node:os";
|
|
613319
|
-
function
|
|
613350
|
+
function wrapText2(value2, width) {
|
|
613320
613351
|
const words = value2.split(/\s+/).filter(Boolean);
|
|
613321
613352
|
const lines = [];
|
|
613322
613353
|
let line = "";
|
|
@@ -614761,7 +614792,7 @@ ${c3.cyan(OMNIUS_FIRST_RUN_BANNER)}
|
|
|
614761
614792
|
};
|
|
614762
614793
|
const boxWrappedDimLine = (content, indent = " ") => {
|
|
614763
614794
|
const formatted = formatMarkdownBlock(content);
|
|
614764
|
-
const lines =
|
|
614795
|
+
const lines = wrapText2(formatted, Math.max(1, boxW - visibleLen2(indent)));
|
|
614765
614796
|
for (const line of lines) {
|
|
614766
614797
|
process.stdout.write(boxLine(`${indent}${c3.dim(line)}`));
|
|
614767
614798
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.313",
|
|
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.313",
|
|
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