@memnexus-ai/typescript-sdk 1.14.12 → 1.14.18
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/index.cjs +4438 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4476 -0
- package/package.json +10 -4
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4476 @@
|
|
|
1
|
+
import { ZodType, z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* HTTP types for the SDK.
|
|
5
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** HTTP methods supported by the SDK */
|
|
9
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
10
|
+
/** OpenAPI parameter serialization styles */
|
|
11
|
+
declare enum SerializationStyle {
|
|
12
|
+
SIMPLE = "simple",
|
|
13
|
+
LABEL = "label",
|
|
14
|
+
MATRIX = "matrix",
|
|
15
|
+
FORM = "form",
|
|
16
|
+
SPACE_DELIMITED = "space_delimited",
|
|
17
|
+
PIPE_DELIMITED = "pipe_delimited",
|
|
18
|
+
DEEP_OBJECT = "deep_object",
|
|
19
|
+
NONE = "none"
|
|
20
|
+
}
|
|
21
|
+
/** Content types */
|
|
22
|
+
declare enum ContentType {
|
|
23
|
+
Json = "json",
|
|
24
|
+
Xml = "xml",
|
|
25
|
+
Pdf = "pdf",
|
|
26
|
+
Image = "image",
|
|
27
|
+
File = "file",
|
|
28
|
+
Binary = "binary",
|
|
29
|
+
FormUrlEncoded = "form",
|
|
30
|
+
Text = "text",
|
|
31
|
+
MultipartFormData = "multipartFormData",
|
|
32
|
+
EventStream = "eventStream",
|
|
33
|
+
NoContent = "noContent"
|
|
34
|
+
}
|
|
35
|
+
/** HTTP request structure */
|
|
36
|
+
interface HttpRequest {
|
|
37
|
+
baseUrl: string;
|
|
38
|
+
method: HttpMethod;
|
|
39
|
+
path: string;
|
|
40
|
+
headers: Map<string, unknown>;
|
|
41
|
+
body?: BodyInit;
|
|
42
|
+
abortSignal?: AbortSignal;
|
|
43
|
+
queryParams: Map<string, unknown>;
|
|
44
|
+
pathParams: Map<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
/** HTTP response metadata */
|
|
47
|
+
interface HttpMetadata {
|
|
48
|
+
status: number;
|
|
49
|
+
statusText: string;
|
|
50
|
+
headers: Record<string, string>;
|
|
51
|
+
}
|
|
52
|
+
/** HTTP response */
|
|
53
|
+
interface HttpResponse<T = unknown> {
|
|
54
|
+
data?: T;
|
|
55
|
+
metadata: HttpMetadata;
|
|
56
|
+
raw: ArrayBuffer;
|
|
57
|
+
}
|
|
58
|
+
/** HTTP error response */
|
|
59
|
+
interface HttpError {
|
|
60
|
+
error: string;
|
|
61
|
+
metadata: HttpMetadata;
|
|
62
|
+
}
|
|
63
|
+
/** SDK configuration */
|
|
64
|
+
interface SdkConfig {
|
|
65
|
+
baseUrl?: string;
|
|
66
|
+
environment?: Environment;
|
|
67
|
+
timeoutMs?: number;
|
|
68
|
+
token?: string;
|
|
69
|
+
retry?: RetryOptions;
|
|
70
|
+
validation?: ValidationOptions;
|
|
71
|
+
}
|
|
72
|
+
/** Available environments */
|
|
73
|
+
declare enum Environment {
|
|
74
|
+
DEFAULT = "http://localhost:3000"
|
|
75
|
+
}
|
|
76
|
+
/** Retry options */
|
|
77
|
+
interface RetryOptions {
|
|
78
|
+
attempts: number;
|
|
79
|
+
delayMs?: number;
|
|
80
|
+
maxDelayMs?: number;
|
|
81
|
+
jitterMs?: number;
|
|
82
|
+
backoffFactor?: number;
|
|
83
|
+
httpCodesToRetry?: number[];
|
|
84
|
+
httpMethodsToRetry?: string[];
|
|
85
|
+
}
|
|
86
|
+
/** Validation options */
|
|
87
|
+
interface ValidationOptions {
|
|
88
|
+
responseValidation?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/** Request parameter with serialization info */
|
|
91
|
+
interface RequestParameter {
|
|
92
|
+
key: string | undefined;
|
|
93
|
+
value: unknown;
|
|
94
|
+
explode: boolean;
|
|
95
|
+
encode: boolean;
|
|
96
|
+
style: SerializationStyle;
|
|
97
|
+
isLimit: boolean;
|
|
98
|
+
isOffset: boolean;
|
|
99
|
+
isCursor: boolean;
|
|
100
|
+
}
|
|
101
|
+
/** Response definition for validation */
|
|
102
|
+
interface ResponseDefinition {
|
|
103
|
+
schema: ZodType;
|
|
104
|
+
contentType: ContentType;
|
|
105
|
+
status: number;
|
|
106
|
+
}
|
|
107
|
+
/** Error definition */
|
|
108
|
+
interface ErrorDefinition {
|
|
109
|
+
error: new (...args: any[]) => Error;
|
|
110
|
+
contentType: ContentType;
|
|
111
|
+
status: number;
|
|
112
|
+
}
|
|
113
|
+
/** Hook interface for request/response interception */
|
|
114
|
+
interface Hook {
|
|
115
|
+
beforeRequest(request: HttpRequest, params: Map<string, string>): Promise<HttpRequest>;
|
|
116
|
+
afterResponse(request: HttpRequest, response: HttpResponse<any>, params: Map<string, string>): Promise<HttpResponse<any>>;
|
|
117
|
+
onError(request: HttpRequest, response: HttpResponse<any>, params: Map<string, string>): Promise<HttpError>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Request builder for constructing HTTP requests.
|
|
122
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
/** Request creation parameters */
|
|
126
|
+
interface CreateRequestParameters {
|
|
127
|
+
baseUrl: string;
|
|
128
|
+
method: HttpMethod;
|
|
129
|
+
path: string;
|
|
130
|
+
config: SdkConfig;
|
|
131
|
+
headers?: Map<string, RequestParameter>;
|
|
132
|
+
queryParams?: Map<string, RequestParameter>;
|
|
133
|
+
pathParams?: Map<string, RequestParameter>;
|
|
134
|
+
body?: unknown;
|
|
135
|
+
responses?: ResponseDefinition[];
|
|
136
|
+
errors?: ErrorDefinition[];
|
|
137
|
+
requestSchema?: ZodType;
|
|
138
|
+
requestContentType?: ContentType;
|
|
139
|
+
validation?: ValidationOptions;
|
|
140
|
+
retry?: RetryOptions;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* HTTP Request object
|
|
144
|
+
*/
|
|
145
|
+
declare class Request {
|
|
146
|
+
readonly baseUrl: string;
|
|
147
|
+
readonly method: HttpMethod;
|
|
148
|
+
readonly path: string;
|
|
149
|
+
readonly config: SdkConfig;
|
|
150
|
+
readonly headers: Map<string, RequestParameter>;
|
|
151
|
+
readonly queryParams: Map<string, RequestParameter>;
|
|
152
|
+
readonly pathParams: Map<string, RequestParameter>;
|
|
153
|
+
body?: unknown;
|
|
154
|
+
readonly responses: ResponseDefinition[];
|
|
155
|
+
readonly errors: ErrorDefinition[];
|
|
156
|
+
readonly requestSchema?: ZodType;
|
|
157
|
+
readonly requestContentType?: ContentType;
|
|
158
|
+
readonly validation: ValidationOptions;
|
|
159
|
+
readonly retry: RetryOptions;
|
|
160
|
+
constructor(params: CreateRequestParameters);
|
|
161
|
+
/**
|
|
162
|
+
* Add a header parameter
|
|
163
|
+
*/
|
|
164
|
+
addHeaderParam(key: string, param: RequestParameter): void;
|
|
165
|
+
/**
|
|
166
|
+
* Add a query parameter
|
|
167
|
+
*/
|
|
168
|
+
addQueryParam(key: string, param: RequestParameter): void;
|
|
169
|
+
/**
|
|
170
|
+
* Add a path parameter
|
|
171
|
+
*/
|
|
172
|
+
addPathParam(key: string, param: RequestParameter): void;
|
|
173
|
+
/**
|
|
174
|
+
* Set the request body
|
|
175
|
+
*/
|
|
176
|
+
addBody(body: unknown): void;
|
|
177
|
+
/**
|
|
178
|
+
* Construct the full URL with path and query parameters
|
|
179
|
+
*/
|
|
180
|
+
constructFullUrl(): string;
|
|
181
|
+
/**
|
|
182
|
+
* Get serialized headers
|
|
183
|
+
*/
|
|
184
|
+
getHeaders(): Record<string, string>;
|
|
185
|
+
/**
|
|
186
|
+
* Build query string from parameters
|
|
187
|
+
*/
|
|
188
|
+
private buildQueryString;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* HTTP client for making API requests.
|
|
193
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Core HTTP client with handler chain.
|
|
198
|
+
*/
|
|
199
|
+
declare class HttpClient {
|
|
200
|
+
private config;
|
|
201
|
+
private readonly requestHandlerChain;
|
|
202
|
+
constructor(config: SdkConfig, hook?: Hook);
|
|
203
|
+
/**
|
|
204
|
+
* Execute an HTTP request
|
|
205
|
+
*/
|
|
206
|
+
call<T>(request: Request): Promise<HttpResponse<T>>;
|
|
207
|
+
/**
|
|
208
|
+
* Update base URL
|
|
209
|
+
*/
|
|
210
|
+
setBaseUrl(url: string): void;
|
|
211
|
+
/**
|
|
212
|
+
* Update config
|
|
213
|
+
*/
|
|
214
|
+
setConfig(config: SdkConfig): void;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Base service class that all API services extend.
|
|
219
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Base class for all API service classes.
|
|
224
|
+
*/
|
|
225
|
+
declare class BaseService {
|
|
226
|
+
protected config: SdkConfig;
|
|
227
|
+
protected client: HttpClient;
|
|
228
|
+
constructor(config: SdkConfig);
|
|
229
|
+
/**
|
|
230
|
+
* Set the base URL for API requests
|
|
231
|
+
*/
|
|
232
|
+
set baseUrl(baseUrl: string);
|
|
233
|
+
/**
|
|
234
|
+
* Set the environment
|
|
235
|
+
*/
|
|
236
|
+
set environment(environment: Environment);
|
|
237
|
+
/**
|
|
238
|
+
* Set the request timeout in milliseconds
|
|
239
|
+
*/
|
|
240
|
+
set timeoutMs(timeoutMs: number);
|
|
241
|
+
/**
|
|
242
|
+
* Set the bearer token for authentication
|
|
243
|
+
*/
|
|
244
|
+
set token(token: string);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Zod schemas for API models.
|
|
249
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
declare const error: z.ZodObject<{
|
|
253
|
+
/** Error message */
|
|
254
|
+
error: z.ZodString;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
error: string;
|
|
257
|
+
}, {
|
|
258
|
+
error: string;
|
|
259
|
+
}>;
|
|
260
|
+
declare const pagination: z.ZodObject<{
|
|
261
|
+
/** Maximum number of items per page */
|
|
262
|
+
limit: z.ZodNumber;
|
|
263
|
+
/** Number of items to skip */
|
|
264
|
+
offset: z.ZodNumber;
|
|
265
|
+
/** Total number of items */
|
|
266
|
+
count: z.ZodNumber;
|
|
267
|
+
}, "strip", z.ZodTypeAny, {
|
|
268
|
+
limit: number;
|
|
269
|
+
offset: number;
|
|
270
|
+
count: number;
|
|
271
|
+
}, {
|
|
272
|
+
limit: number;
|
|
273
|
+
offset: number;
|
|
274
|
+
count: number;
|
|
275
|
+
}>;
|
|
276
|
+
declare const memory: z.ZodObject<{
|
|
277
|
+
/** Unique memory identifier */
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
/** Memory content */
|
|
280
|
+
content: z.ZodString;
|
|
281
|
+
/** Type of memory */
|
|
282
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
283
|
+
/** Context or domain of the memory */
|
|
284
|
+
context: z.ZodOptional<z.ZodString>;
|
|
285
|
+
/** Associated topics */
|
|
286
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
287
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
288
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
289
|
+
/** Event time (when the event actually occurred in reality) */
|
|
290
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
291
|
+
/** Validity start time (when this fact becomes valid) */
|
|
292
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
293
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
294
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
295
|
+
/** Creation timestamp */
|
|
296
|
+
createdAt: z.ZodString;
|
|
297
|
+
/** Last update timestamp */
|
|
298
|
+
updatedAt: z.ZodString;
|
|
299
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
300
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
/** Basis for the confidence score */
|
|
302
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
303
|
+
/** Effective state of the memory in the narrative */
|
|
304
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
|
306
|
+
id: string;
|
|
307
|
+
content: string;
|
|
308
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
309
|
+
createdAt: string;
|
|
310
|
+
updatedAt: string;
|
|
311
|
+
context?: string | undefined;
|
|
312
|
+
topics?: string[] | undefined;
|
|
313
|
+
timestamp?: string | undefined;
|
|
314
|
+
eventTime?: string | undefined;
|
|
315
|
+
validFrom?: string | undefined;
|
|
316
|
+
validTo?: string | null | undefined;
|
|
317
|
+
confidenceScore?: number | undefined;
|
|
318
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
319
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
320
|
+
}, {
|
|
321
|
+
id: string;
|
|
322
|
+
content: string;
|
|
323
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
324
|
+
createdAt: string;
|
|
325
|
+
updatedAt: string;
|
|
326
|
+
context?: string | undefined;
|
|
327
|
+
topics?: string[] | undefined;
|
|
328
|
+
timestamp?: string | undefined;
|
|
329
|
+
eventTime?: string | undefined;
|
|
330
|
+
validFrom?: string | undefined;
|
|
331
|
+
validTo?: string | null | undefined;
|
|
332
|
+
confidenceScore?: number | undefined;
|
|
333
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
334
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
335
|
+
}>;
|
|
336
|
+
declare const createMemoryRequest: z.ZodObject<{
|
|
337
|
+
/** Conversation ID - use "NEW" to create a new conversation or provide existing conversation ID */
|
|
338
|
+
conversationId: z.ZodString;
|
|
339
|
+
/** Memory content */
|
|
340
|
+
content: z.ZodString;
|
|
341
|
+
/** Type of memory */
|
|
342
|
+
memoryType: z.ZodOptional<z.ZodEnum<["episodic", "semantic", "procedural"]>>;
|
|
343
|
+
/** Role (MCP protocol compatibility) */
|
|
344
|
+
role: z.ZodOptional<z.ZodEnum<["user", "assistant", "system"]>>;
|
|
345
|
+
/** Context or domain */
|
|
346
|
+
context: z.ZodOptional<z.ZodString>;
|
|
347
|
+
/** Associated topics */
|
|
348
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
349
|
+
/** Event time (when the event actually occurred in reality, ISO 8601 format) */
|
|
350
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
351
|
+
/** Validity start time (when this fact becomes valid, ISO 8601 format) */
|
|
352
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
353
|
+
/** Validity end time (when this fact expires, ISO 8601 format, omit for never expires) */
|
|
354
|
+
validTo: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, "strip", z.ZodTypeAny, {
|
|
356
|
+
content: string;
|
|
357
|
+
conversationId: string;
|
|
358
|
+
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
359
|
+
context?: string | undefined;
|
|
360
|
+
topics?: string[] | undefined;
|
|
361
|
+
eventTime?: string | undefined;
|
|
362
|
+
validFrom?: string | undefined;
|
|
363
|
+
validTo?: string | undefined;
|
|
364
|
+
role?: "user" | "assistant" | "system" | undefined;
|
|
365
|
+
}, {
|
|
366
|
+
content: string;
|
|
367
|
+
conversationId: string;
|
|
368
|
+
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
369
|
+
context?: string | undefined;
|
|
370
|
+
topics?: string[] | undefined;
|
|
371
|
+
eventTime?: string | undefined;
|
|
372
|
+
validFrom?: string | undefined;
|
|
373
|
+
validTo?: string | undefined;
|
|
374
|
+
role?: "user" | "assistant" | "system" | undefined;
|
|
375
|
+
}>;
|
|
376
|
+
declare const updateMemoryRequest: z.ZodObject<{
|
|
377
|
+
/** Updated memory content */
|
|
378
|
+
content: z.ZodOptional<z.ZodString>;
|
|
379
|
+
/** Updated memory type */
|
|
380
|
+
memoryType: z.ZodOptional<z.ZodEnum<["episodic", "semantic", "procedural"]>>;
|
|
381
|
+
/** Updated context or domain */
|
|
382
|
+
context: z.ZodOptional<z.ZodString>;
|
|
383
|
+
/** Updated topics */
|
|
384
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
385
|
+
}, "strip", z.ZodTypeAny, {
|
|
386
|
+
content?: string | undefined;
|
|
387
|
+
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
388
|
+
context?: string | undefined;
|
|
389
|
+
topics?: string[] | undefined;
|
|
390
|
+
}, {
|
|
391
|
+
content?: string | undefined;
|
|
392
|
+
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
393
|
+
context?: string | undefined;
|
|
394
|
+
topics?: string[] | undefined;
|
|
395
|
+
}>;
|
|
396
|
+
declare const createMemoryResponseMeta: z.ZodObject<{
|
|
397
|
+
/** Conversation ID (actual ID if "NEW" was provided) */
|
|
398
|
+
conversationId: z.ZodString;
|
|
399
|
+
/** Auto-assigned session ID based on 90-minute gap detection */
|
|
400
|
+
sessionId: z.ZodString;
|
|
401
|
+
/** Whether a new session was created (true) or existing session was reused (false) */
|
|
402
|
+
sessionCreated: z.ZodBoolean;
|
|
403
|
+
/** Whether a new conversation was created (true if conversationId was "NEW") */
|
|
404
|
+
conversationCreated: z.ZodBoolean;
|
|
405
|
+
}, "strip", z.ZodTypeAny, {
|
|
406
|
+
conversationId: string;
|
|
407
|
+
sessionId: string;
|
|
408
|
+
sessionCreated: boolean;
|
|
409
|
+
conversationCreated: boolean;
|
|
410
|
+
}, {
|
|
411
|
+
conversationId: string;
|
|
412
|
+
sessionId: string;
|
|
413
|
+
sessionCreated: boolean;
|
|
414
|
+
conversationCreated: boolean;
|
|
415
|
+
}>;
|
|
416
|
+
/**
|
|
417
|
+
* Response from creating a memory, includes the memory and session/conversation metadata
|
|
418
|
+
*/
|
|
419
|
+
declare const createMemoryResponse: z.ZodLazy<z.ZodObject<{
|
|
420
|
+
data: z.ZodObject<{
|
|
421
|
+
/** Unique memory identifier */
|
|
422
|
+
id: z.ZodString;
|
|
423
|
+
/** Memory content */
|
|
424
|
+
content: z.ZodString;
|
|
425
|
+
/** Type of memory */
|
|
426
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
427
|
+
/** Context or domain of the memory */
|
|
428
|
+
context: z.ZodOptional<z.ZodString>;
|
|
429
|
+
/** Associated topics */
|
|
430
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
431
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
432
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
433
|
+
/** Event time (when the event actually occurred in reality) */
|
|
434
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
435
|
+
/** Validity start time (when this fact becomes valid) */
|
|
436
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
437
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
438
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
439
|
+
/** Creation timestamp */
|
|
440
|
+
createdAt: z.ZodString;
|
|
441
|
+
/** Last update timestamp */
|
|
442
|
+
updatedAt: z.ZodString;
|
|
443
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
444
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
445
|
+
/** Basis for the confidence score */
|
|
446
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
447
|
+
/** Effective state of the memory in the narrative */
|
|
448
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
449
|
+
}, "strip", z.ZodTypeAny, {
|
|
450
|
+
id: string;
|
|
451
|
+
content: string;
|
|
452
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
453
|
+
createdAt: string;
|
|
454
|
+
updatedAt: string;
|
|
455
|
+
context?: string | undefined;
|
|
456
|
+
topics?: string[] | undefined;
|
|
457
|
+
timestamp?: string | undefined;
|
|
458
|
+
eventTime?: string | undefined;
|
|
459
|
+
validFrom?: string | undefined;
|
|
460
|
+
validTo?: string | null | undefined;
|
|
461
|
+
confidenceScore?: number | undefined;
|
|
462
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
463
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
464
|
+
}, {
|
|
465
|
+
id: string;
|
|
466
|
+
content: string;
|
|
467
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
468
|
+
createdAt: string;
|
|
469
|
+
updatedAt: string;
|
|
470
|
+
context?: string | undefined;
|
|
471
|
+
topics?: string[] | undefined;
|
|
472
|
+
timestamp?: string | undefined;
|
|
473
|
+
eventTime?: string | undefined;
|
|
474
|
+
validFrom?: string | undefined;
|
|
475
|
+
validTo?: string | null | undefined;
|
|
476
|
+
confidenceScore?: number | undefined;
|
|
477
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
478
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
479
|
+
}>;
|
|
480
|
+
meta: z.ZodObject<{
|
|
481
|
+
/** Conversation ID (actual ID if "NEW" was provided) */
|
|
482
|
+
conversationId: z.ZodString;
|
|
483
|
+
/** Auto-assigned session ID based on 90-minute gap detection */
|
|
484
|
+
sessionId: z.ZodString;
|
|
485
|
+
/** Whether a new session was created (true) or existing session was reused (false) */
|
|
486
|
+
sessionCreated: z.ZodBoolean;
|
|
487
|
+
/** Whether a new conversation was created (true if conversationId was "NEW") */
|
|
488
|
+
conversationCreated: z.ZodBoolean;
|
|
489
|
+
}, "strip", z.ZodTypeAny, {
|
|
490
|
+
conversationId: string;
|
|
491
|
+
sessionId: string;
|
|
492
|
+
sessionCreated: boolean;
|
|
493
|
+
conversationCreated: boolean;
|
|
494
|
+
}, {
|
|
495
|
+
conversationId: string;
|
|
496
|
+
sessionId: string;
|
|
497
|
+
sessionCreated: boolean;
|
|
498
|
+
conversationCreated: boolean;
|
|
499
|
+
}>;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
data: {
|
|
502
|
+
id: string;
|
|
503
|
+
content: string;
|
|
504
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
505
|
+
createdAt: string;
|
|
506
|
+
updatedAt: string;
|
|
507
|
+
context?: string | undefined;
|
|
508
|
+
topics?: string[] | undefined;
|
|
509
|
+
timestamp?: string | undefined;
|
|
510
|
+
eventTime?: string | undefined;
|
|
511
|
+
validFrom?: string | undefined;
|
|
512
|
+
validTo?: string | null | undefined;
|
|
513
|
+
confidenceScore?: number | undefined;
|
|
514
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
515
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
516
|
+
};
|
|
517
|
+
meta: {
|
|
518
|
+
conversationId: string;
|
|
519
|
+
sessionId: string;
|
|
520
|
+
sessionCreated: boolean;
|
|
521
|
+
conversationCreated: boolean;
|
|
522
|
+
};
|
|
523
|
+
}, {
|
|
524
|
+
data: {
|
|
525
|
+
id: string;
|
|
526
|
+
content: string;
|
|
527
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
528
|
+
createdAt: string;
|
|
529
|
+
updatedAt: string;
|
|
530
|
+
context?: string | undefined;
|
|
531
|
+
topics?: string[] | undefined;
|
|
532
|
+
timestamp?: string | undefined;
|
|
533
|
+
eventTime?: string | undefined;
|
|
534
|
+
validFrom?: string | undefined;
|
|
535
|
+
validTo?: string | null | undefined;
|
|
536
|
+
confidenceScore?: number | undefined;
|
|
537
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
538
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
539
|
+
};
|
|
540
|
+
meta: {
|
|
541
|
+
conversationId: string;
|
|
542
|
+
sessionId: string;
|
|
543
|
+
sessionCreated: boolean;
|
|
544
|
+
conversationCreated: boolean;
|
|
545
|
+
};
|
|
546
|
+
}>>;
|
|
547
|
+
declare const relatedMemoryResult: z.ZodObject<{
|
|
548
|
+
memory: z.ZodObject<{
|
|
549
|
+
/** Unique memory identifier */
|
|
550
|
+
id: z.ZodString;
|
|
551
|
+
/** Memory content */
|
|
552
|
+
content: z.ZodString;
|
|
553
|
+
/** Type of memory */
|
|
554
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
555
|
+
/** Context or domain of the memory */
|
|
556
|
+
context: z.ZodOptional<z.ZodString>;
|
|
557
|
+
/** Associated topics */
|
|
558
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
559
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
560
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
561
|
+
/** Event time (when the event actually occurred in reality) */
|
|
562
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
563
|
+
/** Validity start time (when this fact becomes valid) */
|
|
564
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
565
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
566
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
567
|
+
/** Creation timestamp */
|
|
568
|
+
createdAt: z.ZodString;
|
|
569
|
+
/** Last update timestamp */
|
|
570
|
+
updatedAt: z.ZodString;
|
|
571
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
572
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
573
|
+
/** Basis for the confidence score */
|
|
574
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
575
|
+
/** Effective state of the memory in the narrative */
|
|
576
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
577
|
+
}, "strip", z.ZodTypeAny, {
|
|
578
|
+
id: string;
|
|
579
|
+
content: string;
|
|
580
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
581
|
+
createdAt: string;
|
|
582
|
+
updatedAt: string;
|
|
583
|
+
context?: string | undefined;
|
|
584
|
+
topics?: string[] | undefined;
|
|
585
|
+
timestamp?: string | undefined;
|
|
586
|
+
eventTime?: string | undefined;
|
|
587
|
+
validFrom?: string | undefined;
|
|
588
|
+
validTo?: string | null | undefined;
|
|
589
|
+
confidenceScore?: number | undefined;
|
|
590
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
591
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
592
|
+
}, {
|
|
593
|
+
id: string;
|
|
594
|
+
content: string;
|
|
595
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
596
|
+
createdAt: string;
|
|
597
|
+
updatedAt: string;
|
|
598
|
+
context?: string | undefined;
|
|
599
|
+
topics?: string[] | undefined;
|
|
600
|
+
timestamp?: string | undefined;
|
|
601
|
+
eventTime?: string | undefined;
|
|
602
|
+
validFrom?: string | undefined;
|
|
603
|
+
validTo?: string | null | undefined;
|
|
604
|
+
confidenceScore?: number | undefined;
|
|
605
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
606
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
607
|
+
}>;
|
|
608
|
+
/** Relevance score (0-1). For similar: semantic similarity. For related: topic overlap ratio. For conversation: position score. */
|
|
609
|
+
score: z.ZodNumber;
|
|
610
|
+
/** Type of relationship: similar, similar-by-topic, conversation, or topic */
|
|
611
|
+
relationship: z.ZodString;
|
|
612
|
+
/** Topics shared with the source memory (only for topic relationship) */
|
|
613
|
+
sharedTopics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
614
|
+
}, "strip", z.ZodTypeAny, {
|
|
615
|
+
memory: {
|
|
616
|
+
id: string;
|
|
617
|
+
content: string;
|
|
618
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
619
|
+
createdAt: string;
|
|
620
|
+
updatedAt: string;
|
|
621
|
+
context?: string | undefined;
|
|
622
|
+
topics?: string[] | undefined;
|
|
623
|
+
timestamp?: string | undefined;
|
|
624
|
+
eventTime?: string | undefined;
|
|
625
|
+
validFrom?: string | undefined;
|
|
626
|
+
validTo?: string | null | undefined;
|
|
627
|
+
confidenceScore?: number | undefined;
|
|
628
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
629
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
630
|
+
};
|
|
631
|
+
score: number;
|
|
632
|
+
relationship: string;
|
|
633
|
+
sharedTopics?: string[] | undefined;
|
|
634
|
+
}, {
|
|
635
|
+
memory: {
|
|
636
|
+
id: string;
|
|
637
|
+
content: string;
|
|
638
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
639
|
+
createdAt: string;
|
|
640
|
+
updatedAt: string;
|
|
641
|
+
context?: string | undefined;
|
|
642
|
+
topics?: string[] | undefined;
|
|
643
|
+
timestamp?: string | undefined;
|
|
644
|
+
eventTime?: string | undefined;
|
|
645
|
+
validFrom?: string | undefined;
|
|
646
|
+
validTo?: string | null | undefined;
|
|
647
|
+
confidenceScore?: number | undefined;
|
|
648
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
649
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
650
|
+
};
|
|
651
|
+
score: number;
|
|
652
|
+
relationship: string;
|
|
653
|
+
sharedTopics?: string[] | undefined;
|
|
654
|
+
}>;
|
|
655
|
+
/**
|
|
656
|
+
* Response from getting a memory by ID
|
|
657
|
+
*/
|
|
658
|
+
declare const getMemoryResponse: z.ZodLazy<z.ZodObject<{
|
|
659
|
+
data: z.ZodObject<{
|
|
660
|
+
/** Unique memory identifier */
|
|
661
|
+
id: z.ZodString;
|
|
662
|
+
/** Memory content */
|
|
663
|
+
content: z.ZodString;
|
|
664
|
+
/** Type of memory */
|
|
665
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
666
|
+
/** Context or domain of the memory */
|
|
667
|
+
context: z.ZodOptional<z.ZodString>;
|
|
668
|
+
/** Associated topics */
|
|
669
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
670
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
671
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
672
|
+
/** Event time (when the event actually occurred in reality) */
|
|
673
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
674
|
+
/** Validity start time (when this fact becomes valid) */
|
|
675
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
676
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
677
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
678
|
+
/** Creation timestamp */
|
|
679
|
+
createdAt: z.ZodString;
|
|
680
|
+
/** Last update timestamp */
|
|
681
|
+
updatedAt: z.ZodString;
|
|
682
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
683
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
684
|
+
/** Basis for the confidence score */
|
|
685
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
686
|
+
/** Effective state of the memory in the narrative */
|
|
687
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
688
|
+
}, "strip", z.ZodTypeAny, {
|
|
689
|
+
id: string;
|
|
690
|
+
content: string;
|
|
691
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
692
|
+
createdAt: string;
|
|
693
|
+
updatedAt: string;
|
|
694
|
+
context?: string | undefined;
|
|
695
|
+
topics?: string[] | undefined;
|
|
696
|
+
timestamp?: string | undefined;
|
|
697
|
+
eventTime?: string | undefined;
|
|
698
|
+
validFrom?: string | undefined;
|
|
699
|
+
validTo?: string | null | undefined;
|
|
700
|
+
confidenceScore?: number | undefined;
|
|
701
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
702
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
703
|
+
}, {
|
|
704
|
+
id: string;
|
|
705
|
+
content: string;
|
|
706
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
707
|
+
createdAt: string;
|
|
708
|
+
updatedAt: string;
|
|
709
|
+
context?: string | undefined;
|
|
710
|
+
topics?: string[] | undefined;
|
|
711
|
+
timestamp?: string | undefined;
|
|
712
|
+
eventTime?: string | undefined;
|
|
713
|
+
validFrom?: string | undefined;
|
|
714
|
+
validTo?: string | null | undefined;
|
|
715
|
+
confidenceScore?: number | undefined;
|
|
716
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
717
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
718
|
+
}>;
|
|
719
|
+
}, "strip", z.ZodTypeAny, {
|
|
720
|
+
data: {
|
|
721
|
+
id: string;
|
|
722
|
+
content: string;
|
|
723
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
724
|
+
createdAt: string;
|
|
725
|
+
updatedAt: string;
|
|
726
|
+
context?: string | undefined;
|
|
727
|
+
topics?: string[] | undefined;
|
|
728
|
+
timestamp?: string | undefined;
|
|
729
|
+
eventTime?: string | undefined;
|
|
730
|
+
validFrom?: string | undefined;
|
|
731
|
+
validTo?: string | null | undefined;
|
|
732
|
+
confidenceScore?: number | undefined;
|
|
733
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
734
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
735
|
+
};
|
|
736
|
+
}, {
|
|
737
|
+
data: {
|
|
738
|
+
id: string;
|
|
739
|
+
content: string;
|
|
740
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
741
|
+
createdAt: string;
|
|
742
|
+
updatedAt: string;
|
|
743
|
+
context?: string | undefined;
|
|
744
|
+
topics?: string[] | undefined;
|
|
745
|
+
timestamp?: string | undefined;
|
|
746
|
+
eventTime?: string | undefined;
|
|
747
|
+
validFrom?: string | undefined;
|
|
748
|
+
validTo?: string | null | undefined;
|
|
749
|
+
confidenceScore?: number | undefined;
|
|
750
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
751
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
752
|
+
};
|
|
753
|
+
}>>;
|
|
754
|
+
declare const graphRAGQueryRequest: z.ZodObject<{
|
|
755
|
+
/** GraphRAG query string */
|
|
756
|
+
query: z.ZodString;
|
|
757
|
+
/** Maximum graph traversal depth (alias: depth) */
|
|
758
|
+
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
759
|
+
/** Graph traversal depth (deprecated, use maxDepth) */
|
|
760
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
/** Maximum number of results to return */
|
|
762
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
763
|
+
/** Include relationship data in response */
|
|
764
|
+
includeRelationships: z.ZodOptional<z.ZodBoolean>;
|
|
765
|
+
}, "strip", z.ZodTypeAny, {
|
|
766
|
+
query: string;
|
|
767
|
+
limit?: number | undefined;
|
|
768
|
+
maxDepth?: number | undefined;
|
|
769
|
+
depth?: number | undefined;
|
|
770
|
+
includeRelationships?: boolean | undefined;
|
|
771
|
+
}, {
|
|
772
|
+
query: string;
|
|
773
|
+
limit?: number | undefined;
|
|
774
|
+
maxDepth?: number | undefined;
|
|
775
|
+
depth?: number | undefined;
|
|
776
|
+
includeRelationships?: boolean | undefined;
|
|
777
|
+
}>;
|
|
778
|
+
declare const graphRAGQueryResponse: z.ZodLazy<z.ZodObject<{
|
|
779
|
+
/** Unique identifier for this query execution */
|
|
780
|
+
queryId: z.ZodString;
|
|
781
|
+
/** Array of query results with graph context */
|
|
782
|
+
results: z.ZodArray<z.ZodObject<{
|
|
783
|
+
memory: z.ZodObject<{
|
|
784
|
+
/** Unique memory identifier */
|
|
785
|
+
id: z.ZodString;
|
|
786
|
+
/** Memory content */
|
|
787
|
+
content: z.ZodString;
|
|
788
|
+
/** Type of memory */
|
|
789
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
790
|
+
/** Context or domain of the memory */
|
|
791
|
+
context: z.ZodOptional<z.ZodString>;
|
|
792
|
+
/** Associated topics */
|
|
793
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
794
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
795
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
796
|
+
/** Event time (when the event actually occurred in reality) */
|
|
797
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
798
|
+
/** Validity start time (when this fact becomes valid) */
|
|
799
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
800
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
801
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
802
|
+
/** Creation timestamp */
|
|
803
|
+
createdAt: z.ZodString;
|
|
804
|
+
/** Last update timestamp */
|
|
805
|
+
updatedAt: z.ZodString;
|
|
806
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
807
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
808
|
+
/** Basis for the confidence score */
|
|
809
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
810
|
+
/** Effective state of the memory in the narrative */
|
|
811
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
812
|
+
}, "strip", z.ZodTypeAny, {
|
|
813
|
+
id: string;
|
|
814
|
+
content: string;
|
|
815
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
816
|
+
createdAt: string;
|
|
817
|
+
updatedAt: string;
|
|
818
|
+
context?: string | undefined;
|
|
819
|
+
topics?: string[] | undefined;
|
|
820
|
+
timestamp?: string | undefined;
|
|
821
|
+
eventTime?: string | undefined;
|
|
822
|
+
validFrom?: string | undefined;
|
|
823
|
+
validTo?: string | null | undefined;
|
|
824
|
+
confidenceScore?: number | undefined;
|
|
825
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
826
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
827
|
+
}, {
|
|
828
|
+
id: string;
|
|
829
|
+
content: string;
|
|
830
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
831
|
+
createdAt: string;
|
|
832
|
+
updatedAt: string;
|
|
833
|
+
context?: string | undefined;
|
|
834
|
+
topics?: string[] | undefined;
|
|
835
|
+
timestamp?: string | undefined;
|
|
836
|
+
eventTime?: string | undefined;
|
|
837
|
+
validFrom?: string | undefined;
|
|
838
|
+
validTo?: string | null | undefined;
|
|
839
|
+
confidenceScore?: number | undefined;
|
|
840
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
841
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
842
|
+
}>;
|
|
843
|
+
/** Relevance score from full-text search */
|
|
844
|
+
score: z.ZodNumber;
|
|
845
|
+
/** Topics associated with this memory */
|
|
846
|
+
topics: z.ZodArray<z.ZodObject<{}, "strip", z.ZodNullable<z.ZodUnknown>, z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">, z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">>, "many">;
|
|
847
|
+
/** Entities mentioned in this memory */
|
|
848
|
+
entities: z.ZodArray<z.ZodObject<{}, "strip", z.ZodNullable<z.ZodUnknown>, z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">, z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">>, "many">;
|
|
849
|
+
/** Related memories through shared topics */
|
|
850
|
+
relatedMemories: z.ZodArray<z.ZodObject<{}, "strip", z.ZodNullable<z.ZodUnknown>, z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">, z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">>, "many">;
|
|
851
|
+
}, "strip", z.ZodTypeAny, {
|
|
852
|
+
topics: z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
853
|
+
memory: {
|
|
854
|
+
id: string;
|
|
855
|
+
content: string;
|
|
856
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
857
|
+
createdAt: string;
|
|
858
|
+
updatedAt: string;
|
|
859
|
+
context?: string | undefined;
|
|
860
|
+
topics?: string[] | undefined;
|
|
861
|
+
timestamp?: string | undefined;
|
|
862
|
+
eventTime?: string | undefined;
|
|
863
|
+
validFrom?: string | undefined;
|
|
864
|
+
validTo?: string | null | undefined;
|
|
865
|
+
confidenceScore?: number | undefined;
|
|
866
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
867
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
868
|
+
};
|
|
869
|
+
score: number;
|
|
870
|
+
entities: z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
871
|
+
relatedMemories: z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
872
|
+
}, {
|
|
873
|
+
topics: z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
874
|
+
memory: {
|
|
875
|
+
id: string;
|
|
876
|
+
content: string;
|
|
877
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
878
|
+
createdAt: string;
|
|
879
|
+
updatedAt: string;
|
|
880
|
+
context?: string | undefined;
|
|
881
|
+
topics?: string[] | undefined;
|
|
882
|
+
timestamp?: string | undefined;
|
|
883
|
+
eventTime?: string | undefined;
|
|
884
|
+
validFrom?: string | undefined;
|
|
885
|
+
validTo?: string | null | undefined;
|
|
886
|
+
confidenceScore?: number | undefined;
|
|
887
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
888
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
889
|
+
};
|
|
890
|
+
score: number;
|
|
891
|
+
entities: z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
892
|
+
relatedMemories: z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
893
|
+
}>, "many">;
|
|
894
|
+
/** Query execution metadata */
|
|
895
|
+
metadata: z.ZodObject<{
|
|
896
|
+
/** Original query string */
|
|
897
|
+
query: z.ZodString;
|
|
898
|
+
/** Graph traversal depth used */
|
|
899
|
+
depth: z.ZodNumber;
|
|
900
|
+
/** Maximum number of results returned */
|
|
901
|
+
limit: z.ZodNumber;
|
|
902
|
+
/** Query execution timestamp */
|
|
903
|
+
timestamp: z.ZodString;
|
|
904
|
+
}, "strip", z.ZodTypeAny, {
|
|
905
|
+
limit: number;
|
|
906
|
+
timestamp: string;
|
|
907
|
+
query: string;
|
|
908
|
+
depth: number;
|
|
909
|
+
}, {
|
|
910
|
+
limit: number;
|
|
911
|
+
timestamp: string;
|
|
912
|
+
query: string;
|
|
913
|
+
depth: number;
|
|
914
|
+
}>;
|
|
915
|
+
}, "strip", z.ZodTypeAny, {
|
|
916
|
+
metadata: {
|
|
917
|
+
limit: number;
|
|
918
|
+
timestamp: string;
|
|
919
|
+
query: string;
|
|
920
|
+
depth: number;
|
|
921
|
+
};
|
|
922
|
+
queryId: string;
|
|
923
|
+
results: {
|
|
924
|
+
topics: z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
925
|
+
memory: {
|
|
926
|
+
id: string;
|
|
927
|
+
content: string;
|
|
928
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
929
|
+
createdAt: string;
|
|
930
|
+
updatedAt: string;
|
|
931
|
+
context?: string | undefined;
|
|
932
|
+
topics?: string[] | undefined;
|
|
933
|
+
timestamp?: string | undefined;
|
|
934
|
+
eventTime?: string | undefined;
|
|
935
|
+
validFrom?: string | undefined;
|
|
936
|
+
validTo?: string | null | undefined;
|
|
937
|
+
confidenceScore?: number | undefined;
|
|
938
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
939
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
940
|
+
};
|
|
941
|
+
score: number;
|
|
942
|
+
entities: z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
943
|
+
relatedMemories: z.objectOutputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
944
|
+
}[];
|
|
945
|
+
}, {
|
|
946
|
+
metadata: {
|
|
947
|
+
limit: number;
|
|
948
|
+
timestamp: string;
|
|
949
|
+
query: string;
|
|
950
|
+
depth: number;
|
|
951
|
+
};
|
|
952
|
+
queryId: string;
|
|
953
|
+
results: {
|
|
954
|
+
topics: z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
955
|
+
memory: {
|
|
956
|
+
id: string;
|
|
957
|
+
content: string;
|
|
958
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
959
|
+
createdAt: string;
|
|
960
|
+
updatedAt: string;
|
|
961
|
+
context?: string | undefined;
|
|
962
|
+
topics?: string[] | undefined;
|
|
963
|
+
timestamp?: string | undefined;
|
|
964
|
+
eventTime?: string | undefined;
|
|
965
|
+
validFrom?: string | undefined;
|
|
966
|
+
validTo?: string | null | undefined;
|
|
967
|
+
confidenceScore?: number | undefined;
|
|
968
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
969
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
970
|
+
};
|
|
971
|
+
score: number;
|
|
972
|
+
entities: z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
973
|
+
relatedMemories: z.objectInputType<{}, z.ZodNullable<z.ZodUnknown>, "strip">[];
|
|
974
|
+
}[];
|
|
975
|
+
}>>;
|
|
976
|
+
declare const conversation: z.ZodObject<{
|
|
977
|
+
/** Unique conversation identifier */
|
|
978
|
+
id: z.ZodString;
|
|
979
|
+
/** Conversation title */
|
|
980
|
+
title: z.ZodString;
|
|
981
|
+
/** Conversation summary */
|
|
982
|
+
summary: z.ZodNullable<z.ZodString>;
|
|
983
|
+
/** Creation timestamp */
|
|
984
|
+
createdAt: z.ZodString;
|
|
985
|
+
/** Last update timestamp */
|
|
986
|
+
updatedAt: z.ZodString;
|
|
987
|
+
}, "strip", z.ZodTypeAny, {
|
|
988
|
+
id: string;
|
|
989
|
+
createdAt: string;
|
|
990
|
+
updatedAt: string;
|
|
991
|
+
title: string;
|
|
992
|
+
summary: string | null;
|
|
993
|
+
}, {
|
|
994
|
+
id: string;
|
|
995
|
+
createdAt: string;
|
|
996
|
+
updatedAt: string;
|
|
997
|
+
title: string;
|
|
998
|
+
summary: string | null;
|
|
999
|
+
}>;
|
|
1000
|
+
declare const createConversationRequest: z.ZodObject<{
|
|
1001
|
+
/** Conversation title */
|
|
1002
|
+
title: z.ZodString;
|
|
1003
|
+
/** Optional conversation summary */
|
|
1004
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
1005
|
+
}, "strip", z.ZodTypeAny, {
|
|
1006
|
+
title: string;
|
|
1007
|
+
summary?: string | undefined;
|
|
1008
|
+
}, {
|
|
1009
|
+
title: string;
|
|
1010
|
+
summary?: string | undefined;
|
|
1011
|
+
}>;
|
|
1012
|
+
declare const apiKey: z.ZodObject<{
|
|
1013
|
+
/** Unique API key identifier */
|
|
1014
|
+
id: z.ZodString;
|
|
1015
|
+
/** Human-readable label for the API key */
|
|
1016
|
+
label: z.ZodString;
|
|
1017
|
+
/** API key prefix for identification */
|
|
1018
|
+
prefix: z.ZodString;
|
|
1019
|
+
/** Creation timestamp */
|
|
1020
|
+
createdAt: z.ZodString;
|
|
1021
|
+
/** Expiration timestamp (null if never expires) */
|
|
1022
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1023
|
+
/** Last usage timestamp (null if never used) */
|
|
1024
|
+
lastUsedAt: z.ZodNullable<z.ZodString>;
|
|
1025
|
+
}, "strip", z.ZodTypeAny, {
|
|
1026
|
+
label: string;
|
|
1027
|
+
id: string;
|
|
1028
|
+
createdAt: string;
|
|
1029
|
+
prefix: string;
|
|
1030
|
+
expiresAt: string | null;
|
|
1031
|
+
lastUsedAt: string | null;
|
|
1032
|
+
}, {
|
|
1033
|
+
label: string;
|
|
1034
|
+
id: string;
|
|
1035
|
+
createdAt: string;
|
|
1036
|
+
prefix: string;
|
|
1037
|
+
expiresAt: string | null;
|
|
1038
|
+
lastUsedAt: string | null;
|
|
1039
|
+
}>;
|
|
1040
|
+
declare const topic: z.ZodObject<{
|
|
1041
|
+
/** Topic name */
|
|
1042
|
+
name: z.ZodString;
|
|
1043
|
+
/** Number of memories associated with this topic */
|
|
1044
|
+
count: z.ZodNumber;
|
|
1045
|
+
}, "strip", z.ZodTypeAny, {
|
|
1046
|
+
count: number;
|
|
1047
|
+
name: string;
|
|
1048
|
+
}, {
|
|
1049
|
+
count: number;
|
|
1050
|
+
name: string;
|
|
1051
|
+
}>;
|
|
1052
|
+
declare const pattern: z.ZodObject<{
|
|
1053
|
+
/** Unique pattern identifier */
|
|
1054
|
+
id: z.ZodString;
|
|
1055
|
+
/** Pattern type */
|
|
1056
|
+
type: z.ZodString;
|
|
1057
|
+
/** Pattern description */
|
|
1058
|
+
description: z.ZodString;
|
|
1059
|
+
/** Confidence score (0-1) */
|
|
1060
|
+
confidence: z.ZodNumber;
|
|
1061
|
+
}, "strip", z.ZodTypeAny, {
|
|
1062
|
+
type: string;
|
|
1063
|
+
id: string;
|
|
1064
|
+
description: string;
|
|
1065
|
+
confidence: number;
|
|
1066
|
+
}, {
|
|
1067
|
+
type: string;
|
|
1068
|
+
id: string;
|
|
1069
|
+
description: string;
|
|
1070
|
+
confidence: number;
|
|
1071
|
+
}>;
|
|
1072
|
+
declare const serviceCheck: z.ZodObject<{
|
|
1073
|
+
/** Service status */
|
|
1074
|
+
status: z.ZodEnum<["up", "down"]>;
|
|
1075
|
+
/** Response time in milliseconds */
|
|
1076
|
+
responseTime: z.ZodOptional<z.ZodNumber>;
|
|
1077
|
+
}, "strip", z.ZodTypeAny, {
|
|
1078
|
+
status: "up" | "down";
|
|
1079
|
+
responseTime?: number | undefined;
|
|
1080
|
+
}, {
|
|
1081
|
+
status: "up" | "down";
|
|
1082
|
+
responseTime?: number | undefined;
|
|
1083
|
+
}>;
|
|
1084
|
+
declare const healthCheck: z.ZodObject<{
|
|
1085
|
+
/** Overall system health status */
|
|
1086
|
+
status: z.ZodEnum<["healthy", "degraded", "unhealthy"]>;
|
|
1087
|
+
/** Health check timestamp */
|
|
1088
|
+
timestamp: z.ZodString;
|
|
1089
|
+
/** API version */
|
|
1090
|
+
version: z.ZodString;
|
|
1091
|
+
/** System uptime in seconds */
|
|
1092
|
+
uptime: z.ZodNumber;
|
|
1093
|
+
/** Individual service health checks */
|
|
1094
|
+
checks: z.ZodObject<{}, "strip", z.ZodObject<{
|
|
1095
|
+
/** Service status */
|
|
1096
|
+
status: z.ZodEnum<["up", "down"]>;
|
|
1097
|
+
/** Response time in milliseconds */
|
|
1098
|
+
responseTime: z.ZodOptional<z.ZodNumber>;
|
|
1099
|
+
}, "strip", z.ZodTypeAny, {
|
|
1100
|
+
status: "up" | "down";
|
|
1101
|
+
responseTime?: number | undefined;
|
|
1102
|
+
}, {
|
|
1103
|
+
status: "up" | "down";
|
|
1104
|
+
responseTime?: number | undefined;
|
|
1105
|
+
}>, z.objectOutputType<{}, z.ZodObject<{
|
|
1106
|
+
/** Service status */
|
|
1107
|
+
status: z.ZodEnum<["up", "down"]>;
|
|
1108
|
+
/** Response time in milliseconds */
|
|
1109
|
+
responseTime: z.ZodOptional<z.ZodNumber>;
|
|
1110
|
+
}, "strip", z.ZodTypeAny, {
|
|
1111
|
+
status: "up" | "down";
|
|
1112
|
+
responseTime?: number | undefined;
|
|
1113
|
+
}, {
|
|
1114
|
+
status: "up" | "down";
|
|
1115
|
+
responseTime?: number | undefined;
|
|
1116
|
+
}>, "strip">, z.objectInputType<{}, z.ZodObject<{
|
|
1117
|
+
/** Service status */
|
|
1118
|
+
status: z.ZodEnum<["up", "down"]>;
|
|
1119
|
+
/** Response time in milliseconds */
|
|
1120
|
+
responseTime: z.ZodOptional<z.ZodNumber>;
|
|
1121
|
+
}, "strip", z.ZodTypeAny, {
|
|
1122
|
+
status: "up" | "down";
|
|
1123
|
+
responseTime?: number | undefined;
|
|
1124
|
+
}, {
|
|
1125
|
+
status: "up" | "down";
|
|
1126
|
+
responseTime?: number | undefined;
|
|
1127
|
+
}>, "strip">>;
|
|
1128
|
+
}, "strip", z.ZodTypeAny, {
|
|
1129
|
+
status: "healthy" | "degraded" | "unhealthy";
|
|
1130
|
+
timestamp: string;
|
|
1131
|
+
version: string;
|
|
1132
|
+
uptime: number;
|
|
1133
|
+
checks: {} & {
|
|
1134
|
+
[k: string]: {
|
|
1135
|
+
status: "up" | "down";
|
|
1136
|
+
responseTime?: number | undefined;
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
}, {
|
|
1140
|
+
status: "healthy" | "degraded" | "unhealthy";
|
|
1141
|
+
timestamp: string;
|
|
1142
|
+
version: string;
|
|
1143
|
+
uptime: number;
|
|
1144
|
+
checks: {} & {
|
|
1145
|
+
[k: string]: {
|
|
1146
|
+
status: "up" | "down";
|
|
1147
|
+
responseTime?: number | undefined;
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
}>;
|
|
1151
|
+
declare const searchRequest: z.ZodObject<{
|
|
1152
|
+
/** Search query */
|
|
1153
|
+
query: z.ZodString;
|
|
1154
|
+
/** Content filtering mode (defaults to unified) */
|
|
1155
|
+
mode: z.ZodOptional<z.ZodEnum<["unified", "content", "facts"]>>;
|
|
1156
|
+
/** Search algorithm: hybrid (combined, default), semantic (vector), or keyword (fulltext). */
|
|
1157
|
+
searchMethod: z.ZodOptional<z.ZodEnum<["keyword", "semantic", "hybrid"]>>;
|
|
1158
|
+
/** Maximum number of results (defaults to 20) */
|
|
1159
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1160
|
+
/** Offset for pagination (defaults to 0) */
|
|
1161
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1162
|
+
/** Weight for vector (semantic) results in hybrid search (0-1, defaults to 0.7) */
|
|
1163
|
+
vectorWeight: z.ZodOptional<z.ZodNumber>;
|
|
1164
|
+
/** Weight for fulltext (keyword) results in hybrid search (0-1, defaults to 0.3) */
|
|
1165
|
+
fulltextWeight: z.ZodOptional<z.ZodNumber>;
|
|
1166
|
+
/** Minimum similarity threshold for semantic search (0-1, defaults to 0.5) */
|
|
1167
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
1168
|
+
/** If true, include detailed explanation of how each result was matched */
|
|
1169
|
+
explain: z.ZodOptional<z.ZodBoolean>;
|
|
1170
|
+
/** Point-in-time query: show what the system knew at this time (ISO 8601 format) */
|
|
1171
|
+
asOfTime: z.ZodOptional<z.ZodString>;
|
|
1172
|
+
/** Validity query: show facts that were valid at this time (ISO 8601 format) */
|
|
1173
|
+
validAtTime: z.ZodOptional<z.ZodString>;
|
|
1174
|
+
/** Event time range start (ISO 8601 format) */
|
|
1175
|
+
eventTimeFrom: z.ZodOptional<z.ZodString>;
|
|
1176
|
+
/** Event time range end (ISO 8601 format) */
|
|
1177
|
+
eventTimeTo: z.ZodOptional<z.ZodString>;
|
|
1178
|
+
/** Ingestion time range start (ISO 8601 format) */
|
|
1179
|
+
ingestionTimeFrom: z.ZodOptional<z.ZodString>;
|
|
1180
|
+
/** Ingestion time range end (ISO 8601 format) */
|
|
1181
|
+
ingestionTimeTo: z.ZodOptional<z.ZodString>;
|
|
1182
|
+
/** Include expired facts (defaults to false) */
|
|
1183
|
+
includeExpired: z.ZodOptional<z.ZodBoolean>;
|
|
1184
|
+
/** Temporal query mode: 'current' (only valid now), 'historical' (as of a point in time), 'evolution' (chronological) */
|
|
1185
|
+
temporalMode: z.ZodOptional<z.ZodEnum<["current", "historical", "evolution"]>>;
|
|
1186
|
+
/** Filter by topics - returns memories that have ANY of the specified topics */
|
|
1187
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1188
|
+
/** Filter by memory type */
|
|
1189
|
+
memoryType: z.ZodOptional<z.ZodEnum<["episodic", "semantic", "procedural"]>>;
|
|
1190
|
+
/** Filter by conversation ID */
|
|
1191
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
/** Include topics associated with matched memories (defaults to false for performance) */
|
|
1193
|
+
includeTopics: z.ZodOptional<z.ZodBoolean>;
|
|
1194
|
+
/** Include entities mentioned in matched memories (defaults to false for performance) */
|
|
1195
|
+
includeEntities: z.ZodOptional<z.ZodBoolean>;
|
|
1196
|
+
}, "strip", z.ZodTypeAny, {
|
|
1197
|
+
query: string;
|
|
1198
|
+
limit?: number | undefined;
|
|
1199
|
+
offset?: number | undefined;
|
|
1200
|
+
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
1201
|
+
topics?: string[] | undefined;
|
|
1202
|
+
conversationId?: string | undefined;
|
|
1203
|
+
mode?: "content" | "unified" | "facts" | undefined;
|
|
1204
|
+
searchMethod?: "semantic" | "keyword" | "hybrid" | undefined;
|
|
1205
|
+
vectorWeight?: number | undefined;
|
|
1206
|
+
fulltextWeight?: number | undefined;
|
|
1207
|
+
threshold?: number | undefined;
|
|
1208
|
+
explain?: boolean | undefined;
|
|
1209
|
+
asOfTime?: string | undefined;
|
|
1210
|
+
validAtTime?: string | undefined;
|
|
1211
|
+
eventTimeFrom?: string | undefined;
|
|
1212
|
+
eventTimeTo?: string | undefined;
|
|
1213
|
+
ingestionTimeFrom?: string | undefined;
|
|
1214
|
+
ingestionTimeTo?: string | undefined;
|
|
1215
|
+
includeExpired?: boolean | undefined;
|
|
1216
|
+
temporalMode?: "current" | "historical" | "evolution" | undefined;
|
|
1217
|
+
includeTopics?: boolean | undefined;
|
|
1218
|
+
includeEntities?: boolean | undefined;
|
|
1219
|
+
}, {
|
|
1220
|
+
query: string;
|
|
1221
|
+
limit?: number | undefined;
|
|
1222
|
+
offset?: number | undefined;
|
|
1223
|
+
memoryType?: "episodic" | "semantic" | "procedural" | undefined;
|
|
1224
|
+
topics?: string[] | undefined;
|
|
1225
|
+
conversationId?: string | undefined;
|
|
1226
|
+
mode?: "content" | "unified" | "facts" | undefined;
|
|
1227
|
+
searchMethod?: "semantic" | "keyword" | "hybrid" | undefined;
|
|
1228
|
+
vectorWeight?: number | undefined;
|
|
1229
|
+
fulltextWeight?: number | undefined;
|
|
1230
|
+
threshold?: number | undefined;
|
|
1231
|
+
explain?: boolean | undefined;
|
|
1232
|
+
asOfTime?: string | undefined;
|
|
1233
|
+
validAtTime?: string | undefined;
|
|
1234
|
+
eventTimeFrom?: string | undefined;
|
|
1235
|
+
eventTimeTo?: string | undefined;
|
|
1236
|
+
ingestionTimeFrom?: string | undefined;
|
|
1237
|
+
ingestionTimeTo?: string | undefined;
|
|
1238
|
+
includeExpired?: boolean | undefined;
|
|
1239
|
+
temporalMode?: "current" | "historical" | "evolution" | undefined;
|
|
1240
|
+
includeTopics?: boolean | undefined;
|
|
1241
|
+
includeEntities?: boolean | undefined;
|
|
1242
|
+
}>;
|
|
1243
|
+
declare const entity: z.ZodObject<{
|
|
1244
|
+
/** Entity name */
|
|
1245
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1246
|
+
/** Entity type */
|
|
1247
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
}, "strip", z.ZodTypeAny, {
|
|
1249
|
+
type?: string | undefined;
|
|
1250
|
+
name?: string | undefined;
|
|
1251
|
+
}, {
|
|
1252
|
+
type?: string | undefined;
|
|
1253
|
+
name?: string | undefined;
|
|
1254
|
+
}>;
|
|
1255
|
+
declare const topicReference: z.ZodObject<{
|
|
1256
|
+
/** Topic unique identifier */
|
|
1257
|
+
id: z.ZodString;
|
|
1258
|
+
/** Topic name */
|
|
1259
|
+
name: z.ZodString;
|
|
1260
|
+
/** When the topic was created */
|
|
1261
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1262
|
+
}, "strip", z.ZodTypeAny, {
|
|
1263
|
+
id: string;
|
|
1264
|
+
name: string;
|
|
1265
|
+
createdAt?: string | undefined;
|
|
1266
|
+
}, {
|
|
1267
|
+
id: string;
|
|
1268
|
+
name: string;
|
|
1269
|
+
createdAt?: string | undefined;
|
|
1270
|
+
}>;
|
|
1271
|
+
declare const searchResult: z.ZodLazy<z.ZodObject<{
|
|
1272
|
+
memory: z.ZodObject<{
|
|
1273
|
+
/** Unique memory identifier */
|
|
1274
|
+
id: z.ZodString;
|
|
1275
|
+
/** Memory content */
|
|
1276
|
+
content: z.ZodString;
|
|
1277
|
+
/** Type of memory */
|
|
1278
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
1279
|
+
/** Context or domain of the memory */
|
|
1280
|
+
context: z.ZodOptional<z.ZodString>;
|
|
1281
|
+
/** Associated topics */
|
|
1282
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1283
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
1284
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
/** Event time (when the event actually occurred in reality) */
|
|
1286
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
1287
|
+
/** Validity start time (when this fact becomes valid) */
|
|
1288
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
1290
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1291
|
+
/** Creation timestamp */
|
|
1292
|
+
createdAt: z.ZodString;
|
|
1293
|
+
/** Last update timestamp */
|
|
1294
|
+
updatedAt: z.ZodString;
|
|
1295
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
1296
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
1297
|
+
/** Basis for the confidence score */
|
|
1298
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
1299
|
+
/** Effective state of the memory in the narrative */
|
|
1300
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
1301
|
+
}, "strip", z.ZodTypeAny, {
|
|
1302
|
+
id: string;
|
|
1303
|
+
content: string;
|
|
1304
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1305
|
+
createdAt: string;
|
|
1306
|
+
updatedAt: string;
|
|
1307
|
+
context?: string | undefined;
|
|
1308
|
+
topics?: string[] | undefined;
|
|
1309
|
+
timestamp?: string | undefined;
|
|
1310
|
+
eventTime?: string | undefined;
|
|
1311
|
+
validFrom?: string | undefined;
|
|
1312
|
+
validTo?: string | null | undefined;
|
|
1313
|
+
confidenceScore?: number | undefined;
|
|
1314
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1315
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1316
|
+
}, {
|
|
1317
|
+
id: string;
|
|
1318
|
+
content: string;
|
|
1319
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1320
|
+
createdAt: string;
|
|
1321
|
+
updatedAt: string;
|
|
1322
|
+
context?: string | undefined;
|
|
1323
|
+
topics?: string[] | undefined;
|
|
1324
|
+
timestamp?: string | undefined;
|
|
1325
|
+
eventTime?: string | undefined;
|
|
1326
|
+
validFrom?: string | undefined;
|
|
1327
|
+
validTo?: string | null | undefined;
|
|
1328
|
+
confidenceScore?: number | undefined;
|
|
1329
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1330
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1331
|
+
}>;
|
|
1332
|
+
/** Relevance score for this result */
|
|
1333
|
+
score: z.ZodNumber;
|
|
1334
|
+
/** Entities mentioned in this memory */
|
|
1335
|
+
entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1336
|
+
/** Entity name */
|
|
1337
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1338
|
+
/** Entity type */
|
|
1339
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1340
|
+
}, "strip", z.ZodTypeAny, {
|
|
1341
|
+
type?: string | undefined;
|
|
1342
|
+
name?: string | undefined;
|
|
1343
|
+
}, {
|
|
1344
|
+
type?: string | undefined;
|
|
1345
|
+
name?: string | undefined;
|
|
1346
|
+
}>, "many">>;
|
|
1347
|
+
/** Topics associated with this memory */
|
|
1348
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1349
|
+
/** Topic unique identifier */
|
|
1350
|
+
id: z.ZodString;
|
|
1351
|
+
/** Topic name */
|
|
1352
|
+
name: z.ZodString;
|
|
1353
|
+
/** When the topic was created */
|
|
1354
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1355
|
+
}, "strip", z.ZodTypeAny, {
|
|
1356
|
+
id: string;
|
|
1357
|
+
name: string;
|
|
1358
|
+
createdAt?: string | undefined;
|
|
1359
|
+
}, {
|
|
1360
|
+
id: string;
|
|
1361
|
+
name: string;
|
|
1362
|
+
createdAt?: string | undefined;
|
|
1363
|
+
}>, "many">>;
|
|
1364
|
+
/** Search method used to find this result */
|
|
1365
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
1366
|
+
/** Combined RRF score for hybrid search */
|
|
1367
|
+
hybridScore: z.ZodOptional<z.ZodNumber>;
|
|
1368
|
+
/** Vector similarity score (0-1) */
|
|
1369
|
+
vectorScore: z.ZodOptional<z.ZodNumber>;
|
|
1370
|
+
/** Rank in vector search results */
|
|
1371
|
+
vectorRank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1372
|
+
/** Fulltext search score */
|
|
1373
|
+
fulltextScore: z.ZodOptional<z.ZodNumber>;
|
|
1374
|
+
/** Rank in fulltext search results */
|
|
1375
|
+
fulltextRank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1376
|
+
/** Detailed explanation of the match (only when explain=true) */
|
|
1377
|
+
explanation: z.ZodOptional<z.ZodObject<{
|
|
1378
|
+
/** Human-readable explanation of why this result matched */
|
|
1379
|
+
matchReason: z.ZodString;
|
|
1380
|
+
/** Terms from the query that matched (for keyword search) */
|
|
1381
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1382
|
+
/** Cosine similarity score for semantic match (0-1) */
|
|
1383
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
1384
|
+
/** Factors that contributed to the match */
|
|
1385
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1386
|
+
}, "strip", z.ZodTypeAny, {
|
|
1387
|
+
matchReason: string;
|
|
1388
|
+
matchedTerms?: string[] | undefined;
|
|
1389
|
+
semanticSimilarity?: number | undefined;
|
|
1390
|
+
contributingFactors?: string[] | undefined;
|
|
1391
|
+
}, {
|
|
1392
|
+
matchReason: string;
|
|
1393
|
+
matchedTerms?: string[] | undefined;
|
|
1394
|
+
semanticSimilarity?: number | undefined;
|
|
1395
|
+
contributingFactors?: string[] | undefined;
|
|
1396
|
+
}>>;
|
|
1397
|
+
}, "strip", z.ZodTypeAny, {
|
|
1398
|
+
memory: {
|
|
1399
|
+
id: string;
|
|
1400
|
+
content: string;
|
|
1401
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1402
|
+
createdAt: string;
|
|
1403
|
+
updatedAt: string;
|
|
1404
|
+
context?: string | undefined;
|
|
1405
|
+
topics?: string[] | undefined;
|
|
1406
|
+
timestamp?: string | undefined;
|
|
1407
|
+
eventTime?: string | undefined;
|
|
1408
|
+
validFrom?: string | undefined;
|
|
1409
|
+
validTo?: string | null | undefined;
|
|
1410
|
+
confidenceScore?: number | undefined;
|
|
1411
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1412
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1413
|
+
};
|
|
1414
|
+
score: number;
|
|
1415
|
+
topics?: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
name: string;
|
|
1418
|
+
createdAt?: string | undefined;
|
|
1419
|
+
}[] | undefined;
|
|
1420
|
+
entities?: {
|
|
1421
|
+
type?: string | undefined;
|
|
1422
|
+
name?: string | undefined;
|
|
1423
|
+
}[] | undefined;
|
|
1424
|
+
searchMethod?: string | undefined;
|
|
1425
|
+
hybridScore?: number | undefined;
|
|
1426
|
+
vectorScore?: number | undefined;
|
|
1427
|
+
vectorRank?: number | null | undefined;
|
|
1428
|
+
fulltextScore?: number | undefined;
|
|
1429
|
+
fulltextRank?: number | null | undefined;
|
|
1430
|
+
explanation?: {
|
|
1431
|
+
matchReason: string;
|
|
1432
|
+
matchedTerms?: string[] | undefined;
|
|
1433
|
+
semanticSimilarity?: number | undefined;
|
|
1434
|
+
contributingFactors?: string[] | undefined;
|
|
1435
|
+
} | undefined;
|
|
1436
|
+
}, {
|
|
1437
|
+
memory: {
|
|
1438
|
+
id: string;
|
|
1439
|
+
content: string;
|
|
1440
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1441
|
+
createdAt: string;
|
|
1442
|
+
updatedAt: string;
|
|
1443
|
+
context?: string | undefined;
|
|
1444
|
+
topics?: string[] | undefined;
|
|
1445
|
+
timestamp?: string | undefined;
|
|
1446
|
+
eventTime?: string | undefined;
|
|
1447
|
+
validFrom?: string | undefined;
|
|
1448
|
+
validTo?: string | null | undefined;
|
|
1449
|
+
confidenceScore?: number | undefined;
|
|
1450
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1451
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1452
|
+
};
|
|
1453
|
+
score: number;
|
|
1454
|
+
topics?: {
|
|
1455
|
+
id: string;
|
|
1456
|
+
name: string;
|
|
1457
|
+
createdAt?: string | undefined;
|
|
1458
|
+
}[] | undefined;
|
|
1459
|
+
entities?: {
|
|
1460
|
+
type?: string | undefined;
|
|
1461
|
+
name?: string | undefined;
|
|
1462
|
+
}[] | undefined;
|
|
1463
|
+
searchMethod?: string | undefined;
|
|
1464
|
+
hybridScore?: number | undefined;
|
|
1465
|
+
vectorScore?: number | undefined;
|
|
1466
|
+
vectorRank?: number | null | undefined;
|
|
1467
|
+
fulltextScore?: number | undefined;
|
|
1468
|
+
fulltextRank?: number | null | undefined;
|
|
1469
|
+
explanation?: {
|
|
1470
|
+
matchReason: string;
|
|
1471
|
+
matchedTerms?: string[] | undefined;
|
|
1472
|
+
semanticSimilarity?: number | undefined;
|
|
1473
|
+
contributingFactors?: string[] | undefined;
|
|
1474
|
+
} | undefined;
|
|
1475
|
+
}>>;
|
|
1476
|
+
/**
|
|
1477
|
+
* Temporal query metadata (null for semantic/hybrid search)
|
|
1478
|
+
*/
|
|
1479
|
+
declare const temporalMetadata: z.ZodNullable<z.ZodObject<{
|
|
1480
|
+
/** Temporal query mode used */
|
|
1481
|
+
temporalMode: z.ZodString;
|
|
1482
|
+
/** Point-in-time timestamp */
|
|
1483
|
+
asOfTime: z.ZodNullable<z.ZodString>;
|
|
1484
|
+
/** Validity timestamp */
|
|
1485
|
+
validAtTime: z.ZodNullable<z.ZodString>;
|
|
1486
|
+
/** Event time range filter */
|
|
1487
|
+
eventTimeRange: z.ZodNullable<z.ZodObject<{
|
|
1488
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1489
|
+
to: z.ZodNullable<z.ZodString>;
|
|
1490
|
+
}, "strip", z.ZodTypeAny, {
|
|
1491
|
+
from: string | null;
|
|
1492
|
+
to: string | null;
|
|
1493
|
+
}, {
|
|
1494
|
+
from: string | null;
|
|
1495
|
+
to: string | null;
|
|
1496
|
+
}>>;
|
|
1497
|
+
/** Ingestion time range filter */
|
|
1498
|
+
ingestionTimeRange: z.ZodNullable<z.ZodObject<{
|
|
1499
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1500
|
+
to: z.ZodNullable<z.ZodString>;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
from: string | null;
|
|
1503
|
+
to: string | null;
|
|
1504
|
+
}, {
|
|
1505
|
+
from: string | null;
|
|
1506
|
+
to: string | null;
|
|
1507
|
+
}>>;
|
|
1508
|
+
/** Whether expired facts are included */
|
|
1509
|
+
includeExpired: z.ZodBoolean;
|
|
1510
|
+
/** Whether temporal fields are included in results */
|
|
1511
|
+
temporalFieldsIncluded: z.ZodBoolean;
|
|
1512
|
+
}, "strip", z.ZodTypeAny, {
|
|
1513
|
+
asOfTime: string | null;
|
|
1514
|
+
validAtTime: string | null;
|
|
1515
|
+
includeExpired: boolean;
|
|
1516
|
+
temporalMode: string;
|
|
1517
|
+
eventTimeRange: {
|
|
1518
|
+
from: string | null;
|
|
1519
|
+
to: string | null;
|
|
1520
|
+
} | null;
|
|
1521
|
+
ingestionTimeRange: {
|
|
1522
|
+
from: string | null;
|
|
1523
|
+
to: string | null;
|
|
1524
|
+
} | null;
|
|
1525
|
+
temporalFieldsIncluded: boolean;
|
|
1526
|
+
}, {
|
|
1527
|
+
asOfTime: string | null;
|
|
1528
|
+
validAtTime: string | null;
|
|
1529
|
+
includeExpired: boolean;
|
|
1530
|
+
temporalMode: string;
|
|
1531
|
+
eventTimeRange: {
|
|
1532
|
+
from: string | null;
|
|
1533
|
+
to: string | null;
|
|
1534
|
+
} | null;
|
|
1535
|
+
ingestionTimeRange: {
|
|
1536
|
+
from: string | null;
|
|
1537
|
+
to: string | null;
|
|
1538
|
+
} | null;
|
|
1539
|
+
temporalFieldsIncluded: boolean;
|
|
1540
|
+
}>>;
|
|
1541
|
+
declare const searchResponse: z.ZodLazy<z.ZodObject<{
|
|
1542
|
+
/** Search results with metadata */
|
|
1543
|
+
data: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
1544
|
+
memory: z.ZodObject<{
|
|
1545
|
+
/** Unique memory identifier */
|
|
1546
|
+
id: z.ZodString;
|
|
1547
|
+
/** Memory content */
|
|
1548
|
+
content: z.ZodString;
|
|
1549
|
+
/** Type of memory */
|
|
1550
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
1551
|
+
/** Context or domain of the memory */
|
|
1552
|
+
context: z.ZodOptional<z.ZodString>;
|
|
1553
|
+
/** Associated topics */
|
|
1554
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1555
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
1556
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
1557
|
+
/** Event time (when the event actually occurred in reality) */
|
|
1558
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
1559
|
+
/** Validity start time (when this fact becomes valid) */
|
|
1560
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
1561
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
1562
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1563
|
+
/** Creation timestamp */
|
|
1564
|
+
createdAt: z.ZodString;
|
|
1565
|
+
/** Last update timestamp */
|
|
1566
|
+
updatedAt: z.ZodString;
|
|
1567
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
1568
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
1569
|
+
/** Basis for the confidence score */
|
|
1570
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
1571
|
+
/** Effective state of the memory in the narrative */
|
|
1572
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
1573
|
+
}, "strip", z.ZodTypeAny, {
|
|
1574
|
+
id: string;
|
|
1575
|
+
content: string;
|
|
1576
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1577
|
+
createdAt: string;
|
|
1578
|
+
updatedAt: string;
|
|
1579
|
+
context?: string | undefined;
|
|
1580
|
+
topics?: string[] | undefined;
|
|
1581
|
+
timestamp?: string | undefined;
|
|
1582
|
+
eventTime?: string | undefined;
|
|
1583
|
+
validFrom?: string | undefined;
|
|
1584
|
+
validTo?: string | null | undefined;
|
|
1585
|
+
confidenceScore?: number | undefined;
|
|
1586
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1587
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1588
|
+
}, {
|
|
1589
|
+
id: string;
|
|
1590
|
+
content: string;
|
|
1591
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1592
|
+
createdAt: string;
|
|
1593
|
+
updatedAt: string;
|
|
1594
|
+
context?: string | undefined;
|
|
1595
|
+
topics?: string[] | undefined;
|
|
1596
|
+
timestamp?: string | undefined;
|
|
1597
|
+
eventTime?: string | undefined;
|
|
1598
|
+
validFrom?: string | undefined;
|
|
1599
|
+
validTo?: string | null | undefined;
|
|
1600
|
+
confidenceScore?: number | undefined;
|
|
1601
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1602
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1603
|
+
}>;
|
|
1604
|
+
/** Relevance score for this result */
|
|
1605
|
+
score: z.ZodNumber;
|
|
1606
|
+
/** Entities mentioned in this memory */
|
|
1607
|
+
entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1608
|
+
/** Entity name */
|
|
1609
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1610
|
+
/** Entity type */
|
|
1611
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1612
|
+
}, "strip", z.ZodTypeAny, {
|
|
1613
|
+
type?: string | undefined;
|
|
1614
|
+
name?: string | undefined;
|
|
1615
|
+
}, {
|
|
1616
|
+
type?: string | undefined;
|
|
1617
|
+
name?: string | undefined;
|
|
1618
|
+
}>, "many">>;
|
|
1619
|
+
/** Topics associated with this memory */
|
|
1620
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1621
|
+
/** Topic unique identifier */
|
|
1622
|
+
id: z.ZodString;
|
|
1623
|
+
/** Topic name */
|
|
1624
|
+
name: z.ZodString;
|
|
1625
|
+
/** When the topic was created */
|
|
1626
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1627
|
+
}, "strip", z.ZodTypeAny, {
|
|
1628
|
+
id: string;
|
|
1629
|
+
name: string;
|
|
1630
|
+
createdAt?: string | undefined;
|
|
1631
|
+
}, {
|
|
1632
|
+
id: string;
|
|
1633
|
+
name: string;
|
|
1634
|
+
createdAt?: string | undefined;
|
|
1635
|
+
}>, "many">>;
|
|
1636
|
+
/** Search method used to find this result */
|
|
1637
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
/** Combined RRF score for hybrid search */
|
|
1639
|
+
hybridScore: z.ZodOptional<z.ZodNumber>;
|
|
1640
|
+
/** Vector similarity score (0-1) */
|
|
1641
|
+
vectorScore: z.ZodOptional<z.ZodNumber>;
|
|
1642
|
+
/** Rank in vector search results */
|
|
1643
|
+
vectorRank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1644
|
+
/** Fulltext search score */
|
|
1645
|
+
fulltextScore: z.ZodOptional<z.ZodNumber>;
|
|
1646
|
+
/** Rank in fulltext search results */
|
|
1647
|
+
fulltextRank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1648
|
+
/** Detailed explanation of the match (only when explain=true) */
|
|
1649
|
+
explanation: z.ZodOptional<z.ZodObject<{
|
|
1650
|
+
/** Human-readable explanation of why this result matched */
|
|
1651
|
+
matchReason: z.ZodString;
|
|
1652
|
+
/** Terms from the query that matched (for keyword search) */
|
|
1653
|
+
matchedTerms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1654
|
+
/** Cosine similarity score for semantic match (0-1) */
|
|
1655
|
+
semanticSimilarity: z.ZodOptional<z.ZodNumber>;
|
|
1656
|
+
/** Factors that contributed to the match */
|
|
1657
|
+
contributingFactors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1658
|
+
}, "strip", z.ZodTypeAny, {
|
|
1659
|
+
matchReason: string;
|
|
1660
|
+
matchedTerms?: string[] | undefined;
|
|
1661
|
+
semanticSimilarity?: number | undefined;
|
|
1662
|
+
contributingFactors?: string[] | undefined;
|
|
1663
|
+
}, {
|
|
1664
|
+
matchReason: string;
|
|
1665
|
+
matchedTerms?: string[] | undefined;
|
|
1666
|
+
semanticSimilarity?: number | undefined;
|
|
1667
|
+
contributingFactors?: string[] | undefined;
|
|
1668
|
+
}>>;
|
|
1669
|
+
}, "strip", z.ZodTypeAny, {
|
|
1670
|
+
memory: {
|
|
1671
|
+
id: string;
|
|
1672
|
+
content: string;
|
|
1673
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1674
|
+
createdAt: string;
|
|
1675
|
+
updatedAt: string;
|
|
1676
|
+
context?: string | undefined;
|
|
1677
|
+
topics?: string[] | undefined;
|
|
1678
|
+
timestamp?: string | undefined;
|
|
1679
|
+
eventTime?: string | undefined;
|
|
1680
|
+
validFrom?: string | undefined;
|
|
1681
|
+
validTo?: string | null | undefined;
|
|
1682
|
+
confidenceScore?: number | undefined;
|
|
1683
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1684
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1685
|
+
};
|
|
1686
|
+
score: number;
|
|
1687
|
+
topics?: {
|
|
1688
|
+
id: string;
|
|
1689
|
+
name: string;
|
|
1690
|
+
createdAt?: string | undefined;
|
|
1691
|
+
}[] | undefined;
|
|
1692
|
+
entities?: {
|
|
1693
|
+
type?: string | undefined;
|
|
1694
|
+
name?: string | undefined;
|
|
1695
|
+
}[] | undefined;
|
|
1696
|
+
searchMethod?: string | undefined;
|
|
1697
|
+
hybridScore?: number | undefined;
|
|
1698
|
+
vectorScore?: number | undefined;
|
|
1699
|
+
vectorRank?: number | null | undefined;
|
|
1700
|
+
fulltextScore?: number | undefined;
|
|
1701
|
+
fulltextRank?: number | null | undefined;
|
|
1702
|
+
explanation?: {
|
|
1703
|
+
matchReason: string;
|
|
1704
|
+
matchedTerms?: string[] | undefined;
|
|
1705
|
+
semanticSimilarity?: number | undefined;
|
|
1706
|
+
contributingFactors?: string[] | undefined;
|
|
1707
|
+
} | undefined;
|
|
1708
|
+
}, {
|
|
1709
|
+
memory: {
|
|
1710
|
+
id: string;
|
|
1711
|
+
content: string;
|
|
1712
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1713
|
+
createdAt: string;
|
|
1714
|
+
updatedAt: string;
|
|
1715
|
+
context?: string | undefined;
|
|
1716
|
+
topics?: string[] | undefined;
|
|
1717
|
+
timestamp?: string | undefined;
|
|
1718
|
+
eventTime?: string | undefined;
|
|
1719
|
+
validFrom?: string | undefined;
|
|
1720
|
+
validTo?: string | null | undefined;
|
|
1721
|
+
confidenceScore?: number | undefined;
|
|
1722
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1723
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1724
|
+
};
|
|
1725
|
+
score: number;
|
|
1726
|
+
topics?: {
|
|
1727
|
+
id: string;
|
|
1728
|
+
name: string;
|
|
1729
|
+
createdAt?: string | undefined;
|
|
1730
|
+
}[] | undefined;
|
|
1731
|
+
entities?: {
|
|
1732
|
+
type?: string | undefined;
|
|
1733
|
+
name?: string | undefined;
|
|
1734
|
+
}[] | undefined;
|
|
1735
|
+
searchMethod?: string | undefined;
|
|
1736
|
+
hybridScore?: number | undefined;
|
|
1737
|
+
vectorScore?: number | undefined;
|
|
1738
|
+
vectorRank?: number | null | undefined;
|
|
1739
|
+
fulltextScore?: number | undefined;
|
|
1740
|
+
fulltextRank?: number | null | undefined;
|
|
1741
|
+
explanation?: {
|
|
1742
|
+
matchReason: string;
|
|
1743
|
+
matchedTerms?: string[] | undefined;
|
|
1744
|
+
semanticSimilarity?: number | undefined;
|
|
1745
|
+
contributingFactors?: string[] | undefined;
|
|
1746
|
+
} | undefined;
|
|
1747
|
+
}>>, "many">;
|
|
1748
|
+
/** Search method used for this query */
|
|
1749
|
+
searchMethod: z.ZodOptional<z.ZodString>;
|
|
1750
|
+
pagination: z.ZodObject<{
|
|
1751
|
+
/** Maximum number of items per page */
|
|
1752
|
+
limit: z.ZodNumber;
|
|
1753
|
+
/** Number of items to skip */
|
|
1754
|
+
offset: z.ZodNumber;
|
|
1755
|
+
/** Total number of items */
|
|
1756
|
+
count: z.ZodNumber;
|
|
1757
|
+
}, "strip", z.ZodTypeAny, {
|
|
1758
|
+
limit: number;
|
|
1759
|
+
offset: number;
|
|
1760
|
+
count: number;
|
|
1761
|
+
}, {
|
|
1762
|
+
limit: number;
|
|
1763
|
+
offset: number;
|
|
1764
|
+
count: number;
|
|
1765
|
+
}>;
|
|
1766
|
+
/** Temporal query metadata (null for semantic/hybrid search) */
|
|
1767
|
+
temporalMetadata: z.ZodNullable<z.ZodObject<{
|
|
1768
|
+
/** Temporal query mode used */
|
|
1769
|
+
temporalMode: z.ZodString;
|
|
1770
|
+
/** Point-in-time timestamp */
|
|
1771
|
+
asOfTime: z.ZodNullable<z.ZodString>;
|
|
1772
|
+
/** Validity timestamp */
|
|
1773
|
+
validAtTime: z.ZodNullable<z.ZodString>;
|
|
1774
|
+
/** Event time range filter */
|
|
1775
|
+
eventTimeRange: z.ZodNullable<z.ZodObject<{
|
|
1776
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1777
|
+
to: z.ZodNullable<z.ZodString>;
|
|
1778
|
+
}, "strip", z.ZodTypeAny, {
|
|
1779
|
+
from: string | null;
|
|
1780
|
+
to: string | null;
|
|
1781
|
+
}, {
|
|
1782
|
+
from: string | null;
|
|
1783
|
+
to: string | null;
|
|
1784
|
+
}>>;
|
|
1785
|
+
/** Ingestion time range filter */
|
|
1786
|
+
ingestionTimeRange: z.ZodNullable<z.ZodObject<{
|
|
1787
|
+
from: z.ZodNullable<z.ZodString>;
|
|
1788
|
+
to: z.ZodNullable<z.ZodString>;
|
|
1789
|
+
}, "strip", z.ZodTypeAny, {
|
|
1790
|
+
from: string | null;
|
|
1791
|
+
to: string | null;
|
|
1792
|
+
}, {
|
|
1793
|
+
from: string | null;
|
|
1794
|
+
to: string | null;
|
|
1795
|
+
}>>;
|
|
1796
|
+
/** Whether expired facts are included */
|
|
1797
|
+
includeExpired: z.ZodBoolean;
|
|
1798
|
+
/** Whether temporal fields are included in results */
|
|
1799
|
+
temporalFieldsIncluded: z.ZodBoolean;
|
|
1800
|
+
}, "strip", z.ZodTypeAny, {
|
|
1801
|
+
asOfTime: string | null;
|
|
1802
|
+
validAtTime: string | null;
|
|
1803
|
+
includeExpired: boolean;
|
|
1804
|
+
temporalMode: string;
|
|
1805
|
+
eventTimeRange: {
|
|
1806
|
+
from: string | null;
|
|
1807
|
+
to: string | null;
|
|
1808
|
+
} | null;
|
|
1809
|
+
ingestionTimeRange: {
|
|
1810
|
+
from: string | null;
|
|
1811
|
+
to: string | null;
|
|
1812
|
+
} | null;
|
|
1813
|
+
temporalFieldsIncluded: boolean;
|
|
1814
|
+
}, {
|
|
1815
|
+
asOfTime: string | null;
|
|
1816
|
+
validAtTime: string | null;
|
|
1817
|
+
includeExpired: boolean;
|
|
1818
|
+
temporalMode: string;
|
|
1819
|
+
eventTimeRange: {
|
|
1820
|
+
from: string | null;
|
|
1821
|
+
to: string | null;
|
|
1822
|
+
} | null;
|
|
1823
|
+
ingestionTimeRange: {
|
|
1824
|
+
from: string | null;
|
|
1825
|
+
to: string | null;
|
|
1826
|
+
} | null;
|
|
1827
|
+
temporalFieldsIncluded: boolean;
|
|
1828
|
+
}>>;
|
|
1829
|
+
}, "strip", z.ZodTypeAny, {
|
|
1830
|
+
data: {
|
|
1831
|
+
memory: {
|
|
1832
|
+
id: string;
|
|
1833
|
+
content: string;
|
|
1834
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1835
|
+
createdAt: string;
|
|
1836
|
+
updatedAt: string;
|
|
1837
|
+
context?: string | undefined;
|
|
1838
|
+
topics?: string[] | undefined;
|
|
1839
|
+
timestamp?: string | undefined;
|
|
1840
|
+
eventTime?: string | undefined;
|
|
1841
|
+
validFrom?: string | undefined;
|
|
1842
|
+
validTo?: string | null | undefined;
|
|
1843
|
+
confidenceScore?: number | undefined;
|
|
1844
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1845
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1846
|
+
};
|
|
1847
|
+
score: number;
|
|
1848
|
+
topics?: {
|
|
1849
|
+
id: string;
|
|
1850
|
+
name: string;
|
|
1851
|
+
createdAt?: string | undefined;
|
|
1852
|
+
}[] | undefined;
|
|
1853
|
+
entities?: {
|
|
1854
|
+
type?: string | undefined;
|
|
1855
|
+
name?: string | undefined;
|
|
1856
|
+
}[] | undefined;
|
|
1857
|
+
searchMethod?: string | undefined;
|
|
1858
|
+
hybridScore?: number | undefined;
|
|
1859
|
+
vectorScore?: number | undefined;
|
|
1860
|
+
vectorRank?: number | null | undefined;
|
|
1861
|
+
fulltextScore?: number | undefined;
|
|
1862
|
+
fulltextRank?: number | null | undefined;
|
|
1863
|
+
explanation?: {
|
|
1864
|
+
matchReason: string;
|
|
1865
|
+
matchedTerms?: string[] | undefined;
|
|
1866
|
+
semanticSimilarity?: number | undefined;
|
|
1867
|
+
contributingFactors?: string[] | undefined;
|
|
1868
|
+
} | undefined;
|
|
1869
|
+
}[];
|
|
1870
|
+
pagination: {
|
|
1871
|
+
limit: number;
|
|
1872
|
+
offset: number;
|
|
1873
|
+
count: number;
|
|
1874
|
+
};
|
|
1875
|
+
temporalMetadata: {
|
|
1876
|
+
asOfTime: string | null;
|
|
1877
|
+
validAtTime: string | null;
|
|
1878
|
+
includeExpired: boolean;
|
|
1879
|
+
temporalMode: string;
|
|
1880
|
+
eventTimeRange: {
|
|
1881
|
+
from: string | null;
|
|
1882
|
+
to: string | null;
|
|
1883
|
+
} | null;
|
|
1884
|
+
ingestionTimeRange: {
|
|
1885
|
+
from: string | null;
|
|
1886
|
+
to: string | null;
|
|
1887
|
+
} | null;
|
|
1888
|
+
temporalFieldsIncluded: boolean;
|
|
1889
|
+
} | null;
|
|
1890
|
+
searchMethod?: string | undefined;
|
|
1891
|
+
}, {
|
|
1892
|
+
data: {
|
|
1893
|
+
memory: {
|
|
1894
|
+
id: string;
|
|
1895
|
+
content: string;
|
|
1896
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
1897
|
+
createdAt: string;
|
|
1898
|
+
updatedAt: string;
|
|
1899
|
+
context?: string | undefined;
|
|
1900
|
+
topics?: string[] | undefined;
|
|
1901
|
+
timestamp?: string | undefined;
|
|
1902
|
+
eventTime?: string | undefined;
|
|
1903
|
+
validFrom?: string | undefined;
|
|
1904
|
+
validTo?: string | null | undefined;
|
|
1905
|
+
confidenceScore?: number | undefined;
|
|
1906
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
1907
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
1908
|
+
};
|
|
1909
|
+
score: number;
|
|
1910
|
+
topics?: {
|
|
1911
|
+
id: string;
|
|
1912
|
+
name: string;
|
|
1913
|
+
createdAt?: string | undefined;
|
|
1914
|
+
}[] | undefined;
|
|
1915
|
+
entities?: {
|
|
1916
|
+
type?: string | undefined;
|
|
1917
|
+
name?: string | undefined;
|
|
1918
|
+
}[] | undefined;
|
|
1919
|
+
searchMethod?: string | undefined;
|
|
1920
|
+
hybridScore?: number | undefined;
|
|
1921
|
+
vectorScore?: number | undefined;
|
|
1922
|
+
vectorRank?: number | null | undefined;
|
|
1923
|
+
fulltextScore?: number | undefined;
|
|
1924
|
+
fulltextRank?: number | null | undefined;
|
|
1925
|
+
explanation?: {
|
|
1926
|
+
matchReason: string;
|
|
1927
|
+
matchedTerms?: string[] | undefined;
|
|
1928
|
+
semanticSimilarity?: number | undefined;
|
|
1929
|
+
contributingFactors?: string[] | undefined;
|
|
1930
|
+
} | undefined;
|
|
1931
|
+
}[];
|
|
1932
|
+
pagination: {
|
|
1933
|
+
limit: number;
|
|
1934
|
+
offset: number;
|
|
1935
|
+
count: number;
|
|
1936
|
+
};
|
|
1937
|
+
temporalMetadata: {
|
|
1938
|
+
asOfTime: string | null;
|
|
1939
|
+
validAtTime: string | null;
|
|
1940
|
+
includeExpired: boolean;
|
|
1941
|
+
temporalMode: string;
|
|
1942
|
+
eventTimeRange: {
|
|
1943
|
+
from: string | null;
|
|
1944
|
+
to: string | null;
|
|
1945
|
+
} | null;
|
|
1946
|
+
ingestionTimeRange: {
|
|
1947
|
+
from: string | null;
|
|
1948
|
+
to: string | null;
|
|
1949
|
+
} | null;
|
|
1950
|
+
temporalFieldsIncluded: boolean;
|
|
1951
|
+
} | null;
|
|
1952
|
+
searchMethod?: string | undefined;
|
|
1953
|
+
}>>;
|
|
1954
|
+
declare const fact: z.ZodObject<{
|
|
1955
|
+
/** Unique identifier for the fact */
|
|
1956
|
+
id: z.ZodString;
|
|
1957
|
+
/** User ID who owns this fact */
|
|
1958
|
+
userId: z.ZodString;
|
|
1959
|
+
/** Fact name/label */
|
|
1960
|
+
name: z.ZodString;
|
|
1961
|
+
/** Entity type */
|
|
1962
|
+
type: z.ZodString;
|
|
1963
|
+
/** Fact description */
|
|
1964
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1965
|
+
/** Confidence score (0-1) */
|
|
1966
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
1967
|
+
/** Creation timestamp */
|
|
1968
|
+
createdAt: z.ZodString;
|
|
1969
|
+
/** Last update timestamp */
|
|
1970
|
+
updatedAt: z.ZodString;
|
|
1971
|
+
}, "strip", z.ZodTypeAny, {
|
|
1972
|
+
type: string;
|
|
1973
|
+
id: string;
|
|
1974
|
+
createdAt: string;
|
|
1975
|
+
updatedAt: string;
|
|
1976
|
+
name: string;
|
|
1977
|
+
userId: string;
|
|
1978
|
+
description?: string | null | undefined;
|
|
1979
|
+
confidence?: number | undefined;
|
|
1980
|
+
}, {
|
|
1981
|
+
type: string;
|
|
1982
|
+
id: string;
|
|
1983
|
+
createdAt: string;
|
|
1984
|
+
updatedAt: string;
|
|
1985
|
+
name: string;
|
|
1986
|
+
userId: string;
|
|
1987
|
+
description?: string | null | undefined;
|
|
1988
|
+
confidence?: number | undefined;
|
|
1989
|
+
}>;
|
|
1990
|
+
declare const createFactRequest: z.ZodObject<{
|
|
1991
|
+
/** Fact subject (entity name) */
|
|
1992
|
+
subject: z.ZodString;
|
|
1993
|
+
/** Relationship type */
|
|
1994
|
+
predicate: z.ZodString;
|
|
1995
|
+
/** Fact object (related entity) */
|
|
1996
|
+
object: z.ZodString;
|
|
1997
|
+
}, "strip", z.ZodTypeAny, {
|
|
1998
|
+
object: string;
|
|
1999
|
+
subject: string;
|
|
2000
|
+
predicate: string;
|
|
2001
|
+
}, {
|
|
2002
|
+
object: string;
|
|
2003
|
+
subject: string;
|
|
2004
|
+
predicate: string;
|
|
2005
|
+
}>;
|
|
2006
|
+
declare const updateFactRequest: z.ZodObject<{
|
|
2007
|
+
/** Fact subject (entity name) */
|
|
2008
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2009
|
+
/** Relationship type */
|
|
2010
|
+
predicate: z.ZodOptional<z.ZodString>;
|
|
2011
|
+
/** Fact object (related entity) */
|
|
2012
|
+
object: z.ZodOptional<z.ZodString>;
|
|
2013
|
+
/** Confidence score (0-1) */
|
|
2014
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
2015
|
+
}, "strip", z.ZodTypeAny, {
|
|
2016
|
+
object?: string | undefined;
|
|
2017
|
+
confidence?: number | undefined;
|
|
2018
|
+
subject?: string | undefined;
|
|
2019
|
+
predicate?: string | undefined;
|
|
2020
|
+
}, {
|
|
2021
|
+
object?: string | undefined;
|
|
2022
|
+
confidence?: number | undefined;
|
|
2023
|
+
subject?: string | undefined;
|
|
2024
|
+
predicate?: string | undefined;
|
|
2025
|
+
}>;
|
|
2026
|
+
declare const factSearchRequest: z.ZodObject<{
|
|
2027
|
+
/** Search query string */
|
|
2028
|
+
query: z.ZodString;
|
|
2029
|
+
/** Maximum number of results to return */
|
|
2030
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
2031
|
+
}, "strip", z.ZodTypeAny, {
|
|
2032
|
+
query: string;
|
|
2033
|
+
limit?: number | undefined;
|
|
2034
|
+
}, {
|
|
2035
|
+
query: string;
|
|
2036
|
+
limit?: number | undefined;
|
|
2037
|
+
}>;
|
|
2038
|
+
declare const artifact: z.ZodObject<{
|
|
2039
|
+
/** Unique identifier for the artifact */
|
|
2040
|
+
id: z.ZodString;
|
|
2041
|
+
/** User ID who owns this artifact */
|
|
2042
|
+
userId: z.ZodString;
|
|
2043
|
+
/** Artifact content */
|
|
2044
|
+
content: z.ZodString;
|
|
2045
|
+
/** Artifact type (e.g., note, document, code) */
|
|
2046
|
+
type: z.ZodString;
|
|
2047
|
+
/** Artifact name */
|
|
2048
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2049
|
+
/** Artifact description */
|
|
2050
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2051
|
+
/** Associated memory ID */
|
|
2052
|
+
memoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2053
|
+
/** Associated conversation ID */
|
|
2054
|
+
conversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2055
|
+
/** Additional metadata */
|
|
2056
|
+
metadata: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
2057
|
+
/** Creation timestamp */
|
|
2058
|
+
createdAt: z.ZodString;
|
|
2059
|
+
/** Last update timestamp */
|
|
2060
|
+
updatedAt: z.ZodString;
|
|
2061
|
+
}, "strip", z.ZodTypeAny, {
|
|
2062
|
+
type: string;
|
|
2063
|
+
id: string;
|
|
2064
|
+
content: string;
|
|
2065
|
+
createdAt: string;
|
|
2066
|
+
updatedAt: string;
|
|
2067
|
+
userId: string;
|
|
2068
|
+
metadata?: {} | undefined;
|
|
2069
|
+
conversationId?: string | null | undefined;
|
|
2070
|
+
name?: string | null | undefined;
|
|
2071
|
+
description?: string | null | undefined;
|
|
2072
|
+
memoryId?: string | null | undefined;
|
|
2073
|
+
}, {
|
|
2074
|
+
type: string;
|
|
2075
|
+
id: string;
|
|
2076
|
+
content: string;
|
|
2077
|
+
createdAt: string;
|
|
2078
|
+
updatedAt: string;
|
|
2079
|
+
userId: string;
|
|
2080
|
+
metadata?: {} | undefined;
|
|
2081
|
+
conversationId?: string | null | undefined;
|
|
2082
|
+
name?: string | null | undefined;
|
|
2083
|
+
description?: string | null | undefined;
|
|
2084
|
+
memoryId?: string | null | undefined;
|
|
2085
|
+
}>;
|
|
2086
|
+
declare const createArtifactRequest: z.ZodObject<{
|
|
2087
|
+
/** Artifact content */
|
|
2088
|
+
content: z.ZodString;
|
|
2089
|
+
/** Artifact type (e.g., note, document, code) */
|
|
2090
|
+
type: z.ZodString;
|
|
2091
|
+
/** Artifact name */
|
|
2092
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2093
|
+
/** Artifact description */
|
|
2094
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2095
|
+
/** Associated memory ID */
|
|
2096
|
+
memoryId: z.ZodOptional<z.ZodString>;
|
|
2097
|
+
/** Associated conversation ID */
|
|
2098
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
2099
|
+
/** Additional metadata */
|
|
2100
|
+
metadata: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
2101
|
+
}, "strip", z.ZodTypeAny, {
|
|
2102
|
+
type: string;
|
|
2103
|
+
content: string;
|
|
2104
|
+
metadata?: {} | undefined;
|
|
2105
|
+
conversationId?: string | undefined;
|
|
2106
|
+
name?: string | undefined;
|
|
2107
|
+
description?: string | undefined;
|
|
2108
|
+
memoryId?: string | undefined;
|
|
2109
|
+
}, {
|
|
2110
|
+
type: string;
|
|
2111
|
+
content: string;
|
|
2112
|
+
metadata?: {} | undefined;
|
|
2113
|
+
conversationId?: string | undefined;
|
|
2114
|
+
name?: string | undefined;
|
|
2115
|
+
description?: string | undefined;
|
|
2116
|
+
memoryId?: string | undefined;
|
|
2117
|
+
}>;
|
|
2118
|
+
declare const updateArtifactRequest: z.ZodObject<{
|
|
2119
|
+
/** Artifact content */
|
|
2120
|
+
content: z.ZodOptional<z.ZodString>;
|
|
2121
|
+
/** Artifact type (e.g., note, document, code) */
|
|
2122
|
+
type: z.ZodOptional<z.ZodString>;
|
|
2123
|
+
/** Artifact name */
|
|
2124
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2125
|
+
/** Artifact description */
|
|
2126
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2127
|
+
/** Additional metadata */
|
|
2128
|
+
metadata: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
2129
|
+
}, "strip", z.ZodTypeAny, {
|
|
2130
|
+
metadata?: {} | undefined;
|
|
2131
|
+
type?: string | undefined;
|
|
2132
|
+
content?: string | undefined;
|
|
2133
|
+
name?: string | undefined;
|
|
2134
|
+
description?: string | undefined;
|
|
2135
|
+
}, {
|
|
2136
|
+
metadata?: {} | undefined;
|
|
2137
|
+
type?: string | undefined;
|
|
2138
|
+
content?: string | undefined;
|
|
2139
|
+
name?: string | undefined;
|
|
2140
|
+
description?: string | undefined;
|
|
2141
|
+
}>;
|
|
2142
|
+
declare const community: z.ZodObject<{
|
|
2143
|
+
/** Unique identifier for the community */
|
|
2144
|
+
id: z.ZodString;
|
|
2145
|
+
/** Community name */
|
|
2146
|
+
name: z.ZodString;
|
|
2147
|
+
/** Community description */
|
|
2148
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2149
|
+
/** Number of topics in this community */
|
|
2150
|
+
topicCount: z.ZodOptional<z.ZodNumber>;
|
|
2151
|
+
/** Creation timestamp */
|
|
2152
|
+
createdAt: z.ZodString;
|
|
2153
|
+
/** Last update timestamp */
|
|
2154
|
+
updatedAt: z.ZodString;
|
|
2155
|
+
}, "strip", z.ZodTypeAny, {
|
|
2156
|
+
id: string;
|
|
2157
|
+
createdAt: string;
|
|
2158
|
+
updatedAt: string;
|
|
2159
|
+
name: string;
|
|
2160
|
+
description?: string | null | undefined;
|
|
2161
|
+
topicCount?: number | undefined;
|
|
2162
|
+
}, {
|
|
2163
|
+
id: string;
|
|
2164
|
+
createdAt: string;
|
|
2165
|
+
updatedAt: string;
|
|
2166
|
+
name: string;
|
|
2167
|
+
description?: string | null | undefined;
|
|
2168
|
+
topicCount?: number | undefined;
|
|
2169
|
+
}>;
|
|
2170
|
+
declare const mergeCommunitiesRequest: z.ZodObject<{
|
|
2171
|
+
/** Source community ID to merge from */
|
|
2172
|
+
sourceCommunityId: z.ZodString;
|
|
2173
|
+
/** Target community ID to merge into */
|
|
2174
|
+
targetCommunityId: z.ZodString;
|
|
2175
|
+
}, "strip", z.ZodTypeAny, {
|
|
2176
|
+
sourceCommunityId: string;
|
|
2177
|
+
targetCommunityId: string;
|
|
2178
|
+
}, {
|
|
2179
|
+
sourceCommunityId: string;
|
|
2180
|
+
targetCommunityId: string;
|
|
2181
|
+
}>;
|
|
2182
|
+
declare const memoryRelationship: z.ZodObject<{
|
|
2183
|
+
/** Unique relationship identifier */
|
|
2184
|
+
id: z.ZodString;
|
|
2185
|
+
/** ID of the source memory (the memory that has the relationship) */
|
|
2186
|
+
sourceMemoryId: z.ZodString;
|
|
2187
|
+
/** ID of the target memory (the memory being related to) */
|
|
2188
|
+
targetMemoryId: z.ZodString;
|
|
2189
|
+
/** Type of relationship between memories */
|
|
2190
|
+
type: z.ZodEnum<["SUPERSEDES", "FOLLOWS", "RESOLVES", "CONTRADICTS", "REFERENCES"]>;
|
|
2191
|
+
/** Confidence score for the relationship (0-1) */
|
|
2192
|
+
confidence: z.ZodNumber;
|
|
2193
|
+
/** How the relationship was created */
|
|
2194
|
+
creationMethod: z.ZodEnum<["manual", "auto-semantic", "auto-temporal"]>;
|
|
2195
|
+
/** Human-readable explanation for why this relationship exists */
|
|
2196
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2197
|
+
/** When the relationship was created */
|
|
2198
|
+
createdAt: z.ZodString;
|
|
2199
|
+
}, "strip", z.ZodTypeAny, {
|
|
2200
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2201
|
+
id: string;
|
|
2202
|
+
createdAt: string;
|
|
2203
|
+
confidence: number;
|
|
2204
|
+
sourceMemoryId: string;
|
|
2205
|
+
targetMemoryId: string;
|
|
2206
|
+
creationMethod: "manual" | "auto-semantic" | "auto-temporal";
|
|
2207
|
+
reason?: string | undefined;
|
|
2208
|
+
}, {
|
|
2209
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2210
|
+
id: string;
|
|
2211
|
+
createdAt: string;
|
|
2212
|
+
confidence: number;
|
|
2213
|
+
sourceMemoryId: string;
|
|
2214
|
+
targetMemoryId: string;
|
|
2215
|
+
creationMethod: "manual" | "auto-semantic" | "auto-temporal";
|
|
2216
|
+
reason?: string | undefined;
|
|
2217
|
+
}>;
|
|
2218
|
+
declare const createMemoryRelationshipRequest: z.ZodObject<{
|
|
2219
|
+
/** ID of the target memory to create a relationship with */
|
|
2220
|
+
targetMemoryId: z.ZodString;
|
|
2221
|
+
/** Type of relationship between memories */
|
|
2222
|
+
type: z.ZodEnum<["SUPERSEDES", "FOLLOWS", "RESOLVES", "CONTRADICTS", "REFERENCES"]>;
|
|
2223
|
+
/** Confidence score for the relationship (0-1, defaults to 1.0 for manual) */
|
|
2224
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
2225
|
+
/** Optional explanation for the relationship */
|
|
2226
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2227
|
+
}, "strip", z.ZodTypeAny, {
|
|
2228
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2229
|
+
targetMemoryId: string;
|
|
2230
|
+
confidence?: number | undefined;
|
|
2231
|
+
reason?: string | undefined;
|
|
2232
|
+
}, {
|
|
2233
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2234
|
+
targetMemoryId: string;
|
|
2235
|
+
confidence?: number | undefined;
|
|
2236
|
+
reason?: string | undefined;
|
|
2237
|
+
}>;
|
|
2238
|
+
declare const memoryRelationshipsResponse: z.ZodLazy<z.ZodObject<{
|
|
2239
|
+
data: z.ZodArray<z.ZodObject<{
|
|
2240
|
+
/** Unique relationship identifier */
|
|
2241
|
+
id: z.ZodString;
|
|
2242
|
+
/** ID of the source memory (the memory that has the relationship) */
|
|
2243
|
+
sourceMemoryId: z.ZodString;
|
|
2244
|
+
/** ID of the target memory (the memory being related to) */
|
|
2245
|
+
targetMemoryId: z.ZodString;
|
|
2246
|
+
/** Type of relationship between memories */
|
|
2247
|
+
type: z.ZodEnum<["SUPERSEDES", "FOLLOWS", "RESOLVES", "CONTRADICTS", "REFERENCES"]>;
|
|
2248
|
+
/** Confidence score for the relationship (0-1) */
|
|
2249
|
+
confidence: z.ZodNumber;
|
|
2250
|
+
/** How the relationship was created */
|
|
2251
|
+
creationMethod: z.ZodEnum<["manual", "auto-semantic", "auto-temporal"]>;
|
|
2252
|
+
/** Human-readable explanation for why this relationship exists */
|
|
2253
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
2254
|
+
/** When the relationship was created */
|
|
2255
|
+
createdAt: z.ZodString;
|
|
2256
|
+
}, "strip", z.ZodTypeAny, {
|
|
2257
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2258
|
+
id: string;
|
|
2259
|
+
createdAt: string;
|
|
2260
|
+
confidence: number;
|
|
2261
|
+
sourceMemoryId: string;
|
|
2262
|
+
targetMemoryId: string;
|
|
2263
|
+
creationMethod: "manual" | "auto-semantic" | "auto-temporal";
|
|
2264
|
+
reason?: string | undefined;
|
|
2265
|
+
}, {
|
|
2266
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2267
|
+
id: string;
|
|
2268
|
+
createdAt: string;
|
|
2269
|
+
confidence: number;
|
|
2270
|
+
sourceMemoryId: string;
|
|
2271
|
+
targetMemoryId: string;
|
|
2272
|
+
creationMethod: "manual" | "auto-semantic" | "auto-temporal";
|
|
2273
|
+
reason?: string | undefined;
|
|
2274
|
+
}>, "many">;
|
|
2275
|
+
/** The source memory ID these relationships are for */
|
|
2276
|
+
sourceMemoryId: z.ZodString;
|
|
2277
|
+
/** Direction of relationships returned */
|
|
2278
|
+
direction: z.ZodEnum<["outgoing", "incoming", "both"]>;
|
|
2279
|
+
}, "strip", z.ZodTypeAny, {
|
|
2280
|
+
data: {
|
|
2281
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2282
|
+
id: string;
|
|
2283
|
+
createdAt: string;
|
|
2284
|
+
confidence: number;
|
|
2285
|
+
sourceMemoryId: string;
|
|
2286
|
+
targetMemoryId: string;
|
|
2287
|
+
creationMethod: "manual" | "auto-semantic" | "auto-temporal";
|
|
2288
|
+
reason?: string | undefined;
|
|
2289
|
+
}[];
|
|
2290
|
+
sourceMemoryId: string;
|
|
2291
|
+
direction: "outgoing" | "incoming" | "both";
|
|
2292
|
+
}, {
|
|
2293
|
+
data: {
|
|
2294
|
+
type: "SUPERSEDES" | "FOLLOWS" | "RESOLVES" | "CONTRADICTS" | "REFERENCES";
|
|
2295
|
+
id: string;
|
|
2296
|
+
createdAt: string;
|
|
2297
|
+
confidence: number;
|
|
2298
|
+
sourceMemoryId: string;
|
|
2299
|
+
targetMemoryId: string;
|
|
2300
|
+
creationMethod: "manual" | "auto-semantic" | "auto-temporal";
|
|
2301
|
+
reason?: string | undefined;
|
|
2302
|
+
}[];
|
|
2303
|
+
sourceMemoryId: string;
|
|
2304
|
+
direction: "outgoing" | "incoming" | "both";
|
|
2305
|
+
}>>;
|
|
2306
|
+
declare const narrativeThread: z.ZodObject<{
|
|
2307
|
+
/** Unique narrative thread identifier */
|
|
2308
|
+
id: z.ZodString;
|
|
2309
|
+
/** User ID who owns this narrative */
|
|
2310
|
+
userId: z.ZodString;
|
|
2311
|
+
/** Title describing the narrative thread */
|
|
2312
|
+
title: z.ZodString;
|
|
2313
|
+
/** Current state of the narrative thread */
|
|
2314
|
+
state: z.ZodEnum<["open", "resolved", "reopened", "superseded"]>;
|
|
2315
|
+
/** ID of the first memory in this narrative */
|
|
2316
|
+
rootMemoryId: z.ZodString;
|
|
2317
|
+
/** ID of the most recent memory in this narrative */
|
|
2318
|
+
currentMemoryId: z.ZodOptional<z.ZodString>;
|
|
2319
|
+
/** ID of the memory that resolved this narrative (if resolved) */
|
|
2320
|
+
resolutionMemoryId: z.ZodOptional<z.ZodString>;
|
|
2321
|
+
/** Topics associated with this narrative */
|
|
2322
|
+
topics: z.ZodArray<z.ZodString, "many">;
|
|
2323
|
+
/** Number of memories in this narrative */
|
|
2324
|
+
memoryCount: z.ZodNumber;
|
|
2325
|
+
/** When the narrative was created */
|
|
2326
|
+
createdAt: z.ZodString;
|
|
2327
|
+
/** When the narrative was last updated */
|
|
2328
|
+
updatedAt: z.ZodString;
|
|
2329
|
+
}, "strip", z.ZodTypeAny, {
|
|
2330
|
+
id: string;
|
|
2331
|
+
topics: string[];
|
|
2332
|
+
createdAt: string;
|
|
2333
|
+
updatedAt: string;
|
|
2334
|
+
title: string;
|
|
2335
|
+
userId: string;
|
|
2336
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2337
|
+
rootMemoryId: string;
|
|
2338
|
+
memoryCount: number;
|
|
2339
|
+
currentMemoryId?: string | undefined;
|
|
2340
|
+
resolutionMemoryId?: string | undefined;
|
|
2341
|
+
}, {
|
|
2342
|
+
id: string;
|
|
2343
|
+
topics: string[];
|
|
2344
|
+
createdAt: string;
|
|
2345
|
+
updatedAt: string;
|
|
2346
|
+
title: string;
|
|
2347
|
+
userId: string;
|
|
2348
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2349
|
+
rootMemoryId: string;
|
|
2350
|
+
memoryCount: number;
|
|
2351
|
+
currentMemoryId?: string | undefined;
|
|
2352
|
+
resolutionMemoryId?: string | undefined;
|
|
2353
|
+
}>;
|
|
2354
|
+
declare const createNarrativeRequest: z.ZodObject<{
|
|
2355
|
+
/** Title for the narrative thread */
|
|
2356
|
+
title: z.ZodString;
|
|
2357
|
+
/** ID of the first memory in this narrative */
|
|
2358
|
+
rootMemoryId: z.ZodString;
|
|
2359
|
+
/** Topics to associate with this narrative */
|
|
2360
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2361
|
+
}, "strip", z.ZodTypeAny, {
|
|
2362
|
+
title: string;
|
|
2363
|
+
rootMemoryId: string;
|
|
2364
|
+
topics?: string[] | undefined;
|
|
2365
|
+
}, {
|
|
2366
|
+
title: string;
|
|
2367
|
+
rootMemoryId: string;
|
|
2368
|
+
topics?: string[] | undefined;
|
|
2369
|
+
}>;
|
|
2370
|
+
declare const updateNarrativeRequest: z.ZodObject<{
|
|
2371
|
+
/** Updated title for the narrative */
|
|
2372
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2373
|
+
/** Current state of the narrative thread */
|
|
2374
|
+
state: z.ZodOptional<z.ZodEnum<["open", "resolved", "reopened", "superseded"]>>;
|
|
2375
|
+
/** ID of the memory that resolves this narrative */
|
|
2376
|
+
resolutionMemoryId: z.ZodOptional<z.ZodString>;
|
|
2377
|
+
/** Updated topics for the narrative */
|
|
2378
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2379
|
+
}, "strip", z.ZodTypeAny, {
|
|
2380
|
+
topics?: string[] | undefined;
|
|
2381
|
+
title?: string | undefined;
|
|
2382
|
+
state?: "superseded" | "open" | "resolved" | "reopened" | undefined;
|
|
2383
|
+
resolutionMemoryId?: string | undefined;
|
|
2384
|
+
}, {
|
|
2385
|
+
topics?: string[] | undefined;
|
|
2386
|
+
title?: string | undefined;
|
|
2387
|
+
state?: "superseded" | "open" | "resolved" | "reopened" | undefined;
|
|
2388
|
+
resolutionMemoryId?: string | undefined;
|
|
2389
|
+
}>;
|
|
2390
|
+
declare const addMemoryToNarrativeRequest: z.ZodObject<{
|
|
2391
|
+
/** ID of the memory to add to the narrative */
|
|
2392
|
+
memoryId: z.ZodString;
|
|
2393
|
+
/** Position in the narrative (0-indexed, omit for append) */
|
|
2394
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
2395
|
+
}, "strip", z.ZodTypeAny, {
|
|
2396
|
+
memoryId: string;
|
|
2397
|
+
position?: number | undefined;
|
|
2398
|
+
}, {
|
|
2399
|
+
memoryId: string;
|
|
2400
|
+
position?: number | undefined;
|
|
2401
|
+
}>;
|
|
2402
|
+
declare const narrativeMemory: z.ZodObject<{
|
|
2403
|
+
memory: z.ZodObject<{
|
|
2404
|
+
/** Unique memory identifier */
|
|
2405
|
+
id: z.ZodString;
|
|
2406
|
+
/** Memory content */
|
|
2407
|
+
content: z.ZodString;
|
|
2408
|
+
/** Type of memory */
|
|
2409
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
2410
|
+
/** Context or domain of the memory */
|
|
2411
|
+
context: z.ZodOptional<z.ZodString>;
|
|
2412
|
+
/** Associated topics */
|
|
2413
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2414
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
2415
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
2416
|
+
/** Event time (when the event actually occurred in reality) */
|
|
2417
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
2418
|
+
/** Validity start time (when this fact becomes valid) */
|
|
2419
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
2420
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
2421
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2422
|
+
/** Creation timestamp */
|
|
2423
|
+
createdAt: z.ZodString;
|
|
2424
|
+
/** Last update timestamp */
|
|
2425
|
+
updatedAt: z.ZodString;
|
|
2426
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
2427
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
2428
|
+
/** Basis for the confidence score */
|
|
2429
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
2430
|
+
/** Effective state of the memory in the narrative */
|
|
2431
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
2432
|
+
}, "strip", z.ZodTypeAny, {
|
|
2433
|
+
id: string;
|
|
2434
|
+
content: string;
|
|
2435
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2436
|
+
createdAt: string;
|
|
2437
|
+
updatedAt: string;
|
|
2438
|
+
context?: string | undefined;
|
|
2439
|
+
topics?: string[] | undefined;
|
|
2440
|
+
timestamp?: string | undefined;
|
|
2441
|
+
eventTime?: string | undefined;
|
|
2442
|
+
validFrom?: string | undefined;
|
|
2443
|
+
validTo?: string | null | undefined;
|
|
2444
|
+
confidenceScore?: number | undefined;
|
|
2445
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2446
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2447
|
+
}, {
|
|
2448
|
+
id: string;
|
|
2449
|
+
content: string;
|
|
2450
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2451
|
+
createdAt: string;
|
|
2452
|
+
updatedAt: string;
|
|
2453
|
+
context?: string | undefined;
|
|
2454
|
+
topics?: string[] | undefined;
|
|
2455
|
+
timestamp?: string | undefined;
|
|
2456
|
+
eventTime?: string | undefined;
|
|
2457
|
+
validFrom?: string | undefined;
|
|
2458
|
+
validTo?: string | null | undefined;
|
|
2459
|
+
confidenceScore?: number | undefined;
|
|
2460
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2461
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2462
|
+
}>;
|
|
2463
|
+
/** Position of this memory in the narrative (0-indexed) */
|
|
2464
|
+
position: z.ZodNumber;
|
|
2465
|
+
/** Effective state of this memory in the narrative context */
|
|
2466
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
2467
|
+
}, "strip", z.ZodTypeAny, {
|
|
2468
|
+
memory: {
|
|
2469
|
+
id: string;
|
|
2470
|
+
content: string;
|
|
2471
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2472
|
+
createdAt: string;
|
|
2473
|
+
updatedAt: string;
|
|
2474
|
+
context?: string | undefined;
|
|
2475
|
+
topics?: string[] | undefined;
|
|
2476
|
+
timestamp?: string | undefined;
|
|
2477
|
+
eventTime?: string | undefined;
|
|
2478
|
+
validFrom?: string | undefined;
|
|
2479
|
+
validTo?: string | null | undefined;
|
|
2480
|
+
confidenceScore?: number | undefined;
|
|
2481
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2482
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2483
|
+
};
|
|
2484
|
+
position: number;
|
|
2485
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2486
|
+
}, {
|
|
2487
|
+
memory: {
|
|
2488
|
+
id: string;
|
|
2489
|
+
content: string;
|
|
2490
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2491
|
+
createdAt: string;
|
|
2492
|
+
updatedAt: string;
|
|
2493
|
+
context?: string | undefined;
|
|
2494
|
+
topics?: string[] | undefined;
|
|
2495
|
+
timestamp?: string | undefined;
|
|
2496
|
+
eventTime?: string | undefined;
|
|
2497
|
+
validFrom?: string | undefined;
|
|
2498
|
+
validTo?: string | null | undefined;
|
|
2499
|
+
confidenceScore?: number | undefined;
|
|
2500
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2501
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2502
|
+
};
|
|
2503
|
+
position: number;
|
|
2504
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2505
|
+
}>;
|
|
2506
|
+
declare const narrativeTimelineResponse: z.ZodLazy<z.ZodObject<{
|
|
2507
|
+
data: z.ZodArray<z.ZodObject<{
|
|
2508
|
+
memory: z.ZodObject<{
|
|
2509
|
+
/** Unique memory identifier */
|
|
2510
|
+
id: z.ZodString;
|
|
2511
|
+
/** Memory content */
|
|
2512
|
+
content: z.ZodString;
|
|
2513
|
+
/** Type of memory */
|
|
2514
|
+
memoryType: z.ZodEnum<["episodic", "semantic", "procedural"]>;
|
|
2515
|
+
/** Context or domain of the memory */
|
|
2516
|
+
context: z.ZodOptional<z.ZodString>;
|
|
2517
|
+
/** Associated topics */
|
|
2518
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2519
|
+
/** System ingestion timestamp (when the system learned about this) */
|
|
2520
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
2521
|
+
/** Event time (when the event actually occurred in reality) */
|
|
2522
|
+
eventTime: z.ZodOptional<z.ZodString>;
|
|
2523
|
+
/** Validity start time (when this fact becomes valid) */
|
|
2524
|
+
validFrom: z.ZodOptional<z.ZodString>;
|
|
2525
|
+
/** Validity end time (when this fact expires, null means never expires) */
|
|
2526
|
+
validTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2527
|
+
/** Creation timestamp */
|
|
2528
|
+
createdAt: z.ZodString;
|
|
2529
|
+
/** Last update timestamp */
|
|
2530
|
+
updatedAt: z.ZodString;
|
|
2531
|
+
/** Confidence score (0-1) for this memory's accuracy */
|
|
2532
|
+
confidenceScore: z.ZodOptional<z.ZodNumber>;
|
|
2533
|
+
/** Basis for the confidence score */
|
|
2534
|
+
confidenceBasis: z.ZodOptional<z.ZodEnum<["direct-statement", "repeated-mention", "single-mention", "hedged", "inference", "external-source", "contradicted"]>>;
|
|
2535
|
+
/** Effective state of the memory in the narrative */
|
|
2536
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
2537
|
+
}, "strip", z.ZodTypeAny, {
|
|
2538
|
+
id: string;
|
|
2539
|
+
content: string;
|
|
2540
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2541
|
+
createdAt: string;
|
|
2542
|
+
updatedAt: string;
|
|
2543
|
+
context?: string | undefined;
|
|
2544
|
+
topics?: string[] | undefined;
|
|
2545
|
+
timestamp?: string | undefined;
|
|
2546
|
+
eventTime?: string | undefined;
|
|
2547
|
+
validFrom?: string | undefined;
|
|
2548
|
+
validTo?: string | null | undefined;
|
|
2549
|
+
confidenceScore?: number | undefined;
|
|
2550
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2551
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2552
|
+
}, {
|
|
2553
|
+
id: string;
|
|
2554
|
+
content: string;
|
|
2555
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2556
|
+
createdAt: string;
|
|
2557
|
+
updatedAt: string;
|
|
2558
|
+
context?: string | undefined;
|
|
2559
|
+
topics?: string[] | undefined;
|
|
2560
|
+
timestamp?: string | undefined;
|
|
2561
|
+
eventTime?: string | undefined;
|
|
2562
|
+
validFrom?: string | undefined;
|
|
2563
|
+
validTo?: string | null | undefined;
|
|
2564
|
+
confidenceScore?: number | undefined;
|
|
2565
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2566
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2567
|
+
}>;
|
|
2568
|
+
/** Position of this memory in the narrative (0-indexed) */
|
|
2569
|
+
position: z.ZodNumber;
|
|
2570
|
+
/** Effective state of this memory in the narrative context */
|
|
2571
|
+
effectiveState: z.ZodOptional<z.ZodEnum<["current", "superseded", "contradicted"]>>;
|
|
2572
|
+
}, "strip", z.ZodTypeAny, {
|
|
2573
|
+
memory: {
|
|
2574
|
+
id: string;
|
|
2575
|
+
content: string;
|
|
2576
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2577
|
+
createdAt: string;
|
|
2578
|
+
updatedAt: string;
|
|
2579
|
+
context?: string | undefined;
|
|
2580
|
+
topics?: string[] | undefined;
|
|
2581
|
+
timestamp?: string | undefined;
|
|
2582
|
+
eventTime?: string | undefined;
|
|
2583
|
+
validFrom?: string | undefined;
|
|
2584
|
+
validTo?: string | null | undefined;
|
|
2585
|
+
confidenceScore?: number | undefined;
|
|
2586
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2587
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2588
|
+
};
|
|
2589
|
+
position: number;
|
|
2590
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2591
|
+
}, {
|
|
2592
|
+
memory: {
|
|
2593
|
+
id: string;
|
|
2594
|
+
content: string;
|
|
2595
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2596
|
+
createdAt: string;
|
|
2597
|
+
updatedAt: string;
|
|
2598
|
+
context?: string | undefined;
|
|
2599
|
+
topics?: string[] | undefined;
|
|
2600
|
+
timestamp?: string | undefined;
|
|
2601
|
+
eventTime?: string | undefined;
|
|
2602
|
+
validFrom?: string | undefined;
|
|
2603
|
+
validTo?: string | null | undefined;
|
|
2604
|
+
confidenceScore?: number | undefined;
|
|
2605
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2606
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2607
|
+
};
|
|
2608
|
+
position: number;
|
|
2609
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2610
|
+
}>, "many">;
|
|
2611
|
+
narrative: z.ZodObject<{
|
|
2612
|
+
/** Unique narrative thread identifier */
|
|
2613
|
+
id: z.ZodString;
|
|
2614
|
+
/** User ID who owns this narrative */
|
|
2615
|
+
userId: z.ZodString;
|
|
2616
|
+
/** Title describing the narrative thread */
|
|
2617
|
+
title: z.ZodString;
|
|
2618
|
+
/** Current state of the narrative thread */
|
|
2619
|
+
state: z.ZodEnum<["open", "resolved", "reopened", "superseded"]>;
|
|
2620
|
+
/** ID of the first memory in this narrative */
|
|
2621
|
+
rootMemoryId: z.ZodString;
|
|
2622
|
+
/** ID of the most recent memory in this narrative */
|
|
2623
|
+
currentMemoryId: z.ZodOptional<z.ZodString>;
|
|
2624
|
+
/** ID of the memory that resolved this narrative (if resolved) */
|
|
2625
|
+
resolutionMemoryId: z.ZodOptional<z.ZodString>;
|
|
2626
|
+
/** Topics associated with this narrative */
|
|
2627
|
+
topics: z.ZodArray<z.ZodString, "many">;
|
|
2628
|
+
/** Number of memories in this narrative */
|
|
2629
|
+
memoryCount: z.ZodNumber;
|
|
2630
|
+
/** When the narrative was created */
|
|
2631
|
+
createdAt: z.ZodString;
|
|
2632
|
+
/** When the narrative was last updated */
|
|
2633
|
+
updatedAt: z.ZodString;
|
|
2634
|
+
}, "strip", z.ZodTypeAny, {
|
|
2635
|
+
id: string;
|
|
2636
|
+
topics: string[];
|
|
2637
|
+
createdAt: string;
|
|
2638
|
+
updatedAt: string;
|
|
2639
|
+
title: string;
|
|
2640
|
+
userId: string;
|
|
2641
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2642
|
+
rootMemoryId: string;
|
|
2643
|
+
memoryCount: number;
|
|
2644
|
+
currentMemoryId?: string | undefined;
|
|
2645
|
+
resolutionMemoryId?: string | undefined;
|
|
2646
|
+
}, {
|
|
2647
|
+
id: string;
|
|
2648
|
+
topics: string[];
|
|
2649
|
+
createdAt: string;
|
|
2650
|
+
updatedAt: string;
|
|
2651
|
+
title: string;
|
|
2652
|
+
userId: string;
|
|
2653
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2654
|
+
rootMemoryId: string;
|
|
2655
|
+
memoryCount: number;
|
|
2656
|
+
currentMemoryId?: string | undefined;
|
|
2657
|
+
resolutionMemoryId?: string | undefined;
|
|
2658
|
+
}>;
|
|
2659
|
+
pagination: z.ZodObject<{
|
|
2660
|
+
limit: z.ZodNumber;
|
|
2661
|
+
offset: z.ZodNumber;
|
|
2662
|
+
total: z.ZodNumber;
|
|
2663
|
+
}, "strip", z.ZodTypeAny, {
|
|
2664
|
+
limit: number;
|
|
2665
|
+
offset: number;
|
|
2666
|
+
total: number;
|
|
2667
|
+
}, {
|
|
2668
|
+
limit: number;
|
|
2669
|
+
offset: number;
|
|
2670
|
+
total: number;
|
|
2671
|
+
}>;
|
|
2672
|
+
}, "strip", z.ZodTypeAny, {
|
|
2673
|
+
data: {
|
|
2674
|
+
memory: {
|
|
2675
|
+
id: string;
|
|
2676
|
+
content: string;
|
|
2677
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2678
|
+
createdAt: string;
|
|
2679
|
+
updatedAt: string;
|
|
2680
|
+
context?: string | undefined;
|
|
2681
|
+
topics?: string[] | undefined;
|
|
2682
|
+
timestamp?: string | undefined;
|
|
2683
|
+
eventTime?: string | undefined;
|
|
2684
|
+
validFrom?: string | undefined;
|
|
2685
|
+
validTo?: string | null | undefined;
|
|
2686
|
+
confidenceScore?: number | undefined;
|
|
2687
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2688
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2689
|
+
};
|
|
2690
|
+
position: number;
|
|
2691
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2692
|
+
}[];
|
|
2693
|
+
pagination: {
|
|
2694
|
+
limit: number;
|
|
2695
|
+
offset: number;
|
|
2696
|
+
total: number;
|
|
2697
|
+
};
|
|
2698
|
+
narrative: {
|
|
2699
|
+
id: string;
|
|
2700
|
+
topics: string[];
|
|
2701
|
+
createdAt: string;
|
|
2702
|
+
updatedAt: string;
|
|
2703
|
+
title: string;
|
|
2704
|
+
userId: string;
|
|
2705
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2706
|
+
rootMemoryId: string;
|
|
2707
|
+
memoryCount: number;
|
|
2708
|
+
currentMemoryId?: string | undefined;
|
|
2709
|
+
resolutionMemoryId?: string | undefined;
|
|
2710
|
+
};
|
|
2711
|
+
}, {
|
|
2712
|
+
data: {
|
|
2713
|
+
memory: {
|
|
2714
|
+
id: string;
|
|
2715
|
+
content: string;
|
|
2716
|
+
memoryType: "episodic" | "semantic" | "procedural";
|
|
2717
|
+
createdAt: string;
|
|
2718
|
+
updatedAt: string;
|
|
2719
|
+
context?: string | undefined;
|
|
2720
|
+
topics?: string[] | undefined;
|
|
2721
|
+
timestamp?: string | undefined;
|
|
2722
|
+
eventTime?: string | undefined;
|
|
2723
|
+
validFrom?: string | undefined;
|
|
2724
|
+
validTo?: string | null | undefined;
|
|
2725
|
+
confidenceScore?: number | undefined;
|
|
2726
|
+
confidenceBasis?: "direct-statement" | "repeated-mention" | "single-mention" | "hedged" | "inference" | "external-source" | "contradicted" | undefined;
|
|
2727
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2728
|
+
};
|
|
2729
|
+
position: number;
|
|
2730
|
+
effectiveState?: "contradicted" | "current" | "superseded" | undefined;
|
|
2731
|
+
}[];
|
|
2732
|
+
pagination: {
|
|
2733
|
+
limit: number;
|
|
2734
|
+
offset: number;
|
|
2735
|
+
total: number;
|
|
2736
|
+
};
|
|
2737
|
+
narrative: {
|
|
2738
|
+
id: string;
|
|
2739
|
+
topics: string[];
|
|
2740
|
+
createdAt: string;
|
|
2741
|
+
updatedAt: string;
|
|
2742
|
+
title: string;
|
|
2743
|
+
userId: string;
|
|
2744
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2745
|
+
rootMemoryId: string;
|
|
2746
|
+
memoryCount: number;
|
|
2747
|
+
currentMemoryId?: string | undefined;
|
|
2748
|
+
resolutionMemoryId?: string | undefined;
|
|
2749
|
+
};
|
|
2750
|
+
}>>;
|
|
2751
|
+
declare const getNarrativeResponse: z.ZodLazy<z.ZodObject<{
|
|
2752
|
+
data: z.ZodObject<{
|
|
2753
|
+
/** Unique narrative thread identifier */
|
|
2754
|
+
id: z.ZodString;
|
|
2755
|
+
/** User ID who owns this narrative */
|
|
2756
|
+
userId: z.ZodString;
|
|
2757
|
+
/** Title describing the narrative thread */
|
|
2758
|
+
title: z.ZodString;
|
|
2759
|
+
/** Current state of the narrative thread */
|
|
2760
|
+
state: z.ZodEnum<["open", "resolved", "reopened", "superseded"]>;
|
|
2761
|
+
/** ID of the first memory in this narrative */
|
|
2762
|
+
rootMemoryId: z.ZodString;
|
|
2763
|
+
/** ID of the most recent memory in this narrative */
|
|
2764
|
+
currentMemoryId: z.ZodOptional<z.ZodString>;
|
|
2765
|
+
/** ID of the memory that resolved this narrative (if resolved) */
|
|
2766
|
+
resolutionMemoryId: z.ZodOptional<z.ZodString>;
|
|
2767
|
+
/** Topics associated with this narrative */
|
|
2768
|
+
topics: z.ZodArray<z.ZodString, "many">;
|
|
2769
|
+
/** Number of memories in this narrative */
|
|
2770
|
+
memoryCount: z.ZodNumber;
|
|
2771
|
+
/** When the narrative was created */
|
|
2772
|
+
createdAt: z.ZodString;
|
|
2773
|
+
/** When the narrative was last updated */
|
|
2774
|
+
updatedAt: z.ZodString;
|
|
2775
|
+
}, "strip", z.ZodTypeAny, {
|
|
2776
|
+
id: string;
|
|
2777
|
+
topics: string[];
|
|
2778
|
+
createdAt: string;
|
|
2779
|
+
updatedAt: string;
|
|
2780
|
+
title: string;
|
|
2781
|
+
userId: string;
|
|
2782
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2783
|
+
rootMemoryId: string;
|
|
2784
|
+
memoryCount: number;
|
|
2785
|
+
currentMemoryId?: string | undefined;
|
|
2786
|
+
resolutionMemoryId?: string | undefined;
|
|
2787
|
+
}, {
|
|
2788
|
+
id: string;
|
|
2789
|
+
topics: string[];
|
|
2790
|
+
createdAt: string;
|
|
2791
|
+
updatedAt: string;
|
|
2792
|
+
title: string;
|
|
2793
|
+
userId: string;
|
|
2794
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2795
|
+
rootMemoryId: string;
|
|
2796
|
+
memoryCount: number;
|
|
2797
|
+
currentMemoryId?: string | undefined;
|
|
2798
|
+
resolutionMemoryId?: string | undefined;
|
|
2799
|
+
}>;
|
|
2800
|
+
}, "strip", z.ZodTypeAny, {
|
|
2801
|
+
data: {
|
|
2802
|
+
id: string;
|
|
2803
|
+
topics: string[];
|
|
2804
|
+
createdAt: string;
|
|
2805
|
+
updatedAt: string;
|
|
2806
|
+
title: string;
|
|
2807
|
+
userId: string;
|
|
2808
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2809
|
+
rootMemoryId: string;
|
|
2810
|
+
memoryCount: number;
|
|
2811
|
+
currentMemoryId?: string | undefined;
|
|
2812
|
+
resolutionMemoryId?: string | undefined;
|
|
2813
|
+
};
|
|
2814
|
+
}, {
|
|
2815
|
+
data: {
|
|
2816
|
+
id: string;
|
|
2817
|
+
topics: string[];
|
|
2818
|
+
createdAt: string;
|
|
2819
|
+
updatedAt: string;
|
|
2820
|
+
title: string;
|
|
2821
|
+
userId: string;
|
|
2822
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2823
|
+
rootMemoryId: string;
|
|
2824
|
+
memoryCount: number;
|
|
2825
|
+
currentMemoryId?: string | undefined;
|
|
2826
|
+
resolutionMemoryId?: string | undefined;
|
|
2827
|
+
};
|
|
2828
|
+
}>>;
|
|
2829
|
+
declare const listNarrativesResponse: z.ZodLazy<z.ZodObject<{
|
|
2830
|
+
data: z.ZodArray<z.ZodObject<{
|
|
2831
|
+
/** Unique narrative thread identifier */
|
|
2832
|
+
id: z.ZodString;
|
|
2833
|
+
/** User ID who owns this narrative */
|
|
2834
|
+
userId: z.ZodString;
|
|
2835
|
+
/** Title describing the narrative thread */
|
|
2836
|
+
title: z.ZodString;
|
|
2837
|
+
/** Current state of the narrative thread */
|
|
2838
|
+
state: z.ZodEnum<["open", "resolved", "reopened", "superseded"]>;
|
|
2839
|
+
/** ID of the first memory in this narrative */
|
|
2840
|
+
rootMemoryId: z.ZodString;
|
|
2841
|
+
/** ID of the most recent memory in this narrative */
|
|
2842
|
+
currentMemoryId: z.ZodOptional<z.ZodString>;
|
|
2843
|
+
/** ID of the memory that resolved this narrative (if resolved) */
|
|
2844
|
+
resolutionMemoryId: z.ZodOptional<z.ZodString>;
|
|
2845
|
+
/** Topics associated with this narrative */
|
|
2846
|
+
topics: z.ZodArray<z.ZodString, "many">;
|
|
2847
|
+
/** Number of memories in this narrative */
|
|
2848
|
+
memoryCount: z.ZodNumber;
|
|
2849
|
+
/** When the narrative was created */
|
|
2850
|
+
createdAt: z.ZodString;
|
|
2851
|
+
/** When the narrative was last updated */
|
|
2852
|
+
updatedAt: z.ZodString;
|
|
2853
|
+
}, "strip", z.ZodTypeAny, {
|
|
2854
|
+
id: string;
|
|
2855
|
+
topics: string[];
|
|
2856
|
+
createdAt: string;
|
|
2857
|
+
updatedAt: string;
|
|
2858
|
+
title: string;
|
|
2859
|
+
userId: string;
|
|
2860
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2861
|
+
rootMemoryId: string;
|
|
2862
|
+
memoryCount: number;
|
|
2863
|
+
currentMemoryId?: string | undefined;
|
|
2864
|
+
resolutionMemoryId?: string | undefined;
|
|
2865
|
+
}, {
|
|
2866
|
+
id: string;
|
|
2867
|
+
topics: string[];
|
|
2868
|
+
createdAt: string;
|
|
2869
|
+
updatedAt: string;
|
|
2870
|
+
title: string;
|
|
2871
|
+
userId: string;
|
|
2872
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2873
|
+
rootMemoryId: string;
|
|
2874
|
+
memoryCount: number;
|
|
2875
|
+
currentMemoryId?: string | undefined;
|
|
2876
|
+
resolutionMemoryId?: string | undefined;
|
|
2877
|
+
}>, "many">;
|
|
2878
|
+
pagination: z.ZodObject<{
|
|
2879
|
+
limit: z.ZodNumber;
|
|
2880
|
+
offset: z.ZodNumber;
|
|
2881
|
+
count: z.ZodNumber;
|
|
2882
|
+
}, "strip", z.ZodTypeAny, {
|
|
2883
|
+
limit: number;
|
|
2884
|
+
offset: number;
|
|
2885
|
+
count: number;
|
|
2886
|
+
}, {
|
|
2887
|
+
limit: number;
|
|
2888
|
+
offset: number;
|
|
2889
|
+
count: number;
|
|
2890
|
+
}>;
|
|
2891
|
+
}, "strip", z.ZodTypeAny, {
|
|
2892
|
+
data: {
|
|
2893
|
+
id: string;
|
|
2894
|
+
topics: string[];
|
|
2895
|
+
createdAt: string;
|
|
2896
|
+
updatedAt: string;
|
|
2897
|
+
title: string;
|
|
2898
|
+
userId: string;
|
|
2899
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2900
|
+
rootMemoryId: string;
|
|
2901
|
+
memoryCount: number;
|
|
2902
|
+
currentMemoryId?: string | undefined;
|
|
2903
|
+
resolutionMemoryId?: string | undefined;
|
|
2904
|
+
}[];
|
|
2905
|
+
pagination: {
|
|
2906
|
+
limit: number;
|
|
2907
|
+
offset: number;
|
|
2908
|
+
count: number;
|
|
2909
|
+
};
|
|
2910
|
+
}, {
|
|
2911
|
+
data: {
|
|
2912
|
+
id: string;
|
|
2913
|
+
topics: string[];
|
|
2914
|
+
createdAt: string;
|
|
2915
|
+
updatedAt: string;
|
|
2916
|
+
title: string;
|
|
2917
|
+
userId: string;
|
|
2918
|
+
state: "superseded" | "open" | "resolved" | "reopened";
|
|
2919
|
+
rootMemoryId: string;
|
|
2920
|
+
memoryCount: number;
|
|
2921
|
+
currentMemoryId?: string | undefined;
|
|
2922
|
+
resolutionMemoryId?: string | undefined;
|
|
2923
|
+
}[];
|
|
2924
|
+
pagination: {
|
|
2925
|
+
limit: number;
|
|
2926
|
+
offset: number;
|
|
2927
|
+
count: number;
|
|
2928
|
+
};
|
|
2929
|
+
}>>;
|
|
2930
|
+
declare const user: z.ZodObject<{
|
|
2931
|
+
id: z.ZodString;
|
|
2932
|
+
email: z.ZodString;
|
|
2933
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
2934
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
2935
|
+
profilePictureUrl: z.ZodNullable<z.ZodString>;
|
|
2936
|
+
plan: z.ZodEnum<["free", "pro", "enterprise"]>;
|
|
2937
|
+
memoryLimit: z.ZodNumber;
|
|
2938
|
+
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
2939
|
+
createdAt: z.ZodString;
|
|
2940
|
+
updatedAt: z.ZodString;
|
|
2941
|
+
}, "strip", z.ZodTypeAny, {
|
|
2942
|
+
id: string;
|
|
2943
|
+
createdAt: string;
|
|
2944
|
+
updatedAt: string;
|
|
2945
|
+
email: string;
|
|
2946
|
+
firstName: string | null;
|
|
2947
|
+
lastName: string | null;
|
|
2948
|
+
profilePictureUrl: string | null;
|
|
2949
|
+
plan: "free" | "pro" | "enterprise";
|
|
2950
|
+
memoryLimit: number;
|
|
2951
|
+
retentionDays: number | null;
|
|
2952
|
+
}, {
|
|
2953
|
+
id: string;
|
|
2954
|
+
createdAt: string;
|
|
2955
|
+
updatedAt: string;
|
|
2956
|
+
email: string;
|
|
2957
|
+
firstName: string | null;
|
|
2958
|
+
lastName: string | null;
|
|
2959
|
+
profilePictureUrl: string | null;
|
|
2960
|
+
plan: "free" | "pro" | "enterprise";
|
|
2961
|
+
memoryLimit: number;
|
|
2962
|
+
retentionDays: number | null;
|
|
2963
|
+
}>;
|
|
2964
|
+
declare const userUsage: z.ZodObject<{
|
|
2965
|
+
memoriesUsed: z.ZodNumber;
|
|
2966
|
+
memoryLimit: z.ZodNumber;
|
|
2967
|
+
memoriesRemaining: z.ZodNumber;
|
|
2968
|
+
percentUsed: z.ZodNumber;
|
|
2969
|
+
plan: z.ZodEnum<["free", "pro", "enterprise"]>;
|
|
2970
|
+
periodStart: z.ZodString;
|
|
2971
|
+
periodEnd: z.ZodString;
|
|
2972
|
+
}, "strip", z.ZodTypeAny, {
|
|
2973
|
+
plan: "free" | "pro" | "enterprise";
|
|
2974
|
+
memoryLimit: number;
|
|
2975
|
+
memoriesUsed: number;
|
|
2976
|
+
memoriesRemaining: number;
|
|
2977
|
+
percentUsed: number;
|
|
2978
|
+
periodStart: string;
|
|
2979
|
+
periodEnd: string;
|
|
2980
|
+
}, {
|
|
2981
|
+
plan: "free" | "pro" | "enterprise";
|
|
2982
|
+
memoryLimit: number;
|
|
2983
|
+
memoriesUsed: number;
|
|
2984
|
+
memoriesRemaining: number;
|
|
2985
|
+
percentUsed: number;
|
|
2986
|
+
periodStart: string;
|
|
2987
|
+
periodEnd: string;
|
|
2988
|
+
}>;
|
|
2989
|
+
|
|
2990
|
+
/**
|
|
2991
|
+
* TypeScript types for API models.
|
|
2992
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
2993
|
+
*/
|
|
2994
|
+
|
|
2995
|
+
type Error$1 = z.infer<typeof error>;
|
|
2996
|
+
type Pagination = z.infer<typeof pagination>;
|
|
2997
|
+
type Memory = z.infer<typeof memory>;
|
|
2998
|
+
type CreateMemoryRequest = z.infer<typeof createMemoryRequest>;
|
|
2999
|
+
type UpdateMemoryRequest = z.infer<typeof updateMemoryRequest>;
|
|
3000
|
+
type CreateMemoryResponseMeta = z.infer<typeof createMemoryResponseMeta>;
|
|
3001
|
+
/**
|
|
3002
|
+
* Response from creating a memory, includes the memory and session/conversation metadata
|
|
3003
|
+
*/
|
|
3004
|
+
type CreateMemoryResponse = z.infer<typeof createMemoryResponse>;
|
|
3005
|
+
type RelatedMemoryResult = z.infer<typeof relatedMemoryResult>;
|
|
3006
|
+
/**
|
|
3007
|
+
* Response from getting a memory by ID
|
|
3008
|
+
*/
|
|
3009
|
+
type GetMemoryResponse = z.infer<typeof getMemoryResponse>;
|
|
3010
|
+
type GraphRAGQueryRequest = z.infer<typeof graphRAGQueryRequest>;
|
|
3011
|
+
type GraphRAGQueryResponse = z.infer<typeof graphRAGQueryResponse>;
|
|
3012
|
+
type Conversation = z.infer<typeof conversation>;
|
|
3013
|
+
type CreateConversationRequest = z.infer<typeof createConversationRequest>;
|
|
3014
|
+
type ApiKey = z.infer<typeof apiKey>;
|
|
3015
|
+
type Topic = z.infer<typeof topic>;
|
|
3016
|
+
type Pattern = z.infer<typeof pattern>;
|
|
3017
|
+
type ServiceCheck = z.infer<typeof serviceCheck>;
|
|
3018
|
+
type HealthCheck = z.infer<typeof healthCheck>;
|
|
3019
|
+
type SearchRequest = z.infer<typeof searchRequest>;
|
|
3020
|
+
type Entity = z.infer<typeof entity>;
|
|
3021
|
+
type TopicReference = z.infer<typeof topicReference>;
|
|
3022
|
+
type SearchResult = z.infer<typeof searchResult>;
|
|
3023
|
+
/**
|
|
3024
|
+
* Temporal query metadata (null for semantic/hybrid search)
|
|
3025
|
+
*/
|
|
3026
|
+
type TemporalMetadata = z.infer<typeof temporalMetadata>;
|
|
3027
|
+
type SearchResponse = z.infer<typeof searchResponse>;
|
|
3028
|
+
type Fact = z.infer<typeof fact>;
|
|
3029
|
+
type CreateFactRequest = z.infer<typeof createFactRequest>;
|
|
3030
|
+
type UpdateFactRequest = z.infer<typeof updateFactRequest>;
|
|
3031
|
+
type FactSearchRequest = z.infer<typeof factSearchRequest>;
|
|
3032
|
+
type Artifact = z.infer<typeof artifact>;
|
|
3033
|
+
type CreateArtifactRequest = z.infer<typeof createArtifactRequest>;
|
|
3034
|
+
type UpdateArtifactRequest = z.infer<typeof updateArtifactRequest>;
|
|
3035
|
+
type Community = z.infer<typeof community>;
|
|
3036
|
+
type MergeCommunitiesRequest = z.infer<typeof mergeCommunitiesRequest>;
|
|
3037
|
+
type MemoryRelationship = z.infer<typeof memoryRelationship>;
|
|
3038
|
+
type CreateMemoryRelationshipRequest = z.infer<typeof createMemoryRelationshipRequest>;
|
|
3039
|
+
type MemoryRelationshipsResponse = z.infer<typeof memoryRelationshipsResponse>;
|
|
3040
|
+
type NarrativeThread = z.infer<typeof narrativeThread>;
|
|
3041
|
+
type CreateNarrativeRequest = z.infer<typeof createNarrativeRequest>;
|
|
3042
|
+
type UpdateNarrativeRequest = z.infer<typeof updateNarrativeRequest>;
|
|
3043
|
+
type AddMemoryToNarrativeRequest = z.infer<typeof addMemoryToNarrativeRequest>;
|
|
3044
|
+
type NarrativeMemory = z.infer<typeof narrativeMemory>;
|
|
3045
|
+
type NarrativeTimelineResponse = z.infer<typeof narrativeTimelineResponse>;
|
|
3046
|
+
type GetNarrativeResponse = z.infer<typeof getNarrativeResponse>;
|
|
3047
|
+
type ListNarrativesResponse = z.infer<typeof listNarrativesResponse>;
|
|
3048
|
+
type User = z.infer<typeof user>;
|
|
3049
|
+
type UserUsage = z.infer<typeof userUsage>;
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* ApiKeysService - API key management endpoints API operations.
|
|
3053
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3054
|
+
*/
|
|
3055
|
+
|
|
3056
|
+
/**
|
|
3057
|
+
* API key management endpoints
|
|
3058
|
+
*/
|
|
3059
|
+
declare class ApiKeysService extends BaseService {
|
|
3060
|
+
/**
|
|
3061
|
+
* Get user information for current API key
|
|
3062
|
+
* Debug endpoint to retrieve user ID and authentication method from the current API key
|
|
3063
|
+
*/
|
|
3064
|
+
debugUser(): Promise<HttpResponse<{
|
|
3065
|
+
data?: {
|
|
3066
|
+
userId?: string;
|
|
3067
|
+
authMethod?: string;
|
|
3068
|
+
};
|
|
3069
|
+
}>>;
|
|
3070
|
+
/**
|
|
3071
|
+
* List API keys
|
|
3072
|
+
* List all API keys for the authenticated user
|
|
3073
|
+
*/
|
|
3074
|
+
listApiKeys(): Promise<HttpResponse<{
|
|
3075
|
+
data?: ApiKey[];
|
|
3076
|
+
}>>;
|
|
3077
|
+
/**
|
|
3078
|
+
* Create API key
|
|
3079
|
+
* Create a new API key for the authenticated user
|
|
3080
|
+
* @param body - Request body
|
|
3081
|
+
*/
|
|
3082
|
+
createApiKey(options?: {
|
|
3083
|
+
body?: {
|
|
3084
|
+
label?: string;
|
|
3085
|
+
expiresAt?: string;
|
|
3086
|
+
};
|
|
3087
|
+
}): Promise<HttpResponse<{
|
|
3088
|
+
data?: {
|
|
3089
|
+
apiKey?: string;
|
|
3090
|
+
keyInfo?: ApiKey;
|
|
3091
|
+
};
|
|
3092
|
+
}>>;
|
|
3093
|
+
/**
|
|
3094
|
+
* Delete API key
|
|
3095
|
+
* Delete (revoke) an API key by its ID
|
|
3096
|
+
* @param id - The API key ID
|
|
3097
|
+
*/
|
|
3098
|
+
deleteApiKey(id: string): Promise<HttpResponse<void>>;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* ArtifactsService - Artifact storage and retrieval endpoints API operations.
|
|
3103
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3104
|
+
*/
|
|
3105
|
+
|
|
3106
|
+
/**
|
|
3107
|
+
* Artifact storage and retrieval endpoints
|
|
3108
|
+
*/
|
|
3109
|
+
declare class ArtifactsService extends BaseService {
|
|
3110
|
+
/**
|
|
3111
|
+
* List artifacts
|
|
3112
|
+
* List all artifacts for the authenticated user with optional filters
|
|
3113
|
+
* @param limit - Maximum number of artifacts to return
|
|
3114
|
+
* @param offset - Number of artifacts to skip
|
|
3115
|
+
* @param memoryId - Filter by memory ID
|
|
3116
|
+
* @param conversationId - Filter by conversation ID
|
|
3117
|
+
* @param type - Filter by artifact type
|
|
3118
|
+
*/
|
|
3119
|
+
listArtifacts(options?: {
|
|
3120
|
+
limit?: number;
|
|
3121
|
+
offset?: number;
|
|
3122
|
+
memoryId?: string;
|
|
3123
|
+
conversationId?: string;
|
|
3124
|
+
type?: string;
|
|
3125
|
+
}): Promise<HttpResponse<{
|
|
3126
|
+
data?: Artifact[];
|
|
3127
|
+
count?: number;
|
|
3128
|
+
}>>;
|
|
3129
|
+
/**
|
|
3130
|
+
* Create artifact
|
|
3131
|
+
* Create a new artifact for the authenticated user
|
|
3132
|
+
* @param body - Request body
|
|
3133
|
+
*/
|
|
3134
|
+
createArtifact(body: {
|
|
3135
|
+
content: string;
|
|
3136
|
+
type: string;
|
|
3137
|
+
name?: string;
|
|
3138
|
+
description?: string;
|
|
3139
|
+
memoryId?: string;
|
|
3140
|
+
conversationId?: string;
|
|
3141
|
+
metadata?: Record<string, unknown>;
|
|
3142
|
+
}): Promise<HttpResponse<{
|
|
3143
|
+
data?: Artifact;
|
|
3144
|
+
}>>;
|
|
3145
|
+
/**
|
|
3146
|
+
* Get artifact by ID
|
|
3147
|
+
* Retrieve a specific artifact by its ID
|
|
3148
|
+
* @param id - The artifact ID
|
|
3149
|
+
*/
|
|
3150
|
+
getArtifactById(id: string): Promise<HttpResponse<{
|
|
3151
|
+
data?: Artifact;
|
|
3152
|
+
}>>;
|
|
3153
|
+
/**
|
|
3154
|
+
* Delete artifact
|
|
3155
|
+
* Delete an artifact by its ID
|
|
3156
|
+
* @param id - The artifact ID
|
|
3157
|
+
*/
|
|
3158
|
+
deleteArtifact(id: string): Promise<HttpResponse<void>>;
|
|
3159
|
+
/**
|
|
3160
|
+
* Update artifact
|
|
3161
|
+
* Update an existing artifact with partial data
|
|
3162
|
+
* @param id - The artifact ID
|
|
3163
|
+
* @param body - Request body
|
|
3164
|
+
*/
|
|
3165
|
+
updateArtifact(id: string, body: {
|
|
3166
|
+
content?: string;
|
|
3167
|
+
type?: string;
|
|
3168
|
+
name?: string;
|
|
3169
|
+
description?: string;
|
|
3170
|
+
metadata?: Record<string, unknown>;
|
|
3171
|
+
}): Promise<HttpResponse<{
|
|
3172
|
+
data?: Artifact;
|
|
3173
|
+
}>>;
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
/**
|
|
3177
|
+
* ConversationsService - Conversation tracking and analysis endpoints API operations.
|
|
3178
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3179
|
+
*/
|
|
3180
|
+
|
|
3181
|
+
/**
|
|
3182
|
+
* Conversation tracking and analysis endpoints
|
|
3183
|
+
*/
|
|
3184
|
+
declare class ConversationsService extends BaseService {
|
|
3185
|
+
/**
|
|
3186
|
+
* List conversations
|
|
3187
|
+
* List all conversations for the authenticated user with pagination
|
|
3188
|
+
* @param limit - Maximum number of conversations to return
|
|
3189
|
+
* @param offset - Number of conversations to skip
|
|
3190
|
+
*/
|
|
3191
|
+
listConversations(options?: {
|
|
3192
|
+
limit?: number;
|
|
3193
|
+
offset?: number;
|
|
3194
|
+
}): Promise<HttpResponse<{
|
|
3195
|
+
data?: Conversation[];
|
|
3196
|
+
pagination?: {
|
|
3197
|
+
limit?: number;
|
|
3198
|
+
offset?: number;
|
|
3199
|
+
count?: number;
|
|
3200
|
+
};
|
|
3201
|
+
}>>;
|
|
3202
|
+
/**
|
|
3203
|
+
* Create conversation
|
|
3204
|
+
* Create a new conversation for the authenticated user
|
|
3205
|
+
* @param body - Request body
|
|
3206
|
+
*/
|
|
3207
|
+
createConversation(body: {
|
|
3208
|
+
title: string;
|
|
3209
|
+
summary?: string;
|
|
3210
|
+
}): Promise<HttpResponse<{
|
|
3211
|
+
data?: Conversation;
|
|
3212
|
+
}>>;
|
|
3213
|
+
/**
|
|
3214
|
+
* Get conversation summary
|
|
3215
|
+
* Retrieve a conversation summary by its ID
|
|
3216
|
+
* @param conversationId - The conversation ID
|
|
3217
|
+
*/
|
|
3218
|
+
getConversationSummary(conversationId: string): Promise<HttpResponse<{
|
|
3219
|
+
data?: Conversation;
|
|
3220
|
+
}>>;
|
|
3221
|
+
/**
|
|
3222
|
+
* Delete conversation
|
|
3223
|
+
* Delete a conversation and soft-delete all associated memories
|
|
3224
|
+
* @param conversationId - The conversation ID
|
|
3225
|
+
*/
|
|
3226
|
+
deleteConversation(conversationId: string): Promise<HttpResponse<void>>;
|
|
3227
|
+
/**
|
|
3228
|
+
* Get conversation timeline
|
|
3229
|
+
* Get all memories in a conversation in chronological order
|
|
3230
|
+
* @param conversationId - The conversation ID
|
|
3231
|
+
*/
|
|
3232
|
+
getConversationTimeline(conversationId: string): Promise<HttpResponse<{
|
|
3233
|
+
data?: Memory[];
|
|
3234
|
+
count?: number;
|
|
3235
|
+
}>>;
|
|
3236
|
+
/**
|
|
3237
|
+
* Search conversations
|
|
3238
|
+
* Search conversations by query string
|
|
3239
|
+
* @param body - Request body
|
|
3240
|
+
*/
|
|
3241
|
+
searchConversations(body: {
|
|
3242
|
+
query: string;
|
|
3243
|
+
limit?: number;
|
|
3244
|
+
}): Promise<HttpResponse<{
|
|
3245
|
+
data?: Conversation[];
|
|
3246
|
+
count?: number;
|
|
3247
|
+
}>>;
|
|
3248
|
+
/**
|
|
3249
|
+
* Find conversations by topic
|
|
3250
|
+
* Find conversations that contain a specific topic
|
|
3251
|
+
* @param body - Request body
|
|
3252
|
+
*/
|
|
3253
|
+
findConversationsByTopic(body: {
|
|
3254
|
+
topicId: string;
|
|
3255
|
+
limit?: number;
|
|
3256
|
+
}): Promise<HttpResponse<{
|
|
3257
|
+
data?: Conversation[];
|
|
3258
|
+
count?: number;
|
|
3259
|
+
metadata?: {
|
|
3260
|
+
topicId?: string;
|
|
3261
|
+
};
|
|
3262
|
+
}>>;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
/**
|
|
3266
|
+
* FactsService - Fact extraction and management endpoints API operations.
|
|
3267
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3268
|
+
*/
|
|
3269
|
+
|
|
3270
|
+
/**
|
|
3271
|
+
* Fact extraction and management endpoints
|
|
3272
|
+
*/
|
|
3273
|
+
declare class FactsService extends BaseService {
|
|
3274
|
+
/**
|
|
3275
|
+
* List facts
|
|
3276
|
+
* List all facts for the authenticated user
|
|
3277
|
+
* @param limit - Maximum number of facts to return
|
|
3278
|
+
* @param offset - Number of facts to skip
|
|
3279
|
+
*/
|
|
3280
|
+
listFacts(options?: {
|
|
3281
|
+
limit?: number;
|
|
3282
|
+
offset?: number;
|
|
3283
|
+
}): Promise<HttpResponse<{
|
|
3284
|
+
data?: Fact[];
|
|
3285
|
+
count?: number;
|
|
3286
|
+
}>>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Create fact
|
|
3289
|
+
* Create a new semantic fact
|
|
3290
|
+
* @param body - Request body
|
|
3291
|
+
*/
|
|
3292
|
+
createFact(body: {
|
|
3293
|
+
subject: string;
|
|
3294
|
+
predicate: string;
|
|
3295
|
+
object: string;
|
|
3296
|
+
}): Promise<HttpResponse<{
|
|
3297
|
+
data?: Fact;
|
|
3298
|
+
}>>;
|
|
3299
|
+
/**
|
|
3300
|
+
* Get fact by ID
|
|
3301
|
+
* Retrieve a specific fact by its ID
|
|
3302
|
+
* @param id - The fact ID
|
|
3303
|
+
*/
|
|
3304
|
+
getFactById(id: string): Promise<HttpResponse<{
|
|
3305
|
+
data?: Fact;
|
|
3306
|
+
}>>;
|
|
3307
|
+
/**
|
|
3308
|
+
* Update fact
|
|
3309
|
+
* Update an existing fact completely
|
|
3310
|
+
* @param id - The fact ID
|
|
3311
|
+
* @param body - Request body
|
|
3312
|
+
*/
|
|
3313
|
+
updateFact(id: string, body: {
|
|
3314
|
+
subject?: string;
|
|
3315
|
+
predicate?: string;
|
|
3316
|
+
object?: string;
|
|
3317
|
+
confidence?: number;
|
|
3318
|
+
}): Promise<HttpResponse<{
|
|
3319
|
+
data?: Fact;
|
|
3320
|
+
}>>;
|
|
3321
|
+
/**
|
|
3322
|
+
* Delete fact
|
|
3323
|
+
* Delete a fact by its ID
|
|
3324
|
+
* @param id - The fact ID
|
|
3325
|
+
*/
|
|
3326
|
+
deleteFact(id: string): Promise<HttpResponse<void>>;
|
|
3327
|
+
/**
|
|
3328
|
+
* Search facts
|
|
3329
|
+
* Search semantic facts by query string
|
|
3330
|
+
* @param body - Request body
|
|
3331
|
+
*/
|
|
3332
|
+
searchFacts(body: {
|
|
3333
|
+
query: string;
|
|
3334
|
+
limit?: number;
|
|
3335
|
+
}): Promise<HttpResponse<{
|
|
3336
|
+
data?: Fact[];
|
|
3337
|
+
count?: number;
|
|
3338
|
+
metadata?: {
|
|
3339
|
+
query?: string;
|
|
3340
|
+
};
|
|
3341
|
+
}>>;
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3344
|
+
/**
|
|
3345
|
+
* GraphragService - Graph-based retrieval augmented generation endpoints API operations.
|
|
3346
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3347
|
+
*/
|
|
3348
|
+
|
|
3349
|
+
/**
|
|
3350
|
+
* Graph-based retrieval augmented generation endpoints
|
|
3351
|
+
*/
|
|
3352
|
+
declare class GraphragService extends BaseService {
|
|
3353
|
+
/**
|
|
3354
|
+
* Explain a GraphRAG query
|
|
3355
|
+
* Get explanation for a previously executed GraphRAG query result
|
|
3356
|
+
* @param queryId - The query ID to explain
|
|
3357
|
+
*/
|
|
3358
|
+
explainGraphRAGQuery(options?: {
|
|
3359
|
+
queryId?: string;
|
|
3360
|
+
}): Promise<HttpResponse<{
|
|
3361
|
+
data?: Record<string, unknown>;
|
|
3362
|
+
}>>;
|
|
3363
|
+
/**
|
|
3364
|
+
* Query communities
|
|
3365
|
+
* Query communities for relevant information using semantic search
|
|
3366
|
+
* @param body - Request body
|
|
3367
|
+
*/
|
|
3368
|
+
queryCommunities(body: {
|
|
3369
|
+
query: string;
|
|
3370
|
+
limit?: number;
|
|
3371
|
+
}): Promise<HttpResponse<{
|
|
3372
|
+
data?: Record<string, unknown>[];
|
|
3373
|
+
}>>;
|
|
3374
|
+
/**
|
|
3375
|
+
* Execute a GraphRAG query
|
|
3376
|
+
* Execute a graph-based retrieval augmented generation query
|
|
3377
|
+
* @param body - Request body
|
|
3378
|
+
*/
|
|
3379
|
+
executeGraphRAGQuery(body: {
|
|
3380
|
+
query: string;
|
|
3381
|
+
maxDepth?: number;
|
|
3382
|
+
depth?: number;
|
|
3383
|
+
limit?: number;
|
|
3384
|
+
includeRelationships?: boolean;
|
|
3385
|
+
}): Promise<HttpResponse<{
|
|
3386
|
+
data?: GraphRAGQueryResponse;
|
|
3387
|
+
}>>;
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
/**
|
|
3391
|
+
* HealthService - Health check endpoints API operations.
|
|
3392
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3393
|
+
*/
|
|
3394
|
+
|
|
3395
|
+
/**
|
|
3396
|
+
* Health check endpoints
|
|
3397
|
+
*/
|
|
3398
|
+
declare class HealthService extends BaseService {
|
|
3399
|
+
/**
|
|
3400
|
+
* API health check endpoint
|
|
3401
|
+
* Returns the health status and uptime of the API service.
|
|
3402
|
+
This endpoint is public and requires no authentication.
|
|
3403
|
+
Use this endpoint for monitoring, health checks, and service availability verification.
|
|
3404
|
+
|
|
3405
|
+
*/
|
|
3406
|
+
healthCheck(): Promise<HttpResponse<{
|
|
3407
|
+
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
3408
|
+
timestamp: string;
|
|
3409
|
+
version: string;
|
|
3410
|
+
uptime: number;
|
|
3411
|
+
checks: Record<string, unknown>;
|
|
3412
|
+
}>>;
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
/**
|
|
3416
|
+
* MemoriesService - Memory management and retrieval endpoints API operations.
|
|
3417
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3418
|
+
*/
|
|
3419
|
+
|
|
3420
|
+
/**
|
|
3421
|
+
* Memory management and retrieval endpoints
|
|
3422
|
+
*/
|
|
3423
|
+
declare class MemoriesService extends BaseService {
|
|
3424
|
+
/**
|
|
3425
|
+
* Get memory by ID
|
|
3426
|
+
* Retrieve a specific memory by its ID
|
|
3427
|
+
* @param id - The memory ID
|
|
3428
|
+
*/
|
|
3429
|
+
getMemoryById(id: string): Promise<HttpResponse<{
|
|
3430
|
+
data: Memory;
|
|
3431
|
+
}>>;
|
|
3432
|
+
/**
|
|
3433
|
+
* Update a memory
|
|
3434
|
+
* Update an existing memory for the authenticated user
|
|
3435
|
+
* @param id - Memory ID
|
|
3436
|
+
* @param body - Request body
|
|
3437
|
+
*/
|
|
3438
|
+
updateMemory(id: string, body: {
|
|
3439
|
+
content?: string;
|
|
3440
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
3441
|
+
context?: string;
|
|
3442
|
+
topics?: string[];
|
|
3443
|
+
}): Promise<HttpResponse<{
|
|
3444
|
+
data?: Memory;
|
|
3445
|
+
}>>;
|
|
3446
|
+
/**
|
|
3447
|
+
* Delete memory
|
|
3448
|
+
* Delete a memory by its ID
|
|
3449
|
+
* @param id - The memory ID
|
|
3450
|
+
*/
|
|
3451
|
+
deleteMemory(id: string): Promise<HttpResponse<void>>;
|
|
3452
|
+
/**
|
|
3453
|
+
* List memories
|
|
3454
|
+
* List all memories for the authenticated user with pagination.
|
|
3455
|
+
|
|
3456
|
+
**ID Prefix Search:**
|
|
3457
|
+
Use the `idPrefix` parameter for git-style short ID lookup. This enables efficient
|
|
3458
|
+
server-side filtering instead of fetching all memories and filtering client-side.
|
|
3459
|
+
- Minimum 6 characters required for `idPrefix`
|
|
3460
|
+
- Returns matching memories directly (no need for secondary fetch)
|
|
3461
|
+
- Example: `?idPrefix=2d09116a` finds memories starting with that prefix
|
|
3462
|
+
|
|
3463
|
+
* @param idPrefix - Filter memories by ID prefix (git-style short ID lookup). Minimum 6 characters.
|
|
3464
|
+
* @param limit - Maximum number of memories to return
|
|
3465
|
+
* @param offset - Number of memories to skip
|
|
3466
|
+
* @param page - Page number (alternative to offset)
|
|
3467
|
+
*/
|
|
3468
|
+
listMemories(options?: {
|
|
3469
|
+
idPrefix?: string;
|
|
3470
|
+
limit?: number;
|
|
3471
|
+
offset?: number;
|
|
3472
|
+
page?: number;
|
|
3473
|
+
}): Promise<HttpResponse<{
|
|
3474
|
+
data?: Memory[];
|
|
3475
|
+
pagination?: Pagination;
|
|
3476
|
+
}>>;
|
|
3477
|
+
/**
|
|
3478
|
+
* Create a memory
|
|
3479
|
+
* Create a new memory for the authenticated user.
|
|
3480
|
+
|
|
3481
|
+
**Conversation Management:**
|
|
3482
|
+
- Use `conversationId: "NEW"` to create a new conversation automatically
|
|
3483
|
+
- Provide an existing conversation ID to add to that conversation
|
|
3484
|
+
|
|
3485
|
+
**Session Management:**
|
|
3486
|
+
- Sessions are automatically assigned based on 90-minute gap detection
|
|
3487
|
+
- If the last memory in the conversation was within 90 minutes, the same session is reused
|
|
3488
|
+
- If the gap exceeds 90 minutes, a new session is created
|
|
3489
|
+
|
|
3490
|
+
**Response:**
|
|
3491
|
+
- Returns the created memory in `data` field
|
|
3492
|
+
- Returns session/conversation metadata in `meta` field
|
|
3493
|
+
|
|
3494
|
+
* @param body - Request body
|
|
3495
|
+
*/
|
|
3496
|
+
createMemory(body: {
|
|
3497
|
+
conversationId: string;
|
|
3498
|
+
content: string;
|
|
3499
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
3500
|
+
role?: 'user' | 'assistant' | 'system';
|
|
3501
|
+
context?: string;
|
|
3502
|
+
topics?: string[];
|
|
3503
|
+
eventTime?: string;
|
|
3504
|
+
validFrom?: string;
|
|
3505
|
+
validTo?: string;
|
|
3506
|
+
}): Promise<HttpResponse<{
|
|
3507
|
+
data: Memory;
|
|
3508
|
+
meta: CreateMemoryResponseMeta;
|
|
3509
|
+
}>>;
|
|
3510
|
+
/**
|
|
3511
|
+
* Search memories (GET)
|
|
3512
|
+
* Search memories using query parameters. Provides the same functionality as
|
|
3513
|
+
POST /api/memories/search but accepts parameters via query string.
|
|
3514
|
+
|
|
3515
|
+
**Benefits of GET:**
|
|
3516
|
+
- Faster response times (~3x improvement)
|
|
3517
|
+
- Browser/CDN caching support
|
|
3518
|
+
- Simpler integration for read-only clients
|
|
3519
|
+
|
|
3520
|
+
**Search Methods:**
|
|
3521
|
+
- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
3522
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
3523
|
+
- **keyword**: Traditional fulltext search using Lucene
|
|
3524
|
+
|
|
3525
|
+
**Array Parameters:**
|
|
3526
|
+
- `topics`: Provide as comma-separated values (e.g., `topics=typescript,api-design`)
|
|
3527
|
+
|
|
3528
|
+
* @param q - Search query string
|
|
3529
|
+
* @param searchMethod - Search algorithm to use
|
|
3530
|
+
* @param limit - Maximum number of results to return
|
|
3531
|
+
* @param offset - Number of results to skip for pagination
|
|
3532
|
+
* @param threshold - Minimum similarity threshold for semantic search
|
|
3533
|
+
* @param mode - Content filtering mode
|
|
3534
|
+
* @param vectorWeight - Weight for vector similarity in hybrid search
|
|
3535
|
+
* @param fulltextWeight - Weight for fulltext matching in hybrid search
|
|
3536
|
+
* @param topics - Comma-separated list of topics to filter by
|
|
3537
|
+
* @param memoryType - Filter by memory type
|
|
3538
|
+
* @param conversationId - Filter by conversation ID
|
|
3539
|
+
* @param explain - Include detailed match explanations in results
|
|
3540
|
+
* @param includeTopics - Include associated topics in results
|
|
3541
|
+
* @param includeEntities - Include mentioned entities in results
|
|
3542
|
+
* @param asOfTime - Point-in-time query (ISO 8601 datetime)
|
|
3543
|
+
* @param validAtTime - Filter by validity time (ISO 8601 datetime)
|
|
3544
|
+
* @param eventTimeFrom - Event time range start (ISO 8601 datetime)
|
|
3545
|
+
* @param eventTimeTo - Event time range end (ISO 8601 datetime)
|
|
3546
|
+
* @param ingestionTimeFrom - Ingestion time range start (ISO 8601 datetime)
|
|
3547
|
+
* @param ingestionTimeTo - Ingestion time range end (ISO 8601 datetime)
|
|
3548
|
+
* @param includeExpired - Include expired memories in results
|
|
3549
|
+
* @param temporalMode - Temporal query mode
|
|
3550
|
+
*/
|
|
3551
|
+
searchMemoriesGet(options?: {
|
|
3552
|
+
q?: string;
|
|
3553
|
+
searchMethod?: 'keyword' | 'semantic' | 'hybrid';
|
|
3554
|
+
limit?: number;
|
|
3555
|
+
offset?: number;
|
|
3556
|
+
threshold?: number;
|
|
3557
|
+
mode?: 'unified' | 'content' | 'facts';
|
|
3558
|
+
vectorWeight?: number;
|
|
3559
|
+
fulltextWeight?: number;
|
|
3560
|
+
topics?: string;
|
|
3561
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
3562
|
+
conversationId?: string;
|
|
3563
|
+
explain?: boolean;
|
|
3564
|
+
includeTopics?: boolean;
|
|
3565
|
+
includeEntities?: boolean;
|
|
3566
|
+
asOfTime?: string;
|
|
3567
|
+
validAtTime?: string;
|
|
3568
|
+
eventTimeFrom?: string;
|
|
3569
|
+
eventTimeTo?: string;
|
|
3570
|
+
ingestionTimeFrom?: string;
|
|
3571
|
+
ingestionTimeTo?: string;
|
|
3572
|
+
includeExpired?: boolean;
|
|
3573
|
+
temporalMode?: 'current' | 'historical' | 'evolution';
|
|
3574
|
+
}): Promise<HttpResponse<{
|
|
3575
|
+
data: SearchResult[];
|
|
3576
|
+
searchMethod?: string;
|
|
3577
|
+
pagination: {
|
|
3578
|
+
limit: number;
|
|
3579
|
+
offset: number;
|
|
3580
|
+
count: number;
|
|
3581
|
+
};
|
|
3582
|
+
temporalMetadata: TemporalMetadata;
|
|
3583
|
+
}>>;
|
|
3584
|
+
/**
|
|
3585
|
+
* Search all memories
|
|
3586
|
+
* Search memories using different search methods:
|
|
3587
|
+
- **hybrid** (default): Combines semantic and keyword search with Reciprocal Rank Fusion
|
|
3588
|
+
- **semantic**: Vector-based semantic search using OpenAI embeddings
|
|
3589
|
+
- **keyword**: Traditional fulltext search using Lucene
|
|
3590
|
+
|
|
3591
|
+
The `mode` parameter controls content filtering (unified, content, facts).
|
|
3592
|
+
The `searchMethod` parameter controls the search algorithm.
|
|
3593
|
+
|
|
3594
|
+
* @param body - Request body
|
|
3595
|
+
*/
|
|
3596
|
+
searchMemories(body: {
|
|
3597
|
+
query: string;
|
|
3598
|
+
mode?: 'unified' | 'content' | 'facts';
|
|
3599
|
+
searchMethod?: 'keyword' | 'semantic' | 'hybrid';
|
|
3600
|
+
limit?: number;
|
|
3601
|
+
offset?: number;
|
|
3602
|
+
vectorWeight?: number;
|
|
3603
|
+
fulltextWeight?: number;
|
|
3604
|
+
threshold?: number;
|
|
3605
|
+
explain?: boolean;
|
|
3606
|
+
asOfTime?: string;
|
|
3607
|
+
validAtTime?: string;
|
|
3608
|
+
eventTimeFrom?: string;
|
|
3609
|
+
eventTimeTo?: string;
|
|
3610
|
+
ingestionTimeFrom?: string;
|
|
3611
|
+
ingestionTimeTo?: string;
|
|
3612
|
+
includeExpired?: boolean;
|
|
3613
|
+
temporalMode?: 'current' | 'historical' | 'evolution';
|
|
3614
|
+
topics?: string[];
|
|
3615
|
+
memoryType?: 'episodic' | 'semantic' | 'procedural';
|
|
3616
|
+
conversationId?: string;
|
|
3617
|
+
includeTopics?: boolean;
|
|
3618
|
+
includeEntities?: boolean;
|
|
3619
|
+
}): Promise<HttpResponse<{
|
|
3620
|
+
data: SearchResult[];
|
|
3621
|
+
searchMethod?: string;
|
|
3622
|
+
pagination: {
|
|
3623
|
+
limit: number;
|
|
3624
|
+
offset: number;
|
|
3625
|
+
count: number;
|
|
3626
|
+
};
|
|
3627
|
+
temporalMetadata: TemporalMetadata;
|
|
3628
|
+
}>>;
|
|
3629
|
+
/**
|
|
3630
|
+
* Find similar memories
|
|
3631
|
+
* Find memories that are semantically similar to the given memory.
|
|
3632
|
+
|
|
3633
|
+
Uses vector similarity search if embeddings are available for the memory.
|
|
3634
|
+
Falls back to topic-based similarity if embeddings are not available.
|
|
3635
|
+
|
|
3636
|
+
The `relationship` field in results indicates the method used:
|
|
3637
|
+
- `similar` - Found via vector/semantic similarity
|
|
3638
|
+
- `similar-by-topic` - Fallback using shared topics
|
|
3639
|
+
|
|
3640
|
+
* @param id - The source memory ID
|
|
3641
|
+
* @param limit - Maximum number of similar memories to return
|
|
3642
|
+
*/
|
|
3643
|
+
getSimilarMemories(id: string, options?: {
|
|
3644
|
+
limit?: number;
|
|
3645
|
+
}): Promise<HttpResponse<{
|
|
3646
|
+
data?: RelatedMemoryResult[];
|
|
3647
|
+
sourceMemory?: Memory;
|
|
3648
|
+
}>>;
|
|
3649
|
+
/**
|
|
3650
|
+
* Find memories from same conversation
|
|
3651
|
+
* Find other memories that belong to the same conversation as the given memory.
|
|
3652
|
+
|
|
3653
|
+
Returns memories sorted chronologically (oldest first) to show the conversation flow.
|
|
3654
|
+
If the memory doesn't belong to a conversation, returns an empty array.
|
|
3655
|
+
|
|
3656
|
+
* @param id - The source memory ID
|
|
3657
|
+
* @param limit - Maximum number of conversation memories to return
|
|
3658
|
+
*/
|
|
3659
|
+
getConversationMemories(id: string, options?: {
|
|
3660
|
+
limit?: number;
|
|
3661
|
+
}): Promise<HttpResponse<{
|
|
3662
|
+
data?: RelatedMemoryResult[];
|
|
3663
|
+
sourceMemory?: Memory;
|
|
3664
|
+
conversationId?: string;
|
|
3665
|
+
}>>;
|
|
3666
|
+
/**
|
|
3667
|
+
* Find related memories by topics
|
|
3668
|
+
* Find memories that share topics with the given memory.
|
|
3669
|
+
|
|
3670
|
+
The score indicates the ratio of shared topics (1.0 = all topics match).
|
|
3671
|
+
Results are sorted by score (most related first), then by timestamp.
|
|
3672
|
+
|
|
3673
|
+
If the source memory has no topics, returns an empty array.
|
|
3674
|
+
|
|
3675
|
+
* @param id - The source memory ID
|
|
3676
|
+
* @param limit - Maximum number of related memories to return
|
|
3677
|
+
*/
|
|
3678
|
+
getRelatedMemories(id: string, options?: {
|
|
3679
|
+
limit?: number;
|
|
3680
|
+
}): Promise<HttpResponse<{
|
|
3681
|
+
data?: {
|
|
3682
|
+
memory: {
|
|
3683
|
+
id: string;
|
|
3684
|
+
content: string;
|
|
3685
|
+
memoryType: 'episodic' | 'semantic' | 'procedural';
|
|
3686
|
+
context?: string;
|
|
3687
|
+
topics?: string[];
|
|
3688
|
+
timestamp?: string;
|
|
3689
|
+
eventTime?: string;
|
|
3690
|
+
validFrom?: string;
|
|
3691
|
+
validTo?: string;
|
|
3692
|
+
createdAt: string;
|
|
3693
|
+
updatedAt: string;
|
|
3694
|
+
confidenceScore?: number;
|
|
3695
|
+
confidenceBasis?: 'direct-statement' | 'repeated-mention' | 'single-mention' | 'hedged' | 'inference' | 'external-source' | 'contradicted';
|
|
3696
|
+
effectiveState?: 'current' | 'superseded' | 'contradicted';
|
|
3697
|
+
};
|
|
3698
|
+
score: number;
|
|
3699
|
+
relationship: string;
|
|
3700
|
+
sharedTopics?: string[];
|
|
3701
|
+
}[];
|
|
3702
|
+
sourceMemory?: Memory;
|
|
3703
|
+
}>>;
|
|
3704
|
+
/**
|
|
3705
|
+
* Get relationships for a memory
|
|
3706
|
+
* Retrieve all relationships for a memory.
|
|
3707
|
+
|
|
3708
|
+
**Direction Options:**
|
|
3709
|
+
- **outgoing**: Relationships where this memory is the source
|
|
3710
|
+
- **incoming**: Relationships where this memory is the target
|
|
3711
|
+
- **both**: All relationships involving this memory
|
|
3712
|
+
|
|
3713
|
+
* @param id - The memory ID
|
|
3714
|
+
* @param direction - Direction of relationships to retrieve
|
|
3715
|
+
*/
|
|
3716
|
+
getMemoryRelationships(id: string, options?: {
|
|
3717
|
+
direction?: 'outgoing' | 'incoming' | 'both';
|
|
3718
|
+
}): Promise<HttpResponse<{
|
|
3719
|
+
data: MemoryRelationship[];
|
|
3720
|
+
sourceMemoryId: string;
|
|
3721
|
+
direction: 'outgoing' | 'incoming' | 'both';
|
|
3722
|
+
}>>;
|
|
3723
|
+
/**
|
|
3724
|
+
* Create a relationship between memories
|
|
3725
|
+
* Create a relationship between the source memory and a target memory.
|
|
3726
|
+
|
|
3727
|
+
**Relationship Types:**
|
|
3728
|
+
- **SUPERSEDES**: The source memory replaces/updates the target memory
|
|
3729
|
+
- **FOLLOWS**: The source memory follows chronologically from the target
|
|
3730
|
+
- **RESOLVES**: The source memory resolves an issue mentioned in the target
|
|
3731
|
+
- **CONTRADICTS**: The source memory contradicts the target memory
|
|
3732
|
+
- **REFERENCES**: The source memory references the target memory
|
|
3733
|
+
|
|
3734
|
+
When creating SUPERSEDES or CONTRADICTS relationships, the target memory's
|
|
3735
|
+
effectiveState will be automatically updated.
|
|
3736
|
+
|
|
3737
|
+
* @param id - The source memory ID
|
|
3738
|
+
* @param body - Request body
|
|
3739
|
+
*/
|
|
3740
|
+
createMemoryRelationship(id: string, body: {
|
|
3741
|
+
targetMemoryId: string;
|
|
3742
|
+
type: 'SUPERSEDES' | 'FOLLOWS' | 'RESOLVES' | 'CONTRADICTS' | 'REFERENCES';
|
|
3743
|
+
confidence?: number;
|
|
3744
|
+
reason?: string;
|
|
3745
|
+
}): Promise<HttpResponse<{
|
|
3746
|
+
data?: MemoryRelationship;
|
|
3747
|
+
}>>;
|
|
3748
|
+
/**
|
|
3749
|
+
* Delete a relationship
|
|
3750
|
+
* Delete a specific relationship from a memory
|
|
3751
|
+
* @param id - The source memory ID
|
|
3752
|
+
* @param relationshipId - The relationship ID to delete
|
|
3753
|
+
*/
|
|
3754
|
+
deleteMemoryRelationship(id: string, relationshipId: string): Promise<HttpResponse<void>>;
|
|
3755
|
+
/**
|
|
3756
|
+
* Get timeline context for a memory
|
|
3757
|
+
* Get the chronological context around a memory.
|
|
3758
|
+
Returns preceding and following memories ordered by event time.
|
|
3759
|
+
Useful for understanding the narrative flow.
|
|
3760
|
+
|
|
3761
|
+
* @param id - The memory ID
|
|
3762
|
+
* @param before - Number of preceding memories to return
|
|
3763
|
+
* @param after - Number of following memories to return
|
|
3764
|
+
*/
|
|
3765
|
+
getMemoryTimeline(id: string, options?: {
|
|
3766
|
+
before?: number;
|
|
3767
|
+
after?: number;
|
|
3768
|
+
}): Promise<HttpResponse<{
|
|
3769
|
+
data?: {
|
|
3770
|
+
memory?: Memory;
|
|
3771
|
+
preceding?: Memory[];
|
|
3772
|
+
following?: Memory[];
|
|
3773
|
+
};
|
|
3774
|
+
}>>;
|
|
3775
|
+
/**
|
|
3776
|
+
* Detect potential relationships for a memory
|
|
3777
|
+
* Analyze a memory and detect potential relationships with other memories.
|
|
3778
|
+
Uses semantic similarity and pattern detection to suggest relationships.
|
|
3779
|
+
|
|
3780
|
+
Set `autoCreate: true` to automatically create high-confidence relationships.
|
|
3781
|
+
|
|
3782
|
+
* @param id - The memory ID
|
|
3783
|
+
* @param body - Request body
|
|
3784
|
+
*/
|
|
3785
|
+
detectMemoryRelationships(id: string, options?: {
|
|
3786
|
+
body?: {
|
|
3787
|
+
autoCreate?: boolean;
|
|
3788
|
+
minConfidence?: number;
|
|
3789
|
+
};
|
|
3790
|
+
}): Promise<HttpResponse<{
|
|
3791
|
+
data?: {
|
|
3792
|
+
targetMemoryId?: string;
|
|
3793
|
+
type?: 'SUPERSEDES' | 'FOLLOWS' | 'RESOLVES' | 'CONTRADICTS' | 'REFERENCES';
|
|
3794
|
+
confidence?: number;
|
|
3795
|
+
reason?: string;
|
|
3796
|
+
}[];
|
|
3797
|
+
autoCreated?: boolean;
|
|
3798
|
+
}>>;
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
/**
|
|
3802
|
+
* NarrativesService - Narrative thread management endpoints API operations.
|
|
3803
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3804
|
+
*/
|
|
3805
|
+
|
|
3806
|
+
/**
|
|
3807
|
+
* Narrative thread management endpoints
|
|
3808
|
+
*/
|
|
3809
|
+
declare class NarrativesService extends BaseService {
|
|
3810
|
+
/**
|
|
3811
|
+
* List narrative threads
|
|
3812
|
+
* List all narrative threads for the authenticated user.
|
|
3813
|
+
Narratives group related memories into coherent storylines.
|
|
3814
|
+
|
|
3815
|
+
* @param limit - Maximum number of narratives to return
|
|
3816
|
+
* @param offset - Number of narratives to skip
|
|
3817
|
+
* @param state - Filter by narrative state
|
|
3818
|
+
* @param topics - Comma-separated list of topics to filter by
|
|
3819
|
+
*/
|
|
3820
|
+
listNarratives(options?: {
|
|
3821
|
+
limit?: number;
|
|
3822
|
+
offset?: number;
|
|
3823
|
+
state?: 'open' | 'resolved' | 'reopened' | 'superseded';
|
|
3824
|
+
topics?: string;
|
|
3825
|
+
}): Promise<HttpResponse<{
|
|
3826
|
+
data: NarrativeThread[];
|
|
3827
|
+
pagination: {
|
|
3828
|
+
limit: number;
|
|
3829
|
+
offset: number;
|
|
3830
|
+
count: number;
|
|
3831
|
+
};
|
|
3832
|
+
}>>;
|
|
3833
|
+
/**
|
|
3834
|
+
* Create a narrative thread
|
|
3835
|
+
* Create a new narrative thread starting from a root memory.
|
|
3836
|
+
Narratives help organize related memories into coherent storylines.
|
|
3837
|
+
|
|
3838
|
+
* @param body - Request body
|
|
3839
|
+
*/
|
|
3840
|
+
createNarrative(body: {
|
|
3841
|
+
title: string;
|
|
3842
|
+
rootMemoryId: string;
|
|
3843
|
+
topics?: string[];
|
|
3844
|
+
}): Promise<HttpResponse<{
|
|
3845
|
+
data: NarrativeThread;
|
|
3846
|
+
}>>;
|
|
3847
|
+
/**
|
|
3848
|
+
* Get a narrative thread
|
|
3849
|
+
* Retrieve a specific narrative thread by ID
|
|
3850
|
+
* @param id - The narrative ID
|
|
3851
|
+
*/
|
|
3852
|
+
getNarrative(id: string): Promise<HttpResponse<{
|
|
3853
|
+
data: NarrativeThread;
|
|
3854
|
+
}>>;
|
|
3855
|
+
/**
|
|
3856
|
+
* Delete a narrative thread
|
|
3857
|
+
* Delete a narrative thread.
|
|
3858
|
+
This does not delete the associated memories, only the narrative structure.
|
|
3859
|
+
|
|
3860
|
+
* @param id - The narrative ID
|
|
3861
|
+
*/
|
|
3862
|
+
deleteNarrative(id: string): Promise<HttpResponse<void>>;
|
|
3863
|
+
/**
|
|
3864
|
+
* Update a narrative thread
|
|
3865
|
+
* Update a narrative thread's title, topics, or state.
|
|
3866
|
+
Use this to resolve, reopen, or modify narratives.
|
|
3867
|
+
|
|
3868
|
+
* @param id - The narrative ID
|
|
3869
|
+
* @param body - Request body
|
|
3870
|
+
*/
|
|
3871
|
+
updateNarrative(id: string, body: {
|
|
3872
|
+
title?: string;
|
|
3873
|
+
state?: 'open' | 'resolved' | 'reopened' | 'superseded';
|
|
3874
|
+
resolutionMemoryId?: string;
|
|
3875
|
+
topics?: string[];
|
|
3876
|
+
}): Promise<HttpResponse<{
|
|
3877
|
+
data: NarrativeThread;
|
|
3878
|
+
}>>;
|
|
3879
|
+
/**
|
|
3880
|
+
* Get narrative timeline
|
|
3881
|
+
* Get all memories in a narrative, ordered by their position in the narrative.
|
|
3882
|
+
Each memory includes its position and effective state.
|
|
3883
|
+
|
|
3884
|
+
* @param id - The narrative ID
|
|
3885
|
+
* @param limit - Maximum number of memories to return
|
|
3886
|
+
* @param offset - Number of memories to skip
|
|
3887
|
+
*/
|
|
3888
|
+
getNarrativeTimeline(id: string, options?: {
|
|
3889
|
+
limit?: number;
|
|
3890
|
+
offset?: number;
|
|
3891
|
+
}): Promise<HttpResponse<{
|
|
3892
|
+
data: NarrativeMemory[];
|
|
3893
|
+
narrative: NarrativeThread;
|
|
3894
|
+
pagination: {
|
|
3895
|
+
limit: number;
|
|
3896
|
+
offset: number;
|
|
3897
|
+
total: number;
|
|
3898
|
+
};
|
|
3899
|
+
}>>;
|
|
3900
|
+
/**
|
|
3901
|
+
* Add a memory to a narrative
|
|
3902
|
+
* Add an existing memory to a narrative thread.
|
|
3903
|
+
Optionally specify a position to insert the memory at.
|
|
3904
|
+
|
|
3905
|
+
* @param id - The narrative ID
|
|
3906
|
+
* @param body - Request body
|
|
3907
|
+
*/
|
|
3908
|
+
addMemoryToNarrative(id: string, body: {
|
|
3909
|
+
memoryId: string;
|
|
3910
|
+
position?: number;
|
|
3911
|
+
}): Promise<HttpResponse<{
|
|
3912
|
+
data: NarrativeThread;
|
|
3913
|
+
}>>;
|
|
3914
|
+
/**
|
|
3915
|
+
* Remove a memory from a narrative
|
|
3916
|
+
* Remove a memory from a narrative thread.
|
|
3917
|
+
This does not delete the memory itself, only removes it from the narrative.
|
|
3918
|
+
|
|
3919
|
+
* @param id - The narrative ID
|
|
3920
|
+
* @param memoryId - The memory ID to remove
|
|
3921
|
+
*/
|
|
3922
|
+
removeMemoryFromNarrative(id: string, memoryId: string): Promise<HttpResponse<void>>;
|
|
3923
|
+
}
|
|
3924
|
+
|
|
3925
|
+
/**
|
|
3926
|
+
* SystemService - System health, monitoring, and configuration endpoints API operations.
|
|
3927
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
3928
|
+
*/
|
|
3929
|
+
|
|
3930
|
+
/**
|
|
3931
|
+
* System health, monitoring, and configuration endpoints
|
|
3932
|
+
*/
|
|
3933
|
+
declare class SystemService extends BaseService {
|
|
3934
|
+
/**
|
|
3935
|
+
* Get OpenAPI specification
|
|
3936
|
+
* Returns the OpenAPI 3.x specification for the entire API. This endpoint is used by CI/CD to sync the API Gateway.
|
|
3937
|
+
* @param noCache - Bypass cache and regenerate specification
|
|
3938
|
+
*/
|
|
3939
|
+
getOpenApiSpec(options?: {
|
|
3940
|
+
noCache?: '1' | 'true';
|
|
3941
|
+
}): Promise<HttpResponse<Record<string, unknown>>>;
|
|
3942
|
+
/**
|
|
3943
|
+
* Get system health status
|
|
3944
|
+
* Get the current health status of the system including database connectivity
|
|
3945
|
+
*/
|
|
3946
|
+
getSystemHealth(): Promise<HttpResponse<{
|
|
3947
|
+
data?: {
|
|
3948
|
+
status?: 'healthy' | 'unhealthy';
|
|
3949
|
+
database?: Record<string, unknown>;
|
|
3950
|
+
uptime?: number;
|
|
3951
|
+
};
|
|
3952
|
+
}>>;
|
|
3953
|
+
/**
|
|
3954
|
+
* Get context status
|
|
3955
|
+
* Get database statistics and context information
|
|
3956
|
+
*/
|
|
3957
|
+
getContextStatus(): Promise<HttpResponse<{
|
|
3958
|
+
data?: Record<string, unknown>;
|
|
3959
|
+
}>>;
|
|
3960
|
+
/**
|
|
3961
|
+
* Get feature flags
|
|
3962
|
+
* Get all feature flags for the authenticated user
|
|
3963
|
+
*/
|
|
3964
|
+
getFeatureFlags(): Promise<HttpResponse<{
|
|
3965
|
+
data?: Record<string, unknown>;
|
|
3966
|
+
}>>;
|
|
3967
|
+
/**
|
|
3968
|
+
* Evaluate feature flag
|
|
3969
|
+
* Evaluate a specific feature flag for the authenticated user
|
|
3970
|
+
* @param body - Request body
|
|
3971
|
+
*/
|
|
3972
|
+
evaluateFeatureFlag(body: {
|
|
3973
|
+
flagName: string;
|
|
3974
|
+
context?: Record<string, unknown>;
|
|
3975
|
+
}): Promise<HttpResponse<{
|
|
3976
|
+
data?: {
|
|
3977
|
+
enabled?: boolean;
|
|
3978
|
+
flagName?: string;
|
|
3979
|
+
};
|
|
3980
|
+
}>>;
|
|
3981
|
+
/**
|
|
3982
|
+
* Analyze memory quality distribution
|
|
3983
|
+
* Analyze the quality distribution of memories for the authenticated user
|
|
3984
|
+
* @param includeDetails - Include detailed pruning candidate information
|
|
3985
|
+
* @param minQualityThreshold - Minimum quality threshold for pruning candidates (default 0.4)
|
|
3986
|
+
*/
|
|
3987
|
+
analyzeMemoryQuality(options?: {
|
|
3988
|
+
includeDetails?: boolean;
|
|
3989
|
+
minQualityThreshold?: number;
|
|
3990
|
+
}): Promise<HttpResponse<{
|
|
3991
|
+
data?: {
|
|
3992
|
+
totalMemories?: number;
|
|
3993
|
+
qualityDistribution?: {
|
|
3994
|
+
high?: number;
|
|
3995
|
+
medium?: number;
|
|
3996
|
+
low?: number;
|
|
3997
|
+
};
|
|
3998
|
+
averageQuality?: number;
|
|
3999
|
+
pruningCandidates?: number;
|
|
4000
|
+
};
|
|
4001
|
+
}>>;
|
|
4002
|
+
/**
|
|
4003
|
+
* Prune low-quality memories
|
|
4004
|
+
* Prune (soft delete) low-quality memories for the authenticated user
|
|
4005
|
+
* @param body - Request body
|
|
4006
|
+
*/
|
|
4007
|
+
pruneMemories(options?: {
|
|
4008
|
+
body?: {
|
|
4009
|
+
targetReduction?: number;
|
|
4010
|
+
minQualityThreshold?: number;
|
|
4011
|
+
preserveRecent?: boolean;
|
|
4012
|
+
recentDaysToPreserve?: number;
|
|
4013
|
+
dryRun?: boolean;
|
|
4014
|
+
};
|
|
4015
|
+
}): Promise<HttpResponse<{
|
|
4016
|
+
data?: {
|
|
4017
|
+
prunedCount?: number;
|
|
4018
|
+
prunedIds?: string[];
|
|
4019
|
+
dryRun?: boolean;
|
|
4020
|
+
};
|
|
4021
|
+
}>>;
|
|
4022
|
+
}
|
|
4023
|
+
|
|
4024
|
+
/**
|
|
4025
|
+
* PatternsService - Pattern detection and behavioral analysis endpoints API operations.
|
|
4026
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
4027
|
+
*/
|
|
4028
|
+
|
|
4029
|
+
/**
|
|
4030
|
+
* Pattern detection and behavioral analysis endpoints
|
|
4031
|
+
*/
|
|
4032
|
+
declare class PatternsService extends BaseService {
|
|
4033
|
+
/**
|
|
4034
|
+
* List patterns
|
|
4035
|
+
* List all patterns for the authenticated user
|
|
4036
|
+
* @param limit - Maximum number of patterns to return
|
|
4037
|
+
* @param offset - Number of patterns to skip
|
|
4038
|
+
*/
|
|
4039
|
+
listPatterns(options?: {
|
|
4040
|
+
limit?: number;
|
|
4041
|
+
offset?: number;
|
|
4042
|
+
}): Promise<HttpResponse<{
|
|
4043
|
+
data?: Pattern[];
|
|
4044
|
+
pagination?: {
|
|
4045
|
+
limit?: number;
|
|
4046
|
+
offset?: number;
|
|
4047
|
+
count?: number;
|
|
4048
|
+
};
|
|
4049
|
+
}>>;
|
|
4050
|
+
/**
|
|
4051
|
+
* Compile patterns
|
|
4052
|
+
* Compile patterns from user's memories
|
|
4053
|
+
* @param body - Request body
|
|
4054
|
+
*/
|
|
4055
|
+
compilePatterns(options?: {
|
|
4056
|
+
body?: {
|
|
4057
|
+
minOccurrences?: number;
|
|
4058
|
+
timeWindow?: string;
|
|
4059
|
+
};
|
|
4060
|
+
}): Promise<HttpResponse<{
|
|
4061
|
+
data?: Pattern[];
|
|
4062
|
+
count?: number;
|
|
4063
|
+
}>>;
|
|
4064
|
+
/**
|
|
4065
|
+
* Detect behavioral patterns
|
|
4066
|
+
* Run pattern detection algorithms to identify recurring behavioral patterns
|
|
4067
|
+
* @param body - Request body
|
|
4068
|
+
*/
|
|
4069
|
+
detectPatterns(options?: {
|
|
4070
|
+
body?: {
|
|
4071
|
+
contextFilter?: string;
|
|
4072
|
+
timeframeStart?: string;
|
|
4073
|
+
timeframeEnd?: string;
|
|
4074
|
+
minConfidence?: number;
|
|
4075
|
+
maxResults?: number;
|
|
4076
|
+
autoStore?: boolean;
|
|
4077
|
+
};
|
|
4078
|
+
}): Promise<HttpResponse<{
|
|
4079
|
+
data?: {
|
|
4080
|
+
detectedPatterns?: Pattern[];
|
|
4081
|
+
count?: number;
|
|
4082
|
+
stored?: number;
|
|
4083
|
+
confidence?: {
|
|
4084
|
+
average?: number;
|
|
4085
|
+
highest?: number;
|
|
4086
|
+
};
|
|
4087
|
+
};
|
|
4088
|
+
}>>;
|
|
4089
|
+
/**
|
|
4090
|
+
* Analyze pattern trends
|
|
4091
|
+
* Analyze pattern trends, correlations, and generate insights
|
|
4092
|
+
* @param body - Request body
|
|
4093
|
+
*/
|
|
4094
|
+
analyzePatterns(options?: {
|
|
4095
|
+
body?: {
|
|
4096
|
+
timeRange?: number;
|
|
4097
|
+
groupBy?: 'type' | 'context' | 'confidence';
|
|
4098
|
+
includeDetails?: boolean;
|
|
4099
|
+
};
|
|
4100
|
+
}): Promise<HttpResponse<{
|
|
4101
|
+
data?: {
|
|
4102
|
+
analysis?: {
|
|
4103
|
+
totalPatterns?: number;
|
|
4104
|
+
recentPatterns?: number;
|
|
4105
|
+
trends?: Record<string, unknown>;
|
|
4106
|
+
insights?: string[];
|
|
4107
|
+
recommendations?: string[];
|
|
4108
|
+
};
|
|
4109
|
+
timeRange?: number;
|
|
4110
|
+
analyzedAt?: string;
|
|
4111
|
+
};
|
|
4112
|
+
}>>;
|
|
4113
|
+
/**
|
|
4114
|
+
* Update pattern
|
|
4115
|
+
* Update an existing pattern with partial data
|
|
4116
|
+
* @param id - The pattern ID
|
|
4117
|
+
* @param body - Request body
|
|
4118
|
+
*/
|
|
4119
|
+
updatePattern(id: string, body: {
|
|
4120
|
+
name?: string;
|
|
4121
|
+
description?: string;
|
|
4122
|
+
confidence?: number;
|
|
4123
|
+
metadata?: Record<string, unknown>;
|
|
4124
|
+
}): Promise<HttpResponse<{
|
|
4125
|
+
data?: Pattern;
|
|
4126
|
+
}>>;
|
|
4127
|
+
/**
|
|
4128
|
+
* Record pattern feedback
|
|
4129
|
+
* Record feedback on a pattern
|
|
4130
|
+
* @param body - Request body
|
|
4131
|
+
*/
|
|
4132
|
+
recordPatternFeedback(body: {
|
|
4133
|
+
patternId: string;
|
|
4134
|
+
feedback: string;
|
|
4135
|
+
}): Promise<HttpResponse<{
|
|
4136
|
+
data?: Pattern;
|
|
4137
|
+
}>>;
|
|
4138
|
+
}
|
|
4139
|
+
|
|
4140
|
+
/**
|
|
4141
|
+
* BehaviorService - Behavioral pattern tracking and state management endpoints API operations.
|
|
4142
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
4143
|
+
*/
|
|
4144
|
+
|
|
4145
|
+
/**
|
|
4146
|
+
* Behavioral pattern tracking and state management endpoints
|
|
4147
|
+
*/
|
|
4148
|
+
declare class BehaviorService extends BaseService {
|
|
4149
|
+
/**
|
|
4150
|
+
* Get behavioral state
|
|
4151
|
+
* Get current behavioral state for the authenticated user
|
|
4152
|
+
*/
|
|
4153
|
+
getBehavioralState(): Promise<HttpResponse<{
|
|
4154
|
+
data?: Record<string, unknown>;
|
|
4155
|
+
}>>;
|
|
4156
|
+
/**
|
|
4157
|
+
* Update behavioral state
|
|
4158
|
+
* Update or mutate behavioral state
|
|
4159
|
+
* @param body - Request body
|
|
4160
|
+
*/
|
|
4161
|
+
updateBehavioralState(options?: {
|
|
4162
|
+
body?: {
|
|
4163
|
+
state?: Record<string, unknown>;
|
|
4164
|
+
mutations?: Record<string, unknown>;
|
|
4165
|
+
};
|
|
4166
|
+
}): Promise<HttpResponse<{
|
|
4167
|
+
data?: Record<string, unknown>;
|
|
4168
|
+
}>>;
|
|
4169
|
+
}
|
|
4170
|
+
|
|
4171
|
+
/**
|
|
4172
|
+
* TopicsService - Topic detection, clustering, and management endpoints API operations.
|
|
4173
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
4174
|
+
*/
|
|
4175
|
+
|
|
4176
|
+
/**
|
|
4177
|
+
* Topic detection, clustering, and management endpoints
|
|
4178
|
+
*/
|
|
4179
|
+
declare class TopicsService extends BaseService {
|
|
4180
|
+
/**
|
|
4181
|
+
* List topics
|
|
4182
|
+
* List all topics with pagination
|
|
4183
|
+
* @param limit - Maximum number of topics to return
|
|
4184
|
+
* @param offset - Number of topics to skip
|
|
4185
|
+
*/
|
|
4186
|
+
listTopics(options?: {
|
|
4187
|
+
limit?: number;
|
|
4188
|
+
offset?: number;
|
|
4189
|
+
}): Promise<HttpResponse<{
|
|
4190
|
+
data?: Topic[];
|
|
4191
|
+
pagination?: {
|
|
4192
|
+
limit?: number;
|
|
4193
|
+
offset?: number;
|
|
4194
|
+
count?: number;
|
|
4195
|
+
};
|
|
4196
|
+
}>>;
|
|
4197
|
+
/**
|
|
4198
|
+
* Get topic by ID
|
|
4199
|
+
* Retrieve a specific topic by its ID
|
|
4200
|
+
* @param id - The topic ID
|
|
4201
|
+
*/
|
|
4202
|
+
getTopicById(id: string): Promise<HttpResponse<{
|
|
4203
|
+
data?: Topic;
|
|
4204
|
+
}>>;
|
|
4205
|
+
/**
|
|
4206
|
+
* Merge topics
|
|
4207
|
+
* Merge two topics into one
|
|
4208
|
+
* @param body - Request body
|
|
4209
|
+
*/
|
|
4210
|
+
mergeTopics(body: {
|
|
4211
|
+
sourceTopicId: string;
|
|
4212
|
+
targetTopicId: string;
|
|
4213
|
+
}): Promise<HttpResponse<{
|
|
4214
|
+
data?: Topic;
|
|
4215
|
+
}>>;
|
|
4216
|
+
/**
|
|
4217
|
+
* Discover related topics
|
|
4218
|
+
* Discover topics related to a given topic
|
|
4219
|
+
* @param body - Request body
|
|
4220
|
+
*/
|
|
4221
|
+
discoverRelatedTopics(body: {
|
|
4222
|
+
topicId: string;
|
|
4223
|
+
limit?: number;
|
|
4224
|
+
}): Promise<HttpResponse<{
|
|
4225
|
+
data?: Topic[];
|
|
4226
|
+
}>>;
|
|
4227
|
+
/**
|
|
4228
|
+
* Calculate topic similarity
|
|
4229
|
+
* Calculate similarity score between two topics
|
|
4230
|
+
* @param body - Request body
|
|
4231
|
+
*/
|
|
4232
|
+
calculateTopicSimilarity(body: {
|
|
4233
|
+
topicId1: string;
|
|
4234
|
+
topicId2: string;
|
|
4235
|
+
}): Promise<HttpResponse<{
|
|
4236
|
+
data?: {
|
|
4237
|
+
similarity?: number;
|
|
4238
|
+
};
|
|
4239
|
+
}>>;
|
|
4240
|
+
/**
|
|
4241
|
+
* Find similar topics
|
|
4242
|
+
* Find topics similar to a given topic
|
|
4243
|
+
* @param body - Request body
|
|
4244
|
+
*/
|
|
4245
|
+
findSimilarTopics(body: {
|
|
4246
|
+
topicId: string;
|
|
4247
|
+
threshold?: number;
|
|
4248
|
+
limit?: number;
|
|
4249
|
+
}): Promise<HttpResponse<{
|
|
4250
|
+
data?: {
|
|
4251
|
+
topic?: Topic;
|
|
4252
|
+
similarity?: number;
|
|
4253
|
+
}[];
|
|
4254
|
+
}>>;
|
|
4255
|
+
/**
|
|
4256
|
+
* Cluster topics
|
|
4257
|
+
* Cluster topics using community detection algorithms
|
|
4258
|
+
* @param body - Request body
|
|
4259
|
+
*/
|
|
4260
|
+
clusterTopics(options?: {
|
|
4261
|
+
body?: {
|
|
4262
|
+
minClusterSize?: number;
|
|
4263
|
+
};
|
|
4264
|
+
}): Promise<HttpResponse<{
|
|
4265
|
+
data?: {
|
|
4266
|
+
clusters?: Record<string, unknown>[];
|
|
4267
|
+
clusterCount?: number;
|
|
4268
|
+
};
|
|
4269
|
+
}>>;
|
|
4270
|
+
/**
|
|
4271
|
+
* Detect communities
|
|
4272
|
+
* Detect communities in the topic graph using specified algorithm
|
|
4273
|
+
* @param body - Request body
|
|
4274
|
+
*/
|
|
4275
|
+
detectCommunities(options?: {
|
|
4276
|
+
body?: {
|
|
4277
|
+
algorithm?: string;
|
|
4278
|
+
};
|
|
4279
|
+
}): Promise<HttpResponse<{
|
|
4280
|
+
data?: {
|
|
4281
|
+
communities?: Community[];
|
|
4282
|
+
communityCount?: number;
|
|
4283
|
+
};
|
|
4284
|
+
}>>;
|
|
4285
|
+
/**
|
|
4286
|
+
* Search topics
|
|
4287
|
+
* Search topics by query string using fulltext search
|
|
4288
|
+
* @param body - Request body
|
|
4289
|
+
*/
|
|
4290
|
+
searchTopics(body: {
|
|
4291
|
+
query: string;
|
|
4292
|
+
limit?: number;
|
|
4293
|
+
offset?: number;
|
|
4294
|
+
}): Promise<HttpResponse<{
|
|
4295
|
+
data?: Record<string, unknown>[];
|
|
4296
|
+
total?: number;
|
|
4297
|
+
limit?: number;
|
|
4298
|
+
offset?: number;
|
|
4299
|
+
}>>;
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4302
|
+
/**
|
|
4303
|
+
* CommunitiesService - Topic community detection and management endpoints API operations.
|
|
4304
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
4305
|
+
*/
|
|
4306
|
+
|
|
4307
|
+
/**
|
|
4308
|
+
* Topic community detection and management endpoints
|
|
4309
|
+
*/
|
|
4310
|
+
declare class CommunitiesService extends BaseService {
|
|
4311
|
+
/**
|
|
4312
|
+
* List communities
|
|
4313
|
+
* List all communities with pagination
|
|
4314
|
+
* @param limit - Maximum number of communities to return
|
|
4315
|
+
* @param offset - Number of communities to skip
|
|
4316
|
+
*/
|
|
4317
|
+
listCommunities(options?: {
|
|
4318
|
+
limit?: number;
|
|
4319
|
+
offset?: number;
|
|
4320
|
+
}): Promise<HttpResponse<{
|
|
4321
|
+
data?: Community[];
|
|
4322
|
+
pagination?: {
|
|
4323
|
+
limit?: number;
|
|
4324
|
+
offset?: number;
|
|
4325
|
+
count?: number;
|
|
4326
|
+
};
|
|
4327
|
+
}>>;
|
|
4328
|
+
/**
|
|
4329
|
+
* Get community by ID
|
|
4330
|
+
* Retrieve a specific community by its ID
|
|
4331
|
+
* @param id - The community ID
|
|
4332
|
+
*/
|
|
4333
|
+
getCommunityById(id: string): Promise<HttpResponse<{
|
|
4334
|
+
data?: Community;
|
|
4335
|
+
}>>;
|
|
4336
|
+
/**
|
|
4337
|
+
* Merge communities
|
|
4338
|
+
* Merge two communities into one
|
|
4339
|
+
* @param body - Request body
|
|
4340
|
+
*/
|
|
4341
|
+
mergeCommunities(body: {
|
|
4342
|
+
sourceCommunityId: string;
|
|
4343
|
+
targetCommunityId: string;
|
|
4344
|
+
}): Promise<HttpResponse<{
|
|
4345
|
+
data?: Community;
|
|
4346
|
+
}>>;
|
|
4347
|
+
}
|
|
4348
|
+
|
|
4349
|
+
/**
|
|
4350
|
+
* UsersService - User management and profile endpoints API operations.
|
|
4351
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
4352
|
+
*/
|
|
4353
|
+
|
|
4354
|
+
/**
|
|
4355
|
+
* User management and profile endpoints
|
|
4356
|
+
*/
|
|
4357
|
+
declare class UsersService extends BaseService {
|
|
4358
|
+
/**
|
|
4359
|
+
* Sync user from WorkOS
|
|
4360
|
+
* Called by the customer portal after WorkOS authentication.
|
|
4361
|
+
Creates a new user if they don't exist, or updates their profile if they do.
|
|
4362
|
+
This is the main entry point for user provisioning.
|
|
4363
|
+
|
|
4364
|
+
* @param body - Request body
|
|
4365
|
+
*/
|
|
4366
|
+
syncUser(body: {
|
|
4367
|
+
workosId: string;
|
|
4368
|
+
email: string;
|
|
4369
|
+
firstName?: string;
|
|
4370
|
+
lastName?: string;
|
|
4371
|
+
profilePictureUrl?: string;
|
|
4372
|
+
}): Promise<HttpResponse<{
|
|
4373
|
+
data?: User;
|
|
4374
|
+
created?: boolean;
|
|
4375
|
+
}>>;
|
|
4376
|
+
/**
|
|
4377
|
+
* Get current user
|
|
4378
|
+
* Get the currently authenticated user's profile and usage information
|
|
4379
|
+
*/
|
|
4380
|
+
getCurrentUser(): Promise<HttpResponse<{
|
|
4381
|
+
data?: User;
|
|
4382
|
+
usage?: UserUsage;
|
|
4383
|
+
}>>;
|
|
4384
|
+
/**
|
|
4385
|
+
* Update current user
|
|
4386
|
+
* Update the currently authenticated user's profile
|
|
4387
|
+
* @param body - Request body
|
|
4388
|
+
*/
|
|
4389
|
+
updateCurrentUser(options?: {
|
|
4390
|
+
body?: {
|
|
4391
|
+
firstName?: string;
|
|
4392
|
+
lastName?: string;
|
|
4393
|
+
profilePictureUrl?: string;
|
|
4394
|
+
};
|
|
4395
|
+
}): Promise<HttpResponse<{
|
|
4396
|
+
data?: User;
|
|
4397
|
+
}>>;
|
|
4398
|
+
/**
|
|
4399
|
+
* Get current user's usage
|
|
4400
|
+
* Get the currently authenticated user's memory usage statistics
|
|
4401
|
+
*/
|
|
4402
|
+
getCurrentUserUsage(): Promise<HttpResponse<{
|
|
4403
|
+
data?: UserUsage;
|
|
4404
|
+
}>>;
|
|
4405
|
+
/**
|
|
4406
|
+
* Get user by ID
|
|
4407
|
+
* Get a user by their internal ID (admin only)
|
|
4408
|
+
* @param id -
|
|
4409
|
+
*/
|
|
4410
|
+
getUserById(id: string): Promise<HttpResponse<{
|
|
4411
|
+
data?: User;
|
|
4412
|
+
}>>;
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4415
|
+
/**
|
|
4416
|
+
* MemNexus SDK Client
|
|
4417
|
+
* Auto-generated by sdk-generator - do not edit manually.
|
|
4418
|
+
*/
|
|
4419
|
+
|
|
4420
|
+
/**
|
|
4421
|
+
* MemNexus SDK client.
|
|
4422
|
+
* Provides access to all API services.
|
|
4423
|
+
*/
|
|
4424
|
+
declare class Memnexus {
|
|
4425
|
+
private readonly config;
|
|
4426
|
+
/** API key management endpoints operations */
|
|
4427
|
+
readonly apiKeys: ApiKeysService;
|
|
4428
|
+
/** Artifact storage and retrieval endpoints operations */
|
|
4429
|
+
readonly artifacts: ArtifactsService;
|
|
4430
|
+
/** Conversation tracking and analysis endpoints operations */
|
|
4431
|
+
readonly conversations: ConversationsService;
|
|
4432
|
+
/** Fact extraction and management endpoints operations */
|
|
4433
|
+
readonly facts: FactsService;
|
|
4434
|
+
/** Graph-based retrieval augmented generation endpoints operations */
|
|
4435
|
+
readonly graphrag: GraphragService;
|
|
4436
|
+
/** Health check endpoints operations */
|
|
4437
|
+
readonly health: HealthService;
|
|
4438
|
+
/** Memory management and retrieval endpoints operations */
|
|
4439
|
+
readonly memories: MemoriesService;
|
|
4440
|
+
/** Narrative thread management endpoints operations */
|
|
4441
|
+
readonly narratives: NarrativesService;
|
|
4442
|
+
/** System health, monitoring, and configuration endpoints operations */
|
|
4443
|
+
readonly system: SystemService;
|
|
4444
|
+
/** Pattern detection and behavioral analysis endpoints operations */
|
|
4445
|
+
readonly patterns: PatternsService;
|
|
4446
|
+
/** Behavioral pattern tracking and state management endpoints operations */
|
|
4447
|
+
readonly behavior: BehaviorService;
|
|
4448
|
+
/** Topic detection, clustering, and management endpoints operations */
|
|
4449
|
+
readonly topics: TopicsService;
|
|
4450
|
+
/** Topic community detection and management endpoints operations */
|
|
4451
|
+
readonly communities: CommunitiesService;
|
|
4452
|
+
/** User management and profile endpoints operations */
|
|
4453
|
+
readonly users: UsersService;
|
|
4454
|
+
/**
|
|
4455
|
+
* Create a new SDK client.
|
|
4456
|
+
* @param config - SDK configuration
|
|
4457
|
+
*/
|
|
4458
|
+
constructor(config?: SdkConfig);
|
|
4459
|
+
/**
|
|
4460
|
+
* Set the API token for authentication.
|
|
4461
|
+
* @param token - Bearer token
|
|
4462
|
+
*/
|
|
4463
|
+
setToken(token: string): void;
|
|
4464
|
+
/**
|
|
4465
|
+
* Set the base URL for API requests.
|
|
4466
|
+
* @param baseUrl - API base URL
|
|
4467
|
+
*/
|
|
4468
|
+
setBaseUrl(baseUrl: string): void;
|
|
4469
|
+
/**
|
|
4470
|
+
* Set the environment.
|
|
4471
|
+
* @param environment - API environment
|
|
4472
|
+
*/
|
|
4473
|
+
setEnvironment(environment: Environment): void;
|
|
4474
|
+
}
|
|
4475
|
+
|
|
4476
|
+
export { type AddMemoryToNarrativeRequest, type ApiKey, ApiKeysService, type Artifact, ArtifactsService, BehaviorService, CommunitiesService, type Community, ContentType, type Conversation, ConversationsService, type CreateArtifactRequest, type CreateConversationRequest, type CreateFactRequest, type CreateMemoryRelationshipRequest, type CreateMemoryRequest, type CreateMemoryResponse, type CreateMemoryResponseMeta, type CreateNarrativeRequest, type Entity, Environment, type Error$1 as Error, type ErrorDefinition, type Fact, type FactSearchRequest, FactsService, type GetMemoryResponse, type GetNarrativeResponse, type GraphRAGQueryRequest, type GraphRAGQueryResponse, GraphragService, type HealthCheck, HealthService, type Hook, type HttpError, type HttpMetadata, type HttpMethod, type HttpRequest, type HttpResponse, type ListNarrativesResponse, Memnexus, MemoriesService, type Memory, type MemoryRelationship, type MemoryRelationshipsResponse, type MergeCommunitiesRequest, type NarrativeMemory, type NarrativeThread, type NarrativeTimelineResponse, NarrativesService, type Pagination, type Pattern, PatternsService, type RelatedMemoryResult, type RequestParameter, type ResponseDefinition, type RetryOptions, type SdkConfig, type SearchRequest, type SearchResponse, type SearchResult, SerializationStyle, type ServiceCheck, SystemService, type TemporalMetadata, type Topic, type TopicReference, TopicsService, type UpdateArtifactRequest, type UpdateFactRequest, type UpdateMemoryRequest, type UpdateNarrativeRequest, type User, type UserUsage, UsersService, type ValidationOptions, addMemoryToNarrativeRequest, apiKey, artifact, community, conversation, createArtifactRequest, createConversationRequest, createFactRequest, createMemoryRelationshipRequest, createMemoryRequest, createMemoryResponse, createMemoryResponseMeta, createNarrativeRequest, Memnexus as default, entity, error, fact, factSearchRequest, getMemoryResponse, getNarrativeResponse, graphRAGQueryRequest, graphRAGQueryResponse, healthCheck, listNarrativesResponse, memory, memoryRelationship, memoryRelationshipsResponse, mergeCommunitiesRequest, narrativeMemory, narrativeThread, narrativeTimelineResponse, pagination, pattern, relatedMemoryResult, searchRequest, searchResponse, searchResult, serviceCheck, temporalMetadata, topic, topicReference, updateArtifactRequest, updateFactRequest, updateMemoryRequest, updateNarrativeRequest, user, userUsage };
|