omnius 1.0.878 → 1.0.880
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/api/py-embed.js +4 -1
- package/dist/index.js +2 -2
- package/dist/library.js +126 -132
- package/dist/omni-setup-worker.js +4 -1
- package/dist/tui/native/worker.js +436 -162
- package/dist/update-worker-runtime.js +265 -134
- package/docs/DISCOVERY.json +251 -0
- package/docs/DISCOVERY.md +7 -0
- package/docs/work-orders/evidence/explicit-shell-run-views-20261018.json +212 -0
- package/docs/work-orders/evidence/explicit-shell-runs-verification-20261018.json +288 -0
- package/docs/work-orders/evidence/native-space-allocation-verification-20261017.json +177 -0
- package/docs/work-orders/evidence/persistent-shell-tabs-verification-20261018.json +188 -0
- package/docs/work-orders/evidence/persistent-shell-tabs-vte-20261018.json +2307 -0
- package/docs/work-orders/evidence/update-enotempty-real-npm10-20261018.json +229 -0
- package/docs/work-orders/evidence/update-enotempty-verification-20261018.json +94 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -8250,6 +8250,22 @@ var init_network_egress_policy = __esm({
|
|
|
8250
8250
|
}
|
|
8251
8251
|
});
|
|
8252
8252
|
|
|
8253
|
+
// packages/execution/dist/shell-runs.js
|
|
8254
|
+
var init_shell_runs = __esm({
|
|
8255
|
+
"packages/execution/dist/shell-runs.js"() {
|
|
8256
|
+
"use strict";
|
|
8257
|
+
}
|
|
8258
|
+
});
|
|
8259
|
+
|
|
8260
|
+
// packages/execution/dist/shell-run-control.js
|
|
8261
|
+
var init_shell_run_control = __esm({
|
|
8262
|
+
"packages/execution/dist/shell-run-control.js"() {
|
|
8263
|
+
"use strict";
|
|
8264
|
+
init_process_lifecycle();
|
|
8265
|
+
init_process_kill();
|
|
8266
|
+
}
|
|
8267
|
+
});
|
|
8268
|
+
|
|
8253
8269
|
// packages/execution/dist/tools/log-packet.js
|
|
8254
8270
|
var init_log_packet = __esm({
|
|
8255
8271
|
"packages/execution/dist/tools/log-packet.js"() {
|
|
@@ -8569,12 +8585,14 @@ function exactTrailingExitReporterPrimary(command) {
|
|
|
8569
8585
|
}
|
|
8570
8586
|
function trustedTrailingExitReporterPrimary(command, receipt) {
|
|
8571
8587
|
const primary = exactTrailingExitReporterPrimary(command);
|
|
8572
|
-
if (!primary || !receipt || receipt.timedOut || receipt.exitCode !== 0 || receipt.primaryExitCode !== 0 || receipt.primaryExitProvenance !== "trailing_exit_reporter" || normalizeShellCommand(receipt.primaryCommand ?? "") !== normalizeShellCommand(primary)) {
|
|
8588
|
+
if (!primary || !receipt || receipt.timedOut || receipt.cancelled === true || receipt.exitCode !== 0 || receipt.primaryExitCode !== 0 || receipt.primaryExitProvenance !== "trailing_exit_reporter" || normalizeShellCommand(receipt.primaryCommand ?? "") !== normalizeShellCommand(primary)) {
|
|
8573
8589
|
return null;
|
|
8574
8590
|
}
|
|
8575
8591
|
return normalizeShellCommand(receipt.canonicalCommand) === normalizeShellCommand(command) ? primary : null;
|
|
8576
8592
|
}
|
|
8577
8593
|
function describeUntrustedVerificationCommand(command, receipt) {
|
|
8594
|
+
if (receipt?.cancelled === true)
|
|
8595
|
+
return "the command belongs to a cancelled execution";
|
|
8578
8596
|
const primary = exactTrailingExitReporterPrimary(command);
|
|
8579
8597
|
if (primary) {
|
|
8580
8598
|
if (!receipt) {
|
|
@@ -8736,7 +8754,7 @@ function isTeeSink(stage2) {
|
|
|
8736
8754
|
return /^tee(?:\s+(?:-a|--append|--ignore-interrupts))*\s+(?:--\s+)?\S+/i.test(stage2.trim());
|
|
8737
8755
|
}
|
|
8738
8756
|
function receiptTrustsPipeline(receipt) {
|
|
8739
|
-
return Boolean(receipt && receipt.pipefail === true && receipt.timedOut !== true && receipt.exitCode === 0);
|
|
8757
|
+
return Boolean(receipt && receipt.pipefail === true && receipt.timedOut !== true && receipt.cancelled !== true && receipt.exitCode === 0);
|
|
8740
8758
|
}
|
|
8741
8759
|
function isFileDescriptorRedirectionAmpersand(command, index) {
|
|
8742
8760
|
return command[index - 1] === ">" && /[0-9-]/.test(command[index + 1] ?? "");
|
|
@@ -8898,6 +8916,8 @@ function commandIsPureReadOnlyPipeline(command) {
|
|
|
8898
8916
|
});
|
|
8899
8917
|
}
|
|
8900
8918
|
function commandReliablySatisfiesVerifyCommand(observedCommand, verifyCommand, receipt) {
|
|
8919
|
+
if (receipt?.cancelled === true)
|
|
8920
|
+
return false;
|
|
8901
8921
|
if (/[\r\n]/.test(observedCommand))
|
|
8902
8922
|
return false;
|
|
8903
8923
|
const reporterPrimary = trustedTrailingExitReporterPrimary(observedCommand, receipt);
|
|
@@ -9002,6 +9022,8 @@ function parseVerificationStage(source) {
|
|
|
9002
9022
|
return { source, words: words3, writesRedirectedFile };
|
|
9003
9023
|
}
|
|
9004
9024
|
function parseVerificationCommandStages(command, receipt) {
|
|
9025
|
+
if (receipt?.cancelled === true)
|
|
9026
|
+
return null;
|
|
9005
9027
|
const source = trustedTrailingExitReporterPrimary(command, receipt) ?? command;
|
|
9006
9028
|
if (!source.trim() || hasUnsafeVerifierSyntaxExceptPipeline(source))
|
|
9007
9029
|
return null;
|
|
@@ -9337,6 +9359,8 @@ var init_system_auth = __esm({
|
|
|
9337
9359
|
var init_shell = __esm({
|
|
9338
9360
|
"packages/execution/dist/tools/shell.js"() {
|
|
9339
9361
|
"use strict";
|
|
9362
|
+
init_shell_runs();
|
|
9363
|
+
init_shell_run_control();
|
|
9340
9364
|
init_process_kill();
|
|
9341
9365
|
init_process_lifecycle();
|
|
9342
9366
|
init_log_packet();
|
|
@@ -82736,7 +82760,8 @@ var init_git_info = __esm({
|
|
|
82736
82760
|
var init_background_task = __esm({
|
|
82737
82761
|
"packages/execution/dist/tools/background-task.js"() {
|
|
82738
82762
|
"use strict";
|
|
82739
|
-
|
|
82763
|
+
init_shell_runs();
|
|
82764
|
+
init_shell_run_control();
|
|
82740
82765
|
init_background_process_receipt();
|
|
82741
82766
|
init_process_lifecycle();
|
|
82742
82767
|
}
|
|
@@ -88393,6 +88418,7 @@ function evidenceFingerprint(evidence) {
|
|
|
88393
88418
|
cwd: evidence.commandReceipt.cwd,
|
|
88394
88419
|
exitCode: evidence.commandReceipt.exitCode,
|
|
88395
88420
|
timedOut: evidence.commandReceipt.timedOut,
|
|
88421
|
+
cancelled: evidence.commandReceipt.cancelled,
|
|
88396
88422
|
startedAtIso: evidence.commandReceipt.startedAtIso,
|
|
88397
88423
|
finishedAtIso: evidence.commandReceipt.finishedAtIso
|
|
88398
88424
|
} : void 0,
|
|
@@ -88407,7 +88433,7 @@ function normalizeCommandText(value) {
|
|
|
88407
88433
|
return value.replace(/\s+/g, " ").trim();
|
|
88408
88434
|
}
|
|
88409
88435
|
function isSuccessfulCommandEvidenceReceipt(receipt) {
|
|
88410
|
-
return receipt.schema === "omnius.command-evidence-receipt.v1" && receipt.timedOut === false && receipt.exitCode === 0 && (receipt.primaryExitCode === void 0 || receipt.primaryExitCode === 0) && (receipt.runnerExitCode === void 0 || receipt.runnerExitCode === 0);
|
|
88436
|
+
return receipt.schema === "omnius.command-evidence-receipt.v1" && receipt.timedOut === false && receipt.cancelled !== true && receipt.exitCode === 0 && (receipt.primaryExitCode === void 0 || receipt.primaryExitCode === 0) && (receipt.runnerExitCode === void 0 || receipt.runnerExitCode === 0);
|
|
88411
88437
|
}
|
|
88412
88438
|
function normalizeTrustedCommandReceipt(receipt) {
|
|
88413
88439
|
if (receipt?.schema !== "omnius.command-evidence-receipt.v1") {
|
|
@@ -88427,7 +88453,7 @@ function normalizeTrustedCommandReceipt(receipt) {
|
|
|
88427
88453
|
if (finishedAt < startedAt) {
|
|
88428
88454
|
throw new WorkboardError("invalid_command_receipt", "command receipt finished before it started");
|
|
88429
88455
|
}
|
|
88430
|
-
if (typeof receipt.pipefail !== "boolean" || typeof receipt.timedOut !== "boolean") {
|
|
88456
|
+
if (typeof receipt.pipefail !== "boolean" || typeof receipt.timedOut !== "boolean" || receipt.cancelled !== void 0 && typeof receipt.cancelled !== "boolean") {
|
|
88431
88457
|
throw new WorkboardError("invalid_command_receipt", "command evidence receipt is missing process flags");
|
|
88432
88458
|
}
|
|
88433
88459
|
return cloneCommandEvidenceReceipt({
|
|
@@ -89059,6 +89085,7 @@ function writeTodosLocked(sessionId, incoming) {
|
|
|
89059
89085
|
completedAt: status2 === "completed" ? existing?.completedAt ?? now2 : void 0,
|
|
89060
89086
|
verifyCommand: t.verifyCommand ?? existing?.verifyCommand,
|
|
89061
89087
|
// REG-37
|
|
89088
|
+
completionJustification: t.completionJustification ?? existing?.completionJustification,
|
|
89062
89089
|
declaredArtifacts: t.declaredArtifacts ?? existing?.declaredArtifacts
|
|
89063
89090
|
// REG-38
|
|
89064
89091
|
};
|
|
@@ -336547,6 +336574,7 @@ var init_dist5 = __esm({
|
|
|
336547
336574
|
init_provenance();
|
|
336548
336575
|
init_network_egress_policy();
|
|
336549
336576
|
init_shell();
|
|
336577
|
+
init_shell_runs();
|
|
336550
336578
|
init_debate();
|
|
336551
336579
|
init_replay_with_intervention();
|
|
336552
336580
|
init_file_read();
|
|
@@ -343499,13 +343527,13 @@ function createOpenCodeCompatibilityTools() {
|
|
|
343499
343527
|
type: "function",
|
|
343500
343528
|
function: {
|
|
343501
343529
|
name: "shell",
|
|
343502
|
-
description: "Execute a shell command and return its output. Commands run on Linux using /bin/bash. Quote file paths containing spaces or special characters. Prefer dedicated tools over shell commands when possible. When output is large, the full result is saved to a file and a truncated preview is returned.
|
|
343530
|
+
description: "Execute a shell command and return its output. Commands run on Linux using /bin/bash. Quote file paths containing spaces or special characters. Prefer dedicated tools over shell commands when possible. When output is large, the full result is saved to a file and a truncated preview is returned. Every call must explicitly choose a positive integer timeout in milliseconds or null for no deadline. Background commands return immediately, and you will be notified when they complete.",
|
|
343503
343531
|
parameters: { type: "object", properties: {
|
|
343504
343532
|
command: { type: "string", description: "Shell command string to execute" },
|
|
343505
343533
|
workdir: { type: "string", description: "Working directory to execute the command in. Defaults to the current working directory. When possible, avoid changing directories in the command and set the working directory here instead." },
|
|
343506
|
-
timeout: { type: "integer", minimum:
|
|
343534
|
+
timeout: { type: ["integer", "null"], minimum: 1, description: "Required positive integer deadline in milliseconds, or null for no deadline until an explicit Stop." },
|
|
343507
343535
|
background: { type: "boolean", description: "Run the command in the background and return immediately (useful for dev servers and long-running builds). You do not need to use '&' at the end of the command when using this parameter. You will be notified when it completes. DO NOT poll for completion." }
|
|
343508
|
-
}, required: ["command"], additionalProperties: false }
|
|
343536
|
+
}, required: ["command", "timeout"], additionalProperties: false }
|
|
343509
343537
|
}
|
|
343510
343538
|
}];
|
|
343511
343539
|
}
|
|
@@ -350494,10 +350522,10 @@ function hasClaimPathOverlap(claim, evidence) {
|
|
|
350494
350522
|
}
|
|
350495
350523
|
function trustedSuccessfulReceipt(evidence) {
|
|
350496
350524
|
const receipt = evidence.receipt;
|
|
350497
|
-
return evidence.success === true && Boolean(receipt && receipt.canonicalCommand && receipt.cwd && receipt.exitCode === 0 && receipt.timedOut !== true && receipt.finishedAtIso);
|
|
350525
|
+
return evidence.success === true && Boolean(receipt && receipt.canonicalCommand && receipt.cwd && receipt.exitCode === 0 && receipt.timedOut !== true && receipt.cancelled !== true && receipt.finishedAtIso);
|
|
350498
350526
|
}
|
|
350499
350527
|
function evidenceMatchesClaimNeed(claim, evidence, need) {
|
|
350500
|
-
if (evidence.success !== true)
|
|
350528
|
+
if (evidence.success !== true || evidence.receipt?.cancelled === true)
|
|
350501
350529
|
return false;
|
|
350502
350530
|
const pathOverlap = hasClaimPathOverlap(claim, evidence);
|
|
350503
350531
|
switch (need.evidenceKind) {
|
|
@@ -350555,7 +350583,7 @@ function reconcileClaimsWithEvidence(ledger) {
|
|
|
350555
350583
|
const allNeedsMet = claim.evidenceNeeds.every((need) => linked.some((entry) => evidenceMatchesClaimNeed(claim, entry, need)) || // Preserve explicit evidence links authored by a caller. They remain
|
|
350556
350584
|
// subject to failure/receipt validation above, but should not be
|
|
350557
350585
|
// reclassified only because a legacy emitter lacked role metadata.
|
|
350558
|
-
explicit.some((entry) => entry.success === true));
|
|
350586
|
+
explicit.some((entry) => entry.success === true && entry.receipt?.cancelled !== true));
|
|
350559
350587
|
const independentMet = !claim.requiresIndependentEvidence || Boolean(independent);
|
|
350560
350588
|
return {
|
|
350561
350589
|
...claim,
|
|
@@ -350661,7 +350689,7 @@ function isSuccessfulVerificationEvidence(entry) {
|
|
|
350661
350689
|
return false;
|
|
350662
350690
|
if (!entry.receipt)
|
|
350663
350691
|
return true;
|
|
350664
|
-
return entry.receipt.schema === "omnius.command-evidence-receipt.v1" && Boolean(entry.receipt.canonicalCommand.trim()) && Boolean(entry.receipt.cwd.trim()) && entry.receipt.exitCode === 0 && !entry.receipt.timedOut && entry.receipt.declaredVerification?.outcome !== "fail";
|
|
350692
|
+
return entry.receipt.schema === "omnius.command-evidence-receipt.v1" && Boolean(entry.receipt.canonicalCommand.trim()) && Boolean(entry.receipt.cwd.trim()) && entry.receipt.exitCode === 0 && !entry.receipt.timedOut && entry.receipt.cancelled !== true && entry.receipt.declaredVerification?.outcome !== "fail";
|
|
350665
350693
|
}
|
|
350666
350694
|
function isFailedVerificationEvidence(entry) {
|
|
350667
350695
|
return entry.role === "verification" && (entry.success === false || // A typed failed, timed-out or malformed receipt overrides a positive
|
|
@@ -350671,6 +350699,8 @@ function isFailedVerificationEvidence(entry) {
|
|
|
350671
350699
|
function isSuccessfulPostMutationObservation(entry) {
|
|
350672
350700
|
if (entry.success !== true)
|
|
350673
350701
|
return false;
|
|
350702
|
+
if (entry.receipt?.cancelled === true)
|
|
350703
|
+
return false;
|
|
350674
350704
|
if (entry.role === "blocker")
|
|
350675
350705
|
return false;
|
|
350676
350706
|
if (isMutationEvidence(entry))
|
|
@@ -351424,6 +351454,8 @@ function commandIdentity(entry) {
|
|
|
351424
351454
|
}
|
|
351425
351455
|
function checkOutcome(entry) {
|
|
351426
351456
|
const receipt = entry.receipt;
|
|
351457
|
+
if (receipt?.cancelled === true)
|
|
351458
|
+
return "failed";
|
|
351427
351459
|
if (receipt?.timedOut === true)
|
|
351428
351460
|
return "timed_out";
|
|
351429
351461
|
const start = timestamp(receipt?.startedAtIso);
|
|
@@ -355728,6 +355760,11 @@ var CommandEvidenceReceiptSchema = z18.object({
|
|
|
355728
355760
|
timedOut: z18.boolean(),
|
|
355729
355761
|
startedAtIso: timestamp2,
|
|
355730
355762
|
finishedAtIso: timestamp2,
|
|
355763
|
+
shellRunId: z18.string().uuid().optional(),
|
|
355764
|
+
timeoutMs: integer3.positive().nullable().optional(),
|
|
355765
|
+
cancelled: z18.boolean().optional(),
|
|
355766
|
+
signal: token2.nullable().optional(),
|
|
355767
|
+
observation: z18.object({ kind: z18.literal("search_no_match") }).strict().optional(),
|
|
355731
355768
|
outputRef: token2.optional(),
|
|
355732
355769
|
observedPaths: z18.array(token2).optional(),
|
|
355733
355770
|
artifactHashes: z18.array(z18.object({ path: token2, sha256: z18.string().regex(/^[a-f0-9]{64}$/) }).strict()).optional(),
|
|
@@ -357135,6 +357172,7 @@ var commandReceiptSchema = z20.object({
|
|
|
357135
357172
|
cwd: token4,
|
|
357136
357173
|
pipefail: z20.boolean(),
|
|
357137
357174
|
timedOut: z20.boolean(),
|
|
357175
|
+
cancelled: z20.boolean().optional(),
|
|
357138
357176
|
startedAtIso: z20.string().datetime(),
|
|
357139
357177
|
finishedAtIso: z20.string().datetime(),
|
|
357140
357178
|
exitCode: z20.number().int().nullable().optional(),
|
|
@@ -358157,7 +358195,7 @@ var FeatureWorkflowController = class {
|
|
|
358157
358195
|
if (binding.kind === "verification") {
|
|
358158
358196
|
if (result.commandReceipt)
|
|
358159
358197
|
commandReceipt = commandReceiptSchema.parse(result.commandReceipt);
|
|
358160
|
-
successful = successful && !!commandReceipt && commandReceipt.exitCode === 0 && commandReceipt.timedOut !== true && resolve26(commandReceipt.cwd) === resolve26(this.options.workingDir, card.verifier.cwd ?? ".") && commandVerifiesFinalState(commandReceipt.canonicalCommand, card.verifier.command, commandReceipt) && workspaceRevision === operation.workspaceRevision && state.mutationSequence === operation.mutationSequence;
|
|
358198
|
+
successful = successful && !!commandReceipt && commandReceipt.exitCode === 0 && commandReceipt.timedOut !== true && commandReceipt.cancelled !== true && resolve26(commandReceipt.cwd) === resolve26(this.options.workingDir, card.verifier.cwd ?? ".") && commandVerifiesFinalState(commandReceipt.canonicalCommand, card.verifier.command, commandReceipt) && workspaceRevision === operation.workspaceRevision && state.mutationSequence === operation.mutationSequence;
|
|
358161
358199
|
if (!successful)
|
|
358162
358200
|
blockers.push(`Run the declared verifier against the current integrated source: ${card.verifier.command}`);
|
|
358163
358201
|
}
|
|
@@ -360369,7 +360407,7 @@ function evidenceLabel(evidence) {
|
|
|
360369
360407
|
}
|
|
360370
360408
|
function evidenceIsFreshVerification(evidence) {
|
|
360371
360409
|
const receipt = evidence.receipt;
|
|
360372
|
-
return evidence.success === true && evidence.role === "verification" && Boolean(receipt && receipt.canonicalCommand && receipt.cwd && receipt.exitCode === 0 && receipt.timedOut !== true && receipt.finishedAtIso);
|
|
360410
|
+
return evidence.success === true && evidence.role === "verification" && Boolean(receipt && receipt.canonicalCommand && receipt.cwd && receipt.exitCode === 0 && receipt.timedOut !== true && receipt.cancelled !== true && receipt.finishedAtIso);
|
|
360373
360411
|
}
|
|
360374
360412
|
function claimRequiresClosure(claim) {
|
|
360375
360413
|
return claim.materiality === "high" || claim.requiresIndependentEvidence || claim.attainedState === "hardware_integrated" || claim.attainedState === "hardware_verified";
|
|
@@ -360484,7 +360522,7 @@ function buildIntegrationClosure(input) {
|
|
|
360484
360522
|
});
|
|
360485
360523
|
}
|
|
360486
360524
|
const activeFailures = [...input.activeFailures ?? []];
|
|
360487
|
-
const evidence = (ledger?.evidence ?? []).slice(-MAX_EVIDENCE);
|
|
360525
|
+
const evidence = (ledger?.evidence ?? []).slice(-MAX_EVIDENCE).map((item) => item.receipt?.cancelled === true ? { ...item, success: false } : item);
|
|
360488
360526
|
for (const item of evidence) {
|
|
360489
360527
|
const evidenceId = nodeId("evidence", item.id);
|
|
360490
360528
|
addNode({
|
|
@@ -362006,6 +362044,8 @@ function claimAuthority(claim) {
|
|
|
362006
362044
|
return claim.source === "derived" ? "inferred" : "adopted";
|
|
362007
362045
|
}
|
|
362008
362046
|
function evidenceRole(evidence) {
|
|
362047
|
+
if (evidence.receipt?.cancelled === true)
|
|
362048
|
+
return "blocker";
|
|
362009
362049
|
if (evidence.role === "verification")
|
|
362010
362050
|
return "verification";
|
|
362011
362051
|
if (evidence.role === "blocker" || evidence.success === false)
|
|
@@ -362039,7 +362079,7 @@ function freshTodoVerificationEvidence(todo, ledger) {
|
|
|
362039
362079
|
const lastMutation = relevantMutationTimes.length > 0 ? Math.max(...relevantMutationTimes) : Number.NEGATIVE_INFINITY;
|
|
362040
362080
|
const expected = canonicalCommand(todo.verifyCommand);
|
|
362041
362081
|
return ledger.evidence.filter((entry) => {
|
|
362042
|
-
if (entry.role !== "verification" || entry.success !== true || !entry.receipt || entry.receipt.exitCode !== 0 || entry.receipt.timedOut) {
|
|
362082
|
+
if (entry.role !== "verification" || entry.success !== true || !entry.receipt || entry.receipt.exitCode !== 0 || entry.receipt.timedOut || entry.receipt.cancelled === true) {
|
|
362043
362083
|
return false;
|
|
362044
362084
|
}
|
|
362045
362085
|
if (canonicalCommand(entry.receipt.canonicalCommand) !== expected)
|
|
@@ -362070,7 +362110,7 @@ function freshTodoCompletionEvidence(todo, ledger) {
|
|
|
362070
362110
|
return false;
|
|
362071
362111
|
if (entry.role !== "verification" && entry.role !== "delivery")
|
|
362072
362112
|
return false;
|
|
362073
|
-
if (entry.receipt && (entry.receipt.exitCode !== 0 || entry.receipt.timedOut)) {
|
|
362113
|
+
if (entry.receipt && (entry.receipt.exitCode !== 0 || entry.receipt.timedOut || entry.receipt.cancelled === true)) {
|
|
362074
362114
|
return false;
|
|
362075
362115
|
}
|
|
362076
362116
|
if (!entry.receipt && entry.kind !== "delivery_result" && entry.kind !== "human_input") {
|
|
@@ -362881,7 +362921,7 @@ function buildWorkGraphProjectionPatch(input) {
|
|
|
362881
362921
|
nodeId: scopedId("evidence-node", evidence.id),
|
|
362882
362922
|
kind: "evidence",
|
|
362883
362923
|
label: evidence.summary.slice(0, 1e3) || evidence.id,
|
|
362884
|
-
status: evidence.success === false ? "invalid" : "complete",
|
|
362924
|
+
status: evidence.success === false || evidence.receipt?.cancelled === true ? "invalid" : "complete",
|
|
362885
362925
|
authority: "adopted",
|
|
362886
362926
|
bindingIds: [bindingId],
|
|
362887
362927
|
evidenceRefIds: [evidenceId],
|
|
@@ -363733,6 +363773,8 @@ function reconcileCompletedTodosWithEvidence(input) {
|
|
|
363733
363773
|
todo.blocker = blocker2;
|
|
363734
363774
|
continue;
|
|
363735
363775
|
}
|
|
363776
|
+
if (todo.completionJustification?.trim())
|
|
363777
|
+
continue;
|
|
363736
363778
|
const startTurn = todo.id && input.todoStartTurnById?.has(todo.id) ? input.todoStartTurnById.get(todo.id) : 0;
|
|
363737
363779
|
const relevantCalls = input.toolCallLog.filter((call2) => (call2.turn ?? 0) >= startTurn);
|
|
363738
363780
|
const failedIndex = relevantCalls.findIndex((call2, index2) => call2.success === false && todoMentionsFailedCall(todo, call2) && !hasLaterSuccessForCompatibleEvidence(relevantCalls, index2));
|
|
@@ -364201,7 +364243,7 @@ init_dist5();
|
|
|
364201
364243
|
// packages/orchestrator/dist/taskValidationEvidence.js
|
|
364202
364244
|
function successfulTaskValidationExecution(input) {
|
|
364203
364245
|
const command = input.command.trim();
|
|
364204
|
-
return input.success && input.runtimeAuthored !== true && Boolean(command) && (!input.executionReceipt || input.executionReceipt.timedOut !== true && input.executionReceipt.exitCode === 0 && (input.executionReceipt.primaryExitCode === void 0 || input.executionReceipt.primaryExitCode === 0) && normalizeShellCommand(input.executionReceipt.canonicalCommand) === normalizeShellCommand(command));
|
|
364246
|
+
return input.success && input.runtimeAuthored !== true && Boolean(command) && (!input.executionReceipt || input.executionReceipt.cancelled !== true && input.executionReceipt.timedOut !== true && input.executionReceipt.exitCode === 0 && (input.executionReceipt.primaryExitCode === void 0 || input.executionReceipt.primaryExitCode === 0) && normalizeShellCommand(input.executionReceipt.canonicalCommand) === normalizeShellCommand(command));
|
|
364205
364247
|
}
|
|
364206
364248
|
function selectTaskValidationEvidence(input) {
|
|
364207
364249
|
const command = input.command.trim();
|
|
@@ -364319,7 +364361,7 @@ function captureCompletionRuntimeProvenance(capturedAtIso = (/* @__PURE__ */ new
|
|
|
364319
364361
|
}
|
|
364320
364362
|
function isValidObservationReceipt(entry) {
|
|
364321
364363
|
const receipt = entry.receipt;
|
|
364322
|
-
return entry.success === true && entry.role === "observation" && receipt?.schema === "omnius.command-evidence-receipt.v1" && Boolean(receipt.canonicalCommand.trim()) && Boolean(receipt.cwd.trim()) && receipt.exitCode === 0 && receipt.timedOut === false;
|
|
364364
|
+
return entry.success === true && entry.role === "observation" && receipt?.schema === "omnius.command-evidence-receipt.v1" && Boolean(receipt.canonicalCommand.trim()) && Boolean(receipt.cwd.trim()) && receipt.exitCode === 0 && receipt.timedOut === false && receipt.cancelled !== true;
|
|
364323
364365
|
}
|
|
364324
364366
|
function selectedEvidence(ledger) {
|
|
364325
364367
|
if (!ledger) {
|
|
@@ -364330,7 +364372,7 @@ function selectedEvidence(ledger) {
|
|
|
364330
364372
|
artifactHashes: []
|
|
364331
364373
|
};
|
|
364332
364374
|
}
|
|
364333
|
-
const candidates = ledger.evidence.filter((entry) => entry.success === true && (entry.role === "verification" || entry.role === "mutation" || entry.role === "delivery" && Boolean(entry.deliveryReceipt) || isValidObservationReceipt(entry))).slice(-16);
|
|
364375
|
+
const candidates = ledger.evidence.filter((entry) => entry.success === true && entry.receipt?.cancelled !== true && (entry.role === "verification" || entry.role === "mutation" || entry.role === "delivery" && Boolean(entry.deliveryReceipt) || isValidObservationReceipt(entry))).slice(-16);
|
|
364334
364376
|
const artifacts = /* @__PURE__ */ new Map();
|
|
364335
364377
|
const deliveries = /* @__PURE__ */ new Map();
|
|
364336
364378
|
const commandReceipts = [];
|
|
@@ -364729,7 +364771,7 @@ function latestVerification(requirement, mappedEvidenceIds, evidence) {
|
|
|
364729
364771
|
const selected = candidates.at(-1)?.entry;
|
|
364730
364772
|
if (!selected?.receipt)
|
|
364731
364773
|
return { status: "unverified" };
|
|
364732
|
-
const passed = selected.success === true && selected.receipt.exitCode === 0 && selected.receipt.timedOut === false && selected.receipt.declaredVerification?.outcome !== "fail";
|
|
364774
|
+
const passed = selected.success === true && selected.receipt.exitCode === 0 && selected.receipt.timedOut === false && selected.receipt.cancelled !== true && selected.receipt.declaredVerification?.outcome !== "fail";
|
|
364733
364775
|
return {
|
|
364734
364776
|
status: passed ? "satisfied" : "failed",
|
|
364735
364777
|
projection: {
|
|
@@ -365557,7 +365599,9 @@ function reconcileShellExecutionOutcome(command, result) {
|
|
|
365557
365599
|
if (!result.success || !command.trim() || !receipt || receipt.schema !== "omnius.command-evidence-receipt.v1" || typeof receipt.canonicalCommand !== "string" || normalizeShellCommand(receipt.canonicalCommand) !== normalizeShellCommand(command))
|
|
365558
365600
|
return result;
|
|
365559
365601
|
let error;
|
|
365560
|
-
if (receipt.
|
|
365602
|
+
if (receipt.cancelled)
|
|
365603
|
+
error = "Command execution stopped (recorded execution receipt).";
|
|
365604
|
+
else if (receipt.timedOut)
|
|
365561
365605
|
error = "Command execution timed out (recorded execution receipt).";
|
|
365562
365606
|
else {
|
|
365563
365607
|
const candidate = (value) => value.kind === "validation" || value.kind === "other" && value.substantiveStageCount === 1;
|
|
@@ -366606,7 +366650,7 @@ function evaluateDeliveryCoverage(manifest, availableEvidenceIds = [], sourceObs
|
|
|
366606
366650
|
if (!acceptance.requiredFor.includes(claim.state))
|
|
366607
366651
|
continue;
|
|
366608
366652
|
const expected = new Set(acceptance.verificationCommands.map(canonicalCommand2));
|
|
366609
|
-
const receiptFound = availableEvidence.some((evidence) => evidence.success !== false && evidence.receipt?.exitCode === 0 && evidence.receipt?.timedOut !== true && expected.has(canonicalCommand2(evidence.receipt.canonicalCommand)));
|
|
366653
|
+
const receiptFound = availableEvidence.some((evidence) => evidence.success !== false && evidence.receipt?.exitCode === 0 && evidence.receipt?.timedOut !== true && evidence.receipt?.cancelled !== true && expected.has(canonicalCommand2(evidence.receipt.canonicalCommand)));
|
|
366610
366654
|
if (!receiptFound) {
|
|
366611
366655
|
gaps.push({
|
|
366612
366656
|
claimId: claim.id,
|
|
@@ -389148,16 +389192,10 @@ var AgenticRunner = class _AgenticRunner {
|
|
|
389148
389192
|
const requirements = [];
|
|
389149
389193
|
const evidencePredicates = [];
|
|
389150
389194
|
if (todo.verifyCommand) {
|
|
389151
|
-
requirements.push(`verifyCommand: ${todo.verifyCommand}`);
|
|
389152
|
-
evidencePredicates.push({
|
|
389153
|
-
schema: WORKBOARD_EVIDENCE_PREDICATE_SCHEMA,
|
|
389154
|
-
id: `todo:${todo.id}:verifier`,
|
|
389155
|
-
label: `successful live verifier: ${todo.verifyCommand}`,
|
|
389156
|
-
tool: "shell",
|
|
389157
|
-
command: todo.verifyCommand,
|
|
389158
|
-
requireTrustedSuccess: true
|
|
389159
|
-
});
|
|
389195
|
+
requirements.push(`advisory verifyCommand: ${todo.verifyCommand}`);
|
|
389160
389196
|
}
|
|
389197
|
+
if (todo.completionJustification)
|
|
389198
|
+
requirements.push(`agent assessment: ${todo.completionJustification}`);
|
|
389161
389199
|
if (todo.declaredArtifacts?.length) {
|
|
389162
389200
|
requirements.push(`declaredArtifacts: ${todo.declaredArtifacts.slice(0, 5).join(", ")}`);
|
|
389163
389201
|
for (const [index, artifact2] of todo.declaredArtifacts.filter((candidate) => typeof candidate === "string").map((candidate) => this._normalizeEvidencePath(candidate)).filter(Boolean).slice(0, 5).entries()) {
|
|
@@ -389200,7 +389238,8 @@ var AgenticRunner = class _AgenticRunner {
|
|
|
389200
389238
|
evidenceRequirements: requirements,
|
|
389201
389239
|
evidencePredicates: evidencePredicates.length > 0 ? evidencePredicates : void 0,
|
|
389202
389240
|
ownedFiles: (todo.declaredArtifacts ?? []).filter((path8) => typeof path8 === "string").map((path8) => this._normalizeEvidencePath(path8)).filter(Boolean),
|
|
389203
|
-
|
|
389241
|
+
// Checklist hints do not create a mandatory mutation/compile contract.
|
|
389242
|
+
verifierCommand: void 0
|
|
389204
389243
|
};
|
|
389205
389244
|
}
|
|
389206
389245
|
_mirrorTodosToWorkboard(todos) {
|
|
@@ -390915,20 +390954,15 @@ ${renderTaskExecutionSnapshot(snapshot)}` } : projected;
|
|
|
390915
390954
|
}
|
|
390916
390955
|
const eligible = evidence.slice(lastInvalidatingMutation + 1).filter((entry) => entry.role === "verification" && Boolean(entry.receipt));
|
|
390917
390956
|
const desired = [];
|
|
390918
|
-
for (const todo of input.todos) {
|
|
390919
|
-
if (todo.verifyCommand?.trim()) {
|
|
390920
|
-
desired.push({ id: `todo-${todo.id}`, command: todo.verifyCommand });
|
|
390921
|
-
}
|
|
390922
|
-
}
|
|
390923
390957
|
for (const card of input.workboard?.cards ?? []) {
|
|
390924
|
-
if (!card.supersededBy && card.verifierCommand?.trim()) {
|
|
390958
|
+
if (!card.supersededBy && !card.sourceTodoIds?.length && !card.id.startsWith("todo-") && card.verifierCommand?.trim()) {
|
|
390925
390959
|
desired.push({
|
|
390926
390960
|
id: `workboard-${card.id}`,
|
|
390927
390961
|
command: card.verifierCommand
|
|
390928
390962
|
});
|
|
390929
390963
|
}
|
|
390930
390964
|
}
|
|
390931
|
-
const configuredVerifier = this.options.completionVerifyCommand?.trim() || process.env["OMNIUS_COMPLETION_VERIFY_CMD"]?.trim() ||
|
|
390965
|
+
const configuredVerifier = this.options.completionVerifyCommand?.trim() || process.env["OMNIUS_COMPLETION_VERIFY_CMD"]?.trim() || "";
|
|
390932
390966
|
if (configuredVerifier) {
|
|
390933
390967
|
desired.push({ id: "host-final-verifier", command: configuredVerifier });
|
|
390934
390968
|
}
|
|
@@ -393969,7 +394003,7 @@ ${read.content}`;
|
|
|
393969
394003
|
});
|
|
393970
394004
|
}
|
|
393971
394005
|
}
|
|
393972
|
-
async executeToolWithInterruption(tool, name, args, onProgress, callId, assertDispatchScope) {
|
|
394006
|
+
async executeToolWithInterruption(tool, name, args, onProgress, callId, assertDispatchScope, sourceCallId) {
|
|
393973
394007
|
const progressOnly = tool.purpose === "progress";
|
|
393974
394008
|
if (this._interruptionMode !== "off" && this._paused) {
|
|
393975
394009
|
const shouldContinue = await this.waitIfPaused();
|
|
@@ -394225,6 +394259,15 @@ ${read.content}`;
|
|
|
394225
394259
|
}
|
|
394226
394260
|
};
|
|
394227
394261
|
}
|
|
394262
|
+
if (invocation && (name === "shell" || name === "background_run")) {
|
|
394263
|
+
invocation.shellRun = {
|
|
394264
|
+
callId: sourceCallId ?? callId,
|
|
394265
|
+
runId: this.currentArtifactRunId(),
|
|
394266
|
+
sessionId: this._sessionId,
|
|
394267
|
+
taskEpoch: this._taskEpoch,
|
|
394268
|
+
ownerId: this._interruptionOwnerId
|
|
394269
|
+
};
|
|
394270
|
+
}
|
|
394228
394271
|
if (invocation && name === "playwright_browser" && this._hasStartedTask && this._taskEpoch > 0) {
|
|
394229
394272
|
const goal = this._taskObjectiveContract?.goal ?? this._taskState.originalGoal;
|
|
394230
394273
|
if (goal && goal.length <= 1e4) {
|
|
@@ -394398,7 +394441,7 @@ ${workflowStatus}` } : {}
|
|
|
394398
394441
|
if (negativeScope && result.runtimeAuthored !== true && negativeScope.taskEpoch === this._taskEpoch && !this.aborted) {
|
|
394399
394442
|
const receipt = result.executionReceipt;
|
|
394400
394443
|
const ownedReceipt = receipt?.schema === "omnius.command-evidence-receipt.v1" && receipt.command === String(args["command"] ?? args["cmd"] ?? "") && typeof receipt.cwd === "string" && receipt.cwd.length > 0 && _pathResolve(receipt.cwd) === this.authoritativeWorkingDirectory();
|
|
394401
|
-
const negative = Boolean(ownedReceipt && result.success === true && !receipt.timedOut && receipt.observation?.kind === "search_no_match");
|
|
394444
|
+
const negative = Boolean(ownedReceipt && result.success === true && !receipt.timedOut && !receipt.cancelled && receipt.observation?.kind === "search_no_match");
|
|
394402
394445
|
this._negativeObservationRecovery.observe({
|
|
394403
394446
|
...negativeScope,
|
|
394404
394447
|
negative,
|
|
@@ -398196,33 +398239,15 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
|
|
|
398196
398239
|
}
|
|
398197
398240
|
return gaps;
|
|
398198
398241
|
}
|
|
398199
|
-
/**
|
|
398200
|
-
*
|
|
398201
|
-
* history. A completion hold can legitimately tell the model to run an
|
|
398202
|
-
* exact verifier later in the same run; that later pass must clear the
|
|
398203
|
-
* original hold before the truth auto-finalizer evaluates the next turn.
|
|
398204
|
-
*
|
|
398205
|
-
* This deliberately recomputes from post-mutation evidence rather than
|
|
398206
|
-
* clearing the most recently mentioned todo. That preserves freshness for
|
|
398207
|
-
* every completed leaf and leaves independent artifact-inspection failures
|
|
398208
|
-
* intact.
|
|
398209
|
-
*/
|
|
398242
|
+
/** Retire legacy checklist-verifier holds. This does not create or refresh
|
|
398243
|
+
* validation evidence; explicit acceptance and artifact checks stay separate. */
|
|
398210
398244
|
_refreshCompletedTodoVerifierFailures(todos, toolCallLog) {
|
|
398211
|
-
|
|
398212
|
-
const gapContents = new Set(gaps.map((gap) => gap.todo.content));
|
|
398245
|
+
void toolCallLog;
|
|
398213
398246
|
for (const todo of todos) {
|
|
398214
|
-
|
|
398215
|
-
if (todo.status !== "completed" || !verifyCommand || !isExecutableVerifyCommand(verifyCommand)) {
|
|
398216
|
-
continue;
|
|
398217
|
-
}
|
|
398218
|
-
if (gapContents.has(todo.content)) {
|
|
398219
|
-
this._verifyCommandFailures.add(todo.content);
|
|
398220
|
-
} else {
|
|
398221
|
-
this._verifyCommandFailures.delete(todo.content);
|
|
398222
|
-
}
|
|
398247
|
+
this._verifyCommandFailures.delete(todo.content);
|
|
398223
398248
|
this._refreshTodoVerificationFailure(todo.content);
|
|
398224
398249
|
}
|
|
398225
|
-
return
|
|
398250
|
+
return [];
|
|
398226
398251
|
}
|
|
398227
398252
|
_formatFreshVerifierGapFeedback(gaps) {
|
|
398228
398253
|
const lines = gaps.slice(0, 8).map((gap) => {
|
|
@@ -398349,12 +398374,12 @@ ${extras.join("\n")}`;
|
|
|
398349
398374
|
_observeCompileVerifierResult(input) {
|
|
398350
398375
|
const diagnostics = rankCompilerDiagnostics(parseCompilerDiagnostics(input.output));
|
|
398351
398376
|
const verifierCommand = stripVerifierFallbackSuffix(input.verifierCommand) || input.verifierCommand.trim();
|
|
398377
|
+
if (!this._compileFixLoop && diagnostics.length === 0)
|
|
398378
|
+
return null;
|
|
398352
398379
|
const previousDiagnostics = this._lastDeclaredVerifierDiagnostics;
|
|
398353
398380
|
this._declaredVerifierCommand = verifierCommand;
|
|
398354
398381
|
this._lastDeclaredVerifierOutput = input.output;
|
|
398355
398382
|
this._lastDeclaredVerifierDiagnostics = diagnostics;
|
|
398356
|
-
if (!this._compileFixLoop && diagnostics.length === 0)
|
|
398357
|
-
return null;
|
|
398358
398383
|
const verifierFingerprint = compileFixVerifierFingerprint(verifierCommand);
|
|
398359
398384
|
const existingCards = this._compileFixLoop?.cards ?? [];
|
|
398360
398385
|
const cards = diagnostics.length > 0 ? buildCompileFixCards({
|
|
@@ -399173,7 +399198,7 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
399173
399198
|
receipts.unshift(legacyReceipt);
|
|
399174
399199
|
}
|
|
399175
399200
|
receipts.forEach((receipt2, index) => {
|
|
399176
|
-
const succeeded = !!receipt2 && receipt2.exitCode === 0 && receipt2.timedOut === false && (receipt2.primaryExitCode === void 0 || receipt2.primaryExitCode === 0) && receipt2.declaredVerification?.outcome !== "fail";
|
|
399201
|
+
const succeeded = !!receipt2 && receipt2.exitCode === 0 && receipt2.timedOut === false && receipt2.cancelled !== true && (receipt2.primaryExitCode === void 0 || receipt2.primaryExitCode === 0) && receipt2.declaredVerification?.outcome !== "fail";
|
|
399177
399202
|
this._recordCompletionToolEvidenceFromResult({
|
|
399178
399203
|
...input,
|
|
399179
399204
|
workOperation,
|
|
@@ -399400,7 +399425,7 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
399400
399425
|
if (toolName !== "shell" || result.success !== true)
|
|
399401
399426
|
return [];
|
|
399402
399427
|
const receipt = result.executionReceipt;
|
|
399403
|
-
if (!receipt || receipt.schema !== "omnius.command-evidence-receipt.v1" || receipt.exitCode !== 0 || receipt.timedOut || !receipt.command.trim() || !receipt.canonicalCommand.trim() || !receipt.cwd.trim()) {
|
|
399428
|
+
if (!receipt || receipt.schema !== "omnius.command-evidence-receipt.v1" || receipt.exitCode !== 0 || receipt.timedOut || receipt.cancelled === true || !receipt.command.trim() || !receipt.canonicalCommand.trim() || !receipt.cwd.trim()) {
|
|
399404
399429
|
return [];
|
|
399405
399430
|
}
|
|
399406
399431
|
const command = receipt.command;
|
|
@@ -401708,7 +401733,7 @@ ${contentPreview}
|
|
|
401708
401733
|
toolName: input.toolName,
|
|
401709
401734
|
fingerprint: input.fingerprint,
|
|
401710
401735
|
turn: input.turn,
|
|
401711
|
-
receipt: input.receipt && !input.receipt.timedOut && input.receipt.exitCode === 0 ? input.receipt : void 0
|
|
401736
|
+
receipt: input.receipt && !input.receipt.timedOut && !input.receipt.cancelled && input.receipt.exitCode === 0 ? input.receipt : void 0
|
|
401712
401737
|
}
|
|
401713
401738
|
});
|
|
401714
401739
|
for (const failure of failures) {
|
|
@@ -405229,7 +405254,7 @@ ${findingsBody}`;
|
|
|
405229
405254
|
const props = this.schemaProperties(parameters);
|
|
405230
405255
|
const required = this.schemaRequired(parameters);
|
|
405231
405256
|
const providedKeys = Object.keys(args ?? {}).filter((key) => !key.startsWith("_"));
|
|
405232
|
-
const missingRequired = required.filter((field) => args[field] === void 0
|
|
405257
|
+
const missingRequired = required.filter((field) => args[field] === void 0);
|
|
405233
405258
|
const unknownKeys = providedKeys.filter((key) => !props.has(key));
|
|
405234
405259
|
const aliases = this.suggestArgumentAliases(missingRequired, providedKeys, args, props);
|
|
405235
405260
|
const corrected = this.buildCorrectedArgsPreview(args, props, aliases);
|
|
@@ -405331,7 +405356,7 @@ ${findingsBody}`;
|
|
|
405331
405356
|
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
405332
405357
|
const objectValue = value;
|
|
405333
405358
|
const required = Array.isArray(schema["required"]) ? schema["required"].filter((entry) => typeof entry === "string") : [];
|
|
405334
|
-
const missing = required.filter((key) => objectValue[key] === void 0
|
|
405359
|
+
const missing = required.filter((key) => objectValue[key] === void 0);
|
|
405335
405360
|
if (missing.length > 0) {
|
|
405336
405361
|
return `${path7} is missing required parameter(s): ${missing.join(", ")}`;
|
|
405337
405362
|
}
|
|
@@ -405628,6 +405653,7 @@ ${findingsBody}`;
|
|
|
405628
405653
|
targetPaths: this._extractToolTargetPaths(resolved?.name ?? name, args, result),
|
|
405629
405654
|
mutatedFiles: this._isRealProjectMutation(resolved?.name ?? name, result) ? this._extractToolTargetPaths(resolved?.name ?? name, args, result) : [],
|
|
405630
405655
|
executionReceipt: result.executionReceipt,
|
|
405656
|
+
shellRunId: result.shellRunId ?? result.executionReceipt?.shellRunId,
|
|
405631
405657
|
webFetchReceipt: this._webFetchEventReceipt({ toolName: name, callId, args, result, scope: evidenceScope }),
|
|
405632
405658
|
pageContentReceipt: this._pageContentEventReceipt({ toolName: name, callId, args, result, scope: evidenceScope }),
|
|
405633
405659
|
content: this.toolResultEventContent(name, result.output || result.error || ""),
|
|
@@ -409989,7 +410015,6 @@ ${text13}`;
|
|
|
409989
410015
|
if (candidates.length !== 1)
|
|
409990
410016
|
return null;
|
|
409991
410017
|
const card = candidates[0];
|
|
409992
|
-
const verifier = card.verifierCommand?.trim();
|
|
409993
410018
|
const workItem = {
|
|
409994
410019
|
cardId: card.id,
|
|
409995
410020
|
title: card.title,
|
|
@@ -409997,7 +410022,7 @@ ${text13}`;
|
|
|
409997
410022
|
todoIds: card.sourceTodoIds ?? [active.id],
|
|
409998
410023
|
ownedFiles: card.ownedFiles ?? active.declaredArtifacts ?? [],
|
|
409999
410024
|
expectedArtifacts: active.declaredArtifacts ?? card.ownedFiles ?? [],
|
|
410000
|
-
verifierCommand:
|
|
410025
|
+
verifierCommand: void 0,
|
|
410001
410026
|
evidenceRequirements: card.evidenceRequirements
|
|
410002
410027
|
};
|
|
410003
410028
|
const evidence = [
|
|
@@ -411762,6 +411787,7 @@ Respond with the assessment and take the selected evidence-backed action.`;
|
|
|
411762
411787
|
parentId: t.parentId,
|
|
411763
411788
|
blocker: t.blocker,
|
|
411764
411789
|
verifyCommand: t.verifyCommand,
|
|
411790
|
+
completionJustification: t.completionJustification,
|
|
411765
411791
|
declaredArtifacts: t.declaredArtifacts
|
|
411766
411792
|
})));
|
|
411767
411793
|
const lines = verification.downgrades.slice(0, 6).map((d) => `- "${d.content.slice(0, 90)}": ${d.from} -> ${d.to} (${d.evidence})`);
|
|
@@ -412609,7 +412635,7 @@ ${dynamicProjectContext}`
|
|
|
412609
412635
|
`Unresolved verification item(s) introduced this run:`,
|
|
412610
412636
|
...failures.map((item) => ` - ${item}`),
|
|
412611
412637
|
``,
|
|
412612
|
-
`
|
|
412638
|
+
`Inspect the missing declared artifact or describe the remaining gap accurately. Optional verifyCommand hints do not require another shell run. (Pre-existing failures present at task start are ignored.)`
|
|
412613
412639
|
].join("\n");
|
|
412614
412640
|
lastCompletionGateReason = `${newFailures.length} unresolved todo verification failure(s) introduced this run`;
|
|
412615
412641
|
lastCompletionGateFeedback = feedback;
|
|
@@ -412977,14 +413003,6 @@ ${lastCompletionGateFeedback.trim().slice(0, 4e3)}` : ""
|
|
|
412977
413003
|
].join("\n")
|
|
412978
413004
|
};
|
|
412979
413005
|
}
|
|
412980
|
-
const verifierGaps = this._completionVerifierGapsAfterFinalMutation(this.readSessionTodos() || [], toolCallLog).filter((gap) => gap.lastMutationTurn >= 0);
|
|
412981
|
-
if (verifierGaps.length > 0) {
|
|
412982
|
-
return {
|
|
412983
|
-
code: "post_mutation_verification",
|
|
412984
|
-
reason: `${verifierGaps.length} completed todo verifier(s) have no successful receipt after the final relevant mutation`,
|
|
412985
|
-
feedback: this._formatFreshVerifierGapFeedback(verifierGaps)
|
|
412986
|
-
};
|
|
412987
|
-
}
|
|
412988
413006
|
const compileFixLoopWasMutated = this._compileFixLoop?.lastMutationTurn !== null && this._compileFixLoop?.lastMutationTurn !== void 0;
|
|
412989
413007
|
const compileFeedback = compileFixLoopWasMutated ? this._compileFixLoopCompletionBlocker(turn) : null;
|
|
412990
413008
|
if (compileFeedback) {
|
|
@@ -414169,7 +414187,7 @@ ${cachedResult}`,
|
|
|
414169
414187
|
if (!tool.inputSchema && !validationError && tool.parameters && typeof tool.parameters === "object") {
|
|
414170
414188
|
const required = tool.parameters.required;
|
|
414171
414189
|
if (Array.isArray(required)) {
|
|
414172
|
-
const missing = required.filter((field) => tc.arguments[field] === void 0
|
|
414190
|
+
const missing = required.filter((field) => tc.arguments[field] === void 0);
|
|
414173
414191
|
if (missing.length > 0) {
|
|
414174
414192
|
validationError = `Missing required parameter(s): ${missing.join(", ")}`;
|
|
414175
414193
|
}
|
|
@@ -414362,10 +414380,11 @@ ${cachedResult}`,
|
|
|
414362
414380
|
this.emit({
|
|
414363
414381
|
type: "status",
|
|
414364
414382
|
toolName: tc.name,
|
|
414383
|
+
actionId: tc.id,
|
|
414365
414384
|
content: progress,
|
|
414366
414385
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
414367
414386
|
});
|
|
414368
|
-
}, evidenceCallId);
|
|
414387
|
+
}, evidenceCallId, void 0, tc.id);
|
|
414369
414388
|
result = await this._guardMaterializedFileReadResult({
|
|
414370
414389
|
callId: tc.id,
|
|
414371
414390
|
toolName: resolvedTool?.name ?? tc.name,
|
|
@@ -415083,9 +415102,10 @@ ${diagnostic}`;
|
|
|
415083
415102
|
} catch {
|
|
415084
415103
|
}
|
|
415085
415104
|
}
|
|
415105
|
+
const processWasStopped = result.executionReceipt?.cancelled === true;
|
|
415086
415106
|
{
|
|
415087
415107
|
const _cmd = typeof tc.arguments?.["command"] === "string" ? tc.arguments["command"] : typeof tc.arguments?.["cmd"] === "string" ? tc.arguments["cmd"] : "";
|
|
415088
|
-
if (_cmd && tc.name === "shell") {
|
|
415108
|
+
if (_cmd && tc.name === "shell" && !processWasStopped) {
|
|
415089
415109
|
if (!result.success) {
|
|
415090
415110
|
this._resolutionMemory.recordFailure({
|
|
415091
415111
|
tool: tc.name,
|
|
@@ -415112,7 +415132,7 @@ ${diagnostic}`;
|
|
|
415112
415132
|
}
|
|
415113
415133
|
}
|
|
415114
415134
|
let failureWorkboardCardId = null;
|
|
415115
|
-
if (!result.success && !completionReviewIsPending && (result.error || result.output || result.llmContent)) {
|
|
415135
|
+
if (!result.success && !processWasStopped && !completionReviewIsPending && (result.error || result.output || result.llmContent)) {
|
|
415116
415136
|
const errorText = (result.error || result.output || result.llmContent || "").toString();
|
|
415117
415137
|
const diagnosis = this._diagnoseToolFailure(tc.name, tc.arguments, result);
|
|
415118
415138
|
const sig = diagnosis.patternKey;
|
|
@@ -415266,6 +415286,7 @@ ${diagnostic}`;
|
|
|
415266
415286
|
parentId: t.parentId,
|
|
415267
415287
|
blocker: t.blocker,
|
|
415268
415288
|
verifyCommand: t.verifyCommand,
|
|
415289
|
+
completionJustification: t.completionJustification,
|
|
415269
415290
|
declaredArtifacts: t.declaredArtifacts
|
|
415270
415291
|
})));
|
|
415271
415292
|
_todosNow = this.readSessionTodos() || truth.todos;
|
|
@@ -415288,19 +415309,19 @@ ${diagnostic}`;
|
|
|
415288
415309
|
});
|
|
415289
415310
|
}
|
|
415290
415311
|
this._mirrorTodosToWorkboard(_todosNow);
|
|
415291
|
-
if (!this._newFieldNudgeFired && !this._isTodoWriteNoopResult(result)) {
|
|
415312
|
+
if (!this._newFieldNudgeFired && _todosNow.some((t) => t.status !== "completed") && !this._isTodoWriteNoopResult(result)) {
|
|
415292
415313
|
this._todoWritesObservedForNudge++;
|
|
415293
|
-
const _anyFieldUsed = _todosNow.some((t) => typeof t.verifyCommand === "string" || Array.isArray(t.declaredArtifacts));
|
|
415314
|
+
const _anyFieldUsed = _todosNow.some((t) => typeof t.verifyCommand === "string" || Boolean(t.completionJustification?.trim()) || Array.isArray(t.declaredArtifacts));
|
|
415294
415315
|
if (this._todoWritesObservedForNudge >= 2 && !_anyFieldUsed) {
|
|
415295
415316
|
this._newFieldNudgeFired = true;
|
|
415296
415317
|
pushSoftInjection("system", [
|
|
415297
415318
|
`[NUDGE — REG-37e: you have emitted multiple todo_writes without using verifyCommand or declaredArtifacts.]`,
|
|
415298
415319
|
``,
|
|
415299
|
-
`
|
|
415320
|
+
`Optional verification metadata can help explain completion. A declared command is not a passing result; use actual receipts or a stated completionJustification:`,
|
|
415300
415321
|
` - verifyCommand: a shell invocation that proves the work passes (test runner, build command, file existence check, etc.)`,
|
|
415301
415322
|
` - declaredArtifacts: list of file paths this todo produces`,
|
|
415302
415323
|
``,
|
|
415303
|
-
`
|
|
415324
|
+
`Completion may be a justified agent assessment. Record the basis and limitations; do not add commands or repeat work solely to fill optional checklist metadata.`,
|
|
415304
415325
|
``,
|
|
415305
415326
|
`Worked example shape (substitute commands native to your stack):`,
|
|
415306
415327
|
` {"id":"pX","content":"Implement the cache module","status":"in_progress","verifyCommand":"<your test command>","declaredArtifacts":["src/lib/cache.ts","tests/unit/cache.test.ts"]}`
|
|
@@ -415310,40 +415331,8 @@ ${diagnostic}`;
|
|
|
415310
415331
|
for (const _t of _todosNow) {
|
|
415311
415332
|
if (_t.status !== "completed")
|
|
415312
415333
|
continue;
|
|
415313
|
-
|
|
415314
|
-
|
|
415315
|
-
const _history = toolCallLog.slice(-15).filter((c) => c.name === "shell").map((c) => ({
|
|
415316
|
-
command: this._shellCommandFromArgsKey(c.argsKey),
|
|
415317
|
-
success: c.success === true,
|
|
415318
|
-
receipt: c.executionReceipt
|
|
415319
|
-
}));
|
|
415320
|
-
const _verified = verifyCommandSatisfiedByShellHistory(_vc, _history);
|
|
415321
|
-
if (_verified) {
|
|
415322
|
-
this._verifyCommandFailures.delete(_t.content);
|
|
415323
|
-
this._refreshTodoVerificationFailure(_t.content);
|
|
415324
|
-
} else {
|
|
415325
|
-
this._verifyCommandFailures.add(_t.content);
|
|
415326
|
-
this._refreshTodoVerificationFailure(_t.content);
|
|
415327
|
-
this._verifyHintInjectedThisTurn.add(_t.content);
|
|
415328
|
-
messages2.push({
|
|
415329
|
-
role: "system",
|
|
415330
|
-
content: [
|
|
415331
|
-
`[VERIFICATION REQUIRED — REG-37]`,
|
|
415332
|
-
``,
|
|
415333
|
-
`You marked the todo "${_t.content.slice(0, 100)}" as completed, but its verifyCommand has not been run successfully in your recent shell history.`,
|
|
415334
|
-
``,
|
|
415335
|
-
`verifyCommand: \`${_vc}\``,
|
|
415336
|
-
``,
|
|
415337
|
-
`Run this command BEFORE the completion is accepted as real progress. If it succeeds, the completion is verified. If it fails, revert the todo to in_progress and fix the underlying issue.`,
|
|
415338
|
-
``,
|
|
415339
|
-
`Per the MAST failure taxonomy (Cemri et al. NeurIPS 2025), 21.3% of multi-agent failures are "task verification & termination" — claiming completion without running the validation that proves it. Don't be one of them.`
|
|
415340
|
-
].join("\n")
|
|
415341
|
-
});
|
|
415342
|
-
}
|
|
415343
|
-
} else {
|
|
415344
|
-
this._verifyCommandFailures.delete(_t.content);
|
|
415345
|
-
this._refreshTodoVerificationFailure(_t.content);
|
|
415346
|
-
}
|
|
415334
|
+
this._verifyCommandFailures.delete(_t.content);
|
|
415335
|
+
this._refreshTodoVerificationFailure(_t.content);
|
|
415347
415336
|
if (!this._artifactInspectionDoneThisTurn.has(_t.content)) {
|
|
415348
415337
|
this._artifactInspectionDoneThisTurn.add(_t.content);
|
|
415349
415338
|
const _writeMap = /* @__PURE__ */ new Map();
|
|
@@ -415572,7 +415561,7 @@ ${diagnostic}`;
|
|
|
415572
415561
|
}
|
|
415573
415562
|
}
|
|
415574
415563
|
}
|
|
415575
|
-
if (!result.success && result.runtimeAuthored !== true && !this._isPdfTerminalFeedback(result)) {
|
|
415564
|
+
if (!result.success && !processWasStopped && result.runtimeAuthored !== true && !this._isPdfTerminalFeedback(result)) {
|
|
415576
415565
|
const failureTargets = this._extractToolTargetPaths(tc.name, tc.arguments, result);
|
|
415577
415566
|
const failureDiagnosis = result.failureDiagnosis ?? this._diagnoseToolFailure(tc.name, tc.arguments, result);
|
|
415578
415567
|
this._recentFailures.push({
|
|
@@ -415720,7 +415709,7 @@ ${bookkeepingGuidance}`;
|
|
|
415720
415709
|
|
|
415721
415710
|
${bookkeepingGuidance}` : bookkeepingGuidance;
|
|
415722
415711
|
}
|
|
415723
|
-
if (!result.success && !completionReviewIsPending && this.options.modelTier === "small") {
|
|
415712
|
+
if (!result.success && !processWasStopped && !completionReviewIsPending && this.options.modelTier === "small") {
|
|
415724
415713
|
const recovery = this.buildRecoveryGuidance(tc.name, result.error ?? "", tc.arguments);
|
|
415725
415714
|
if (recovery)
|
|
415726
415715
|
output += "\n\n" + recovery;
|
|
@@ -415742,7 +415731,7 @@ ${bookkeepingGuidance}` : bookkeepingGuidance;
|
|
|
415742
415731
|
}
|
|
415743
415732
|
if (result.success) {
|
|
415744
415733
|
delete result.failureDiagnosis;
|
|
415745
|
-
} else if (!completionReviewIsPending && !this._isPdfTerminalFeedback(result)) {
|
|
415734
|
+
} else if (!processWasStopped && !completionReviewIsPending && !this._isPdfTerminalFeedback(result)) {
|
|
415746
415735
|
this._diagnoseToolFailure(tc.name, tc.arguments, result);
|
|
415747
415736
|
const staleHashRetryGuidance = this._buildStaleHashRetryGuidance(tc.name, tc.arguments, result);
|
|
415748
415737
|
if (staleHashRetryGuidance) {
|
|
@@ -415908,6 +415897,7 @@ Evidence: ${evidencePreview}`.slice(0, 500);
|
|
|
415908
415897
|
targetPaths: toolTargetPaths,
|
|
415909
415898
|
mutatedFiles: realMutationPaths,
|
|
415910
415899
|
executionReceipt: result.executionReceipt,
|
|
415900
|
+
shellRunId: result.shellRunId ?? result.executionReceipt?.shellRunId,
|
|
415911
415901
|
synthetic: result.runtimeAuthored === true,
|
|
415912
415902
|
blocked: result.runtimeAuthored === true && result.success === false,
|
|
415913
415903
|
...this._objectiveFrontier ? { objectiveFrontier: this._objectiveFrontier } : {},
|
|
@@ -416106,7 +416096,7 @@ Evidence: ${evidencePreview}`.slice(0, 500);
|
|
|
416106
416096
|
${structuralGuardGuidance}` : structuralGuardGuidance;
|
|
416107
416097
|
}
|
|
416108
416098
|
}
|
|
416109
|
-
if (tc.name === "shell" && result.runtimeAuthored !== true) {
|
|
416099
|
+
if (tc.name === "shell" && !processWasStopped && result.runtimeAuthored !== true) {
|
|
416110
416100
|
const shellCommand = String(tc.arguments?.["command"] ?? tc.arguments?.["cmd"] ?? "");
|
|
416111
416101
|
const compileOutput = this._expandTriagedPayloadForDiagnostics([result.output, result.llmContent, result.error].filter((part) => typeof part === "string" && part.length > 0).join("\n"));
|
|
416112
416102
|
const verifierCommand = this._declaredVerifierCommandForShell(shellCommand, compileOutput, result.success === true, result.executionReceipt);
|
|
@@ -416397,7 +416387,7 @@ Do NOT retry ${tc.name} with similar arguments and do NOT use file_write to esca
|
|
|
416397
416387
|
if (isModify && turnTier === "small") {
|
|
416398
416388
|
const modCount = this._taskState.modifiedFiles.size;
|
|
416399
416389
|
if (modCount >= 2 && modCount % 2 === 0) {
|
|
416400
|
-
this.enqueueRuntimeGuidance(`[Test reminder] You've modified ${modCount} files. Run relevant tests NOW to verify: shell(command="npm test") or the project's test command. Fix any failures before continuing.`);
|
|
416390
|
+
this.enqueueRuntimeGuidance(`[Test reminder] You've modified ${modCount} files. Run relevant tests NOW to verify: shell(command="npm test", timeout=300000) or the project's test command with an explicit deadline (or null). Fix any failures before continuing.`);
|
|
416401
416391
|
}
|
|
416402
416392
|
}
|
|
416403
416393
|
}
|
|
@@ -422116,6 +422106,9 @@ ${marker}` : marker);
|
|
|
422116
422106
|
if (typeof args["verifyCommand"] === "string" && args["verifyCommand"].trim()) {
|
|
422117
422107
|
todo["verifyCommand"] = args["verifyCommand"].trim();
|
|
422118
422108
|
}
|
|
422109
|
+
if (typeof args["completionJustification"] === "string" && args["completionJustification"].trim()) {
|
|
422110
|
+
todo["completionJustification"] = args["completionJustification"].trim();
|
|
422111
|
+
}
|
|
422119
422112
|
if (typeof args["blocker"] === "string" && args["blocker"].trim()) {
|
|
422120
422113
|
todo["blocker"] = args["blocker"].trim();
|
|
422121
422114
|
}
|
|
@@ -425376,7 +425369,7 @@ Do NOT rewrite the entire function. Patch the specific fault, then re-run tests.
|
|
|
425376
425369
|
const taskGoal = (this._taskState.goal || "").toLowerCase();
|
|
425377
425370
|
const isDebugging = /bug|fix|debug|broken|wrong|fail|error|issue|refactor|extract/i.test(taskGoal);
|
|
425378
425371
|
if (isDebugging) {
|
|
425379
|
-
return `You just read "${lastFilePath}". Before changing anything, WRITE A QUICK TEST to observe the current behavior: ${this._promptToolAvailable("shell") ? 'shell(command="node -e …")' : this._promptToolAvailable("repl_exec") ? "repl_exec" : "an available inspection tool"}. See what actually happens — don't guess. Then fix based on what you observed.`;
|
|
425372
|
+
return `You just read "${lastFilePath}". Before changing anything, WRITE A QUICK TEST to observe the current behavior: ${this._promptToolAvailable("shell") ? 'shell(command="node -e …", timeout=30000)' : this._promptToolAvailable("repl_exec") ? "repl_exec" : "an available inspection tool"}. See what actually happens — don't guess. Then fix based on what you observed.`;
|
|
425380
425373
|
}
|
|
425381
425374
|
return `You just read "${lastFilePath}". Now make the needed changes with file_edit, or if exploring, decide what to modify.`;
|
|
425382
425375
|
}
|
|
@@ -432589,6 +432582,7 @@ function mapExecutionToolResult(result) {
|
|
|
432589
432582
|
// uses this receipt for completion evidence; reconstructing it from a
|
|
432590
432583
|
// truncated/streamed transcript would be unsound.
|
|
432591
432584
|
executionReceipt: result.executionReceipt,
|
|
432585
|
+
shellRunId: result.shellRunId ?? result.executionReceipt?.shellRunId,
|
|
432592
432586
|
executionReceipts: result.executionReceipts,
|
|
432593
432587
|
documentExtraction: result.documentExtraction,
|
|
432594
432588
|
runtimeSession: result.runtimeSession,
|