@meshagent/meshagent 0.34.0 → 0.35.0
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/CHANGELOG.md +5 -0
- package/dist/browser/memory-client.d.ts +200 -0
- package/dist/browser/memory-client.js +532 -6
- package/dist/browser/meshagent-client.d.ts +140 -0
- package/dist/browser/meshagent-client.js +406 -15
- package/dist/esm/memory-client.d.ts +200 -0
- package/dist/esm/memory-client.js +532 -6
- package/dist/esm/meshagent-client.d.ts +140 -0
- package/dist/esm/meshagent-client.js +406 -15
- package/dist/node/memory-client.d.ts +200 -0
- package/dist/node/memory-client.js +532 -6
- package/dist/node/meshagent-client.d.ts +140 -0
- package/dist/node/meshagent-client.js +406 -15
- package/package.json +1 -1
|
@@ -1,4 +1,103 @@
|
|
|
1
1
|
import { RoomClient } from "./room-client";
|
|
2
|
+
export type MemoryIngestStrategy = "heuristic" | "llm";
|
|
3
|
+
export interface MemoryEntityRecord {
|
|
4
|
+
entityId?: string | null;
|
|
5
|
+
name: string;
|
|
6
|
+
entityType?: string | null;
|
|
7
|
+
context?: string | null;
|
|
8
|
+
confidence?: number | null;
|
|
9
|
+
createdAt?: string | null;
|
|
10
|
+
validAt?: string | null;
|
|
11
|
+
metadata?: Record<string, string> | null;
|
|
12
|
+
}
|
|
13
|
+
export interface MemoryRelationshipRecord {
|
|
14
|
+
sourceEntityId: string;
|
|
15
|
+
targetEntityId: string;
|
|
16
|
+
relationshipType?: string;
|
|
17
|
+
description?: string | null;
|
|
18
|
+
confidence?: number | null;
|
|
19
|
+
createdAt?: string | null;
|
|
20
|
+
validAt?: string | null;
|
|
21
|
+
expiredAt?: string | null;
|
|
22
|
+
invalidAt?: string | null;
|
|
23
|
+
sourceEntityName?: string | null;
|
|
24
|
+
targetEntityName?: string | null;
|
|
25
|
+
metadata?: Record<string, string> | null;
|
|
26
|
+
}
|
|
27
|
+
export interface MemoryDatasetSummary {
|
|
28
|
+
name: string;
|
|
29
|
+
rows: number;
|
|
30
|
+
columns: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface MemoryDetails {
|
|
33
|
+
name: string;
|
|
34
|
+
namespace?: string[] | null;
|
|
35
|
+
path: string;
|
|
36
|
+
datasets: MemoryDatasetSummary[];
|
|
37
|
+
}
|
|
38
|
+
export interface MemoryIngestStats {
|
|
39
|
+
entities: number;
|
|
40
|
+
relationships: number;
|
|
41
|
+
sources: number;
|
|
42
|
+
}
|
|
43
|
+
export interface MemoryIngestResult {
|
|
44
|
+
name: string;
|
|
45
|
+
stats: MemoryIngestStats;
|
|
46
|
+
entityIds: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface MemoryRecallRelationship {
|
|
49
|
+
sourceEntityId: string;
|
|
50
|
+
targetEntityId: string;
|
|
51
|
+
relationshipType: string;
|
|
52
|
+
description?: string | null;
|
|
53
|
+
createdAt?: string | null;
|
|
54
|
+
validAt?: string | null;
|
|
55
|
+
expiredAt?: string | null;
|
|
56
|
+
invalidAt?: string | null;
|
|
57
|
+
}
|
|
58
|
+
export interface MemoryRecallItem {
|
|
59
|
+
entityId: string;
|
|
60
|
+
name: string;
|
|
61
|
+
entityType: string;
|
|
62
|
+
context?: string | null;
|
|
63
|
+
confidence?: number | null;
|
|
64
|
+
createdAt?: string | null;
|
|
65
|
+
validAt?: string | null;
|
|
66
|
+
score: number;
|
|
67
|
+
relationships: MemoryRecallRelationship[];
|
|
68
|
+
}
|
|
69
|
+
export interface MemoryRecallResult {
|
|
70
|
+
name: string;
|
|
71
|
+
query: string;
|
|
72
|
+
items: MemoryRecallItem[];
|
|
73
|
+
}
|
|
74
|
+
export interface MemoryDeleteEntitiesResult {
|
|
75
|
+
name: string;
|
|
76
|
+
deletedEntities: number;
|
|
77
|
+
deletedRelationships: number;
|
|
78
|
+
}
|
|
79
|
+
export interface MemoryRelationshipSelector {
|
|
80
|
+
sourceEntityId: string;
|
|
81
|
+
targetEntityId: string;
|
|
82
|
+
relationshipType?: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface MemoryDeleteRelationshipsResult {
|
|
85
|
+
name: string;
|
|
86
|
+
deletedRelationships: number;
|
|
87
|
+
}
|
|
88
|
+
export interface MemoryOptimizeDatasetStats {
|
|
89
|
+
dataset: string;
|
|
90
|
+
fragmentsAdded: number;
|
|
91
|
+
fragmentsRemoved: number;
|
|
92
|
+
filesAdded: number;
|
|
93
|
+
filesRemoved: number;
|
|
94
|
+
oldVersionsRemoved: number;
|
|
95
|
+
bytesRemoved: number;
|
|
96
|
+
}
|
|
97
|
+
export interface MemoryOptimizeResult {
|
|
98
|
+
name: string;
|
|
99
|
+
datasets: MemoryOptimizeDatasetStats[];
|
|
100
|
+
}
|
|
2
101
|
export declare class MemoryClient {
|
|
3
102
|
private readonly room;
|
|
4
103
|
constructor({ room }: {
|
|
@@ -6,6 +105,7 @@ export declare class MemoryClient {
|
|
|
6
105
|
});
|
|
7
106
|
private unexpectedResponse;
|
|
8
107
|
private invoke;
|
|
108
|
+
private expectJsonResponse;
|
|
9
109
|
list(params?: {
|
|
10
110
|
namespace?: string[] | null;
|
|
11
111
|
}): Promise<string[]>;
|
|
@@ -20,4 +120,104 @@ export declare class MemoryClient {
|
|
|
20
120
|
namespace?: string[] | null;
|
|
21
121
|
ignoreMissing?: boolean;
|
|
22
122
|
}): Promise<void>;
|
|
123
|
+
inspect(params: {
|
|
124
|
+
name: string;
|
|
125
|
+
namespace?: string[] | null;
|
|
126
|
+
}): Promise<MemoryDetails>;
|
|
127
|
+
query(params: {
|
|
128
|
+
name: string;
|
|
129
|
+
statement: string;
|
|
130
|
+
namespace?: string[] | null;
|
|
131
|
+
}): Promise<Array<Record<string, unknown>>>;
|
|
132
|
+
upsertTable(params: {
|
|
133
|
+
name: string;
|
|
134
|
+
table: string;
|
|
135
|
+
records: Array<Record<string, unknown>>;
|
|
136
|
+
namespace?: string[] | null;
|
|
137
|
+
merge?: boolean;
|
|
138
|
+
}): Promise<void>;
|
|
139
|
+
upsertNodes(params: {
|
|
140
|
+
name: string;
|
|
141
|
+
records: MemoryEntityRecord[];
|
|
142
|
+
namespace?: string[] | null;
|
|
143
|
+
merge?: boolean;
|
|
144
|
+
}): Promise<void>;
|
|
145
|
+
upsertRelationships(params: {
|
|
146
|
+
name: string;
|
|
147
|
+
records: MemoryRelationshipRecord[];
|
|
148
|
+
namespace?: string[] | null;
|
|
149
|
+
merge?: boolean;
|
|
150
|
+
}): Promise<void>;
|
|
151
|
+
ingestText(params: {
|
|
152
|
+
name: string;
|
|
153
|
+
text: string;
|
|
154
|
+
namespace?: string[] | null;
|
|
155
|
+
strategy?: MemoryIngestStrategy;
|
|
156
|
+
llmModel?: string | null;
|
|
157
|
+
llmTemperature?: number | null;
|
|
158
|
+
}): Promise<MemoryIngestResult>;
|
|
159
|
+
ingestImage(params: {
|
|
160
|
+
name: string;
|
|
161
|
+
caption?: string | null;
|
|
162
|
+
data?: Uint8Array | null;
|
|
163
|
+
mimeType?: string | null;
|
|
164
|
+
source?: string | null;
|
|
165
|
+
annotations?: Record<string, string> | null;
|
|
166
|
+
namespace?: string[] | null;
|
|
167
|
+
strategy?: MemoryIngestStrategy;
|
|
168
|
+
llmModel?: string | null;
|
|
169
|
+
llmTemperature?: number | null;
|
|
170
|
+
}): Promise<MemoryIngestResult>;
|
|
171
|
+
ingestFile(params: {
|
|
172
|
+
name: string;
|
|
173
|
+
path?: string | null;
|
|
174
|
+
text?: string | null;
|
|
175
|
+
mimeType?: string | null;
|
|
176
|
+
namespace?: string[] | null;
|
|
177
|
+
strategy?: MemoryIngestStrategy;
|
|
178
|
+
llmModel?: string | null;
|
|
179
|
+
llmTemperature?: number | null;
|
|
180
|
+
}): Promise<MemoryIngestResult>;
|
|
181
|
+
ingestFromTable(params: {
|
|
182
|
+
name: string;
|
|
183
|
+
table: string;
|
|
184
|
+
textColumns?: string[] | null;
|
|
185
|
+
tableNamespace?: string[] | null;
|
|
186
|
+
limit?: number | null;
|
|
187
|
+
namespace?: string[] | null;
|
|
188
|
+
strategy?: MemoryIngestStrategy;
|
|
189
|
+
llmModel?: string | null;
|
|
190
|
+
llmTemperature?: number | null;
|
|
191
|
+
}): Promise<MemoryIngestResult>;
|
|
192
|
+
ingestFromStorage(params: {
|
|
193
|
+
name: string;
|
|
194
|
+
paths: string[];
|
|
195
|
+
namespace?: string[] | null;
|
|
196
|
+
strategy?: MemoryIngestStrategy;
|
|
197
|
+
llmModel?: string | null;
|
|
198
|
+
llmTemperature?: number | null;
|
|
199
|
+
}): Promise<MemoryIngestResult>;
|
|
200
|
+
recall(params: {
|
|
201
|
+
name: string;
|
|
202
|
+
query: string;
|
|
203
|
+
namespace?: string[] | null;
|
|
204
|
+
limit?: number;
|
|
205
|
+
includeRelationships?: boolean;
|
|
206
|
+
}): Promise<MemoryRecallResult>;
|
|
207
|
+
deleteEntities(params: {
|
|
208
|
+
name: string;
|
|
209
|
+
entityIds: string[];
|
|
210
|
+
namespace?: string[] | null;
|
|
211
|
+
}): Promise<MemoryDeleteEntitiesResult>;
|
|
212
|
+
deleteRelationships(params: {
|
|
213
|
+
name: string;
|
|
214
|
+
relationships: MemoryRelationshipSelector[];
|
|
215
|
+
namespace?: string[] | null;
|
|
216
|
+
}): Promise<MemoryDeleteRelationshipsResult>;
|
|
217
|
+
optimize(params: {
|
|
218
|
+
name: string;
|
|
219
|
+
namespace?: string[] | null;
|
|
220
|
+
compact?: boolean;
|
|
221
|
+
cleanup?: boolean;
|
|
222
|
+
}): Promise<MemoryOptimizeResult>;
|
|
23
223
|
}
|