@staix/agent-mem 0.3.0 → 0.3.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/README.md +1 -1
- package/package.json +1 -1
- package/src/memory/store.ts +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Curated memory with append-only JSONL logs, a derived SQLite index, short- and long-term tiers, a typed graph, goals with leases, and git sync between machines. Extracted from [agent-hub](https://github.com/STAIxBWLB/agent-hub), with compatible storage and entry IDs.
|
|
4
4
|
|
|
5
|
-
Version: 0.3.
|
|
5
|
+
Version: 0.3.1. Requires Bun 1.4.2 or later; no runtime dependencies.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
package/package.json
CHANGED
package/src/memory/store.ts
CHANGED
|
@@ -451,9 +451,9 @@ export class MemoryStore {
|
|
|
451
451
|
const moving = this.views().filter((v) => (!this.generationIndex || this.generationIndex.own(v.id)) && v.task === task && v.tier === "short" && v.local && !v.supersededBy && v.expiresAt === null && PROMOTED_KINDS.includes(v.kind));
|
|
452
452
|
return moving.filter((v) => this.promote(v.id, actor, undefined, true) !== undefined).length;
|
|
453
453
|
}
|
|
454
|
-
/** Whether a task was
|
|
455
|
-
settled(task: string): boolean {
|
|
456
|
-
return !!this.db.query(this.generationIndex
|
|
454
|
+
/** Whether a task was settled in this profile. Reconciliation may opt into bridged legacy settlements. */
|
|
455
|
+
settled(task: string, options: { includeLegacy?: boolean } = {}): boolean {
|
|
456
|
+
return !!this.db.query(this.generationIndex && !options.includeLegacy
|
|
457
457
|
? "SELECT 1 FROM ops JOIN generation_rows ON generation_rows.id=ops.id WHERE op='settle' AND target=? AND own=1"
|
|
458
458
|
: "SELECT 1 FROM ops WHERE op = 'settle' AND target = ?").get(task);
|
|
459
459
|
}
|