clawvault 3.3.0 → 3.4.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 +26 -26
- package/bin/command-registration.test.js +2 -1
- package/bin/help-contract.test.js +2 -0
- package/bin/register-maintenance-commands.js +27 -1
- package/bin/register-query-commands.js +35 -0
- package/bin/register-query-commands.test.js +15 -0
- package/dist/chunk-35JCYSRR.js +158 -0
- package/dist/{chunk-TDWFBDAQ.js → chunk-D5U3Q4N5.js} +7 -151
- package/dist/{chunk-YCUVAOFC.js → chunk-DCF4KMFD.js} +4 -4
- package/dist/chunk-NSXYM6EZ.js +255 -0
- package/dist/chunk-PLNK37JD.js +2223 -0
- package/dist/chunk-RL2L6I6K.js +223 -0
- package/dist/chunk-YTRZNA64.js +37 -0
- package/dist/cli/index.js +6 -5
- package/dist/commands/entities.d.ts +8 -1
- package/dist/commands/entities.js +44 -1
- package/dist/commands/link.js +5 -5
- package/dist/commands/maintain.js +2 -1
- package/dist/commands/recall.d.ts +14 -0
- package/dist/commands/recall.js +15 -0
- package/dist/index.d.ts +59 -1
- package/dist/index.js +56 -11
- package/dist/openclaw-plugin--gqA2BZw.d.ts +267 -0
- package/dist/openclaw-plugin.d.ts +4 -8
- package/dist/openclaw-plugin.js +16 -10
- package/dist/types-CbL-wIKi.d.ts +36 -0
- package/openclaw.plugin.json +39 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
rebuildCommand,
|
|
7
7
|
registerRebuildCommand
|
|
8
8
|
} from "./chunk-QFWERBDP.js";
|
|
9
|
+
import {
|
|
10
|
+
recallCommand
|
|
11
|
+
} from "./chunk-YTRZNA64.js";
|
|
9
12
|
import {
|
|
10
13
|
registerReplayCommand,
|
|
11
14
|
replayCommand
|
|
@@ -45,9 +48,32 @@ import {
|
|
|
45
48
|
graphCommand,
|
|
46
49
|
graphSummary
|
|
47
50
|
} from "./chunk-S7N7HI5E.js";
|
|
51
|
+
import {
|
|
52
|
+
LiveCaptureService,
|
|
53
|
+
createMemorySlot,
|
|
54
|
+
createMemorySlotPlugin,
|
|
55
|
+
evaluateCandidateQuality,
|
|
56
|
+
extractHeuristicMemories,
|
|
57
|
+
extractMemoriesFromAssistantResponse,
|
|
58
|
+
extractTaggedMemoryNotes,
|
|
59
|
+
isLikelyJunkMemory,
|
|
60
|
+
openclaw_plugin_default,
|
|
61
|
+
plausibilityScore,
|
|
62
|
+
registerMemorySlot
|
|
63
|
+
} from "./chunk-PLNK37JD.js";
|
|
64
|
+
import {
|
|
65
|
+
buildRecallResult,
|
|
66
|
+
classifyRecallQuery
|
|
67
|
+
} from "./chunk-RL2L6I6K.js";
|
|
68
|
+
import {
|
|
69
|
+
ensureEntityProfiles,
|
|
70
|
+
readEntityProfile,
|
|
71
|
+
readEntityProfiles,
|
|
72
|
+
synthesizeEntityProfiles
|
|
73
|
+
} from "./chunk-NSXYM6EZ.js";
|
|
48
74
|
import {
|
|
49
75
|
registerCliCommands
|
|
50
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-DCF4KMFD.js";
|
|
51
77
|
import {
|
|
52
78
|
registerTailscaleCommands,
|
|
53
79
|
registerTailscaleDiscoverCommand,
|
|
@@ -99,7 +125,7 @@ import {
|
|
|
99
125
|
import {
|
|
100
126
|
maintainCommand,
|
|
101
127
|
registerMaintainCommand
|
|
102
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-D5U3Q4N5.js";
|
|
103
129
|
import {
|
|
104
130
|
SessionWatcher,
|
|
105
131
|
observeCommand,
|
|
@@ -156,6 +182,16 @@ import {
|
|
|
156
182
|
registerContextCommand,
|
|
157
183
|
resolveContextProfile
|
|
158
184
|
} from "./chunk-GFCHWMGD.js";
|
|
185
|
+
import {
|
|
186
|
+
embedCommand,
|
|
187
|
+
registerEmbedCommand
|
|
188
|
+
} from "./chunk-T7E764W3.js";
|
|
189
|
+
import {
|
|
190
|
+
inboxAddCommand,
|
|
191
|
+
registerInboxCommand
|
|
192
|
+
} from "./chunk-HEHO7SMV.js";
|
|
193
|
+
import "./chunk-2PKBIKDH.js";
|
|
194
|
+
import "./chunk-35JCYSRR.js";
|
|
159
195
|
import {
|
|
160
196
|
FactStore,
|
|
161
197
|
extractFactsLlm,
|
|
@@ -174,10 +210,6 @@ import {
|
|
|
174
210
|
MEMORY_TYPES,
|
|
175
211
|
TYPE_TO_CATEGORY
|
|
176
212
|
} from "./chunk-2CDEETQN.js";
|
|
177
|
-
import {
|
|
178
|
-
embedCommand,
|
|
179
|
-
registerEmbedCommand
|
|
180
|
-
} from "./chunk-T7E764W3.js";
|
|
181
213
|
import {
|
|
182
214
|
loadVaultQmdConfig,
|
|
183
215
|
removeQmdCollection
|
|
@@ -196,11 +228,6 @@ import {
|
|
|
196
228
|
qmdUpdate
|
|
197
229
|
} from "./chunk-PTWPPVC7.js";
|
|
198
230
|
import "./chunk-H3JZIB5O.js";
|
|
199
|
-
import {
|
|
200
|
-
inboxAddCommand,
|
|
201
|
-
registerInboxCommand
|
|
202
|
-
} from "./chunk-HEHO7SMV.js";
|
|
203
|
-
import "./chunk-2PKBIKDH.js";
|
|
204
231
|
import {
|
|
205
232
|
archiveCommand,
|
|
206
233
|
registerArchiveCommand
|
|
@@ -666,6 +693,7 @@ export {
|
|
|
666
693
|
DEFAULT_SERVE_PORT,
|
|
667
694
|
EmbeddingCache,
|
|
668
695
|
FactStore,
|
|
696
|
+
LiveCaptureService,
|
|
669
697
|
MEMORY_GRAPH_SCHEMA_VERSION,
|
|
670
698
|
MEMORY_TYPES,
|
|
671
699
|
Observer,
|
|
@@ -689,11 +717,13 @@ export {
|
|
|
689
717
|
buildInjectionResult,
|
|
690
718
|
buildKanbanLanes,
|
|
691
719
|
buildOrUpdateMemoryGraphIndex,
|
|
720
|
+
buildRecallResult,
|
|
692
721
|
buildSessionRecap,
|
|
693
722
|
buildTemplateVariables,
|
|
694
723
|
buildTransitionEvent,
|
|
695
724
|
checkOpenClawCompatibility,
|
|
696
725
|
checkPeerClawVault,
|
|
726
|
+
classifyRecallQuery,
|
|
697
727
|
compareManifests,
|
|
698
728
|
compareObservationText,
|
|
699
729
|
compatCommand,
|
|
@@ -707,6 +737,8 @@ export {
|
|
|
707
737
|
createFactExtractionAdapter,
|
|
708
738
|
createGeminiFlashAdapter,
|
|
709
739
|
createLlmFunction,
|
|
740
|
+
createMemorySlot,
|
|
741
|
+
createMemorySlotPlugin,
|
|
710
742
|
createProject,
|
|
711
743
|
createVault,
|
|
712
744
|
deterministicInjectMatches,
|
|
@@ -715,10 +747,15 @@ export {
|
|
|
715
747
|
embed,
|
|
716
748
|
embedBatch,
|
|
717
749
|
embedCommand,
|
|
750
|
+
ensureEntityProfiles,
|
|
751
|
+
evaluateCandidateQuality,
|
|
718
752
|
extractCardSlug,
|
|
719
753
|
extractFactsLlm,
|
|
720
754
|
extractFactsRuleBased,
|
|
755
|
+
extractHeuristicMemories,
|
|
721
756
|
extractKeywordSetFromTranscript,
|
|
757
|
+
extractMemoriesFromAssistantResponse,
|
|
758
|
+
extractTaggedMemoryNotes,
|
|
722
759
|
extractTags,
|
|
723
760
|
extractWikiLinks,
|
|
724
761
|
factId,
|
|
@@ -756,6 +793,7 @@ export {
|
|
|
756
793
|
indexInjectableItems,
|
|
757
794
|
inferContextProfile,
|
|
758
795
|
injectCommand,
|
|
796
|
+
isLikelyJunkMemory,
|
|
759
797
|
isRegression,
|
|
760
798
|
kanbanCommand,
|
|
761
799
|
listConfig,
|
|
@@ -776,16 +814,21 @@ export {
|
|
|
776
814
|
normalizeEntity,
|
|
777
815
|
observeActiveSessions,
|
|
778
816
|
observeCommand,
|
|
817
|
+
openclaw_plugin_default as openclawHookPlugin,
|
|
779
818
|
parseKanbanMarkdown,
|
|
780
819
|
parseSessionFile,
|
|
781
820
|
parseSessionSourceLabel,
|
|
821
|
+
plausibilityScore,
|
|
782
822
|
pushFileToRemote,
|
|
783
823
|
qmdEmbed,
|
|
784
824
|
qmdUpdate,
|
|
785
825
|
queryTransitions,
|
|
786
826
|
readAllTransitions,
|
|
827
|
+
readEntityProfile,
|
|
828
|
+
readEntityProfiles,
|
|
787
829
|
readProject,
|
|
788
830
|
rebuildCommand,
|
|
831
|
+
recallCommand,
|
|
789
832
|
reciprocalRankFusion,
|
|
790
833
|
reflectCommand,
|
|
791
834
|
registerArchiveCommand,
|
|
@@ -797,6 +840,7 @@ export {
|
|
|
797
840
|
registerInboxCommand,
|
|
798
841
|
registerInjectCommand,
|
|
799
842
|
registerMaintainCommand,
|
|
843
|
+
registerMemorySlot,
|
|
800
844
|
registerMigrateCommand,
|
|
801
845
|
registerMigrateObservationsCommand,
|
|
802
846
|
registerObserveCommand,
|
|
@@ -832,6 +876,7 @@ export {
|
|
|
832
876
|
syncBdCommand,
|
|
833
877
|
syncKanbanBoard,
|
|
834
878
|
syncWithPeer,
|
|
879
|
+
synthesizeEntityProfiles,
|
|
835
880
|
tailscaleDiscoverCommand,
|
|
836
881
|
tailscaleServeCommand,
|
|
837
882
|
tailscaleStatusCommand,
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { D as Document, a as SearchOptions, b as SearchResult } from './types-DslKvCaj.js';
|
|
2
|
+
import { PluginConfig } from './lib/config.js';
|
|
3
|
+
import { b as RecallOptions } from './types-CbL-wIKi.js';
|
|
4
|
+
|
|
5
|
+
type CapturedMemoryType = 'fact' | 'preference' | 'decision' | 'lesson' | 'entity' | 'episode' | 'relationship';
|
|
6
|
+
interface CaptureMessage {
|
|
7
|
+
role: string;
|
|
8
|
+
content: string;
|
|
9
|
+
timestamp?: string;
|
|
10
|
+
}
|
|
11
|
+
interface CaptureCandidate {
|
|
12
|
+
content: string;
|
|
13
|
+
type: CapturedMemoryType;
|
|
14
|
+
confidence: number;
|
|
15
|
+
title?: string;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
entities?: string[];
|
|
18
|
+
source: 'memory_note' | 'heuristic';
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
interface CaptureOptions {
|
|
22
|
+
vaultPath?: string;
|
|
23
|
+
agentId?: string;
|
|
24
|
+
pluginConfig?: PluginConfig;
|
|
25
|
+
minConfidence?: number;
|
|
26
|
+
dedupThreshold?: number;
|
|
27
|
+
maxPerTurn?: number;
|
|
28
|
+
sourceSessionId?: string;
|
|
29
|
+
}
|
|
30
|
+
interface CaptureRejection {
|
|
31
|
+
candidate: CaptureCandidate;
|
|
32
|
+
reason: string;
|
|
33
|
+
}
|
|
34
|
+
interface CaptureStoreResult {
|
|
35
|
+
stored: number;
|
|
36
|
+
rejected: number;
|
|
37
|
+
storedDocuments: string[];
|
|
38
|
+
acceptedCandidates: CaptureCandidate[];
|
|
39
|
+
rejectedCandidates: CaptureRejection[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface MemorySlotInitOptions {
|
|
43
|
+
vaultPath?: string;
|
|
44
|
+
agentId?: string;
|
|
45
|
+
pluginConfig?: PluginConfig;
|
|
46
|
+
}
|
|
47
|
+
interface MemoryStoreMetadata {
|
|
48
|
+
title?: string;
|
|
49
|
+
category?: string;
|
|
50
|
+
type?: CapturedMemoryType;
|
|
51
|
+
tags?: string[];
|
|
52
|
+
frontmatter?: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
interface MemorySlotRecallOptions extends Omit<RecallOptions, 'vaultPath' | 'pluginConfig' | 'agentId'> {
|
|
55
|
+
vaultPath?: string;
|
|
56
|
+
pluginConfig?: PluginConfig;
|
|
57
|
+
agentId?: string;
|
|
58
|
+
}
|
|
59
|
+
interface MemorySlotSearchOptions extends SearchOptions {
|
|
60
|
+
vaultPath?: string;
|
|
61
|
+
pluginConfig?: PluginConfig;
|
|
62
|
+
agentId?: string;
|
|
63
|
+
}
|
|
64
|
+
interface MemorySlotStoreOptions extends MemoryStoreMetadata {
|
|
65
|
+
vaultPath?: string;
|
|
66
|
+
pluginConfig?: PluginConfig;
|
|
67
|
+
agentId?: string;
|
|
68
|
+
}
|
|
69
|
+
interface MemorySlot {
|
|
70
|
+
recall(query: string, options?: MemorySlotRecallOptions): Promise<string>;
|
|
71
|
+
capture(messages: unknown[], options?: CaptureOptions): Promise<CaptureStoreResult>;
|
|
72
|
+
store(content: string, metadata?: MemorySlotStoreOptions): Promise<Document>;
|
|
73
|
+
search(query: string, options?: MemorySlotSearchOptions): Promise<SearchResult[]>;
|
|
74
|
+
}
|
|
75
|
+
declare function createMemorySlot(defaults?: MemorySlotInitOptions): MemorySlot;
|
|
76
|
+
declare function createMemorySlotPlugin(defaults?: MemorySlotInitOptions): {
|
|
77
|
+
plugins: {
|
|
78
|
+
slots: {
|
|
79
|
+
memory: MemorySlot;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
declare function registerMemorySlot(registry: Record<string, any>, defaults?: MemorySlotInitOptions): void;
|
|
84
|
+
|
|
85
|
+
type ClawVaultContextProfile = "default" | "planning" | "incident" | "handoff" | "auto";
|
|
86
|
+
interface ClawVaultPluginConfig {
|
|
87
|
+
vaultPath?: string;
|
|
88
|
+
agentVaults?: Record<string, string>;
|
|
89
|
+
allowClawvaultExec?: boolean;
|
|
90
|
+
clawvaultBinaryPath?: string;
|
|
91
|
+
clawvaultBinarySha256?: string;
|
|
92
|
+
allowEnvAccess?: boolean;
|
|
93
|
+
enableStartupRecovery?: boolean;
|
|
94
|
+
enableSessionContextInjection?: boolean;
|
|
95
|
+
enableAutoCheckpoint?: boolean;
|
|
96
|
+
enableObserveOnNew?: boolean;
|
|
97
|
+
enableHeartbeatObservation?: boolean;
|
|
98
|
+
enableCompactionObservation?: boolean;
|
|
99
|
+
enableWeeklyReflection?: boolean;
|
|
100
|
+
enableFactExtraction?: boolean;
|
|
101
|
+
autoCheckpoint?: boolean;
|
|
102
|
+
observeOnHeartbeat?: boolean;
|
|
103
|
+
weeklyReflection?: boolean;
|
|
104
|
+
contextProfile?: ClawVaultContextProfile;
|
|
105
|
+
maxContextResults?: number;
|
|
106
|
+
enableBeforePromptRecall?: boolean;
|
|
107
|
+
enforceCommunicationProtocol?: boolean;
|
|
108
|
+
enableMessageSendingFilter?: boolean;
|
|
109
|
+
minQuestionRecallScore?: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type MemorySource = "memory" | "sessions";
|
|
113
|
+
type MemorySearchResult = {
|
|
114
|
+
path: string;
|
|
115
|
+
startLine: number;
|
|
116
|
+
endLine: number;
|
|
117
|
+
score: number;
|
|
118
|
+
snippet: string;
|
|
119
|
+
source: MemorySource;
|
|
120
|
+
citation?: string;
|
|
121
|
+
};
|
|
122
|
+
type MemoryEmbeddingProbeResult = {
|
|
123
|
+
ok: boolean;
|
|
124
|
+
error?: string;
|
|
125
|
+
};
|
|
126
|
+
type MemorySyncProgressUpdate = {
|
|
127
|
+
completed: number;
|
|
128
|
+
total: number;
|
|
129
|
+
label?: string;
|
|
130
|
+
};
|
|
131
|
+
type MemoryProviderStatus = {
|
|
132
|
+
backend: "builtin" | "qmd";
|
|
133
|
+
provider: string;
|
|
134
|
+
model?: string;
|
|
135
|
+
requestedProvider?: string;
|
|
136
|
+
files?: number;
|
|
137
|
+
chunks?: number;
|
|
138
|
+
dirty?: boolean;
|
|
139
|
+
workspaceDir?: string;
|
|
140
|
+
dbPath?: string;
|
|
141
|
+
extraPaths?: string[];
|
|
142
|
+
sources?: MemorySource[];
|
|
143
|
+
sourceCounts?: Array<{
|
|
144
|
+
source: MemorySource;
|
|
145
|
+
files: number;
|
|
146
|
+
chunks: number;
|
|
147
|
+
}>;
|
|
148
|
+
cache?: {
|
|
149
|
+
enabled: boolean;
|
|
150
|
+
entries?: number;
|
|
151
|
+
maxEntries?: number;
|
|
152
|
+
};
|
|
153
|
+
fts?: {
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
available: boolean;
|
|
156
|
+
error?: string;
|
|
157
|
+
};
|
|
158
|
+
fallback?: {
|
|
159
|
+
from: string;
|
|
160
|
+
reason?: string;
|
|
161
|
+
};
|
|
162
|
+
vector?: {
|
|
163
|
+
enabled: boolean;
|
|
164
|
+
available?: boolean;
|
|
165
|
+
extensionPath?: string;
|
|
166
|
+
loadError?: string;
|
|
167
|
+
dims?: number;
|
|
168
|
+
};
|
|
169
|
+
batch?: {
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
failures: number;
|
|
172
|
+
limit: number;
|
|
173
|
+
wait: boolean;
|
|
174
|
+
concurrency: number;
|
|
175
|
+
pollIntervalMs: number;
|
|
176
|
+
timeoutMs: number;
|
|
177
|
+
lastError?: string;
|
|
178
|
+
lastProvider?: string;
|
|
179
|
+
};
|
|
180
|
+
custom?: Record<string, unknown>;
|
|
181
|
+
};
|
|
182
|
+
interface MemorySearchManager {
|
|
183
|
+
search(query: string, opts?: {
|
|
184
|
+
maxResults?: number;
|
|
185
|
+
minScore?: number;
|
|
186
|
+
sessionKey?: string;
|
|
187
|
+
}): Promise<MemorySearchResult[]>;
|
|
188
|
+
readFile(params: {
|
|
189
|
+
relPath: string;
|
|
190
|
+
from?: number;
|
|
191
|
+
lines?: number;
|
|
192
|
+
}): Promise<{
|
|
193
|
+
text: string;
|
|
194
|
+
path: string;
|
|
195
|
+
}>;
|
|
196
|
+
status(): MemoryProviderStatus;
|
|
197
|
+
sync?(params?: {
|
|
198
|
+
reason?: string;
|
|
199
|
+
force?: boolean;
|
|
200
|
+
progress?: (update: MemorySyncProgressUpdate) => void;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
probeEmbeddingAvailability(): Promise<MemoryEmbeddingProbeResult>;
|
|
203
|
+
probeVectorAvailability(): Promise<boolean>;
|
|
204
|
+
close?(): Promise<void>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface ClawVaultMemoryManagerOptions {
|
|
208
|
+
pluginConfig: ClawVaultPluginConfig;
|
|
209
|
+
workspaceDir?: string;
|
|
210
|
+
defaultAgentId?: string;
|
|
211
|
+
logger?: {
|
|
212
|
+
debug?: (message: string) => void;
|
|
213
|
+
warn: (message: string) => void;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
declare class ClawVaultMemoryManager implements MemorySearchManager {
|
|
217
|
+
private readonly options;
|
|
218
|
+
constructor(options: ClawVaultMemoryManagerOptions);
|
|
219
|
+
search(query: string, opts?: {
|
|
220
|
+
maxResults?: number;
|
|
221
|
+
minScore?: number;
|
|
222
|
+
sessionKey?: string;
|
|
223
|
+
}): Promise<MemorySearchResult[]>;
|
|
224
|
+
readFile(params: {
|
|
225
|
+
relPath: string;
|
|
226
|
+
from?: number;
|
|
227
|
+
lines?: number;
|
|
228
|
+
}): Promise<{
|
|
229
|
+
text: string;
|
|
230
|
+
path: string;
|
|
231
|
+
}>;
|
|
232
|
+
status(): MemoryProviderStatus;
|
|
233
|
+
sync(params?: {
|
|
234
|
+
reason?: string;
|
|
235
|
+
force?: boolean;
|
|
236
|
+
progress?: (update: {
|
|
237
|
+
completed: number;
|
|
238
|
+
total: number;
|
|
239
|
+
label?: string;
|
|
240
|
+
}) => void;
|
|
241
|
+
}): Promise<void>;
|
|
242
|
+
probeEmbeddingAvailability(): Promise<MemoryEmbeddingProbeResult>;
|
|
243
|
+
probeVectorAvailability(): Promise<boolean>;
|
|
244
|
+
close(): Promise<void>;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare const clawvaultPlugin: {
|
|
248
|
+
id: string;
|
|
249
|
+
name: string;
|
|
250
|
+
kind: "memory";
|
|
251
|
+
description: string;
|
|
252
|
+
register(apiOrRuntime?: unknown): Promise<{
|
|
253
|
+
plugins: {
|
|
254
|
+
slots: {
|
|
255
|
+
memory: MemorySlot;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
} | {
|
|
259
|
+
plugins: {
|
|
260
|
+
slots: {
|
|
261
|
+
memory: ClawVaultMemoryManager;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
}>;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export { type CaptureOptions as C, type MemorySlot as M, type CaptureStoreResult as a, type CaptureCandidate as b, type CaptureMessage as c, type CaptureRejection as d, type CapturedMemoryType as e, type MemorySlotInitOptions as f, type MemorySlotRecallOptions as g, type MemorySlotSearchOptions as h, type MemorySlotStoreOptions as i, type MemoryStoreMetadata as j, createMemorySlot as k, createMemorySlotPlugin as l, clawvaultPlugin as m, registerMemorySlot as r };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
register(): void;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export { clawvaultPlugin as default };
|
|
1
|
+
export { l as createMemorySlotPlugin, m as default } from './openclaw-plugin--gqA2BZw.js';
|
|
2
|
+
import './types-DslKvCaj.js';
|
|
3
|
+
import './lib/config.js';
|
|
4
|
+
import './types-CbL-wIKi.js';
|
package/dist/openclaw-plugin.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createMemorySlotPlugin,
|
|
3
|
+
openclaw_plugin_default
|
|
4
|
+
} from "./chunk-PLNK37JD.js";
|
|
5
|
+
import "./chunk-RL2L6I6K.js";
|
|
6
|
+
import "./chunk-NSXYM6EZ.js";
|
|
7
|
+
import "./chunk-35JCYSRR.js";
|
|
8
|
+
import "./chunk-BSJ6RIT7.js";
|
|
9
|
+
import "./chunk-ECGJYWNA.js";
|
|
10
|
+
import "./chunk-2CDEETQN.js";
|
|
11
|
+
import "./chunk-FZ5I2NF7.js";
|
|
12
|
+
import "./chunk-PTWPPVC7.js";
|
|
13
|
+
import "./chunk-H3JZIB5O.js";
|
|
14
|
+
import "./chunk-GJO3CFUN.js";
|
|
15
|
+
import "./chunk-33DOSHTA.js";
|
|
1
16
|
import "./chunk-2ZDO52B4.js";
|
|
2
|
-
|
|
3
|
-
// src/openclaw-plugin.ts
|
|
4
|
-
var clawvaultPlugin = {
|
|
5
|
-
id: "clawvault",
|
|
6
|
-
name: "ClawVault",
|
|
7
|
-
description: "Structured memory system for AI agents with context death resilience",
|
|
8
|
-
register() {
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
var openclaw_plugin_default = clawvaultPlugin;
|
|
12
17
|
export {
|
|
18
|
+
createMemorySlotPlugin,
|
|
13
19
|
openclaw_plugin_default as default
|
|
14
20
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { a as SearchOptions, b as SearchResult } from './types-DslKvCaj.js';
|
|
2
|
+
import { PluginConfig } from './lib/config.js';
|
|
3
|
+
|
|
4
|
+
type RecallStrategy = 'quick' | 'entity' | 'temporal' | 'verification' | 'relationship';
|
|
5
|
+
interface RecallQueryClassification {
|
|
6
|
+
strategy: RecallStrategy;
|
|
7
|
+
entityName?: string;
|
|
8
|
+
temporalDays?: number;
|
|
9
|
+
}
|
|
10
|
+
interface RecallOptions {
|
|
11
|
+
limit?: number;
|
|
12
|
+
strategy?: RecallStrategy;
|
|
13
|
+
includeSources?: boolean;
|
|
14
|
+
vaultPath?: string;
|
|
15
|
+
agentId?: string;
|
|
16
|
+
pluginConfig?: PluginConfig;
|
|
17
|
+
searchOptions?: SearchOptions;
|
|
18
|
+
}
|
|
19
|
+
interface RecallSource {
|
|
20
|
+
title: string;
|
|
21
|
+
path: string;
|
|
22
|
+
category: string;
|
|
23
|
+
score: number;
|
|
24
|
+
snippet: string;
|
|
25
|
+
modified: string;
|
|
26
|
+
}
|
|
27
|
+
interface RecallResult {
|
|
28
|
+
query: string;
|
|
29
|
+
strategy: RecallStrategy;
|
|
30
|
+
entityName?: string;
|
|
31
|
+
context: string;
|
|
32
|
+
sources: RecallSource[];
|
|
33
|
+
rawResults: SearchResult[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type { RecallStrategy as R, RecallQueryClassification as a, RecallOptions as b, RecallResult as c, RecallSource as d };
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"id": "clawvault",
|
|
3
3
|
"name": "ClawVault",
|
|
4
4
|
"version": "2.7.0",
|
|
5
|
+
"kind": "memory",
|
|
5
6
|
"description": "Structured memory system for AI agents with context death resilience",
|
|
6
7
|
"configSchema": {
|
|
7
8
|
"type": "object",
|
|
@@ -103,6 +104,28 @@
|
|
|
103
104
|
"maximum": 20,
|
|
104
105
|
"description": "Maximum number of context results to inject on session start",
|
|
105
106
|
"default": 4
|
|
107
|
+
},
|
|
108
|
+
"enableBeforePromptRecall": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"description": "Enable before_prompt_build memory recall directives and vault context injection.",
|
|
111
|
+
"default": true
|
|
112
|
+
},
|
|
113
|
+
"enableMessageSendingFilter": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"description": "Enable outbound message filtering via message_sending hook.",
|
|
116
|
+
"default": true
|
|
117
|
+
},
|
|
118
|
+
"enforceCommunicationProtocol": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"description": "Append communication protocol rules to system context and enforce rewrites.",
|
|
121
|
+
"default": true
|
|
122
|
+
},
|
|
123
|
+
"minQuestionRecallScore": {
|
|
124
|
+
"type": "number",
|
|
125
|
+
"minimum": 0,
|
|
126
|
+
"maximum": 1,
|
|
127
|
+
"description": "Minimum memory_search score used when checking outbound questions for existing answers.",
|
|
128
|
+
"default": 0.35
|
|
106
129
|
}
|
|
107
130
|
},
|
|
108
131
|
"additionalProperties": false
|
|
@@ -177,6 +200,22 @@
|
|
|
177
200
|
"label": "Max Context Results",
|
|
178
201
|
"description": "Number of vault memories to inject"
|
|
179
202
|
},
|
|
203
|
+
"enableBeforePromptRecall": {
|
|
204
|
+
"label": "Enable Before Prompt Recall",
|
|
205
|
+
"description": "Use before_prompt_build to force memory recall and inject vault context."
|
|
206
|
+
},
|
|
207
|
+
"enableMessageSendingFilter": {
|
|
208
|
+
"label": "Enable Message Sending Filter",
|
|
209
|
+
"description": "Use message_sending to rewrite or block protocol violations."
|
|
210
|
+
},
|
|
211
|
+
"enforceCommunicationProtocol": {
|
|
212
|
+
"label": "Enforce Communication Protocol",
|
|
213
|
+
"description": "Append protocol rules to system context and enforce banned-pattern rewrites."
|
|
214
|
+
},
|
|
215
|
+
"minQuestionRecallScore": {
|
|
216
|
+
"label": "Min Question Recall Score",
|
|
217
|
+
"description": "Score threshold when deciding if outbound questions are already answered by memory."
|
|
218
|
+
},
|
|
180
219
|
"observeOnHeartbeat": {
|
|
181
220
|
"label": "Observe on Heartbeat (Legacy Alias)",
|
|
182
221
|
"description": "Deprecated alias for enableHeartbeatObservation."
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawvault",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "Structured memory system for AI agents
|
|
3
|
+
"version": "3.4.1",
|
|
4
|
+
"description": "Structured memory system for AI agents — typed storage, knowledge graph, context profiles, canvas dashboards, neural graph themes, and Obsidian-native task views. An elephant never forgets. 🐘",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"build": "tsup src/commands/archive.ts src/commands/backlog.ts src/commands/benchmark.ts src/commands/blocked.ts src/commands/canvas.ts src/commands/checkpoint.ts src/commands/compat.ts src/commands/context.ts src/commands/doctor.ts src/commands/embed.ts src/commands/entities.ts src/commands/graph.ts src/commands/inbox.ts src/commands/inject.ts src/commands/kanban.ts src/commands/link.ts src/commands/maintain.ts src/commands/migrate-observations.ts src/commands/observe.ts src/commands/project.ts src/commands/rebuild.ts src/commands/rebuild-embeddings.ts src/commands/recover.ts src/commands/reflect.ts src/commands/repair-session.ts src/commands/replay.ts src/commands/session-recap.ts src/commands/setup.ts src/commands/shell-init.ts src/commands/sleep.ts src/commands/status.ts src/commands/sync-bd.ts src/commands/tailscale.ts src/commands/task.ts src/commands/template.ts src/commands/wake.ts src/cli/index.ts src/index.ts src/openclaw-plugin.ts src/lib/auto-linker.ts src/lib/canvas-layout.ts src/lib/config.ts src/lib/entity-index.ts src/lib/project-utils.ts src/lib/session-repair.ts src/lib/session-utils.ts src/lib/tailscale.ts src/lib/task-utils.ts src/lib/template-engine.ts src/lib/webdav.ts --format esm --dts --clean",
|
|
37
|
+
"build": "tsup src/commands/archive.ts src/commands/backlog.ts src/commands/benchmark.ts src/commands/blocked.ts src/commands/canvas.ts src/commands/checkpoint.ts src/commands/compat.ts src/commands/context.ts src/commands/doctor.ts src/commands/embed.ts src/commands/entities.ts src/commands/graph.ts src/commands/inbox.ts src/commands/inject.ts src/commands/kanban.ts src/commands/link.ts src/commands/maintain.ts src/commands/migrate-observations.ts src/commands/observe.ts src/commands/project.ts src/commands/recall.ts src/commands/rebuild.ts src/commands/rebuild-embeddings.ts src/commands/recover.ts src/commands/reflect.ts src/commands/repair-session.ts src/commands/replay.ts src/commands/session-recap.ts src/commands/setup.ts src/commands/shell-init.ts src/commands/sleep.ts src/commands/status.ts src/commands/sync-bd.ts src/commands/tailscale.ts src/commands/task.ts src/commands/template.ts src/commands/wake.ts src/cli/index.ts src/index.ts src/openclaw-plugin.ts src/lib/auto-linker.ts src/lib/canvas-layout.ts src/lib/config.ts src/lib/entity-index.ts src/lib/project-utils.ts src/lib/session-repair.ts src/lib/session-utils.ts src/lib/tailscale.ts src/lib/task-utils.ts src/lib/template-engine.ts src/lib/webdav.ts --format esm --dts --clean",
|
|
38
38
|
"dev": "tsup src/index.ts src/commands/*.ts src/lib/*.ts --format esm --dts --watch",
|
|
39
39
|
"lint": "eslint src",
|
|
40
40
|
"typecheck": "tsc --noEmit",
|
|
@@ -98,4 +98,4 @@
|
|
|
98
98
|
"typescript": "^5.3.3",
|
|
99
99
|
"vitest": "^1.2.0"
|
|
100
100
|
}
|
|
101
|
-
}
|
|
101
|
+
}
|