@polypixel/memoir-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1448 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
3
+ import type { JsonObject, Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file memoir/v1/memory.proto.
6
+ */
7
+ export declare const file_memoir_v1_memory: GenFile;
8
+ /**
9
+ * Scope uniquely identifies a memory partition. Memories written under one
10
+ * scope are never returned under another. The triple matches the manifesto's
11
+ * SDK pseudocode and the Tier-1 integration shape.
12
+ *
13
+ * @generated from message memoir.v1.Scope
14
+ */
15
+ export type Scope = Message<"memoir.v1.Scope"> & {
16
+ /**
17
+ * @generated from field: string agent_id = 1;
18
+ */
19
+ agentId: string;
20
+ /**
21
+ * @generated from field: string org_id = 2;
22
+ */
23
+ orgId: string;
24
+ /**
25
+ * @generated from field: string user_id = 3;
26
+ */
27
+ userId: string;
28
+ };
29
+ /**
30
+ * Describes the message memoir.v1.Scope.
31
+ * Use `create(ScopeSchema)` to create a new message.
32
+ */
33
+ export declare const ScopeSchema: GenMessage<Scope>;
34
+ /**
35
+ * @generated from message memoir.v1.Memory
36
+ */
37
+ export type Memory = Message<"memoir.v1.Memory"> & {
38
+ /**
39
+ * @generated from field: string pid = 1;
40
+ */
41
+ pid: string;
42
+ /**
43
+ * @generated from field: memoir.v1.Scope scope = 2;
44
+ */
45
+ scope?: Scope;
46
+ /**
47
+ * @generated from field: string content = 3;
48
+ */
49
+ content: string;
50
+ /**
51
+ * @generated from field: google.protobuf.Struct metadata = 4;
52
+ */
53
+ metadata?: JsonObject;
54
+ /**
55
+ * @generated from field: google.protobuf.Timestamp created_at = 5;
56
+ */
57
+ createdAt?: Timestamp;
58
+ /**
59
+ * Set when the worker has fully processed the memory (embedding + any
60
+ * extraction). As of memoir-core v0.1 the library does not yet populate
61
+ * a dedicated `processed_at` column — the field stays unset for now;
62
+ * consumers should rely on `status == MEMORY_STATUS_PROCESSED` as the
63
+ * canonical "ready" signal. The proto field is preserved so a future
64
+ * library schema migration can backfill it without a proto bump.
65
+ *
66
+ * @generated from field: optional google.protobuf.Timestamp processed_at = 6;
67
+ */
68
+ processedAt?: Timestamp;
69
+ /**
70
+ * Lifecycle state. Maps from memoir-core's `memories.qdrant_status`
71
+ * column (`pending` / `indexed` / `failed`) to PENDING / PROCESSED /
72
+ * FAILED at the handler boundary.
73
+ *
74
+ * @generated from field: memoir.v1.MemoryStatus status = 7;
75
+ */
76
+ status: MemoryStatus;
77
+ /**
78
+ * Wall-clock time of the row's last in-place edit. Equals `created_at`
79
+ * for memories never edited. Maps from memoir-core's `Memory.updated_at`.
80
+ *
81
+ * @generated from field: google.protobuf.Timestamp updated_at = 8;
82
+ */
83
+ updatedAt?: Timestamp;
84
+ /**
85
+ * Event-time of the thing being remembered, distinct from `created_at`
86
+ * (when memoir was told). Unset when no event-time is known (preferences,
87
+ * identity facts). Maps from memoir-core's `Memory.event_at`.
88
+ *
89
+ * @generated from field: optional google.protobuf.Timestamp event_at = 9;
90
+ */
91
+ eventAt?: Timestamp;
92
+ /**
93
+ * Soft-deletion marker; unset when the memory is active. Maps from
94
+ * memoir-core's `Memory.supersession` (`SupersessionInfo`).
95
+ *
96
+ * @generated from field: optional memoir.v1.Supersession supersession = 10;
97
+ */
98
+ supersession?: Supersession;
99
+ /**
100
+ * Episodic (raw utterance written via Remember) or semantic (a fact the
101
+ * extraction worker derived from an episodic source). Maps from
102
+ * memoir-core's `Memory.kind`.
103
+ *
104
+ * @generated from field: memoir.v1.MemoryKind kind = 11;
105
+ */
106
+ kind: MemoryKind;
107
+ };
108
+ /**
109
+ * Describes the message memoir.v1.Memory.
110
+ * Use `create(MemorySchema)` to create a new message.
111
+ */
112
+ export declare const MemorySchema: GenMessage<Memory>;
113
+ /**
114
+ * Latest supersession state for a Memory — winner pid and decision time.
115
+ * Mirrors memoir-core's `SupersessionInfo`. Present only on superseded rows.
116
+ *
117
+ * @generated from message memoir.v1.Supersession
118
+ */
119
+ export type Supersession = Message<"memoir.v1.Supersession"> & {
120
+ /**
121
+ * @generated from field: string winner_pid = 1;
122
+ */
123
+ winnerPid: string;
124
+ /**
125
+ * @generated from field: google.protobuf.Timestamp at = 2;
126
+ */
127
+ at?: Timestamp;
128
+ };
129
+ /**
130
+ * Describes the message memoir.v1.Supersession.
131
+ * Use `create(SupersessionSchema)` to create a new message.
132
+ */
133
+ export declare const SupersessionSchema: GenMessage<Supersession>;
134
+ /**
135
+ * Selects which memory kinds a read includes. Mirrors memoir-core's
136
+ * `KindSelector`. Per the library's semantics, a selector with BOTH fields
137
+ * false (the proto3 default, or an omitted selector) means "all kinds" —
138
+ * not "no kinds". Setting exactly one field filters to that kind.
139
+ *
140
+ * @generated from message memoir.v1.KindSelector
141
+ */
142
+ export type KindSelector = Message<"memoir.v1.KindSelector"> & {
143
+ /**
144
+ * @generated from field: bool episodic = 1;
145
+ */
146
+ episodic: boolean;
147
+ /**
148
+ * @generated from field: bool semantic = 2;
149
+ */
150
+ semantic: boolean;
151
+ };
152
+ /**
153
+ * Describes the message memoir.v1.KindSelector.
154
+ * Use `create(KindSelectorSchema)` to create a new message.
155
+ */
156
+ export declare const KindSelectorSchema: GenMessage<KindSelector>;
157
+ /**
158
+ * Search result with similarity score attached.
159
+ *
160
+ * @generated from message memoir.v1.SearchHit
161
+ */
162
+ export type SearchHit = Message<"memoir.v1.SearchHit"> & {
163
+ /**
164
+ * @generated from field: memoir.v1.Memory memory = 1;
165
+ */
166
+ memory?: Memory;
167
+ /**
168
+ * Cosine similarity, higher = closer. Range [-1.0, 1.0]; in practice
169
+ * memoir-core's embedding model yields scores in [0.0, 1.0] for typical
170
+ * semantic content. memoir-core's vector index returns this value
171
+ * verbatim (no rank normalization), sourced from Qdrant's `query`
172
+ * response per `packages/memoir-core/src/vector/qdrant.rs`.
173
+ *
174
+ * @generated from field: float score = 2;
175
+ */
176
+ score: number;
177
+ };
178
+ /**
179
+ * Describes the message memoir.v1.SearchHit.
180
+ * Use `create(SearchHitSchema)` to create a new message.
181
+ */
182
+ export declare const SearchHitSchema: GenMessage<SearchHit>;
183
+ /**
184
+ * @generated from message memoir.v1.SearchRequest
185
+ */
186
+ export type SearchRequest = Message<"memoir.v1.SearchRequest"> & {
187
+ /**
188
+ * @generated from field: memoir.v1.Scope scope = 1;
189
+ */
190
+ scope?: Scope;
191
+ /**
192
+ * @generated from field: string query = 2;
193
+ */
194
+ query: string;
195
+ /**
196
+ * Maximum hits to return. memoir-core treats `limit = 0` as "use library
197
+ * default" (currently 10, per `packages/memoir-core/src/client/search.rs`
198
+ * `DEFAULT_LIMIT`). The handler in memoir-service enforces a soft cap on
199
+ * very large values — agents typically request 5-50. No cursor-based
200
+ * pagination in v0.1.
201
+ *
202
+ * @generated from field: int32 limit = 3;
203
+ */
204
+ limit: number;
205
+ /**
206
+ * Optional caller-supplied metadata filter, AND-joined with the scope
207
+ * and kind conditions enforced by the library. Caller-supplied conditions
208
+ * cannot widen scope. See `MemoryFilter` for shape.
209
+ *
210
+ * @generated from field: optional memoir.v1.MemoryFilter metadata_filter = 4;
211
+ */
212
+ metadataFilter?: MemoryFilter;
213
+ /**
214
+ * Optional similarity floor in [-1.0, 1.0]. Hits with score below this
215
+ * value are dropped by the vector backend before they reach the response.
216
+ * Unset = no floor.
217
+ *
218
+ * @generated from field: optional float min_similarity = 5;
219
+ */
220
+ minSimilarity?: number;
221
+ /**
222
+ * Restricts retrieval to the selected memory kind(s). Omitted or
223
+ * both-false = all kinds (see `KindSelector`). Maps to the library's
224
+ * `SearchBuilder::episodic` / `::semantic` toggles.
225
+ *
226
+ * @generated from field: optional memoir.v1.KindSelector kinds = 6;
227
+ */
228
+ kinds?: KindSelector;
229
+ };
230
+ /**
231
+ * Describes the message memoir.v1.SearchRequest.
232
+ * Use `create(SearchRequestSchema)` to create a new message.
233
+ */
234
+ export declare const SearchRequestSchema: GenMessage<SearchRequest>;
235
+ /**
236
+ * Caller-supplied filter applied at search time. Mirrors Qdrant's payload
237
+ * filter structure one-to-one but is a memoir-owned type so consumers do not
238
+ * take a transitive Qdrant dependency. Sections combine as:
239
+ * - `must` — AND
240
+ * - `must_not` — AND-NOT
241
+ * - `should` — OR (at least one)
242
+ * An empty filter (all sections empty) is inert.
243
+ *
244
+ * @generated from message memoir.v1.MemoryFilter
245
+ */
246
+ export type MemoryFilter = Message<"memoir.v1.MemoryFilter"> & {
247
+ /**
248
+ * @generated from field: repeated memoir.v1.FilterCondition must = 1;
249
+ */
250
+ must: FilterCondition[];
251
+ /**
252
+ * @generated from field: repeated memoir.v1.FilterCondition must_not = 2;
253
+ */
254
+ mustNot: FilterCondition[];
255
+ /**
256
+ * @generated from field: repeated memoir.v1.FilterCondition should = 3;
257
+ */
258
+ should: FilterCondition[];
259
+ };
260
+ /**
261
+ * Describes the message memoir.v1.MemoryFilter.
262
+ * Use `create(MemoryFilterSchema)` to create a new message.
263
+ */
264
+ export declare const MemoryFilterSchema: GenMessage<MemoryFilter>;
265
+ /**
266
+ * One field-targeted condition inside a [`MemoryFilter`].
267
+ *
268
+ * @generated from message memoir.v1.FilterCondition
269
+ */
270
+ export type FilterCondition = Message<"memoir.v1.FilterCondition"> & {
271
+ /**
272
+ * Payload field name to apply the condition against.
273
+ *
274
+ * @generated from field: string field = 1;
275
+ */
276
+ field: string;
277
+ /**
278
+ * @generated from oneof memoir.v1.FilterCondition.condition
279
+ */
280
+ condition: {
281
+ /**
282
+ * Field equals a single value.
283
+ *
284
+ * @generated from field: memoir.v1.MatchValue equals = 2;
285
+ */
286
+ value: MatchValue;
287
+ case: "equals";
288
+ } | {
289
+ /**
290
+ * Field equals any value in the list — `IN (...)` semantics.
291
+ *
292
+ * @generated from field: memoir.v1.MatchValues in_values = 3;
293
+ */
294
+ value: MatchValues;
295
+ case: "inValues";
296
+ } | {
297
+ /**
298
+ * Field is a number within the range.
299
+ *
300
+ * @generated from field: memoir.v1.NumericRange range = 4;
301
+ */
302
+ value: NumericRange;
303
+ case: "range";
304
+ } | {
305
+ case: undefined;
306
+ value?: undefined;
307
+ };
308
+ };
309
+ /**
310
+ * Describes the message memoir.v1.FilterCondition.
311
+ * Use `create(FilterConditionSchema)` to create a new message.
312
+ */
313
+ export declare const FilterConditionSchema: GenMessage<FilterCondition>;
314
+ /**
315
+ * Concrete value for equality matching. Mirrors memoir-core's `MatchValue`.
316
+ *
317
+ * @generated from message memoir.v1.MatchValue
318
+ */
319
+ export type MatchValue = Message<"memoir.v1.MatchValue"> & {
320
+ /**
321
+ * @generated from oneof memoir.v1.MatchValue.value
322
+ */
323
+ value: {
324
+ /**
325
+ * @generated from field: string keyword = 1;
326
+ */
327
+ value: string;
328
+ case: "keyword";
329
+ } | {
330
+ /**
331
+ * @generated from field: int64 integer = 2;
332
+ */
333
+ value: bigint;
334
+ case: "integer";
335
+ } | {
336
+ /**
337
+ * @generated from field: bool boolean = 3;
338
+ */
339
+ value: boolean;
340
+ case: "boolean";
341
+ } | {
342
+ case: undefined;
343
+ value?: undefined;
344
+ };
345
+ };
346
+ /**
347
+ * Describes the message memoir.v1.MatchValue.
348
+ * Use `create(MatchValueSchema)` to create a new message.
349
+ */
350
+ export declare const MatchValueSchema: GenMessage<MatchValue>;
351
+ /**
352
+ * List of values for `IN (...)` matching. Mirrors memoir-core's `MatchValues`.
353
+ *
354
+ * @generated from message memoir.v1.MatchValues
355
+ */
356
+ export type MatchValues = Message<"memoir.v1.MatchValues"> & {
357
+ /**
358
+ * @generated from oneof memoir.v1.MatchValues.values
359
+ */
360
+ values: {
361
+ /**
362
+ * @generated from field: memoir.v1.KeywordList keywords = 1;
363
+ */
364
+ value: KeywordList;
365
+ case: "keywords";
366
+ } | {
367
+ /**
368
+ * @generated from field: memoir.v1.IntegerList integers = 2;
369
+ */
370
+ value: IntegerList;
371
+ case: "integers";
372
+ } | {
373
+ case: undefined;
374
+ value?: undefined;
375
+ };
376
+ };
377
+ /**
378
+ * Describes the message memoir.v1.MatchValues.
379
+ * Use `create(MatchValuesSchema)` to create a new message.
380
+ */
381
+ export declare const MatchValuesSchema: GenMessage<MatchValues>;
382
+ /**
383
+ * @generated from message memoir.v1.KeywordList
384
+ */
385
+ export type KeywordList = Message<"memoir.v1.KeywordList"> & {
386
+ /**
387
+ * @generated from field: repeated string values = 1;
388
+ */
389
+ values: string[];
390
+ };
391
+ /**
392
+ * Describes the message memoir.v1.KeywordList.
393
+ * Use `create(KeywordListSchema)` to create a new message.
394
+ */
395
+ export declare const KeywordListSchema: GenMessage<KeywordList>;
396
+ /**
397
+ * @generated from message memoir.v1.IntegerList
398
+ */
399
+ export type IntegerList = Message<"memoir.v1.IntegerList"> & {
400
+ /**
401
+ * @generated from field: repeated int64 values = 1;
402
+ */
403
+ values: bigint[];
404
+ };
405
+ /**
406
+ * Describes the message memoir.v1.IntegerList.
407
+ * Use `create(IntegerListSchema)` to create a new message.
408
+ */
409
+ export declare const IntegerListSchema: GenMessage<IntegerList>;
410
+ /**
411
+ * Half-open or closed numeric range. All bounds optional; an entirely-unbounded
412
+ * range matches every numeric value (and is a no-op — prefer omitting the
413
+ * condition).
414
+ *
415
+ * @generated from message memoir.v1.NumericRange
416
+ */
417
+ export type NumericRange = Message<"memoir.v1.NumericRange"> & {
418
+ /**
419
+ * @generated from field: optional double lt = 1;
420
+ */
421
+ lt?: number;
422
+ /**
423
+ * @generated from field: optional double lte = 2;
424
+ */
425
+ lte?: number;
426
+ /**
427
+ * @generated from field: optional double gt = 3;
428
+ */
429
+ gt?: number;
430
+ /**
431
+ * @generated from field: optional double gte = 4;
432
+ */
433
+ gte?: number;
434
+ };
435
+ /**
436
+ * Describes the message memoir.v1.NumericRange.
437
+ * Use `create(NumericRangeSchema)` to create a new message.
438
+ */
439
+ export declare const NumericRangeSchema: GenMessage<NumericRange>;
440
+ /**
441
+ * @generated from message memoir.v1.SearchResponse
442
+ */
443
+ export type SearchResponse = Message<"memoir.v1.SearchResponse"> & {
444
+ /**
445
+ * @generated from field: repeated memoir.v1.SearchHit hits = 1;
446
+ */
447
+ hits: SearchHit[];
448
+ };
449
+ /**
450
+ * Describes the message memoir.v1.SearchResponse.
451
+ * Use `create(SearchResponseSchema)` to create a new message.
452
+ */
453
+ export declare const SearchResponseSchema: GenMessage<SearchResponse>;
454
+ /**
455
+ * @generated from message memoir.v1.RecallRequest
456
+ */
457
+ export type RecallRequest = Message<"memoir.v1.RecallRequest"> & {
458
+ /**
459
+ * @generated from field: string pid = 1;
460
+ */
461
+ pid: string;
462
+ };
463
+ /**
464
+ * Describes the message memoir.v1.RecallRequest.
465
+ * Use `create(RecallRequestSchema)` to create a new message.
466
+ */
467
+ export declare const RecallRequestSchema: GenMessage<RecallRequest>;
468
+ /**
469
+ * @generated from message memoir.v1.RecallResponse
470
+ */
471
+ export type RecallResponse = Message<"memoir.v1.RecallResponse"> & {
472
+ /**
473
+ * @generated from field: memoir.v1.Memory memory = 1;
474
+ */
475
+ memory?: Memory;
476
+ };
477
+ /**
478
+ * Describes the message memoir.v1.RecallResponse.
479
+ * Use `create(RecallResponseSchema)` to create a new message.
480
+ */
481
+ export declare const RecallResponseSchema: GenMessage<RecallResponse>;
482
+ /**
483
+ * @generated from message memoir.v1.RememberRequest
484
+ */
485
+ export type RememberRequest = Message<"memoir.v1.RememberRequest"> & {
486
+ /**
487
+ * @generated from field: memoir.v1.Scope scope = 1;
488
+ */
489
+ scope?: Scope;
490
+ /**
491
+ * @generated from field: string content = 2;
492
+ */
493
+ content: string;
494
+ /**
495
+ * @generated from field: optional google.protobuf.Struct metadata = 3;
496
+ */
497
+ metadata?: JsonObject;
498
+ };
499
+ /**
500
+ * Describes the message memoir.v1.RememberRequest.
501
+ * Use `create(RememberRequestSchema)` to create a new message.
502
+ */
503
+ export declare const RememberRequestSchema: GenMessage<RememberRequest>;
504
+ /**
505
+ * @generated from message memoir.v1.RememberResponse
506
+ */
507
+ export type RememberResponse = Message<"memoir.v1.RememberResponse"> & {
508
+ /**
509
+ * The persisted memory. `status` is always `MEMORY_STATUS_PENDING` at
510
+ * write time — the worker drains the embed (and, if configured, extract)
511
+ * queue asynchronously. Consumers needing job-state visibility use the
512
+ * `AdminService` (see `admin.proto`) rather than additional fields here.
513
+ *
514
+ * @generated from field: memoir.v1.Memory memory = 1;
515
+ */
516
+ memory?: Memory;
517
+ };
518
+ /**
519
+ * Describes the message memoir.v1.RememberResponse.
520
+ * Use `create(RememberResponseSchema)` to create a new message.
521
+ */
522
+ export declare const RememberResponseSchema: GenMessage<RememberResponse>;
523
+ /**
524
+ * @generated from message memoir.v1.ForgetRequest
525
+ */
526
+ export type ForgetRequest = Message<"memoir.v1.ForgetRequest"> & {
527
+ /**
528
+ * Either pid (target a single memory) OR scope (target every memory in a scope).
529
+ * Exactly one must be set.
530
+ *
531
+ * @generated from oneof memoir.v1.ForgetRequest.target
532
+ */
533
+ target: {
534
+ /**
535
+ * @generated from field: string pid = 1;
536
+ */
537
+ value: string;
538
+ case: "pid";
539
+ } | {
540
+ /**
541
+ * @generated from field: memoir.v1.Scope scope = 2;
542
+ */
543
+ value: Scope;
544
+ case: "scope";
545
+ } | {
546
+ case: undefined;
547
+ value?: undefined;
548
+ };
549
+ /**
550
+ * When false, soft-delete (status preserved, memory excluded from search).
551
+ *
552
+ * @generated from field: bool hard_delete = 3;
553
+ */
554
+ hardDelete: boolean;
555
+ };
556
+ /**
557
+ * Describes the message memoir.v1.ForgetRequest.
558
+ * Use `create(ForgetRequestSchema)` to create a new message.
559
+ */
560
+ export declare const ForgetRequestSchema: GenMessage<ForgetRequest>;
561
+ /**
562
+ * @generated from message memoir.v1.ForgetResponse
563
+ */
564
+ export type ForgetResponse = Message<"memoir.v1.ForgetResponse"> & {
565
+ /**
566
+ * The pids that were actually removed from the source of truth. Empty
567
+ * when the target matched no rows (not an error). Mirrors the library's
568
+ * `Client::forget` return shape (`Vec<String>`).
569
+ *
570
+ * @generated from field: repeated string deleted_pids = 1;
571
+ */
572
+ deletedPids: string[];
573
+ };
574
+ /**
575
+ * Describes the message memoir.v1.ForgetResponse.
576
+ * Use `create(ForgetResponseSchema)` to create a new message.
577
+ */
578
+ export declare const ForgetResponseSchema: GenMessage<ForgetResponse>;
579
+ /**
580
+ * @generated from message memoir.v1.TimelineRequest
581
+ */
582
+ export type TimelineRequest = Message<"memoir.v1.TimelineRequest"> & {
583
+ /**
584
+ * @generated from field: memoir.v1.Scope scope = 1;
585
+ */
586
+ scope?: Scope;
587
+ /**
588
+ * Restricts to the selected kind(s). Omitted or both-false = all kinds.
589
+ *
590
+ * @generated from field: optional memoir.v1.KindSelector kinds = 2;
591
+ */
592
+ kinds?: KindSelector;
593
+ /**
594
+ * Half-open time windows. `*_after` is inclusive (>=), `*_before` is
595
+ * exclusive (<), matching the library's `start..end` convention. All
596
+ * optional; unset = unbounded on that side. `created_*` filters on
597
+ * write-time, `event_at_*` on event-time (rows with no event_at are
598
+ * excluded by an event_at bound).
599
+ *
600
+ * @generated from field: optional google.protobuf.Timestamp created_after = 3;
601
+ */
602
+ createdAfter?: Timestamp;
603
+ /**
604
+ * @generated from field: optional google.protobuf.Timestamp created_before = 4;
605
+ */
606
+ createdBefore?: Timestamp;
607
+ /**
608
+ * @generated from field: optional google.protobuf.Timestamp event_at_after = 5;
609
+ */
610
+ eventAtAfter?: Timestamp;
611
+ /**
612
+ * @generated from field: optional google.protobuf.Timestamp event_at_before = 6;
613
+ */
614
+ eventAtBefore?: Timestamp;
615
+ /**
616
+ * Drops superseded rows when true. Default (false/omitted) INCLUDES them —
617
+ * timeline is the audit view. The field is named for the non-default
618
+ * action so proto3's false-default aligns with the library's
619
+ * include-by-default behavior.
620
+ *
621
+ * @generated from field: bool exclude_superseded = 7;
622
+ */
623
+ excludeSuperseded: boolean;
624
+ /**
625
+ * Maximum rows. `0` = library default (50, `DEFAULT_TIMELINE_LIMIT`).
626
+ *
627
+ * @generated from field: int32 limit = 8;
628
+ */
629
+ limit: number;
630
+ /**
631
+ * Oldest-first when true. Default (false/omitted) is newest-first by
632
+ * created_at, matching the library default.
633
+ *
634
+ * @generated from field: bool ascending = 9;
635
+ */
636
+ ascending: boolean;
637
+ };
638
+ /**
639
+ * Describes the message memoir.v1.TimelineRequest.
640
+ * Use `create(TimelineRequestSchema)` to create a new message.
641
+ */
642
+ export declare const TimelineRequestSchema: GenMessage<TimelineRequest>;
643
+ /**
644
+ * @generated from message memoir.v1.TimelineResponse
645
+ */
646
+ export type TimelineResponse = Message<"memoir.v1.TimelineResponse"> & {
647
+ /**
648
+ * Memories in the requested order. `score` is never set (timeline computes
649
+ * no similarity). Mirrors `Client::timeline`'s `Vec<Memory>` return.
650
+ *
651
+ * @generated from field: repeated memoir.v1.Memory memories = 1;
652
+ */
653
+ memories: Memory[];
654
+ };
655
+ /**
656
+ * Describes the message memoir.v1.TimelineResponse.
657
+ * Use `create(TimelineResponseSchema)` to create a new message.
658
+ */
659
+ export declare const TimelineResponseSchema: GenMessage<TimelineResponse>;
660
+ /**
661
+ * @generated from message memoir.v1.RecallAsOfRequest
662
+ */
663
+ export type RecallAsOfRequest = Message<"memoir.v1.RecallAsOfRequest"> & {
664
+ /**
665
+ * @generated from field: memoir.v1.Scope scope = 1;
666
+ */
667
+ scope?: Scope;
668
+ /**
669
+ * The point in time to reconstruct. Memories created on or before this
670
+ * instant that were active (not yet superseded) as of it are returned.
671
+ * A future `as_of` yields current state; one before any memory existed
672
+ * yields empty — both fall out of the library semantics.
673
+ *
674
+ * @generated from field: google.protobuf.Timestamp as_of = 2;
675
+ */
676
+ asOf?: Timestamp;
677
+ /**
678
+ * Restricts to the selected kind(s). Omitted or both-false = all kinds.
679
+ *
680
+ * @generated from field: optional memoir.v1.KindSelector kinds = 3;
681
+ */
682
+ kinds?: KindSelector;
683
+ /**
684
+ * Maximum rows. `0` = library default (50, `DEFAULT_TIMELINE_LIMIT`).
685
+ *
686
+ * @generated from field: int32 limit = 4;
687
+ */
688
+ limit: number;
689
+ };
690
+ /**
691
+ * Describes the message memoir.v1.RecallAsOfRequest.
692
+ * Use `create(RecallAsOfRequestSchema)` to create a new message.
693
+ */
694
+ export declare const RecallAsOfRequestSchema: GenMessage<RecallAsOfRequest>;
695
+ /**
696
+ * @generated from message memoir.v1.RecallAsOfResponse
697
+ */
698
+ export type RecallAsOfResponse = Message<"memoir.v1.RecallAsOfResponse"> & {
699
+ /**
700
+ * Memories active as of the requested instant, newest-first. `score` is
701
+ * never set. Mirrors `Client::recall_as_of`'s `Vec<Memory>` return.
702
+ *
703
+ * @generated from field: repeated memoir.v1.Memory memories = 1;
704
+ */
705
+ memories: Memory[];
706
+ };
707
+ /**
708
+ * Describes the message memoir.v1.RecallAsOfResponse.
709
+ * Use `create(RecallAsOfResponseSchema)` to create a new message.
710
+ */
711
+ export declare const RecallAsOfResponseSchema: GenMessage<RecallAsOfResponse>;
712
+ /**
713
+ * How Query orders candidates. Mirrors memoir-core's `RankingStrategy`.
714
+ * A message-with-oneof (not a bare enum) so new strategies and their
715
+ * parameters are additive — matching the Rust enum's `#[non_exhaustive]`
716
+ * posture. An unset oneof means "use the library default" (hybrid).
717
+ *
718
+ * @generated from message memoir.v1.Ranking
719
+ */
720
+ export type Ranking = Message<"memoir.v1.Ranking"> & {
721
+ /**
722
+ * @generated from oneof memoir.v1.Ranking.strategy
723
+ */
724
+ strategy: {
725
+ /**
726
+ * @generated from field: memoir.v1.Hybrid hybrid = 1;
727
+ */
728
+ value: Hybrid;
729
+ case: "hybrid";
730
+ } | {
731
+ /**
732
+ * @generated from field: memoir.v1.Blended blended = 2;
733
+ */
734
+ value: Blended;
735
+ case: "blended";
736
+ } | {
737
+ case: undefined;
738
+ value?: undefined;
739
+ };
740
+ };
741
+ /**
742
+ * Describes the message memoir.v1.Ranking.
743
+ * Use `create(RankingSchema)` to create a new message.
744
+ */
745
+ export declare const RankingSchema: GenMessage<Ranking>;
746
+ /**
747
+ * Blend of cosine similarity and recency. Mirrors `RankingStrategy::Hybrid`.
748
+ * score = alpha * cosine + (1 - alpha) * decay(age).
749
+ *
750
+ * @generated from message memoir.v1.Hybrid
751
+ */
752
+ export type Hybrid = Message<"memoir.v1.Hybrid"> & {
753
+ /**
754
+ * Weight on cosine in [0.0, 1.0]; (1 - alpha) weights recency.
755
+ *
756
+ * @generated from field: float alpha = 1;
757
+ */
758
+ alpha: number;
759
+ /**
760
+ * Recency-decay function applied to the memory's age.
761
+ *
762
+ * @generated from field: memoir.v1.Decay decay = 2;
763
+ */
764
+ decay?: Decay;
765
+ };
766
+ /**
767
+ * Describes the message memoir.v1.Hybrid.
768
+ * Use `create(HybridSchema)` to create a new message.
769
+ */
770
+ export declare const HybridSchema: GenMessage<Hybrid>;
771
+ /**
772
+ * Linear blend of cosine, confidence, recency, and a category bonus.
773
+ * Mirrors `RankingStrategy::Blended`. score =
774
+ * w_cos*cosine + w_conf*(confidence/100) + w_rec*decay(age)
775
+ * + category_bonus (when the memory's category is preferred).
776
+ *
777
+ * @generated from message memoir.v1.Blended
778
+ */
779
+ export type Blended = Message<"memoir.v1.Blended"> & {
780
+ /**
781
+ * @generated from field: memoir.v1.BlendWeights weights = 1;
782
+ */
783
+ weights?: BlendWeights;
784
+ /**
785
+ * Recency-decay function applied to the memory's age.
786
+ *
787
+ * @generated from field: memoir.v1.Decay decay = 2;
788
+ */
789
+ decay?: Decay;
790
+ };
791
+ /**
792
+ * Describes the message memoir.v1.Blended.
793
+ * Use `create(BlendedSchema)` to create a new message.
794
+ */
795
+ export declare const BlendedSchema: GenMessage<Blended>;
796
+ /**
797
+ * Signal weights for `Blended`. Mirrors memoir-core's `BlendWeights`.
798
+ *
799
+ * @generated from message memoir.v1.BlendWeights
800
+ */
801
+ export type BlendWeights = Message<"memoir.v1.BlendWeights"> & {
802
+ /**
803
+ * Weight on cosine similarity.
804
+ *
805
+ * @generated from field: float cosine = 1;
806
+ */
807
+ cosine: number;
808
+ /**
809
+ * Weight on confidence (0-100 normalized to [0, 1]).
810
+ *
811
+ * @generated from field: float confidence = 2;
812
+ */
813
+ confidence: number;
814
+ /**
815
+ * Weight on the recency-decay term.
816
+ *
817
+ * @generated from field: float recency = 3;
818
+ */
819
+ recency: number;
820
+ /**
821
+ * Additive bonus when a memory's category is in preferred_categories.
822
+ *
823
+ * @generated from field: float category_bonus = 4;
824
+ */
825
+ categoryBonus: number;
826
+ /**
827
+ * Categories that earn the bonus. Empty disables it.
828
+ *
829
+ * @generated from field: repeated string preferred_categories = 5;
830
+ */
831
+ preferredCategories: string[];
832
+ };
833
+ /**
834
+ * Describes the message memoir.v1.BlendWeights.
835
+ * Use `create(BlendWeightsSchema)` to create a new message.
836
+ */
837
+ export declare const BlendWeightsSchema: GenMessage<BlendWeights>;
838
+ /**
839
+ * Recency-decay function. Mirrors memoir-core's `DecayFn`. Message-with-oneof
840
+ * for the same additive-forward-compat reason as `Ranking`.
841
+ *
842
+ * @generated from message memoir.v1.Decay
843
+ */
844
+ export type Decay = Message<"memoir.v1.Decay"> & {
845
+ /**
846
+ * @generated from oneof memoir.v1.Decay.function
847
+ */
848
+ function: {
849
+ /**
850
+ * @generated from field: memoir.v1.ExponentialDecay exponential = 1;
851
+ */
852
+ value: ExponentialDecay;
853
+ case: "exponential";
854
+ } | {
855
+ /**
856
+ * @generated from field: memoir.v1.ReciprocalDecay reciprocal = 2;
857
+ */
858
+ value: ReciprocalDecay;
859
+ case: "reciprocal";
860
+ } | {
861
+ /**
862
+ * @generated from field: memoir.v1.StepDecay step = 3;
863
+ */
864
+ value: StepDecay;
865
+ case: "step";
866
+ } | {
867
+ case: undefined;
868
+ value?: undefined;
869
+ };
870
+ };
871
+ /**
872
+ * Describes the message memoir.v1.Decay.
873
+ * Use `create(DecaySchema)` to create a new message.
874
+ */
875
+ export declare const DecaySchema: GenMessage<Decay>;
876
+ /**
877
+ * exp(-ln(2) * age / half_life); reaches 0.5 at half_life.
878
+ *
879
+ * @generated from message memoir.v1.ExponentialDecay
880
+ */
881
+ export type ExponentialDecay = Message<"memoir.v1.ExponentialDecay"> & {
882
+ /**
883
+ * @generated from field: google.protobuf.Duration half_life = 1;
884
+ */
885
+ halfLife?: Duration;
886
+ };
887
+ /**
888
+ * Describes the message memoir.v1.ExponentialDecay.
889
+ * Use `create(ExponentialDecaySchema)` to create a new message.
890
+ */
891
+ export declare const ExponentialDecaySchema: GenMessage<ExponentialDecay>;
892
+ /**
893
+ * 1 / (1 + age / scale); reaches 0.5 at scale, slower tail than exponential.
894
+ *
895
+ * @generated from message memoir.v1.ReciprocalDecay
896
+ */
897
+ export type ReciprocalDecay = Message<"memoir.v1.ReciprocalDecay"> & {
898
+ /**
899
+ * @generated from field: google.protobuf.Duration scale = 1;
900
+ */
901
+ scale?: Duration;
902
+ };
903
+ /**
904
+ * Describes the message memoir.v1.ReciprocalDecay.
905
+ * Use `create(ReciprocalDecaySchema)` to create a new message.
906
+ */
907
+ export declare const ReciprocalDecaySchema: GenMessage<ReciprocalDecay>;
908
+ /**
909
+ * Bucketed decay. Buckets are ordered by ascending boundary; an age within
910
+ * [prev_boundary, boundary] takes that bucket's value; ages past the last
911
+ * boundary take the last value.
912
+ *
913
+ * @generated from message memoir.v1.StepDecay
914
+ */
915
+ export type StepDecay = Message<"memoir.v1.StepDecay"> & {
916
+ /**
917
+ * @generated from field: repeated memoir.v1.DecayBucket buckets = 1;
918
+ */
919
+ buckets: DecayBucket[];
920
+ };
921
+ /**
922
+ * Describes the message memoir.v1.StepDecay.
923
+ * Use `create(StepDecaySchema)` to create a new message.
924
+ */
925
+ export declare const StepDecaySchema: GenMessage<StepDecay>;
926
+ /**
927
+ * @generated from message memoir.v1.DecayBucket
928
+ */
929
+ export type DecayBucket = Message<"memoir.v1.DecayBucket"> & {
930
+ /**
931
+ * @generated from field: google.protobuf.Duration boundary = 1;
932
+ */
933
+ boundary?: Duration;
934
+ /**
935
+ * @generated from field: float value = 2;
936
+ */
937
+ value: number;
938
+ };
939
+ /**
940
+ * Describes the message memoir.v1.DecayBucket.
941
+ * Use `create(DecayBucketSchema)` to create a new message.
942
+ */
943
+ export declare const DecayBucketSchema: GenMessage<DecayBucket>;
944
+ /**
945
+ * Query result with its hybrid (blended cosine + recency) score attached.
946
+ * Distinct from `SearchHit`: that hit's `score` is raw cosine; this one's
947
+ * is the post-re-rank hybrid score.
948
+ *
949
+ * @generated from message memoir.v1.QueryHit
950
+ */
951
+ export type QueryHit = Message<"memoir.v1.QueryHit"> & {
952
+ /**
953
+ * @generated from field: memoir.v1.Memory memory = 1;
954
+ */
955
+ memory?: Memory;
956
+ /**
957
+ * @generated from field: float score = 2;
958
+ */
959
+ score: number;
960
+ };
961
+ /**
962
+ * Describes the message memoir.v1.QueryHit.
963
+ * Use `create(QueryHitSchema)` to create a new message.
964
+ */
965
+ export declare const QueryHitSchema: GenMessage<QueryHit>;
966
+ /**
967
+ * @generated from message memoir.v1.QueryRequest
968
+ */
969
+ export type QueryRequest = Message<"memoir.v1.QueryRequest"> & {
970
+ /**
971
+ * @generated from field: memoir.v1.Scope scope = 1;
972
+ */
973
+ scope?: Scope;
974
+ /**
975
+ * @generated from field: string query = 2;
976
+ */
977
+ query: string;
978
+ /**
979
+ * Maximum hits to return. `0` = library default (10, `DEFAULT_QUERY_LIMIT`).
980
+ *
981
+ * @generated from field: int32 limit = 3;
982
+ */
983
+ limit: number;
984
+ /**
985
+ * Restricts to the selected kind(s). Omitted or both-false = all kinds.
986
+ *
987
+ * @generated from field: optional memoir.v1.KindSelector kinds = 4;
988
+ */
989
+ kinds?: KindSelector;
990
+ /**
991
+ * Optional caller-supplied metadata filter, AND-joined with scope+kind.
992
+ *
993
+ * @generated from field: optional memoir.v1.MemoryFilter metadata_filter = 5;
994
+ */
995
+ metadataFilter?: MemoryFilter;
996
+ /**
997
+ * Optional cosine floor applied at CANDIDATE-RETRIEVAL, before hybrid
998
+ * re-ranking — NOT a floor on the final hybrid score. Candidates below
999
+ * this raw-cosine value never enter the re-rank. Unset = no floor.
1000
+ *
1001
+ * @generated from field: optional float min_similarity = 6;
1002
+ */
1003
+ minSimilarity?: number;
1004
+ /**
1005
+ * Half-open time windows on write-time / event-time. See `TimelineRequest`
1006
+ * for the inclusive-after / exclusive-before convention.
1007
+ *
1008
+ * @generated from field: optional google.protobuf.Timestamp created_after = 7;
1009
+ */
1010
+ createdAfter?: Timestamp;
1011
+ /**
1012
+ * @generated from field: optional google.protobuf.Timestamp created_before = 8;
1013
+ */
1014
+ createdBefore?: Timestamp;
1015
+ /**
1016
+ * @generated from field: optional google.protobuf.Timestamp event_at_after = 9;
1017
+ */
1018
+ eventAtAfter?: Timestamp;
1019
+ /**
1020
+ * @generated from field: optional google.protobuf.Timestamp event_at_before = 10;
1021
+ */
1022
+ eventAtBefore?: Timestamp;
1023
+ /**
1024
+ * Ranking strategy. Unset = library default hybrid (parameters may drift
1025
+ * pre-1.0; pin an explicit Ranking for stable behavior).
1026
+ *
1027
+ * @generated from field: optional memoir.v1.Ranking ranking = 11;
1028
+ */
1029
+ ranking?: Ranking;
1030
+ };
1031
+ /**
1032
+ * Describes the message memoir.v1.QueryRequest.
1033
+ * Use `create(QueryRequestSchema)` to create a new message.
1034
+ */
1035
+ export declare const QueryRequestSchema: GenMessage<QueryRequest>;
1036
+ /**
1037
+ * @generated from message memoir.v1.QueryResponse
1038
+ */
1039
+ export type QueryResponse = Message<"memoir.v1.QueryResponse"> & {
1040
+ /**
1041
+ * Ranked hits, best-first. Each carries its hybrid score.
1042
+ *
1043
+ * @generated from field: repeated memoir.v1.QueryHit hits = 1;
1044
+ */
1045
+ hits: QueryHit[];
1046
+ /**
1047
+ * The ranking that produced this result, with library defaults filled in
1048
+ * when the request left `ranking` unset. Mirrors
1049
+ * `MemoryContext::strategy_used()`.
1050
+ *
1051
+ * @generated from field: memoir.v1.Ranking ranking_used = 2;
1052
+ */
1053
+ rankingUsed?: Ranking;
1054
+ };
1055
+ /**
1056
+ * Describes the message memoir.v1.QueryResponse.
1057
+ * Use `create(QueryResponseSchema)` to create a new message.
1058
+ */
1059
+ export declare const QueryResponseSchema: GenMessage<QueryResponse>;
1060
+ /**
1061
+ * @generated from message memoir.v1.EditRequest
1062
+ */
1063
+ export type EditRequest = Message<"memoir.v1.EditRequest"> & {
1064
+ /**
1065
+ * The memory to edit.
1066
+ *
1067
+ * @generated from field: string pid = 1;
1068
+ */
1069
+ pid: string;
1070
+ /**
1071
+ * Fields to overwrite. Each is independent: an unset field is left
1072
+ * untouched, a set field is overwritten. An EditRequest with no fields
1073
+ * set is a no-op that returns the current row. There is no way to clear
1074
+ * `event_at` back to unset over the wire (mirrors the library, which
1075
+ * only supports setting it).
1076
+ *
1077
+ * @generated from field: optional string content = 2;
1078
+ */
1079
+ content?: string;
1080
+ /**
1081
+ * @generated from field: optional google.protobuf.Struct metadata = 3;
1082
+ */
1083
+ metadata?: JsonObject;
1084
+ /**
1085
+ * @generated from field: optional google.protobuf.Timestamp event_at = 4;
1086
+ */
1087
+ eventAt?: Timestamp;
1088
+ };
1089
+ /**
1090
+ * Describes the message memoir.v1.EditRequest.
1091
+ * Use `create(EditRequestSchema)` to create a new message.
1092
+ */
1093
+ export declare const EditRequestSchema: GenMessage<EditRequest>;
1094
+ /**
1095
+ * @generated from message memoir.v1.EditResponse
1096
+ */
1097
+ export type EditResponse = Message<"memoir.v1.EditResponse"> & {
1098
+ /**
1099
+ * The updated memory. After a content edit the row is re-embedding, so
1100
+ * `status` is PENDING and the row is briefly excluded from search —
1101
+ * same lifecycle as a fresh Remember.
1102
+ *
1103
+ * @generated from field: memoir.v1.Memory memory = 1;
1104
+ */
1105
+ memory?: Memory;
1106
+ };
1107
+ /**
1108
+ * Describes the message memoir.v1.EditResponse.
1109
+ * Use `create(EditResponseSchema)` to create a new message.
1110
+ */
1111
+ export declare const EditResponseSchema: GenMessage<EditResponse>;
1112
+ /**
1113
+ * @generated from message memoir.v1.FeedbackRequest
1114
+ */
1115
+ export type FeedbackRequest = Message<"memoir.v1.FeedbackRequest"> & {
1116
+ /**
1117
+ * The wrong *semantic* memory the user is correcting (the fact they saw in
1118
+ * recall). Must be a semantic row with an episodic source; an episodic pid
1119
+ * is rejected (correct those via Edit).
1120
+ *
1121
+ * @generated from field: string pid = 1;
1122
+ */
1123
+ pid: string;
1124
+ /**
1125
+ * The user's correction, woven into the re-extraction prompt so the model
1126
+ * fixes its reasoning. Optional, but supplying it is the point — without it
1127
+ * the source is re-extracted blind.
1128
+ *
1129
+ * @generated from field: optional string correction = 2;
1130
+ */
1131
+ correction?: string;
1132
+ };
1133
+ /**
1134
+ * Describes the message memoir.v1.FeedbackRequest.
1135
+ * Use `create(FeedbackRequestSchema)` to create a new message.
1136
+ */
1137
+ export declare const FeedbackRequestSchema: GenMessage<FeedbackRequest>;
1138
+ /**
1139
+ * Empty: feedback is fire-and-forget. The correction completes behind the
1140
+ * worker queue; re-Recall later to observe the corrected rows.
1141
+ *
1142
+ * @generated from message memoir.v1.FeedbackResponse
1143
+ */
1144
+ export type FeedbackResponse = Message<"memoir.v1.FeedbackResponse"> & {};
1145
+ /**
1146
+ * Describes the message memoir.v1.FeedbackResponse.
1147
+ * Use `create(FeedbackResponseSchema)` to create a new message.
1148
+ */
1149
+ export declare const FeedbackResponseSchema: GenMessage<FeedbackResponse>;
1150
+ /**
1151
+ * @generated from message memoir.v1.SupersessionHistoryRequest
1152
+ */
1153
+ export type SupersessionHistoryRequest = Message<"memoir.v1.SupersessionHistoryRequest"> & {
1154
+ /**
1155
+ * The memory whose supersession trail to read.
1156
+ *
1157
+ * @generated from field: string pid = 1;
1158
+ */
1159
+ pid: string;
1160
+ };
1161
+ /**
1162
+ * Describes the message memoir.v1.SupersessionHistoryRequest.
1163
+ * Use `create(SupersessionHistoryRequestSchema)` to create a new message.
1164
+ */
1165
+ export declare const SupersessionHistoryRequestSchema: GenMessage<SupersessionHistoryRequest>;
1166
+ /**
1167
+ * @generated from message memoir.v1.SupersessionHistoryResponse
1168
+ */
1169
+ export type SupersessionHistoryResponse = Message<"memoir.v1.SupersessionHistoryResponse"> & {
1170
+ /**
1171
+ * The full event trail, oldest first. Empty when the memory was never
1172
+ * superseded (or doesn't exist — both produce no rows).
1173
+ *
1174
+ * @generated from field: repeated memoir.v1.SupersessionEvent events = 1;
1175
+ */
1176
+ events: SupersessionEvent[];
1177
+ };
1178
+ /**
1179
+ * Describes the message memoir.v1.SupersessionHistoryResponse.
1180
+ * Use `create(SupersessionHistoryResponseSchema)` to create a new message.
1181
+ */
1182
+ export declare const SupersessionHistoryResponseSchema: GenMessage<SupersessionHistoryResponse>;
1183
+ /**
1184
+ * @generated from message memoir.v1.ListAgentsRequest
1185
+ */
1186
+ export type ListAgentsRequest = Message<"memoir.v1.ListAgentsRequest"> & {
1187
+ /**
1188
+ * The org whose agents to list.
1189
+ *
1190
+ * @generated from field: string org_id = 1;
1191
+ */
1192
+ orgId: string;
1193
+ /**
1194
+ * The user whose agents to list.
1195
+ *
1196
+ * @generated from field: string user_id = 2;
1197
+ */
1198
+ userId: string;
1199
+ };
1200
+ /**
1201
+ * Describes the message memoir.v1.ListAgentsRequest.
1202
+ * Use `create(ListAgentsRequestSchema)` to create a new message.
1203
+ */
1204
+ export declare const ListAgentsRequestSchema: GenMessage<ListAgentsRequest>;
1205
+ /**
1206
+ * @generated from message memoir.v1.ListAgentsResponse
1207
+ */
1208
+ export type ListAgentsResponse = Message<"memoir.v1.ListAgentsResponse"> & {
1209
+ /**
1210
+ * Distinct agent ids in the org + user scope, sorted ascending. Empty
1211
+ * when the scope has no memories yet.
1212
+ *
1213
+ * @generated from field: repeated string agent_ids = 1;
1214
+ */
1215
+ agentIds: string[];
1216
+ };
1217
+ /**
1218
+ * Describes the message memoir.v1.ListAgentsResponse.
1219
+ * Use `create(ListAgentsResponseSchema)` to create a new message.
1220
+ */
1221
+ export declare const ListAgentsResponseSchema: GenMessage<ListAgentsResponse>;
1222
+ /**
1223
+ * One supersede or unsupersede decision against a memory. Mirrors memoir-
1224
+ * core's `SupersessionEvent`. Distinct from `Supersession` (current marker,
1225
+ * non-null winner): `winner_pid` here is optional because unsupersede events
1226
+ * carry no winner.
1227
+ *
1228
+ * @generated from message memoir.v1.SupersessionEvent
1229
+ */
1230
+ export type SupersessionEvent = Message<"memoir.v1.SupersessionEvent"> & {
1231
+ /**
1232
+ * @generated from field: optional string winner_pid = 1;
1233
+ */
1234
+ winnerPid?: string;
1235
+ /**
1236
+ * @generated from field: google.protobuf.Timestamp decided_at = 2;
1237
+ */
1238
+ decidedAt?: Timestamp;
1239
+ };
1240
+ /**
1241
+ * Describes the message memoir.v1.SupersessionEvent.
1242
+ * Use `create(SupersessionEventSchema)` to create a new message.
1243
+ */
1244
+ export declare const SupersessionEventSchema: GenMessage<SupersessionEvent>;
1245
+ /**
1246
+ * @generated from enum memoir.v1.MemoryStatus
1247
+ */
1248
+ export declare enum MemoryStatus {
1249
+ /**
1250
+ * @generated from enum value: MEMORY_STATUS_UNSPECIFIED = 0;
1251
+ */
1252
+ UNSPECIFIED = 0,
1253
+ /**
1254
+ * Written, not yet processed by the worker.
1255
+ *
1256
+ * @generated from enum value: MEMORY_STATUS_PENDING = 1;
1257
+ */
1258
+ PENDING = 1,
1259
+ /**
1260
+ * Extraction + embedding + graph update done.
1261
+ *
1262
+ * @generated from enum value: MEMORY_STATUS_PROCESSED = 2;
1263
+ */
1264
+ PROCESSED = 2,
1265
+ /**
1266
+ * Processing failed after max retries. See admin "failed writes" view.
1267
+ *
1268
+ * @generated from enum value: MEMORY_STATUS_FAILED = 3;
1269
+ */
1270
+ FAILED = 3
1271
+ }
1272
+ /**
1273
+ * Describes the enum memoir.v1.MemoryStatus.
1274
+ */
1275
+ export declare const MemoryStatusSchema: GenEnum<MemoryStatus>;
1276
+ /**
1277
+ * @generated from enum memoir.v1.MemoryKind
1278
+ */
1279
+ export declare enum MemoryKind {
1280
+ /**
1281
+ * @generated from enum value: MEMORY_KIND_UNSPECIFIED = 0;
1282
+ */
1283
+ UNSPECIFIED = 0,
1284
+ /**
1285
+ * Raw utterance written via Remember.
1286
+ *
1287
+ * @generated from enum value: MEMORY_KIND_EPISODIC = 1;
1288
+ */
1289
+ EPISODIC = 1,
1290
+ /**
1291
+ * Fact derived from an episodic source by extraction.
1292
+ *
1293
+ * @generated from enum value: MEMORY_KIND_SEMANTIC = 2;
1294
+ */
1295
+ SEMANTIC = 2
1296
+ }
1297
+ /**
1298
+ * Describes the enum memoir.v1.MemoryKind.
1299
+ */
1300
+ export declare const MemoryKindSchema: GenEnum<MemoryKind>;
1301
+ /**
1302
+ * MemoryService is the canonical read/write surface for processed memories.
1303
+ *
1304
+ * v0.1: handlers return Unimplemented. The proto is defined now to lock in
1305
+ * the SDK surface so consumers can integrate against stable types.
1306
+ * The memory epic implements real handlers.
1307
+ *
1308
+ * @generated from service memoir.v1.MemoryService
1309
+ */
1310
+ export declare const MemoryService: GenService<{
1311
+ /**
1312
+ * Semantic retrieval within a scope. Vector + optional graph traversal,
1313
+ * no LLM call. Hot path — designed to add minimal latency to agent loops.
1314
+ *
1315
+ * @generated from rpc memoir.v1.MemoryService.Search
1316
+ */
1317
+ search: {
1318
+ methodKind: "unary";
1319
+ input: typeof SearchRequestSchema;
1320
+ output: typeof SearchResponseSchema;
1321
+ };
1322
+ /**
1323
+ * Direct lookup by memory pid. Bypasses vector search.
1324
+ *
1325
+ * @generated from rpc memoir.v1.MemoryService.Recall
1326
+ */
1327
+ recall: {
1328
+ methodKind: "unary";
1329
+ input: typeof RecallRequestSchema;
1330
+ output: typeof RecallResponseSchema;
1331
+ };
1332
+ /**
1333
+ * Write a memory. Returns immediately after persisting raw content;
1334
+ * extraction / embedding / contradiction detection happen asynchronously.
1335
+ *
1336
+ * @generated from rpc memoir.v1.MemoryService.Remember
1337
+ */
1338
+ remember: {
1339
+ methodKind: "unary";
1340
+ input: typeof RememberRequestSchema;
1341
+ output: typeof RememberResponseSchema;
1342
+ };
1343
+ /**
1344
+ * Soft- or hard-delete a memory or a scope's worth of memories.
1345
+ *
1346
+ * @generated from rpc memoir.v1.MemoryService.Forget
1347
+ */
1348
+ forget: {
1349
+ methodKind: "unary";
1350
+ input: typeof ForgetRequestSchema;
1351
+ output: typeof ForgetResponseSchema;
1352
+ };
1353
+ /**
1354
+ * Chronological event-log read within a scope. Postgres-only — no vector
1355
+ * search, no LLM. Includes superseded rows by default (audit view).
1356
+ * Newest-first unless `ascending` is set. Wraps memoir-core's
1357
+ * `Client::timeline`.
1358
+ *
1359
+ * @generated from rpc memoir.v1.MemoryService.Timeline
1360
+ */
1361
+ timeline: {
1362
+ methodKind: "unary";
1363
+ input: typeof TimelineRequestSchema;
1364
+ output: typeof TimelineResponseSchema;
1365
+ };
1366
+ /**
1367
+ * Point-in-time read: memoir's state of knowledge as of a timestamp.
1368
+ * Returns memories created on or before `as_of` that were not yet
1369
+ * superseded then. Postgres-only. Wraps memoir-core's
1370
+ * `Client::recall_as_of`.
1371
+ *
1372
+ * @generated from rpc memoir.v1.MemoryService.RecallAsOf
1373
+ */
1374
+ recallAsOf: {
1375
+ methodKind: "unary";
1376
+ input: typeof RecallAsOfRequestSchema;
1377
+ output: typeof RecallAsOfResponseSchema;
1378
+ };
1379
+ /**
1380
+ * Hybrid-ranked retrieval: vector candidates re-ranked by a blend of
1381
+ * cosine similarity and recency, returning prompt-shaped context. Wraps
1382
+ * memoir-core's `Client::query`. The response carries raw memories +
1383
+ * their hybrid score + the strategy used; rendering to a prompt string
1384
+ * is the SDK's job, not the wire's.
1385
+ *
1386
+ * @generated from rpc memoir.v1.MemoryService.Query
1387
+ */
1388
+ query: {
1389
+ methodKind: "unary";
1390
+ input: typeof QueryRequestSchema;
1391
+ output: typeof QueryResponseSchema;
1392
+ };
1393
+ /**
1394
+ * In-place correction of an existing memory — distinct from supersession
1395
+ * (edit overwrites because the original was wrong; supersede preserves
1396
+ * because new info obsoletes old). Content changes trigger re-embedding,
1397
+ * so the row is briefly unsearchable. Wraps memoir-core's `Client::edit`.
1398
+ *
1399
+ * @generated from rpc memoir.v1.MemoryService.Edit
1400
+ */
1401
+ edit: {
1402
+ methodKind: "unary";
1403
+ input: typeof EditRequestSchema;
1404
+ output: typeof EditResponseSchema;
1405
+ };
1406
+ /**
1407
+ * Corrects a wrong extraction by teaching, not editing. The pid is the
1408
+ * wrong *semantic* memory the user saw; memoir retires its derived rows
1409
+ * and re-derives from the episodic source with the correction in context.
1410
+ * Fire-and-forget: returns once the reprocess is enqueued. To correct the
1411
+ * episodic record itself, use Edit. Wraps memoir-core's `Client::feedback`.
1412
+ *
1413
+ * @generated from rpc memoir.v1.MemoryService.Feedback
1414
+ */
1415
+ feedback: {
1416
+ methodKind: "unary";
1417
+ input: typeof FeedbackRequestSchema;
1418
+ output: typeof FeedbackResponseSchema;
1419
+ };
1420
+ /**
1421
+ * Returns every supersede/unsupersede decision against a memory in
1422
+ * chronological order — the full audit trail behind a row's current
1423
+ * `Memory.supersession` marker. A pid with no events (never superseded
1424
+ * or simply absent) returns an empty list. Wraps memoir-core's
1425
+ * `Client::supersession_history`.
1426
+ *
1427
+ * @generated from rpc memoir.v1.MemoryService.SupersessionHistory
1428
+ */
1429
+ supersessionHistory: {
1430
+ methodKind: "unary";
1431
+ input: typeof SupersessionHistoryRequestSchema;
1432
+ output: typeof SupersessionHistoryResponseSchema;
1433
+ };
1434
+ /**
1435
+ * Lists the distinct agent ids that have memories under an org + user.
1436
+ * Caller-scoped agent discovery for pickers/autocomplete — a tenant sees
1437
+ * only their own agents. An empty org/user returns no agents. Wraps
1438
+ * memoir-core's `Client::list_agents`.
1439
+ *
1440
+ * @generated from rpc memoir.v1.MemoryService.ListAgents
1441
+ */
1442
+ listAgents: {
1443
+ methodKind: "unary";
1444
+ input: typeof ListAgentsRequestSchema;
1445
+ output: typeof ListAgentsResponseSchema;
1446
+ };
1447
+ }>;
1448
+ //# sourceMappingURL=memory_pb.d.ts.map