@lanonasis/recall-forge 1.1.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/.claw/skills/SKILL.md +347 -0
- package/CHANGELOG.md +162 -0
- package/LICENSE +21 -0
- package/README.md +302 -0
- package/SETUP.md +190 -0
- package/dist/cli-common.d.ts +25 -0
- package/dist/cli-common.js +338 -0
- package/dist/cli-memory.d.ts +6 -0
- package/dist/cli-memory.js +146 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +135 -0
- package/dist/client.d.ts +116 -0
- package/dist/client.js +643 -0
- package/dist/config.d.ts +41 -0
- package/dist/config.js +125 -0
- package/dist/enrichment/capture-filter.d.ts +4 -0
- package/dist/enrichment/capture-filter.js +44 -0
- package/dist/enrichment/prompt-safety.d.ts +13 -0
- package/dist/enrichment/prompt-safety.js +83 -0
- package/dist/enrichment/tag-extractor.d.ts +1 -0
- package/dist/enrichment/tag-extractor.js +47 -0
- package/dist/enrichment/type-detector.d.ts +2 -0
- package/dist/enrichment/type-detector.js +95 -0
- package/dist/extraction/cli-extract.d.ts +8 -0
- package/dist/extraction/cli-extract.js +66 -0
- package/dist/extraction/format-adapters.d.ts +8 -0
- package/dist/extraction/format-adapters.js +268 -0
- package/dist/extraction/index.d.ts +7 -0
- package/dist/extraction/index.js +7 -0
- package/dist/extraction/jsonl-extractor.d.ts +32 -0
- package/dist/extraction/jsonl-extractor.js +207 -0
- package/dist/extraction/markdown-extractor.d.ts +23 -0
- package/dist/extraction/markdown-extractor.js +228 -0
- package/dist/extraction/secret-redactor.d.ts +7 -0
- package/dist/extraction/secret-redactor.js +112 -0
- package/dist/extraction/sqlite-extractor.d.ts +15 -0
- package/dist/extraction/sqlite-extractor.js +245 -0
- package/dist/extraction/types.d.ts +50 -0
- package/dist/extraction/types.js +1 -0
- package/dist/hooks/capture.d.ts +23 -0
- package/dist/hooks/capture.js +162 -0
- package/dist/hooks/context-engine.d.ts +4 -0
- package/dist/hooks/context-engine.js +54 -0
- package/dist/hooks/local-fallback.d.ts +5 -0
- package/dist/hooks/local-fallback.js +31 -0
- package/dist/hooks/recall.d.ts +21 -0
- package/dist/hooks/recall.js +123 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +103 -0
- package/dist/plugin-sdk-stub.d.ts +53 -0
- package/dist/plugin-sdk-stub.js +3 -0
- package/dist/privacy/privacy-guard.d.ts +33 -0
- package/dist/privacy/privacy-guard.js +130 -0
- package/dist/privacy/privacy-log.d.ts +6 -0
- package/dist/privacy/privacy-log.js +44 -0
- package/dist/tools/memory-forget.d.ts +3 -0
- package/dist/tools/memory-forget.js +109 -0
- package/dist/tools/memory-get.d.ts +3 -0
- package/dist/tools/memory-get.js +46 -0
- package/dist/tools/memory-search.d.ts +4 -0
- package/dist/tools/memory-search.js +95 -0
- package/dist/tools/memory-store.d.ts +5 -0
- package/dist/tools/memory-store.js +199 -0
- package/openclaw.plugin.json +315 -0
- package/package.json +90 -0
- package/setup/agents-memory.md +63 -0
- package/setup/heartbeat-memory.md +53 -0
- package/setup/install.sh +179 -0
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { LanonasisConfig } from "./config.js";
|
|
2
|
+
export type LanMemoryType = "context" | "project" | "knowledge" | "reference" | "personal" | "workflow";
|
|
3
|
+
export type WriteIntent = "new" | "continue" | "auto";
|
|
4
|
+
export type LanMemory = {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: string;
|
|
8
|
+
type: LanMemoryType;
|
|
9
|
+
memory_type?: LanMemoryType;
|
|
10
|
+
tags?: string[];
|
|
11
|
+
topic_key?: string;
|
|
12
|
+
metadata?: Record<string, unknown>;
|
|
13
|
+
created_at?: string;
|
|
14
|
+
updated_at?: string;
|
|
15
|
+
similarity?: number;
|
|
16
|
+
similarity_score?: number;
|
|
17
|
+
};
|
|
18
|
+
export type LanCreateParams = Pick<LanMemory, "title" | "content" | "type" | "tags" | "topic_key" | "metadata"> & {
|
|
19
|
+
idempotency_key?: string;
|
|
20
|
+
continuity_key?: string;
|
|
21
|
+
write_intent?: WriteIntent;
|
|
22
|
+
};
|
|
23
|
+
export type LanSearchParams = {
|
|
24
|
+
query: string;
|
|
25
|
+
threshold?: number;
|
|
26
|
+
limit?: number;
|
|
27
|
+
type?: LanMemoryType;
|
|
28
|
+
tags?: string[];
|
|
29
|
+
topic_key?: string;
|
|
30
|
+
include_deleted?: boolean;
|
|
31
|
+
response_mode?: "full" | "compact" | "timeline";
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
};
|
|
34
|
+
export type LanUpdateParams = Partial<Pick<LanMemory, "title" | "content" | "type" | "tags" | "topic_key" | "metadata">> & {
|
|
35
|
+
idempotency_key?: string;
|
|
36
|
+
continuity_key?: string;
|
|
37
|
+
write_intent?: WriteIntent;
|
|
38
|
+
};
|
|
39
|
+
export type LanListSortField = "created_at" | "updated_at" | "title" | "memory_type";
|
|
40
|
+
export type LanSortOrder = "asc" | "desc";
|
|
41
|
+
export type LanListParams = {
|
|
42
|
+
limit?: number;
|
|
43
|
+
page?: number;
|
|
44
|
+
type?: LanMemoryType;
|
|
45
|
+
tags?: string[];
|
|
46
|
+
topic_key?: string;
|
|
47
|
+
include_deleted?: boolean;
|
|
48
|
+
sort?: LanListSortField;
|
|
49
|
+
order?: LanSortOrder;
|
|
50
|
+
};
|
|
51
|
+
export type LanMemoryStats = {
|
|
52
|
+
total_memories: number;
|
|
53
|
+
memories_by_type: Record<string, number>;
|
|
54
|
+
with_embeddings?: number;
|
|
55
|
+
without_embeddings?: number;
|
|
56
|
+
recent_activity?: {
|
|
57
|
+
created_last_24h?: number;
|
|
58
|
+
updated_last_24h?: number;
|
|
59
|
+
accessed_last_24h?: number;
|
|
60
|
+
};
|
|
61
|
+
top_tags?: Array<{
|
|
62
|
+
tag: string;
|
|
63
|
+
count: number;
|
|
64
|
+
}>;
|
|
65
|
+
storage?: Record<string, unknown>;
|
|
66
|
+
organization_id?: string;
|
|
67
|
+
generated_at?: string;
|
|
68
|
+
total_topics?: number;
|
|
69
|
+
most_accessed_memory?: string;
|
|
70
|
+
recent_memories?: string[];
|
|
71
|
+
};
|
|
72
|
+
export declare class LanonasisClient {
|
|
73
|
+
private baseUrl;
|
|
74
|
+
private apiKey;
|
|
75
|
+
private projectId;
|
|
76
|
+
private cache;
|
|
77
|
+
private rateLimit;
|
|
78
|
+
private readonly CACHE_TTL_MS;
|
|
79
|
+
private readonly CACHE_MAX_SIZE;
|
|
80
|
+
private readonly RATE_LIMIT_WINDOW_MS;
|
|
81
|
+
private readonly RATE_LIMIT_MAX_REQ;
|
|
82
|
+
constructor(cfg: LanonasisConfig);
|
|
83
|
+
private cacheKey;
|
|
84
|
+
private getFromCache;
|
|
85
|
+
private setCache;
|
|
86
|
+
private enforceRateLimit;
|
|
87
|
+
private request;
|
|
88
|
+
private handleResponse;
|
|
89
|
+
private buildRequestUrl;
|
|
90
|
+
private shouldUseCompatibilityFallback;
|
|
91
|
+
private shouldUseLegacyGetFallback;
|
|
92
|
+
private normalizeMemory;
|
|
93
|
+
private normalizeMemoryListResult;
|
|
94
|
+
private getEnvCredential;
|
|
95
|
+
private toAuthHeader;
|
|
96
|
+
private getStoredAuthHeader;
|
|
97
|
+
private resolveAuthHeader;
|
|
98
|
+
private unwrap;
|
|
99
|
+
private invalidateSearchCache;
|
|
100
|
+
private isUuid;
|
|
101
|
+
resolveMemoryId(idOrPrefix: string): Promise<string>;
|
|
102
|
+
searchMemories(params: LanSearchParams): Promise<LanMemory[]>;
|
|
103
|
+
createMemory(params: LanCreateParams): Promise<LanMemory>;
|
|
104
|
+
getMemory(id: string): Promise<LanMemory>;
|
|
105
|
+
listMemories(params?: LanListParams): Promise<{
|
|
106
|
+
memories: LanMemory[];
|
|
107
|
+
total: number;
|
|
108
|
+
}>;
|
|
109
|
+
updateMemory(id: string, updates: LanUpdateParams): Promise<LanMemory>;
|
|
110
|
+
deleteMemory(id: string): Promise<void>;
|
|
111
|
+
getHealth(): Promise<{
|
|
112
|
+
status: string;
|
|
113
|
+
version: string;
|
|
114
|
+
}>;
|
|
115
|
+
getStats(): Promise<LanMemoryStats>;
|
|
116
|
+
}
|