@signetai/signet-memory-openclaw 0.147.13 → 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.
- package/dist/index.js +15 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10641,6 +10641,11 @@ function normalizeRememberTags(tags) {
|
|
|
10641
10641
|
}
|
|
10642
10642
|
return;
|
|
10643
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
|
+
}
|
|
10644
10649
|
function partitionRecallRows(rows) {
|
|
10645
10650
|
return {
|
|
10646
10651
|
primary: rows.filter((row) => row.supplementary !== true),
|
|
@@ -10762,7 +10767,11 @@ function formatRecallText(raw) {
|
|
|
10762
10767
|
if (parsed.meta.temporal?.mode === "timeline")
|
|
10763
10768
|
return formatTemporalRecallText(primary, parsed.meta.temporal);
|
|
10764
10769
|
const noun = parsed.meta.totalReturned === 1 ? "memory" : "memories";
|
|
10765
|
-
const parts =
|
|
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})` : ""}.`];
|
|
10766
10775
|
if (primary.length > 0) {
|
|
10767
10776
|
parts.push("", "Primary matches:", ...primary.map((row) => formatRecallRow(row)));
|
|
10768
10777
|
}
|
|
@@ -10776,7 +10785,7 @@ function buildRecallRequestBody(query, options = {}) {
|
|
|
10776
10785
|
return withDefined({
|
|
10777
10786
|
query,
|
|
10778
10787
|
keywordQuery: options.keywordQuery ?? options.keyword_query,
|
|
10779
|
-
limit: options.limit,
|
|
10788
|
+
limit: normalizeRecallLimit(options.limit),
|
|
10780
10789
|
project: options.project,
|
|
10781
10790
|
type: options.type,
|
|
10782
10791
|
tags: options.tags,
|
|
@@ -10787,11 +10796,11 @@ function buildRecallRequestBody(query, options = {}) {
|
|
|
10787
10796
|
until: options.until,
|
|
10788
10797
|
time: options.time,
|
|
10789
10798
|
expand: options.expand === true ? true : undefined,
|
|
10790
|
-
agentId: options.agentId,
|
|
10791
|
-
sessionKey: options.sessionKey,
|
|
10792
|
-
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,
|
|
10793
10802
|
scope: options.scope,
|
|
10794
|
-
sourceOnly: options.sourceOnly === true ? true : undefined,
|
|
10803
|
+
sourceOnly: options.sourceOnly === true || options.source_only === true ? true : undefined,
|
|
10795
10804
|
aggregate: options.aggregate === true ? true : undefined,
|
|
10796
10805
|
aggregateBudget: options.aggregateBudget ?? options.aggregate_budget,
|
|
10797
10806
|
saveAggregate: options.saveAggregate === false || options.save_aggregate === false ? false : options.saveAggregate === true || options.save_aggregate === true ? true : undefined
|