@memorilabs/openclaw-memori 0.0.13 → 0.0.14
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/tools/memori-recall.js +36 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/memori/SKILL.md +20 -27
|
@@ -26,7 +26,7 @@ export function createMemoriRecallTool(deps) {
|
|
|
26
26
|
},
|
|
27
27
|
signal: {
|
|
28
28
|
type: 'string',
|
|
29
|
-
description: 'Filter
|
|
29
|
+
description: 'Filter by how the memory was derived. MUST be set together with `source` using one of the allowed (source, signal) pairs — never set independently. Valid pairs: (constraint, discovery), (decision, commit), (fact, verification), (execution, failure), (instruction, discovery), (insight, inference), (status, update), (strategy, pattern), (task, result).',
|
|
30
30
|
enum: [
|
|
31
31
|
'commit',
|
|
32
32
|
'discovery',
|
|
@@ -40,7 +40,7 @@ export function createMemoriRecallTool(deps) {
|
|
|
40
40
|
},
|
|
41
41
|
source: {
|
|
42
42
|
type: 'string',
|
|
43
|
-
description: 'Filter
|
|
43
|
+
description: 'Filter by memory type. MUST be set together with `signal` using one of the allowed (source, signal) pairs — never set independently. Valid pairs: (constraint, discovery), (decision, commit), (fact, verification), (execution, failure), (instruction, discovery), (insight, inference), (status, update), (strategy, pattern), (task, result).',
|
|
44
44
|
enum: [
|
|
45
45
|
'constraint',
|
|
46
46
|
'decision',
|
|
@@ -68,6 +68,40 @@ export function createMemoriRecallTool(deps) {
|
|
|
68
68
|
details: null,
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
const hasSource = finalParams.source != null;
|
|
72
|
+
const hasSignal = finalParams.signal != null;
|
|
73
|
+
if (hasSource !== hasSignal) {
|
|
74
|
+
const errorResult = {
|
|
75
|
+
error: 'source and signal must be provided together or both omitted',
|
|
76
|
+
};
|
|
77
|
+
logger.warn(`memori_recall rejected: ${JSON.stringify(errorResult)}`);
|
|
78
|
+
return {
|
|
79
|
+
content: [{ type: 'text', text: JSON.stringify(errorResult) }],
|
|
80
|
+
details: null,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const VALID_PAIRS = {
|
|
84
|
+
constraint: 'discovery',
|
|
85
|
+
decision: 'commit',
|
|
86
|
+
fact: 'verification',
|
|
87
|
+
execution: 'failure',
|
|
88
|
+
instruction: 'discovery',
|
|
89
|
+
insight: 'inference',
|
|
90
|
+
status: 'update',
|
|
91
|
+
strategy: 'pattern',
|
|
92
|
+
task: 'result',
|
|
93
|
+
};
|
|
94
|
+
const source = finalParams.source;
|
|
95
|
+
if (hasSource && source != null && VALID_PAIRS[source] !== finalParams.signal) {
|
|
96
|
+
const errorResult = {
|
|
97
|
+
error: `Invalid (source, signal) pair: (${source}, ${finalParams.signal}). Expected signal for source "${source}" is "${VALID_PAIRS[source]}".`,
|
|
98
|
+
};
|
|
99
|
+
logger.warn(`memori_recall rejected: ${JSON.stringify(errorResult)}`);
|
|
100
|
+
return {
|
|
101
|
+
content: [{ type: 'text', text: JSON.stringify(errorResult) }],
|
|
102
|
+
details: null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
71
105
|
logger.info(`memori_recall params: ${JSON.stringify(finalParams)}`);
|
|
72
106
|
const client = createRecallClient(config.apiKey, config.entityId);
|
|
73
107
|
const result = await client.agentRecall(finalParams);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.14";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '0.0.
|
|
1
|
+
export const SDK_VERSION = '0.0.14';
|
package/package.json
CHANGED
package/skills/memori/SKILL.md
CHANGED
|
@@ -57,36 +57,29 @@ Prefer targeted recall over broad queries.
|
|
|
57
57
|
- `projectId` → project or workspace context
|
|
58
58
|
- `sessionId` → specific session
|
|
59
59
|
- `dateStart` / `dateEnd` → time-bounded recall
|
|
60
|
-
- `source` → type of memory
|
|
61
|
-
- `signal` → how the memory was derived
|
|
60
|
+
- `source` → type of memory (must be paired with `signal` from the allowed combinations below)
|
|
61
|
+
- `signal` → how the memory was derived (must be paired with `source` from the allowed combinations below)
|
|
62
62
|
|
|
63
63
|
> Note: If a `sessionId` is provided, a `projectId` must also be provided.
|
|
64
64
|
> All timestamps are stored in **UTC**.
|
|
65
65
|
|
|
66
|
-
###
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- inference
|
|
84
|
-
- pattern
|
|
85
|
-
- result
|
|
86
|
-
- update
|
|
87
|
-
- verification
|
|
88
|
-
|
|
89
|
-
Use `source` and `signal` to prioritize high-signal memory when possible.
|
|
66
|
+
### Allowed source + signal combinations
|
|
67
|
+
|
|
68
|
+
`source` and `signal` are not independent. They must be set together (or both omitted). Only the following `(source, signal)` pairs are valid:
|
|
69
|
+
|
|
70
|
+
- `source=constraint`, `signal=discovery`
|
|
71
|
+
- `source=decision`, `signal=commit`
|
|
72
|
+
- `source=fact`, `signal=verification`
|
|
73
|
+
- `source=execution`, `signal=failure`
|
|
74
|
+
- `source=instruction`, `signal=discovery`
|
|
75
|
+
- `source=insight`, `signal=inference`
|
|
76
|
+
- `source=status`, `signal=update`
|
|
77
|
+
- `source=strategy`, `signal=pattern`
|
|
78
|
+
- `source=task`, `signal=result`
|
|
79
|
+
|
|
80
|
+
Any combination of `source` and `signal` not in this list is invalid and must not be sent to `memori_recall`.
|
|
81
|
+
|
|
82
|
+
Use one of the allowed `(source, signal)` pairs to prioritize high-signal memory when possible; never set `source` or `signal` independently.
|
|
90
83
|
|
|
91
84
|
### Default behavior (recall)
|
|
92
85
|
|
|
@@ -97,7 +90,7 @@ Use `source` and `signal` to prioritize high-signal memory when possible.
|
|
|
97
90
|
|
|
98
91
|
- Start narrow (entity + project)
|
|
99
92
|
- Add time bounds only when needed
|
|
100
|
-
- Use `source
|
|
93
|
+
- Use an allowed `(source, signal)` pair to refine results (never set them independently)
|
|
101
94
|
- Expand scope only if needed
|
|
102
95
|
- Do not recall on every turn
|
|
103
96
|
|