memory-braid 0.5.0 → 0.6.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 +61 -4
- package/openclaw.plugin.json +32 -0
- package/package.json +1 -1
- package/src/capture.ts +128 -2
- package/src/config.ts +127 -2
- package/src/extract.ts +9 -4
- package/src/index.ts +817 -141
- package/src/state.ts +9 -0
- package/src/types.ts +27 -0
package/src/state.ts
CHANGED
|
@@ -38,6 +38,15 @@ const DEFAULT_STATS: PluginStatsState = {
|
|
|
38
38
|
quarantinedFiltered: 0,
|
|
39
39
|
remediationQuarantined: 0,
|
|
40
40
|
remediationDeleted: 0,
|
|
41
|
+
agentLearningToolCalls: 0,
|
|
42
|
+
agentLearningAccepted: 0,
|
|
43
|
+
agentLearningRejectedValidation: 0,
|
|
44
|
+
agentLearningRejectedNovelty: 0,
|
|
45
|
+
agentLearningRejectedCooldown: 0,
|
|
46
|
+
agentLearningAutoCaptured: 0,
|
|
47
|
+
agentLearningAutoRejected: 0,
|
|
48
|
+
agentLearningInjected: 0,
|
|
49
|
+
agentLearningRecallHits: 0,
|
|
41
50
|
},
|
|
42
51
|
};
|
|
43
52
|
|
package/src/types.ts
CHANGED
|
@@ -6,6 +6,24 @@ export type CaptureOrigin = "external_user" | "assistant_derived";
|
|
|
6
6
|
|
|
7
7
|
export type CapturePath = "before_message_write" | "agent_end_last_turn";
|
|
8
8
|
|
|
9
|
+
export type MemoryOwner = "user" | "agent";
|
|
10
|
+
|
|
11
|
+
export type MemoryKind =
|
|
12
|
+
| "fact"
|
|
13
|
+
| "preference"
|
|
14
|
+
| "decision"
|
|
15
|
+
| "task"
|
|
16
|
+
| "heuristic"
|
|
17
|
+
| "lesson"
|
|
18
|
+
| "strategy"
|
|
19
|
+
| "other";
|
|
20
|
+
|
|
21
|
+
export type CaptureIntent = "observed" | "inferred" | "self_reflection" | "explicit_tool";
|
|
22
|
+
|
|
23
|
+
export type RecallTarget = "response" | "planning" | "both";
|
|
24
|
+
|
|
25
|
+
export type Stability = "ephemeral" | "session" | "durable";
|
|
26
|
+
|
|
9
27
|
export type ScopeKey = {
|
|
10
28
|
workspaceHash: string;
|
|
11
29
|
agentId: string;
|
|
@@ -75,6 +93,15 @@ export type CaptureStats = {
|
|
|
75
93
|
quarantinedFiltered: number;
|
|
76
94
|
remediationQuarantined: number;
|
|
77
95
|
remediationDeleted: number;
|
|
96
|
+
agentLearningToolCalls: number;
|
|
97
|
+
agentLearningAccepted: number;
|
|
98
|
+
agentLearningRejectedValidation: number;
|
|
99
|
+
agentLearningRejectedNovelty: number;
|
|
100
|
+
agentLearningRejectedCooldown: number;
|
|
101
|
+
agentLearningAutoCaptured: number;
|
|
102
|
+
agentLearningAutoRejected: number;
|
|
103
|
+
agentLearningInjected: number;
|
|
104
|
+
agentLearningRecallHits: number;
|
|
78
105
|
lastRunAt?: string;
|
|
79
106
|
lastRemediationAt?: string;
|
|
80
107
|
};
|