agenr 1.9.0 → 1.9.1
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/CHANGELOG.md +19 -0
- package/dist/cli.js +26 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.9.1] - 2026-04-12
|
|
6
|
+
|
|
7
|
+
Supersession stall-recovery and review-order guard patch release.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Supersession review order is now enforced at the tool boundary.** The supersession query tool now blocks widening into lower-confidence subject sweeps until the same run has actually exhausted claim-key work, keeping the pass aligned with its intended review order.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **Supersession passes no longer self-poison completion state by widening too early.** The surgeon now avoids the stuck `widenedBeforeClaimKeyExhausted` path that could leave a run unable to complete cleanly after later claim-key review caught up.
|
|
16
|
+
- **Supersession completion feedback is more actionable.** Rejected `complete_pass` calls now tell the model how to count reviewed-but-intentionally-unlinked clusters via `entries_skipped`, reducing repeated no-progress bounded slices.
|
|
17
|
+
|
|
18
|
+
### Validation
|
|
19
|
+
|
|
20
|
+
Changes since last push to `origin/master`:
|
|
21
|
+
|
|
22
|
+
- Fix surgeon supersession stall handling
|
|
23
|
+
|
|
5
24
|
## [1.9.0] - 2026-04-12
|
|
6
25
|
|
|
7
26
|
Surgeon autonomy, review-flow hardening, and CLI/runtime polish release.
|
package/dist/cli.js
CHANGED
|
@@ -10817,10 +10817,10 @@ function describeSupersessionRejection(progress, input) {
|
|
|
10817
10817
|
return "Completion rejected: the review widened beyond claim_key clusters before the claim_key sweep was exhausted.";
|
|
10818
10818
|
}
|
|
10819
10819
|
if (!progress.claimKeyScopeExhausted) {
|
|
10820
|
-
return input.budgetUsedPct === null ? `Completion rejected: ${progress.claimKeyClustersRemaining} claim_key clusters still remain in the current sweep.` : `Completion rejected: ${progress.claimKeyClustersRemaining} claim_key clusters still remain in the current sweep and only ${input.budgetUsedPct}% of the cost budget has been used.`;
|
|
10820
|
+
return input.budgetUsedPct === null ? `Completion rejected: ${progress.claimKeyClustersRemaining} claim_key clusters still remain in the current sweep. For reviewed-but-intentionally-unlinked clusters, include one paged entry_id per cluster in entries_skipped.` : `Completion rejected: ${progress.claimKeyClustersRemaining} claim_key clusters still remain in the current sweep and only ${input.budgetUsedPct}% of the cost budget has been used. For reviewed-but-intentionally-unlinked clusters, include one paged entry_id per cluster in entries_skipped.`;
|
|
10821
10821
|
}
|
|
10822
10822
|
if (input.subjectTotal > 0 && !progress.subjectScopeExhausted) {
|
|
10823
|
-
return input.budgetUsedPct === null ? `Completion rejected: the claim_key sweep is exhausted, but ${progress.subjectClustersRemaining} subject clusters still remain.` : `Completion rejected: the claim_key sweep is exhausted, but ${progress.subjectClustersRemaining} subject clusters still remain and only ${input.budgetUsedPct}% of the cost budget has been used.`;
|
|
10823
|
+
return input.budgetUsedPct === null ? `Completion rejected: the claim_key sweep is exhausted, but ${progress.subjectClustersRemaining} subject clusters still remain. For reviewed-but-intentionally-unlinked clusters, include one paged entry_id per cluster in entries_skipped.` : `Completion rejected: the claim_key sweep is exhausted, but ${progress.subjectClustersRemaining} subject clusters still remain and only ${input.budgetUsedPct}% of the cost budget has been used. For reviewed-but-intentionally-unlinked clusters, include one paged entry_id per cluster in entries_skipped.`;
|
|
10824
10824
|
}
|
|
10825
10825
|
if (!input.budgetForcedStop) {
|
|
10826
10826
|
return input.budgetUsedPct === null ? "Completion rejected: the supersession sweep still has unfinished work." : `Completion rejected: the supersession sweep still has unfinished work and only ${input.budgetUsedPct}% of the cost budget has been used.`;
|
|
@@ -11482,12 +11482,25 @@ function createQuerySupersessionCandidatesTool(deps) {
|
|
|
11482
11482
|
const limit = normalizeLimit4(params.limit);
|
|
11483
11483
|
const offset = normalizeOffset3(params.offset);
|
|
11484
11484
|
const type = normalizeOptionalString11(params.type);
|
|
11485
|
+
const progress = deps.completionGuards?.supersession.snapshot();
|
|
11486
|
+
if ((scope === "subject" || scope === "all") && shouldBlockLowerConfidenceScope(progress)) {
|
|
11487
|
+
return toolResult({
|
|
11488
|
+
clusters: [],
|
|
11489
|
+
count: 0,
|
|
11490
|
+
scope,
|
|
11491
|
+
limit,
|
|
11492
|
+
offset,
|
|
11493
|
+
claimKeyClusterCount: progress?.claimKeyClustersRemaining ?? 0,
|
|
11494
|
+
subjectClusterCount: progress?.subjectClustersRemaining ?? 0,
|
|
11495
|
+
blocked: true,
|
|
11496
|
+
message: buildClaimKeyFirstMessage(progress.claimKeyClustersRemaining)
|
|
11497
|
+
});
|
|
11498
|
+
}
|
|
11485
11499
|
const counts = await deps.port.countSupersessionCandidates({
|
|
11486
11500
|
type,
|
|
11487
11501
|
skipRecentlyEvaluatedDays: deps.skipRecentlyEvaluatedDays,
|
|
11488
11502
|
now: deps.now()
|
|
11489
11503
|
});
|
|
11490
|
-
const progress = deps.completionGuards?.supersession.snapshot();
|
|
11491
11504
|
const claimKeyClusters = scope === "subject" ? [] : await deps.port.listSupersessionCandidates({
|
|
11492
11505
|
scope: "claim_key",
|
|
11493
11506
|
type,
|
|
@@ -11546,6 +11559,15 @@ function buildEmptyResultMessage(scope) {
|
|
|
11546
11559
|
}
|
|
11547
11560
|
return "No more supersession clusters match the current filters. The review pool appears exhausted.";
|
|
11548
11561
|
}
|
|
11562
|
+
function shouldBlockLowerConfidenceScope(progress) {
|
|
11563
|
+
if (!progress) {
|
|
11564
|
+
return false;
|
|
11565
|
+
}
|
|
11566
|
+
return !progress.claimKeyScopeExhausted && progress.claimKeyClustersRemaining > 0;
|
|
11567
|
+
}
|
|
11568
|
+
function buildClaimKeyFirstMessage(remainingClaimKeyClusters) {
|
|
11569
|
+
return remainingClaimKeyClusters === 1 ? "The subject sweep is blocked until the claim_key sweep is exhausted. One claim_key cluster still remains - continue with scope = 'claim_key'." : `The subject sweep is blocked until the claim_key sweep is exhausted. ${remainingClaimKeyClusters} claim_key clusters still remain - continue with scope = 'claim_key'.`;
|
|
11570
|
+
}
|
|
11549
11571
|
function normalizeLimit4(value) {
|
|
11550
11572
|
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
11551
11573
|
return 20;
|
|
@@ -12724,6 +12746,7 @@ function buildContinuationPrompt(input) {
|
|
|
12724
12746
|
"Continue the supersession pass.",
|
|
12725
12747
|
progressReminder,
|
|
12726
12748
|
"Keep paginating claim_key clusters while any remain. Once the claim_key sweep returns no remaining clusters, query scope = 'subject' to confirm whether lower-confidence work remains.",
|
|
12749
|
+
"Viewed supersession clusters do not count as adjudicated unless you mutate them or include one paged entry_id from the cluster in entries_skipped during complete_pass.",
|
|
12727
12750
|
"If both claim_key and subject sweeps are exhausted, call complete_pass and include any reviewed but intentionally unlinked clusters in entries_skipped.",
|
|
12728
12751
|
"Avoid no-op metadata actions that do not change persisted state."
|
|
12729
12752
|
] : [
|