omnius 1.0.469 → 1.0.470
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 +86 -13
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -575514,7 +575514,7 @@ function compactCachedEvidence(text2) {
|
|
|
575514
575514
|
const lineCount = value2 ? value2.split("\n").length : 0;
|
|
575515
575515
|
const sha = value2.match(/sha256=([a-f0-9]{8,64})/i)?.[1];
|
|
575516
575516
|
const header = value2.match(/\[FILE CONTEXT \|[^\]]+\]/)?.[0];
|
|
575517
|
-
const preview = value2
|
|
575517
|
+
const preview = meaningfulCachedEvidencePreview(value2);
|
|
575518
575518
|
return [
|
|
575519
575519
|
"Cached evidence is already available in the active context/tool cache; full payload omitted from this block to avoid context bloat.",
|
|
575520
575520
|
`cached_size=${lineCount} lines, ${value2.length} chars`,
|
|
@@ -575524,6 +575524,35 @@ function compactCachedEvidence(text2) {
|
|
|
575524
575524
|
"Use the cached evidence now, or request a distinct offset/limit/query if genuinely needed."
|
|
575525
575525
|
].filter(Boolean).join("\n");
|
|
575526
575526
|
}
|
|
575527
|
+
function meaningfulCachedEvidencePreview(text2) {
|
|
575528
|
+
const lines = text2.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
575529
|
+
const preview = [];
|
|
575530
|
+
const push = (value2) => {
|
|
575531
|
+
if (!value2)
|
|
575532
|
+
return;
|
|
575533
|
+
if (preview.includes(value2))
|
|
575534
|
+
return;
|
|
575535
|
+
preview.push(value2);
|
|
575536
|
+
};
|
|
575537
|
+
for (let i2 = 0; i2 < lines.length; i2++) {
|
|
575538
|
+
const line = lines[i2];
|
|
575539
|
+
if (line.startsWith("[trust_tier:") || line.startsWith("[quoted_tool_output:") || line === "---" || line === "[SHELL RESULT CACHE]" || line === "[SHELL TRANSCRIPT]" || /^cwd_(?:before|after|note):/i.test(line) || line === "output:" || line === "stderr:" || line === "[no stderr captured]") {
|
|
575540
|
+
continue;
|
|
575541
|
+
}
|
|
575542
|
+
if (line === "stdout:" || line === "error:") {
|
|
575543
|
+
const next = lines.slice(i2 + 1).find((candidate) => candidate && candidate !== "[no stdout captured]" && candidate !== "[no stderr captured]" && candidate !== "[SHELL TRANSCRIPT]" && candidate !== "stderr:" && !/^cwd_(?:before|after|note):/i.test(candidate));
|
|
575544
|
+
if (next)
|
|
575545
|
+
push(`${line} ${next}`);
|
|
575546
|
+
continue;
|
|
575547
|
+
}
|
|
575548
|
+
if (line === "[no stdout captured]")
|
|
575549
|
+
continue;
|
|
575550
|
+
push(line);
|
|
575551
|
+
if (preview.join(" | ").length >= 520 || preview.length >= 5)
|
|
575552
|
+
break;
|
|
575553
|
+
}
|
|
575554
|
+
return preview.join(" | ").slice(0, 700);
|
|
575555
|
+
}
|
|
575527
575556
|
function actionReasonSummary(actionReason) {
|
|
575528
575557
|
if (!actionReason)
|
|
575529
575558
|
return "";
|
|
@@ -578844,6 +578873,7 @@ var init_agenticRunner = __esm({
|
|
|
578844
578873
|
init_completionLedger();
|
|
578845
578874
|
init_completionAutoFinalize();
|
|
578846
578875
|
init_verificationCommand();
|
|
578876
|
+
init_completionContract();
|
|
578847
578877
|
init_dist6();
|
|
578848
578878
|
init_ollama_pool();
|
|
578849
578879
|
init_personality();
|
|
@@ -581847,8 +581877,11 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
581847
581877
|
const realFileMutation = input.realFileMutation ?? this._isRealProjectMutation(input.toolName, input.result);
|
|
581848
581878
|
const attemptedTargetPaths = this._extractToolTargetPaths(input.toolName, input.args, input.result);
|
|
581849
581879
|
const realMutationPaths = input.realMutationPaths ?? (realFileMutation ? attemptedTargetPaths : []);
|
|
581850
|
-
const
|
|
581851
|
-
const
|
|
581880
|
+
const shellActionReasonScope = input.toolName === "shell" ? input.actionReason?.scope : void 0;
|
|
581881
|
+
const shellActionReasonDeclaresVerification = shellActionReasonScope === "verification";
|
|
581882
|
+
const shellActionReasonDeclaresNonVerification = typeof shellActionReasonScope === "string" && shellActionReasonScope.length > 0 && shellActionReasonScope !== "verification";
|
|
581883
|
+
const shellVerification = input.toolName === "shell" && (shellActionReasonDeclaresVerification || !shellActionReasonDeclaresNonVerification && input.result.runtimeAuthored !== true && this._shellResultLooksLikeVerification(input.args, input.result));
|
|
581884
|
+
const shellVerificationFamily = shellVerification ? this._shellVerificationFamily(input.args, input.actionReason) : "";
|
|
581852
581885
|
if (input.result.success === true && this._isProjectEditTool(input.toolName) && !realFileMutation && input.result.alreadyApplied !== true) {
|
|
581853
581886
|
return;
|
|
581854
581887
|
}
|
|
@@ -581861,8 +581894,8 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
581861
581894
|
outputPreview: (input.outputPreview ?? this._toolEvidencePreview(input.result, void 0, 1200, input.toolName)).toString().slice(0, input.toolName === "audio_analyze" || input.toolName === "video_understand" ? 1200 : 500),
|
|
581862
581895
|
argsKey: input.argsKey.slice(0, 300),
|
|
581863
581896
|
targetPaths: attemptedTargetPaths,
|
|
581864
|
-
role: input.result.completionEvidenceRole ?? (input.result.alreadyApplied === true ? "mutation" : realFileMutation ? "mutation" : input.result.runtimeAuthored === true ? "blocker" : shellVerification ? "verification" : void 0),
|
|
581865
|
-
family: input.result.completionEvidenceFamily ?? (input.result.runtimeAuthored === true ? "runtime_control" : shellVerification ? shellVerificationFamily : void 0),
|
|
581897
|
+
role: input.result.completionEvidenceRole ?? (input.result.alreadyApplied === true ? "mutation" : realFileMutation ? "mutation" : input.result.runtimeAuthored === true && !shellVerification ? "blocker" : shellVerification ? "verification" : void 0),
|
|
581898
|
+
family: input.result.completionEvidenceFamily ?? (input.result.runtimeAuthored === true && !shellVerification ? "runtime_control" : shellVerification ? shellVerificationFamily : void 0),
|
|
581866
581899
|
verificationImpact: input.result.completionVerificationImpact ?? (input.result.alreadyApplied === true ? "neutral" : realFileMutation ? "invalidates" : void 0),
|
|
581867
581900
|
metrics: input.result.completionEvidenceMetrics
|
|
581868
581901
|
});
|
|
@@ -581882,7 +581915,17 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
581882
581915
|
}
|
|
581883
581916
|
this._saveCompletionLedgerSafe();
|
|
581884
581917
|
}
|
|
581885
|
-
_shellVerificationFamily(args) {
|
|
581918
|
+
_shellVerificationFamily(args, actionReason) {
|
|
581919
|
+
if (actionReason?.scope === "verification") {
|
|
581920
|
+
const stableParts = [
|
|
581921
|
+
actionReason.task_anchor,
|
|
581922
|
+
actionReason.expected_result
|
|
581923
|
+
].map((part) => String(part ?? "").trim()).filter(Boolean);
|
|
581924
|
+
const semanticKey = (stableParts.length > 0 ? stableParts : [String(actionReason.intent ?? "").trim()].filter(Boolean)).join(" | ");
|
|
581925
|
+
const normalized2 = normalizeCompletionKey(semanticKey || "shell verification", "shell_verification").slice(0, 140);
|
|
581926
|
+
if (normalized2)
|
|
581927
|
+
return `shell-action:${normalized2}`;
|
|
581928
|
+
}
|
|
581886
581929
|
const command = String(args?.["command"] ?? args?.["cmd"] ?? "").trim();
|
|
581887
581930
|
const normalized = normalizeShellCommand(command);
|
|
581888
581931
|
return `shell:${(normalized || command || "verification").slice(0, 160)}`;
|
|
@@ -581891,10 +581934,8 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
581891
581934
|
const command = String(args?.["command"] ?? args?.["cmd"] ?? "");
|
|
581892
581935
|
if (!command.trim())
|
|
581893
581936
|
return false;
|
|
581894
|
-
|
|
581895
|
-
|
|
581896
|
-
${result.error ?? ""}`;
|
|
581897
|
-
return /\b(test|tests|vitest|jest|pytest|go test|cargo test|npm test|pnpm test|yarn test|typecheck|tsc|build|verify|verification|check)\b/i.test(text2);
|
|
581937
|
+
void result;
|
|
581938
|
+
return /\b(test|tests|vitest|jest|pytest|go test|cargo test|npm test|pnpm test|yarn test|typecheck|tsc|build|verify|verification|check)\b/i.test(command);
|
|
581898
581939
|
}
|
|
581899
581940
|
_shouldSuppressCompletionDiscoveryEvidence(toolName, result, targetPaths) {
|
|
581900
581941
|
if (result.success !== true)
|
|
@@ -584306,7 +584347,7 @@ ${sections.join("\n")}` : sections.join("\n");
|
|
|
584306
584347
|
_buildRepeatCachedEvidenceNotice(toolName, args, hits, cachedResult) {
|
|
584307
584348
|
const argPreview = JSON.stringify(args ?? {}).slice(0, 200);
|
|
584308
584349
|
const target = this.extractPrimaryToolPath(args) || argPreview;
|
|
584309
|
-
const summary = this._summarizeCachedToolResult(cachedResult);
|
|
584350
|
+
const summary = this._summarizeCachedToolResult(toolName, cachedResult);
|
|
584310
584351
|
return [
|
|
584311
584352
|
"[REPEAT GATE - cached evidence not re-sent]",
|
|
584312
584353
|
`Exact repeat #${hits} of ${toolName}(${argPreview}).`,
|
|
@@ -584318,17 +584359,46 @@ ${sections.join("\n")}` : sections.join("\n");
|
|
|
584318
584359
|
"If you need different information, use a distinct offset/limit/query. For broad multi-file discovery, use file_explore, grep_search, fanout_explore, or full_sub_agent instead of repeating this call."
|
|
584319
584360
|
].join("\n");
|
|
584320
584361
|
}
|
|
584321
|
-
_summarizeCachedToolResult(output) {
|
|
584362
|
+
_summarizeCachedToolResult(toolName, output) {
|
|
584322
584363
|
const text2 = output || "";
|
|
584323
584364
|
const lineCount = text2 ? text2.split("\n").length : 0;
|
|
584324
584365
|
const sha = text2.match(/sha256=([a-f0-9]{8,64})/i)?.[1];
|
|
584325
584366
|
const header = text2.match(/\[FILE CONTEXT \|[^\]]+\]/)?.[0];
|
|
584367
|
+
const preview = toolName === "shell" ? this._meaningfulCachedShellPreview(text2) : "";
|
|
584326
584368
|
return [
|
|
584327
584369
|
`cached_size=${lineCount} lines, ${text2.length} chars`,
|
|
584328
584370
|
sha ? `cached_sha256=${sha.slice(0, 16)}` : "",
|
|
584329
|
-
header ? `cached_header=${header.slice(0, 220)}` : ""
|
|
584371
|
+
header ? `cached_header=${header.slice(0, 220)}` : "",
|
|
584372
|
+
preview ? `cached_preview=${preview}` : ""
|
|
584330
584373
|
].filter(Boolean).join("\n");
|
|
584331
584374
|
}
|
|
584375
|
+
_meaningfulCachedShellPreview(text2) {
|
|
584376
|
+
const lines = text2.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
584377
|
+
const preview = [];
|
|
584378
|
+
const push = (value2) => {
|
|
584379
|
+
if (!value2 || preview.includes(value2))
|
|
584380
|
+
return;
|
|
584381
|
+
preview.push(value2);
|
|
584382
|
+
};
|
|
584383
|
+
for (let i2 = 0; i2 < lines.length; i2++) {
|
|
584384
|
+
const line = lines[i2];
|
|
584385
|
+
if (line.startsWith("[trust_tier:") || line.startsWith("[quoted_tool_output:") || line === "---" || line === "[SHELL RESULT CACHE]" || line === "[SHELL TRANSCRIPT]" || /^cwd_(?:before|after|note):/i.test(line) || line === "output:" || line === "stderr:" || line === "[no stderr captured]") {
|
|
584386
|
+
continue;
|
|
584387
|
+
}
|
|
584388
|
+
if (line === "stdout:" || line === "error:") {
|
|
584389
|
+
const next = lines.slice(i2 + 1).find((candidate) => candidate && candidate !== "[no stdout captured]" && candidate !== "[no stderr captured]" && candidate !== "[SHELL TRANSCRIPT]" && candidate !== "stderr:" && !/^cwd_(?:before|after|note):/i.test(candidate));
|
|
584390
|
+
if (next)
|
|
584391
|
+
push(`${line} ${next}`);
|
|
584392
|
+
continue;
|
|
584393
|
+
}
|
|
584394
|
+
if (line === "[no stdout captured]")
|
|
584395
|
+
continue;
|
|
584396
|
+
push(line);
|
|
584397
|
+
if (preview.join(" | ").length >= 520 || preview.length >= 5)
|
|
584398
|
+
break;
|
|
584399
|
+
}
|
|
584400
|
+
return preview.join(" | ").slice(0, 700);
|
|
584401
|
+
}
|
|
584332
584402
|
_renderKnowledgeBlock(recentToolResults) {
|
|
584333
584403
|
if (recentToolResults.size === 0)
|
|
584334
584404
|
return null;
|
|
@@ -591635,6 +591705,7 @@ Then use file_read on individual FILES inside it.`);
|
|
|
591635
591705
|
toolName: tc.name,
|
|
591636
591706
|
argsKey: tc.arguments ? JSON.stringify(tc.arguments) : "",
|
|
591637
591707
|
args: tc.arguments,
|
|
591708
|
+
actionReason: toolActionReason,
|
|
591638
591709
|
result,
|
|
591639
591710
|
outputPreview: this._toolEvidencePreview(result, output, 1200, tc.name),
|
|
591640
591711
|
realFileMutation,
|
|
@@ -592628,6 +592699,7 @@ ${this.options.maxTurns && this.options.maxTurns > 0 ? `You have ${this.options.
|
|
|
592628
592699
|
if (this.aborted)
|
|
592629
592700
|
break;
|
|
592630
592701
|
toolCallCount++;
|
|
592702
|
+
const bfActionReason = this._toolActionReasonForCall(tc.name, tc.arguments ?? {});
|
|
592631
592703
|
const bfArgsKey = this._buildExactArgsKey(tc.arguments ?? {});
|
|
592632
592704
|
toolCallLog.push({ name: tc.name, argsKey: bfArgsKey });
|
|
592633
592705
|
this._toolLastUsedTurn.set(tc.name, turn);
|
|
@@ -592772,6 +592844,7 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
|
|
|
592772
592844
|
toolName: tc.name,
|
|
592773
592845
|
argsKey: bfArgsKey,
|
|
592774
592846
|
args: tc.arguments,
|
|
592847
|
+
actionReason: bfActionReason,
|
|
592775
592848
|
result,
|
|
592776
592849
|
outputPreview: this._toolEvidencePreview(result, output, 1200, tc.name),
|
|
592777
592850
|
realFileMutation: bfRealFileMutation,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.470",
|
|
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.470",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED