@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 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.0. Requires Bun 1.4.2 or later; no runtime dependencies.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staix/agent-mem",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Curated, shared memory for coding agents: append-only logs, a derived index, tiers and a typed graph.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -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 ever settled, for the hub's reconciliation of approvals a crash cut off before their settle entry. */
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
  }