@signetai/signet-memory-openclaw 0.147.12 → 0.147.18

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.
Files changed (2) hide show
  1. package/dist/index.js +36 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9879,6 +9879,19 @@ function up86(db) {
9879
9879
  ON summary_jobs(agent_id, session_key, content_hash)
9880
9880
  `);
9881
9881
  }
9882
+ function addColumnIfMissing22(db, table, column, definition) {
9883
+ const cols = db.prepare(`PRAGMA table_info(${table})`).all();
9884
+ if (cols.some((col) => col.name === column))
9885
+ return;
9886
+ db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
9887
+ }
9888
+ function up87(db) {
9889
+ addColumnIfMissing22(db, "summary_jobs", "boundary_reason", "TEXT");
9890
+ db.exec(`
9891
+ CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
9892
+ ON summary_jobs(agent_id, session_key, boundary_reason)
9893
+ `);
9894
+ }
9882
9895
  var MIGRATIONS = [
9883
9896
  {
9884
9897
  version: 1,
@@ -10582,6 +10595,14 @@ var MIGRATIONS = [
10582
10595
  artifacts: {
10583
10596
  columns: [{ table: "summary_jobs", column: "content_hash" }]
10584
10597
  }
10598
+ },
10599
+ {
10600
+ version: 87,
10601
+ name: "summary-jobs-boundary-reason",
10602
+ up: up87,
10603
+ artifacts: {
10604
+ columns: [{ table: "summary_jobs", column: "boundary_reason" }]
10605
+ }
10585
10606
  }
10586
10607
  ];
10587
10608
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -10620,6 +10641,11 @@ function normalizeRememberTags(tags) {
10620
10641
  }
10621
10642
  return;
10622
10643
  }
10644
+ function normalizeRecallLimit(limit) {
10645
+ if (typeof limit !== "number" || !Number.isFinite(limit))
10646
+ return 10;
10647
+ return Math.min(100, Math.max(1, Math.trunc(limit)));
10648
+ }
10623
10649
  function partitionRecallRows(rows) {
10624
10650
  return {
10625
10651
  primary: rows.filter((row) => row.supplementary !== true),
@@ -10741,7 +10767,11 @@ function formatRecallText(raw) {
10741
10767
  if (parsed.meta.temporal?.mode === "timeline")
10742
10768
  return formatTemporalRecallText(primary, parsed.meta.temporal);
10743
10769
  const noun = parsed.meta.totalReturned === 1 ? "memory" : "memories";
10744
- const parts = [`Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`];
10770
+ const parts = payload.aggregate?.partial === true && typeof payload.aggregate.message === "string" ? [
10771
+ payload.aggregate.message,
10772
+ "",
10773
+ `Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`
10774
+ ] : [`Found ${parsed.meta.totalReturned} ${noun}${parsed.method ? ` (${parsed.method})` : ""}.`];
10745
10775
  if (primary.length > 0) {
10746
10776
  parts.push("", "Primary matches:", ...primary.map((row) => formatRecallRow(row)));
10747
10777
  }
@@ -10755,7 +10785,7 @@ function buildRecallRequestBody(query, options = {}) {
10755
10785
  return withDefined({
10756
10786
  query,
10757
10787
  keywordQuery: options.keywordQuery ?? options.keyword_query,
10758
- limit: options.limit,
10788
+ limit: normalizeRecallLimit(options.limit),
10759
10789
  project: options.project,
10760
10790
  type: options.type,
10761
10791
  tags: options.tags,
@@ -10766,11 +10796,11 @@ function buildRecallRequestBody(query, options = {}) {
10766
10796
  until: options.until,
10767
10797
  time: options.time,
10768
10798
  expand: options.expand === true ? true : undefined,
10769
- agentId: options.agentId,
10770
- sessionKey: options.sessionKey,
10771
- includeRecalled: options.includeRecalled === true ? true : undefined,
10799
+ agentId: options.agentId ?? options.agent_id ?? options.contextAgentId,
10800
+ sessionKey: options.sessionKey ?? options.session_key,
10801
+ includeRecalled: options.includeRecalled === true || options.include_recalled === true ? true : undefined,
10772
10802
  scope: options.scope,
10773
- sourceOnly: options.sourceOnly === true ? true : undefined,
10803
+ sourceOnly: options.sourceOnly === true || options.source_only === true ? true : undefined,
10774
10804
  aggregate: options.aggregate === true ? true : undefined,
10775
10805
  aggregateBudget: options.aggregateBudget ?? options.aggregate_budget,
10776
10806
  saveAggregate: options.saveAggregate === false || options.save_aggregate === false ? false : options.saveAggregate === true || options.save_aggregate === true ? true : undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/signet-memory-openclaw",
3
- "version": "0.147.12",
3
+ "version": "0.147.18",
4
4
  "description": "Signet adapter for OpenClaw — runtime plugin for AI agent memory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",