Skip to content

Commit 66fc669

Browse files
Ace AutonomousAce Autonomous
authored andcommitted
release: v0.9.4 — gap notification rate limiting
1 parent e24548e commit 66fc669

5 files changed

Lines changed: 19 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License"></a>
1313
<a href="https://openclaw.ai"><img src="https://img.shields.io/badge/OpenClaw-Plugin-orange" alt="OpenClaw Plugin"></a>
1414
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white" alt="TypeScript"></a>
15-
<a href="https://github.com/sudokrang/aceforge/blob/main/CHANGELOG.md"><img src="https://img.shields.io/badge/version-0.9.3-green" alt="Version"></a>
15+
<a href="https://github.com/sudokrang/aceforge/blob/main/CHANGELOG.md"><img src="https://img.shields.io/badge/version-0.9.4-green" alt="Version"></a>
1616
<img src="https://img.shields.io/badge/tests-412%2F412-brightgreen" alt="Tests">
1717
<img src="https://img.shields.io/badge/adversarial-23%2F23-brightgreen" alt="Adversarial">
1818
</p>

index.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,18 @@ function buildPlugin() {
356356
if (behaviorGaps.length > 0) {
357357
const criticalGaps = behaviorGaps.filter(g => g.count >= 5);
358358
if (criticalGaps.length > 0) {
359+
// Rate limit: max once per 24 hours
360+
const gapNotifyFile = path.join(FORGE_DIR, ".last-gap-notify");
361+
const GAP_NOTIFY_INTERVAL = 24 * 60 * 60 * 1000;
362+
let shouldNotifyGaps = true;
363+
try {
364+
if (fs.existsSync(gapNotifyFile)) {
365+
const last = new Date(fs.readFileSync(gapNotifyFile, "utf-8").trim()).getTime();
366+
if (Date.now() - last < GAP_NOTIFY_INTERVAL) shouldNotifyGaps = false;
367+
}
368+
} catch { /* first run */ }
369+
370+
if (shouldNotifyGaps) {
359371
// Build human-readable notification per gap
360372
const gapMessages: string[] = [];
361373
for (const g of criticalGaps) {
@@ -392,6 +404,8 @@ function buildPlugin() {
392404
`🔍 ${bold("Agent Behavior Gap")}\n\n` +
393405
gapMessages.join("\n\n")
394406
).catch(() => {});
407+
try { fs.writeFileSync(gapNotifyFile, new Date().toISOString()); } catch { /* non-critical */ }
408+
} // end shouldNotifyGaps
395409
}
396410
}
397411
updateTreeWithBehaviorGaps();
@@ -1240,7 +1254,7 @@ function buildPlugin() {
12401254
}
12411255
});
12421256

1243-
log.info("[aceforge] v0.9.3 — all hooks, tools, commands, and evolution engine registered ");
1257+
log.info("[aceforge] v0.9.4 — all hooks, tools, commands, and evolution engine registered ");
12441258
}
12451259
};
12461260
}

openclaw.plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "aceforge",
33
"name": "AceForge",
44
"description": "Self-evolving skill engine \u2014 detects patterns, crystallizes skills, manages lifecycle, proactive intelligence, self-validation",
5-
"version": "0.9.3",
5+
"version": "0.9.4",
66
"openclaw": {
77
"extensions": [
88
"./index.ts"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aceforge",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"type": "module",
55
"main": "index.ts",
66
"openclaw": {

0 commit comments

Comments
 (0)