omnius 1.0.367 → 1.0.368
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 +119 -41
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -558608,6 +558608,19 @@ function isFailedVerificationEvidence(entry) {
|
|
|
558608
558608
|
const text2 = `${entry.toolName ?? ""} ${entry.summary}`.toLowerCase();
|
|
558609
558609
|
return /\b(test|tests|verify|verification|build|compile|tsc|vitest|jest|pytest|go test|cargo test)\b/.test(text2);
|
|
558610
558610
|
}
|
|
558611
|
+
function verificationFamily(entry) {
|
|
558612
|
+
const text2 = `${entry.toolName ?? ""} ${entry.summary}`.toLowerCase();
|
|
558613
|
+
if (/\b(vitest|jest|pytest|go test|cargo test|npm test|pnpm test|yarn test|node\s+tests?|test|tests|spec)\b/.test(text2)) {
|
|
558614
|
+
return "test";
|
|
558615
|
+
}
|
|
558616
|
+
if (/\b(typecheck|tsc)\b/.test(text2))
|
|
558617
|
+
return "typecheck";
|
|
558618
|
+
if (/\b(build|built|compile|compiled)\b/.test(text2))
|
|
558619
|
+
return "build";
|
|
558620
|
+
if (/\b(verify|verified|verification)\b/.test(text2))
|
|
558621
|
+
return "verify";
|
|
558622
|
+
return null;
|
|
558623
|
+
}
|
|
558611
558624
|
function isStaleEditEvidence(entry) {
|
|
558612
558625
|
if (entry.success !== false)
|
|
558613
558626
|
return false;
|
|
@@ -558618,13 +558631,24 @@ function finalizeCompletionLedgerTruth(ledger) {
|
|
|
558618
558631
|
let unresolved = [...ledger.unresolved];
|
|
558619
558632
|
let lastMutation = -1;
|
|
558620
558633
|
let lastVerification = -1;
|
|
558634
|
+
const lastSuccessfulVerificationByFamily = /* @__PURE__ */ new Map();
|
|
558621
558635
|
ledger.evidence.forEach((entry, index) => {
|
|
558622
558636
|
if (isMutationEvidence(entry))
|
|
558623
558637
|
lastMutation = index;
|
|
558624
|
-
if (isSuccessfulVerificationEvidence(entry))
|
|
558638
|
+
if (isSuccessfulVerificationEvidence(entry)) {
|
|
558625
558639
|
lastVerification = index;
|
|
558640
|
+
const family = verificationFamily(entry);
|
|
558641
|
+
if (family)
|
|
558642
|
+
lastSuccessfulVerificationByFamily.set(family, index);
|
|
558643
|
+
}
|
|
558644
|
+
});
|
|
558645
|
+
ledger.evidence.forEach((entry, index) => {
|
|
558626
558646
|
if (isFailedVerificationEvidence(entry)) {
|
|
558627
|
-
|
|
558647
|
+
const family = verificationFamily(entry);
|
|
558648
|
+
const resolvedByLaterSuccess = family !== null && (lastSuccessfulVerificationByFamily.get(family) ?? -1) > index;
|
|
558649
|
+
if (!resolvedByLaterSuccess) {
|
|
558650
|
+
unresolved = appendUnresolved(unresolved, `Verification failed or did not prove success: ${entry.summary}`, entry.id);
|
|
558651
|
+
}
|
|
558628
558652
|
}
|
|
558629
558653
|
if (isStaleEditEvidence(entry)) {
|
|
558630
558654
|
unresolved = appendUnresolved(unresolved, `Stale edit failure remains unresolved: ${entry.summary}`, entry.id);
|
|
@@ -568816,6 +568840,16 @@ function classifyShellIntent(cmd) {
|
|
|
568816
568840
|
} else {
|
|
568817
568841
|
verbToken = first2;
|
|
568818
568842
|
}
|
|
568843
|
+
if (isRunner && verbToken === "run" && tokens.length >= 3) {
|
|
568844
|
+
const scriptToken = tokens[2].toLowerCase().replace(/^["']|["']$/g, "");
|
|
568845
|
+
const scriptRow = VERB_TABLE[scriptToken];
|
|
568846
|
+
if (scriptRow) {
|
|
568847
|
+
return { klass: scriptRow.klass, verb: scriptRow.canonical, tool: first2 };
|
|
568848
|
+
}
|
|
568849
|
+
if (/\b(test|spec|vitest|jest|pytest|check|verify|lint|typecheck)\b/i.test(scriptToken)) {
|
|
568850
|
+
return { klass: "verify", verb: "test", tool: first2 };
|
|
568851
|
+
}
|
|
568852
|
+
}
|
|
568819
568853
|
const row = VERB_TABLE[verbToken];
|
|
568820
568854
|
if (!row)
|
|
568821
568855
|
return { klass: "other", verb: verbToken, tool: first2 };
|
|
@@ -568831,7 +568865,7 @@ function verifyShellOutcome(command, ctx3, result) {
|
|
|
568831
568865
|
if (!result.success) {
|
|
568832
568866
|
return { trustworthy: true, intentBucket: baseBucket, outcomeClass: "broken" };
|
|
568833
568867
|
}
|
|
568834
|
-
if (intent.klass === "read") {
|
|
568868
|
+
if (intent.klass === "read" || intent.klass === "verify") {
|
|
568835
568869
|
return { trustworthy: true, intentBucket: baseBucket, outcomeClass: "verified" };
|
|
568836
568870
|
}
|
|
568837
568871
|
const mtimeCheck = checkMutateMtimeDelta(intent, cwd4, ctx3, result);
|
|
@@ -569169,13 +569203,17 @@ var init_postActionVerifier = __esm({
|
|
|
569169
569203
|
build: { canonical: "build", klass: "mutate" },
|
|
569170
569204
|
compile: { canonical: "build", klass: "mutate" },
|
|
569171
569205
|
make: { canonical: "build", klass: "mutate" },
|
|
569172
|
-
// ──
|
|
569173
|
-
test: { canonical: "test", klass: "
|
|
569174
|
-
t: { canonical: "test", klass: "
|
|
569175
|
-
spec: { canonical: "test", klass: "
|
|
569176
|
-
vitest: { canonical: "test", klass: "
|
|
569177
|
-
jest: { canonical: "test", klass: "
|
|
569178
|
-
pytest: { canonical: "test", klass: "
|
|
569206
|
+
// ── verification family (read-only by contract for the verifier) ──────────
|
|
569207
|
+
test: { canonical: "test", klass: "verify" },
|
|
569208
|
+
t: { canonical: "test", klass: "verify" },
|
|
569209
|
+
spec: { canonical: "test", klass: "verify" },
|
|
569210
|
+
vitest: { canonical: "test", klass: "verify" },
|
|
569211
|
+
jest: { canonical: "test", klass: "verify" },
|
|
569212
|
+
pytest: { canonical: "test", klass: "verify" },
|
|
569213
|
+
check: { canonical: "check", klass: "verify" },
|
|
569214
|
+
verify: { canonical: "verify", klass: "verify" },
|
|
569215
|
+
lint: { canonical: "lint", klass: "verify" },
|
|
569216
|
+
typecheck: { canonical: "typecheck", klass: "verify" },
|
|
569179
569217
|
// ── publish / scaffold / generate (mutate) ────────────────────────────────
|
|
569180
569218
|
publish: { canonical: "publish", klass: "mutate" },
|
|
569181
569219
|
init: { canonical: "init", klass: "mutate" },
|
|
@@ -571912,6 +571950,37 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
|
|
|
571912
571950
|
return false;
|
|
571913
571951
|
return true;
|
|
571914
571952
|
}
|
|
571953
|
+
_toolEvidencePreview(result, displayOutput, max = 500) {
|
|
571954
|
+
const modelVisible = result.llmContent ?? result.output ?? displayOutput ?? "";
|
|
571955
|
+
const failurePrefix = result.success === false && result.error ? `Error: ${result.error}` : "";
|
|
571956
|
+
const combined = failurePrefix && modelVisible && !String(modelVisible).startsWith(failurePrefix) ? `${failurePrefix}
|
|
571957
|
+
${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
571958
|
+
return String(combined).slice(0, max);
|
|
571959
|
+
}
|
|
571960
|
+
_recordCompletionToolEvidenceFromResult(input) {
|
|
571961
|
+
if (!this._completionLedger || input.toolName === "task_complete")
|
|
571962
|
+
return;
|
|
571963
|
+
const realFileMutation = input.realFileMutation ?? this._isRealProjectMutation(input.toolName, input.result);
|
|
571964
|
+
const realMutationPaths = input.realMutationPaths ?? (realFileMutation ? this._extractToolTargetPaths(input.toolName, input.args, input.result) : []);
|
|
571965
|
+
this._completionLedger = recordToolEvidence(this._completionLedger, {
|
|
571966
|
+
name: input.toolName,
|
|
571967
|
+
success: input.result.success,
|
|
571968
|
+
outputPreview: (input.outputPreview ?? this._toolEvidencePreview(input.result)).toString().slice(0, 500),
|
|
571969
|
+
argsKey: input.argsKey.slice(0, 300)
|
|
571970
|
+
});
|
|
571971
|
+
if (realFileMutation && realMutationPaths.length > 0) {
|
|
571972
|
+
for (const filePath of realMutationPaths) {
|
|
571973
|
+
this._completionLedger = recordCompletionEvidence(this._completionLedger, {
|
|
571974
|
+
kind: "file_change",
|
|
571975
|
+
toolName: input.toolName,
|
|
571976
|
+
success: true,
|
|
571977
|
+
summary: `file change: ${filePath}`,
|
|
571978
|
+
rawRef: `file://${filePath}`
|
|
571979
|
+
});
|
|
571980
|
+
}
|
|
571981
|
+
}
|
|
571982
|
+
this._saveCompletionLedgerSafe();
|
|
571983
|
+
}
|
|
571915
571984
|
_isAtomicBatchEditAbort(toolName, result) {
|
|
571916
571985
|
if (toolName !== "batch_edit" || !result || result.success !== false) {
|
|
571917
571986
|
return false;
|
|
@@ -572605,10 +572674,20 @@ ${_checks}`
|
|
|
572605
572674
|
const maxCycles = parseInt(process.env["OMNIUS_BACKWARD_PASS_MAX_CYCLES"] || "2", 10) || 2;
|
|
572606
572675
|
if (this._backwardPassCyclesUsed >= maxCycles) {
|
|
572607
572676
|
const lastCritique2 = this._lastBackwardPassCritique;
|
|
572608
|
-
const
|
|
572677
|
+
const evidenceAfterCritique = lastCritique2 ? toolCallLog.slice(lastCritique2.toolLogLength) : [];
|
|
572678
|
+
const freshVerification = evidenceAfterCritique.filter((entry) => {
|
|
572679
|
+
if (entry.success !== true)
|
|
572680
|
+
return false;
|
|
572681
|
+
const text2 = `${entry.name} ${entry.argsKey} ${entry.outputPreview ?? ""}`.toLowerCase();
|
|
572682
|
+
return /\b(test|tests|vitest|jest|pytest|go test|cargo test|npm test|pnpm test|yarn test|typecheck|tsc|build|verify|verification)\b/.test(text2) && /\b(pass|passed|success|exit:?\s*0|ok|0 failures|0 failed)\b/.test(text2);
|
|
572683
|
+
}).slice(-3);
|
|
572684
|
+
const concern = freshVerification.length > 0 ? [
|
|
572685
|
+
"Prior reviewer concern may be stale; fresh verification evidence was recorded after that critique.",
|
|
572686
|
+
...freshVerification.map((entry) => `${entry.name}: ${(entry.outputPreview ?? entry.argsKey).slice(0, 220)}`)
|
|
572687
|
+
].join(" ") : lastCritique2?.rationale?.trim() || this._lastBackwardPassVerdict || "unspecified";
|
|
572609
572688
|
this._completionCaveat = [
|
|
572610
572689
|
`[COMPLETION CAVEAT] Backward-pass review did not fully approve after ${this._backwardPassCyclesUsed}/${maxCycles} cycle(s).`,
|
|
572611
|
-
|
|
572690
|
+
`${freshVerification.length > 0 ? "Reviewer reconciliation note" : "Unresolved reviewer concern"}: ${concern.slice(0, 600)}`,
|
|
572612
572691
|
"The work was completed with deliverables present; treat the above as follow-up rather than a blocker."
|
|
572613
572692
|
].join("\n");
|
|
572614
572693
|
this.emit({
|
|
@@ -580161,7 +580240,7 @@ ${bookkeepingGuidance}` : bookkeepingGuidance;
|
|
|
580161
580240
|
currentLogEntry.success = result.success;
|
|
580162
580241
|
currentLogEntry.mutated = realFileMutation;
|
|
580163
580242
|
currentLogEntry.mutatedFiles = realMutationPaths;
|
|
580164
|
-
currentLogEntry.outputPreview = (result
|
|
580243
|
+
currentLogEntry.outputPreview = this._toolEvidencePreview(result, output);
|
|
580165
580244
|
}
|
|
580166
580245
|
this._toolEvents.push({
|
|
580167
580246
|
name: tc.name,
|
|
@@ -580502,26 +580581,15 @@ Then use file_read on individual FILES inside it.`);
|
|
|
580502
580581
|
lastFailureHandoffTurn = turn;
|
|
580503
580582
|
}
|
|
580504
580583
|
}
|
|
580505
|
-
|
|
580506
|
-
|
|
580507
|
-
|
|
580508
|
-
|
|
580509
|
-
|
|
580510
|
-
|
|
580511
|
-
|
|
580512
|
-
|
|
580513
|
-
|
|
580514
|
-
this._completionLedger = recordCompletionEvidence(this._completionLedger, {
|
|
580515
|
-
kind: "file_change",
|
|
580516
|
-
toolName: tc.name,
|
|
580517
|
-
success: true,
|
|
580518
|
-
summary: `file change: ${filePath2}`,
|
|
580519
|
-
rawRef: `file://${filePath2}`
|
|
580520
|
-
});
|
|
580521
|
-
}
|
|
580522
|
-
}
|
|
580523
|
-
this._saveCompletionLedgerSafe();
|
|
580524
|
-
}
|
|
580584
|
+
this._recordCompletionToolEvidenceFromResult({
|
|
580585
|
+
toolName: tc.name,
|
|
580586
|
+
argsKey: tc.arguments ? JSON.stringify(tc.arguments) : "",
|
|
580587
|
+
args: tc.arguments,
|
|
580588
|
+
result,
|
|
580589
|
+
outputPreview: this._toolEvidencePreview(result, output),
|
|
580590
|
+
realFileMutation,
|
|
580591
|
+
realMutationPaths
|
|
580592
|
+
});
|
|
580525
580593
|
this._onTypedEvent?.({
|
|
580526
580594
|
type: "tool_call_finished",
|
|
580527
580595
|
runId: this._sessionId ?? "unknown",
|
|
@@ -581617,6 +581685,15 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
|
|
|
581617
581685
|
} else {
|
|
581618
581686
|
output = modelContent2;
|
|
581619
581687
|
}
|
|
581688
|
+
const bfRealFileMutation = this._isRealProjectMutation(tc.name, result);
|
|
581689
|
+
const bfRealMutationPaths = bfRealFileMutation ? this._extractToolTargetPaths(tc.name, tc.arguments, result) : [];
|
|
581690
|
+
const bfLogEntry = toolCallLog[toolCallLog.length - 1];
|
|
581691
|
+
if (bfLogEntry) {
|
|
581692
|
+
bfLogEntry.success = result.success;
|
|
581693
|
+
bfLogEntry.mutated = bfRealFileMutation;
|
|
581694
|
+
bfLogEntry.mutatedFiles = bfRealMutationPaths;
|
|
581695
|
+
bfLogEntry.outputPreview = this._toolEvidencePreview(result, output);
|
|
581696
|
+
}
|
|
581620
581697
|
this.emit({
|
|
581621
581698
|
type: "tool_result",
|
|
581622
581699
|
toolName: tc.name,
|
|
@@ -581626,14 +581703,15 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
|
|
|
581626
581703
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
581627
581704
|
});
|
|
581628
581705
|
this._trackDecomp2(tc, result, turn);
|
|
581629
|
-
|
|
581630
|
-
|
|
581631
|
-
|
|
581632
|
-
|
|
581633
|
-
|
|
581634
|
-
|
|
581635
|
-
|
|
581636
|
-
|
|
581706
|
+
this._recordCompletionToolEvidenceFromResult({
|
|
581707
|
+
toolName: tc.name,
|
|
581708
|
+
argsKey: bfArgsKey,
|
|
581709
|
+
args: tc.arguments,
|
|
581710
|
+
result,
|
|
581711
|
+
outputPreview: this._toolEvidencePreview(result, output),
|
|
581712
|
+
realFileMutation: bfRealFileMutation,
|
|
581713
|
+
realMutationPaths: bfRealMutationPaths
|
|
581714
|
+
});
|
|
581637
581715
|
const enoentTools2 = /* @__PURE__ */ new Set([
|
|
581638
581716
|
"file_read",
|
|
581639
581717
|
"list_directory",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.368",
|
|
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.368",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED