agenr 0.8.31 → 0.8.33
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 +13 -0
- package/dist/cli-main.js +20 -17
- package/dist/openclaw-plugin/index.js +11 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.33] - 2026-02-24
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- retire --force flag skips confirmation prompts for programmatic retirement (#225)
|
|
7
|
+
- runRetireTool now passes --force so high-importance handoff entries (imp >= 8) are properly retired (#225)
|
|
8
|
+
|
|
9
|
+
## [0.8.32] - 2026-02-24
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- summarizeSessionForHandoff: changed logger.debug to console.log for all skip-reason
|
|
13
|
+
and LLM call logging so output is visible in gateway.err.log at production log level
|
|
14
|
+
(closes #223)
|
|
15
|
+
|
|
3
16
|
## [0.8.31] - 2026-02-24
|
|
4
17
|
|
|
5
18
|
### Fixed
|
package/dist/cli-main.js
CHANGED
|
@@ -16557,22 +16557,24 @@ async function runRetireCommand(subject, options, deps) {
|
|
|
16557
16557
|
clack7.outro(void 0, clackOutput);
|
|
16558
16558
|
return { exitCode: 0 };
|
|
16559
16559
|
}
|
|
16560
|
-
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
}
|
|
16570
|
-
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16574
|
-
|
|
16575
|
-
|
|
16560
|
+
if (options.force !== true) {
|
|
16561
|
+
const requiresGuardrail = candidates.some((candidate) => candidate.importance >= 8);
|
|
16562
|
+
if (requiresGuardrail) {
|
|
16563
|
+
const typed = await resolvedDeps.textInputFn("Type CONFIRM to retire high-importance entries");
|
|
16564
|
+
if (typed !== "CONFIRM") {
|
|
16565
|
+
clack7.log.warn("Retirement canceled.", clackOutput);
|
|
16566
|
+
clack7.outro(void 0, clackOutput);
|
|
16567
|
+
return { exitCode: 1 };
|
|
16568
|
+
}
|
|
16569
|
+
} else {
|
|
16570
|
+
const confirmed = await resolvedDeps.confirmFn(
|
|
16571
|
+
`Retire ${candidates.length} matching entr${candidates.length === 1 ? "y" : "ies"}?`
|
|
16572
|
+
);
|
|
16573
|
+
if (!confirmed) {
|
|
16574
|
+
clack7.log.warn("Retirement canceled.", clackOutput);
|
|
16575
|
+
clack7.outro(void 0, clackOutput);
|
|
16576
|
+
return { exitCode: 1 };
|
|
16577
|
+
}
|
|
16576
16578
|
}
|
|
16577
16579
|
}
|
|
16578
16580
|
const retireSubject = queryId ? candidates[0]?.subject ?? queryId : querySubject;
|
|
@@ -18858,7 +18860,7 @@ function createProgram() {
|
|
|
18858
18860
|
});
|
|
18859
18861
|
process.exitCode = result.exitCode;
|
|
18860
18862
|
});
|
|
18861
|
-
program.command("retire [subject]").description("Retire a stale entry from active recall (entry is hidden, not deleted)").option("--persist", "Write to retirements ledger so retirement survives re-ingest").option("--contains", "Use substring matching instead of exact match").option("--dry-run", "Preview matches without retiring").option("--reason <text>", "Reason for retirement").option("--db <path>", "Path to database file").option("--id <id>", "Retire a specific entry by its ID (overrides subject matching)").action(async (subject, opts) => {
|
|
18863
|
+
program.command("retire [subject]").description("Retire a stale entry from active recall (entry is hidden, not deleted)").option("--persist", "Write to retirements ledger so retirement survives re-ingest").option("--contains", "Use substring matching instead of exact match").option("--dry-run", "Preview matches without retiring").option("--force", "Skip confirmation prompts (for programmatic use)").option("--reason <text>", "Reason for retirement").option("--db <path>", "Path to database file").option("--id <id>", "Retire a specific entry by its ID (overrides subject matching)").action(async (subject, opts) => {
|
|
18862
18864
|
const entryId = opts.id;
|
|
18863
18865
|
if (!entryId && !subject) {
|
|
18864
18866
|
console.error("Error: provide a subject or --id <id>");
|
|
@@ -18874,6 +18876,7 @@ function createProgram() {
|
|
|
18874
18876
|
persist: opts.persist === true,
|
|
18875
18877
|
contains: opts.contains === true,
|
|
18876
18878
|
dryRun: opts.dryRun === true,
|
|
18879
|
+
force: opts.force === true,
|
|
18877
18880
|
reason: opts.reason,
|
|
18878
18881
|
db: opts.db,
|
|
18879
18882
|
id: entryId
|
|
@@ -890,7 +890,8 @@ async function runRetireTool(agenrPath, params) {
|
|
|
890
890
|
if (persist) {
|
|
891
891
|
args.push("--persist");
|
|
892
892
|
}
|
|
893
|
-
|
|
893
|
+
args.push("--force");
|
|
894
|
+
const result = await runAgenrCommand(agenrPath, args);
|
|
894
895
|
if (result.timedOut) {
|
|
895
896
|
return {
|
|
896
897
|
content: [{ type: "text", text: "agenr_retire failed: command timed out" }]
|
|
@@ -1293,11 +1294,11 @@ async function summarizeSessionForHandoff(currentRawMessages, sessionsDir, curre
|
|
|
1293
1294
|
let transcript = buildMergedTranscript(priorSlice, priorSurface, currentSlice, currentSurface);
|
|
1294
1295
|
const nonHeaderLineCount = countTranscriptContentLines(transcript);
|
|
1295
1296
|
if (nonHeaderLineCount < 3) {
|
|
1296
|
-
|
|
1297
|
+
console.log("[agenr] before_reset: skipping LLM summary - reason: short transcript");
|
|
1297
1298
|
return null;
|
|
1298
1299
|
}
|
|
1299
1300
|
if (currentSlice.length < 5 && priorSlice.length === 0) {
|
|
1300
|
-
|
|
1301
|
+
console.log("[agenr] before_reset: skipping LLM summary - reason: too few messages");
|
|
1301
1302
|
return null;
|
|
1302
1303
|
}
|
|
1303
1304
|
if (transcript.length > HANDOFF_TRANSCRIPT_MAX_CHARS) {
|
|
@@ -1313,14 +1314,14 @@ async function summarizeSessionForHandoff(currentRawMessages, sessionsDir, curre
|
|
|
1313
1314
|
try {
|
|
1314
1315
|
llmClient = createLlmClient({});
|
|
1315
1316
|
} catch (err) {
|
|
1316
|
-
|
|
1317
|
+
console.log("[agenr] before_reset: skipping LLM summary - reason: LLM client init failed");
|
|
1317
1318
|
return null;
|
|
1318
1319
|
}
|
|
1319
1320
|
const resolvedModel = llmClient.resolvedModel;
|
|
1320
1321
|
const credentials = llmClient.credentials;
|
|
1321
1322
|
const apiKey = typeof credentials.apiKey === "string" ? credentials.apiKey.trim() : "";
|
|
1322
1323
|
if (!apiKey) {
|
|
1323
|
-
|
|
1324
|
+
console.log("[agenr] before_reset: no apiKey available, skipping LLM summary");
|
|
1324
1325
|
return null;
|
|
1325
1326
|
}
|
|
1326
1327
|
const context = {
|
|
@@ -1328,7 +1329,7 @@ async function summarizeSessionForHandoff(currentRawMessages, sessionsDir, curre
|
|
|
1328
1329
|
messages: [{ role: "user", content: transcript, timestamp: Date.now() }],
|
|
1329
1330
|
tools: []
|
|
1330
1331
|
};
|
|
1331
|
-
|
|
1332
|
+
console.log(
|
|
1332
1333
|
`[agenr] before_reset: sending to LLM model=${resolvedModel.model} chars=${transcript.length} currentMsgs=${currentSlice.length} priorMsgs=${priorSlice.length}`
|
|
1333
1334
|
);
|
|
1334
1335
|
const assistantMsg = await runSimpleStream({
|
|
@@ -1339,18 +1340,18 @@ async function summarizeSessionForHandoff(currentRawMessages, sessionsDir, curre
|
|
|
1339
1340
|
streamSimpleImpl
|
|
1340
1341
|
});
|
|
1341
1342
|
if (assistantMsg.stopReason === "error") {
|
|
1342
|
-
|
|
1343
|
+
console.log("[agenr] before_reset: skipping LLM summary - reason: LLM error stop");
|
|
1343
1344
|
return null;
|
|
1344
1345
|
}
|
|
1345
1346
|
const summaryText = extractAssistantSummaryText(assistantMsg);
|
|
1346
1347
|
if (!summaryText) {
|
|
1347
|
-
|
|
1348
|
+
console.log("[agenr] before_reset: skipping LLM summary - reason: empty summary text");
|
|
1348
1349
|
return null;
|
|
1349
1350
|
}
|
|
1350
|
-
|
|
1351
|
+
console.log(`[agenr] before_reset: LLM summary received chars=${summaryText.length}`);
|
|
1351
1352
|
return summaryText;
|
|
1352
1353
|
} catch (err) {
|
|
1353
|
-
|
|
1354
|
+
console.log(
|
|
1354
1355
|
`[agenr] before_reset: summarize handoff failed: ${err instanceof Error ? err.message : String(err)}`
|
|
1355
1356
|
);
|
|
1356
1357
|
return null;
|