@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.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +77 -0
- package/dist/memoir/v1/admin_pb.d.ts +534 -0
- package/dist/memoir/v1/admin_pb.d.ts.map +1 -0
- package/dist/memoir/v1/admin_pb.js +167 -0
- package/dist/memoir/v1/auth_pb.d.ts +689 -0
- package/dist/memoir/v1/auth_pb.d.ts.map +1 -0
- package/dist/memoir/v1/auth_pb.js +211 -0
- package/dist/memoir/v1/memory_pb.d.ts +1448 -0
- package/dist/memoir/v1/memory_pb.d.ts.map +1 -0
- package/dist/memoir/v1/memory_pb.js +302 -0
- package/package.json +53 -0
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file memoir/v1/admin.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_memoir_v1_admin: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* FailedJob mirrors `memoir_core::jobs::FailedJob` exactly. Deliberately
|
|
10
|
+
* excludes the original `payload` and any content from the referenced
|
|
11
|
+
* memory — see the service-level PII boundary in AdminService's doc
|
|
12
|
+
* comment.
|
|
13
|
+
*
|
|
14
|
+
* @generated from message memoir.v1.FailedJob
|
|
15
|
+
*/
|
|
16
|
+
export type FailedJob = Message<"memoir.v1.FailedJob"> & {
|
|
17
|
+
/**
|
|
18
|
+
* @generated from field: int64 id = 1;
|
|
19
|
+
*/
|
|
20
|
+
id: bigint;
|
|
21
|
+
/**
|
|
22
|
+
* The memory pid this job processes.
|
|
23
|
+
*
|
|
24
|
+
* @generated from field: string source_pid = 2;
|
|
25
|
+
*/
|
|
26
|
+
sourcePid: string;
|
|
27
|
+
/**
|
|
28
|
+
* @generated from field: memoir.v1.JobKind kind = 3;
|
|
29
|
+
*/
|
|
30
|
+
kind: JobKind;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from field: int32 attempts = 4;
|
|
33
|
+
*/
|
|
34
|
+
attempts: number;
|
|
35
|
+
/**
|
|
36
|
+
* @generated from field: optional string failure_reason = 5;
|
|
37
|
+
*/
|
|
38
|
+
failureReason?: string;
|
|
39
|
+
/**
|
|
40
|
+
* @generated from field: google.protobuf.Timestamp updated_at = 6;
|
|
41
|
+
*/
|
|
42
|
+
updatedAt?: Timestamp;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Describes the message memoir.v1.FailedJob.
|
|
46
|
+
* Use `create(FailedJobSchema)` to create a new message.
|
|
47
|
+
*/
|
|
48
|
+
export declare const FailedJobSchema: GenMessage<FailedJob>;
|
|
49
|
+
/**
|
|
50
|
+
* @generated from message memoir.v1.ListFailedJobsRequest
|
|
51
|
+
*/
|
|
52
|
+
export type ListFailedJobsRequest = Message<"memoir.v1.ListFailedJobsRequest"> & {
|
|
53
|
+
/**
|
|
54
|
+
* Maximum rows to return. `limit = 0` means "use library default" (the
|
|
55
|
+
* implementer maps to whatever cap `Client::failed_jobs` accepts at
|
|
56
|
+
* ticket-time). Pagination is limit-only in v0.1 — no cursor.
|
|
57
|
+
*
|
|
58
|
+
* @generated from field: int32 limit = 1;
|
|
59
|
+
*/
|
|
60
|
+
limit: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Describes the message memoir.v1.ListFailedJobsRequest.
|
|
64
|
+
* Use `create(ListFailedJobsRequestSchema)` to create a new message.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ListFailedJobsRequestSchema: GenMessage<ListFailedJobsRequest>;
|
|
67
|
+
/**
|
|
68
|
+
* @generated from message memoir.v1.ListFailedJobsResponse
|
|
69
|
+
*/
|
|
70
|
+
export type ListFailedJobsResponse = Message<"memoir.v1.ListFailedJobsResponse"> & {
|
|
71
|
+
/**
|
|
72
|
+
* @generated from field: repeated memoir.v1.FailedJob jobs = 1;
|
|
73
|
+
*/
|
|
74
|
+
jobs: FailedJob[];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Describes the message memoir.v1.ListFailedJobsResponse.
|
|
78
|
+
* Use `create(ListFailedJobsResponseSchema)` to create a new message.
|
|
79
|
+
*/
|
|
80
|
+
export declare const ListFailedJobsResponseSchema: GenMessage<ListFailedJobsResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from message memoir.v1.PendingJobsCountRequest
|
|
83
|
+
*/
|
|
84
|
+
export type PendingJobsCountRequest = Message<"memoir.v1.PendingJobsCountRequest"> & {};
|
|
85
|
+
/**
|
|
86
|
+
* Describes the message memoir.v1.PendingJobsCountRequest.
|
|
87
|
+
* Use `create(PendingJobsCountRequestSchema)` to create a new message.
|
|
88
|
+
*/
|
|
89
|
+
export declare const PendingJobsCountRequestSchema: GenMessage<PendingJobsCountRequest>;
|
|
90
|
+
/**
|
|
91
|
+
* @generated from message memoir.v1.PendingJobsCountResponse
|
|
92
|
+
*/
|
|
93
|
+
export type PendingJobsCountResponse = Message<"memoir.v1.PendingJobsCountResponse"> & {
|
|
94
|
+
/**
|
|
95
|
+
* Number of jobs currently in `pending` state. Library returns `u64`;
|
|
96
|
+
* wire is `int64` for TS-compat (JS `number` is f64, safe to 2^53-1).
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: int64 count = 1;
|
|
99
|
+
*/
|
|
100
|
+
count: bigint;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Describes the message memoir.v1.PendingJobsCountResponse.
|
|
104
|
+
* Use `create(PendingJobsCountResponseSchema)` to create a new message.
|
|
105
|
+
*/
|
|
106
|
+
export declare const PendingJobsCountResponseSchema: GenMessage<PendingJobsCountResponse>;
|
|
107
|
+
/**
|
|
108
|
+
* @generated from message memoir.v1.RetryJobRequest
|
|
109
|
+
*/
|
|
110
|
+
export type RetryJobRequest = Message<"memoir.v1.RetryJobRequest"> & {
|
|
111
|
+
/**
|
|
112
|
+
* @generated from field: int64 id = 1;
|
|
113
|
+
*/
|
|
114
|
+
id: bigint;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Describes the message memoir.v1.RetryJobRequest.
|
|
118
|
+
* Use `create(RetryJobRequestSchema)` to create a new message.
|
|
119
|
+
*/
|
|
120
|
+
export declare const RetryJobRequestSchema: GenMessage<RetryJobRequest>;
|
|
121
|
+
/**
|
|
122
|
+
* @generated from message memoir.v1.RetryJobResponse
|
|
123
|
+
*/
|
|
124
|
+
export type RetryJobResponse = Message<"memoir.v1.RetryJobResponse"> & {};
|
|
125
|
+
/**
|
|
126
|
+
* Describes the message memoir.v1.RetryJobResponse.
|
|
127
|
+
* Use `create(RetryJobResponseSchema)` to create a new message.
|
|
128
|
+
*/
|
|
129
|
+
export declare const RetryJobResponseSchema: GenMessage<RetryJobResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* No `hard_delete` flag: the library's `Client::delete_failed_job` is
|
|
132
|
+
* unconditional. The referenced memory row is untouched either way.
|
|
133
|
+
*
|
|
134
|
+
* @generated from message memoir.v1.DeleteFailedJobRequest
|
|
135
|
+
*/
|
|
136
|
+
export type DeleteFailedJobRequest = Message<"memoir.v1.DeleteFailedJobRequest"> & {
|
|
137
|
+
/**
|
|
138
|
+
* @generated from field: int64 id = 1;
|
|
139
|
+
*/
|
|
140
|
+
id: bigint;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Describes the message memoir.v1.DeleteFailedJobRequest.
|
|
144
|
+
* Use `create(DeleteFailedJobRequestSchema)` to create a new message.
|
|
145
|
+
*/
|
|
146
|
+
export declare const DeleteFailedJobRequestSchema: GenMessage<DeleteFailedJobRequest>;
|
|
147
|
+
/**
|
|
148
|
+
* @generated from message memoir.v1.DeleteFailedJobResponse
|
|
149
|
+
*/
|
|
150
|
+
export type DeleteFailedJobResponse = Message<"memoir.v1.DeleteFailedJobResponse"> & {};
|
|
151
|
+
/**
|
|
152
|
+
* Describes the message memoir.v1.DeleteFailedJobResponse.
|
|
153
|
+
* Use `create(DeleteFailedJobResponseSchema)` to create a new message.
|
|
154
|
+
*/
|
|
155
|
+
export declare const DeleteFailedJobResponseSchema: GenMessage<DeleteFailedJobResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* @generated from message memoir.v1.RetryFailedJobsRequest
|
|
158
|
+
*/
|
|
159
|
+
export type RetryFailedJobsRequest = Message<"memoir.v1.RetryFailedJobsRequest"> & {
|
|
160
|
+
/**
|
|
161
|
+
* When set, only retry jobs of this kind. Unset = retry all kinds.
|
|
162
|
+
*
|
|
163
|
+
* @generated from field: optional memoir.v1.JobKind of_kind = 1;
|
|
164
|
+
*/
|
|
165
|
+
ofKind?: JobKind;
|
|
166
|
+
/**
|
|
167
|
+
* When true, return the affected count without touching any rows.
|
|
168
|
+
*
|
|
169
|
+
* @generated from field: bool dry_run = 2;
|
|
170
|
+
*/
|
|
171
|
+
dryRun: boolean;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Describes the message memoir.v1.RetryFailedJobsRequest.
|
|
175
|
+
* Use `create(RetryFailedJobsRequestSchema)` to create a new message.
|
|
176
|
+
*/
|
|
177
|
+
export declare const RetryFailedJobsRequestSchema: GenMessage<RetryFailedJobsRequest>;
|
|
178
|
+
/**
|
|
179
|
+
* @generated from message memoir.v1.RetryFailedJobsResponse
|
|
180
|
+
*/
|
|
181
|
+
export type RetryFailedJobsResponse = Message<"memoir.v1.RetryFailedJobsResponse"> & {
|
|
182
|
+
/**
|
|
183
|
+
* Number of jobs the operation affected (or, in `dry_run` mode, would
|
|
184
|
+
* have affected). Mirrors `RetryBuilder`'s `u64` return.
|
|
185
|
+
*
|
|
186
|
+
* @generated from field: int64 affected = 1;
|
|
187
|
+
*/
|
|
188
|
+
affected: bigint;
|
|
189
|
+
/**
|
|
190
|
+
* Echo of the request's `dry_run` for caller clarity — confirms that the
|
|
191
|
+
* count reflects a preview, not a real retry.
|
|
192
|
+
*
|
|
193
|
+
* @generated from field: bool dry_run = 2;
|
|
194
|
+
*/
|
|
195
|
+
dryRun: boolean;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Describes the message memoir.v1.RetryFailedJobsResponse.
|
|
199
|
+
* Use `create(RetryFailedJobsResponseSchema)` to create a new message.
|
|
200
|
+
*/
|
|
201
|
+
export declare const RetryFailedJobsResponseSchema: GenMessage<RetryFailedJobsResponse>;
|
|
202
|
+
/**
|
|
203
|
+
* @generated from message memoir.v1.UnsupersedeRequest
|
|
204
|
+
*/
|
|
205
|
+
export type UnsupersedeRequest = Message<"memoir.v1.UnsupersedeRequest"> & {
|
|
206
|
+
/**
|
|
207
|
+
* @generated from field: string pid = 1;
|
|
208
|
+
*/
|
|
209
|
+
pid: string;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Describes the message memoir.v1.UnsupersedeRequest.
|
|
213
|
+
* Use `create(UnsupersedeRequestSchema)` to create a new message.
|
|
214
|
+
*/
|
|
215
|
+
export declare const UnsupersedeRequestSchema: GenMessage<UnsupersedeRequest>;
|
|
216
|
+
/**
|
|
217
|
+
* @generated from message memoir.v1.UnsupersedeResponse
|
|
218
|
+
*/
|
|
219
|
+
export type UnsupersedeResponse = Message<"memoir.v1.UnsupersedeResponse"> & {};
|
|
220
|
+
/**
|
|
221
|
+
* Describes the message memoir.v1.UnsupersedeResponse.
|
|
222
|
+
* Use `create(UnsupersedeResponseSchema)` to create a new message.
|
|
223
|
+
*/
|
|
224
|
+
export declare const UnsupersedeResponseSchema: GenMessage<UnsupersedeResponse>;
|
|
225
|
+
/**
|
|
226
|
+
* @generated from message memoir.v1.ReconcileRequest
|
|
227
|
+
*/
|
|
228
|
+
export type ReconcileRequest = Message<"memoir.v1.ReconcileRequest"> & {
|
|
229
|
+
/**
|
|
230
|
+
* When true, run only the failed-row retry pass; skip orphan cleanup.
|
|
231
|
+
*
|
|
232
|
+
* @generated from field: bool only_retry_failed = 1;
|
|
233
|
+
*/
|
|
234
|
+
onlyRetryFailed: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* When true, run only the orphan-cleanup pass; skip retry. Set BOTH
|
|
237
|
+
* flags to false (or omit both) to run both passes.
|
|
238
|
+
*
|
|
239
|
+
* @generated from field: bool only_clean_orphans = 2;
|
|
240
|
+
*/
|
|
241
|
+
onlyCleanOrphans: boolean;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Describes the message memoir.v1.ReconcileRequest.
|
|
245
|
+
* Use `create(ReconcileRequestSchema)` to create a new message.
|
|
246
|
+
*/
|
|
247
|
+
export declare const ReconcileRequestSchema: GenMessage<ReconcileRequest>;
|
|
248
|
+
/**
|
|
249
|
+
* @generated from message memoir.v1.ReconcileResponse
|
|
250
|
+
*/
|
|
251
|
+
export type ReconcileResponse = Message<"memoir.v1.ReconcileResponse"> & {
|
|
252
|
+
/**
|
|
253
|
+
* Mirrors `memoir_core::client::ReconcileSummary`. Counts reflect work
|
|
254
|
+
* performed, not work attempted — see the library docs.
|
|
255
|
+
*
|
|
256
|
+
* Rows the retry pass attempted to re-embed.
|
|
257
|
+
*
|
|
258
|
+
* @generated from field: int64 failed_retried = 1;
|
|
259
|
+
*/
|
|
260
|
+
failedRetried: bigint;
|
|
261
|
+
/**
|
|
262
|
+
* Rows the retry pass moved into `indexed`.
|
|
263
|
+
*
|
|
264
|
+
* @generated from field: int64 failed_recovered = 2;
|
|
265
|
+
*/
|
|
266
|
+
failedRecovered: bigint;
|
|
267
|
+
/**
|
|
268
|
+
* Orphan vectors deleted from the index.
|
|
269
|
+
*
|
|
270
|
+
* @generated from field: int64 orphans_deleted = 3;
|
|
271
|
+
*/
|
|
272
|
+
orphansDeleted: bigint;
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Describes the message memoir.v1.ReconcileResponse.
|
|
276
|
+
* Use `create(ReconcileResponseSchema)` to create a new message.
|
|
277
|
+
*/
|
|
278
|
+
export declare const ReconcileResponseSchema: GenMessage<ReconcileResponse>;
|
|
279
|
+
/**
|
|
280
|
+
* @generated from message memoir.v1.ExtractionStatsRequest
|
|
281
|
+
*/
|
|
282
|
+
export type ExtractionStatsRequest = Message<"memoir.v1.ExtractionStatsRequest"> & {
|
|
283
|
+
/**
|
|
284
|
+
* Optional scope-subset filters. Each set field narrows the slice; unset
|
|
285
|
+
* imposes no constraint. All three unset aggregates the whole store. These
|
|
286
|
+
* map to memoir-core's `StatsFilter`, a partial scope (not the all-required
|
|
287
|
+
* `Scope`), so `org_id` alone yields a per-tenant number.
|
|
288
|
+
*
|
|
289
|
+
* @generated from field: optional string agent_id = 1;
|
|
290
|
+
*/
|
|
291
|
+
agentId?: string;
|
|
292
|
+
/**
|
|
293
|
+
* @generated from field: optional string org_id = 2;
|
|
294
|
+
*/
|
|
295
|
+
orgId?: string;
|
|
296
|
+
/**
|
|
297
|
+
* @generated from field: optional string user_id = 3;
|
|
298
|
+
*/
|
|
299
|
+
userId?: string;
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Describes the message memoir.v1.ExtractionStatsRequest.
|
|
303
|
+
* Use `create(ExtractionStatsRequestSchema)` to create a new message.
|
|
304
|
+
*/
|
|
305
|
+
export declare const ExtractionStatsRequestSchema: GenMessage<ExtractionStatsRequest>;
|
|
306
|
+
/**
|
|
307
|
+
* One (provider, model) accuracy row. Mirrors `memoir_core::memory::ExtractionStat`.
|
|
308
|
+
*
|
|
309
|
+
* @generated from message memoir.v1.ExtractionStat
|
|
310
|
+
*/
|
|
311
|
+
export type ExtractionStat = Message<"memoir.v1.ExtractionStat"> & {
|
|
312
|
+
/**
|
|
313
|
+
* Producing LLM provider (e.g. "ollama").
|
|
314
|
+
*
|
|
315
|
+
* @generated from field: string provider = 1;
|
|
316
|
+
*/
|
|
317
|
+
provider: string;
|
|
318
|
+
/**
|
|
319
|
+
* Producing model id (e.g. "qwen3:14b").
|
|
320
|
+
*
|
|
321
|
+
* @generated from field: string model = 2;
|
|
322
|
+
*/
|
|
323
|
+
model: string;
|
|
324
|
+
/**
|
|
325
|
+
* Semantic rows produced (active + retired, any reason).
|
|
326
|
+
*
|
|
327
|
+
* @generated from field: int64 total = 3;
|
|
328
|
+
*/
|
|
329
|
+
total: bigint;
|
|
330
|
+
/**
|
|
331
|
+
* Subset retired as a corrected wrong extraction.
|
|
332
|
+
*
|
|
333
|
+
* @generated from field: int64 rejected = 4;
|
|
334
|
+
*/
|
|
335
|
+
rejected: bigint;
|
|
336
|
+
/**
|
|
337
|
+
* Derived `1 − rejected/total` in [0, 1], computed library-side so wire
|
|
338
|
+
* consumers need not reproduce the total = 0 → 1.0 identity. Echoed for
|
|
339
|
+
* convenience; `total`/`rejected` remain authoritative.
|
|
340
|
+
*
|
|
341
|
+
* @generated from field: double accuracy = 5;
|
|
342
|
+
*/
|
|
343
|
+
accuracy: number;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Describes the message memoir.v1.ExtractionStat.
|
|
347
|
+
* Use `create(ExtractionStatSchema)` to create a new message.
|
|
348
|
+
*/
|
|
349
|
+
export declare const ExtractionStatSchema: GenMessage<ExtractionStat>;
|
|
350
|
+
/**
|
|
351
|
+
* @generated from message memoir.v1.ExtractionStatsResponse
|
|
352
|
+
*/
|
|
353
|
+
export type ExtractionStatsResponse = Message<"memoir.v1.ExtractionStatsResponse"> & {
|
|
354
|
+
/**
|
|
355
|
+
* Per-(provider, model) rows, ordered by provider then model. Empty when
|
|
356
|
+
* the slice has no semantic rows.
|
|
357
|
+
*
|
|
358
|
+
* @generated from field: repeated memoir.v1.ExtractionStat stats = 1;
|
|
359
|
+
*/
|
|
360
|
+
stats: ExtractionStat[];
|
|
361
|
+
};
|
|
362
|
+
/**
|
|
363
|
+
* Describes the message memoir.v1.ExtractionStatsResponse.
|
|
364
|
+
* Use `create(ExtractionStatsResponseSchema)` to create a new message.
|
|
365
|
+
*/
|
|
366
|
+
export declare const ExtractionStatsResponseSchema: GenMessage<ExtractionStatsResponse>;
|
|
367
|
+
/**
|
|
368
|
+
* JobKind mirrors `memoir_core::jobs::JobKind`. The set is closed by the
|
|
369
|
+
* CHECK constraint on `memory_jobs.kind`; extending it requires a
|
|
370
|
+
* follow-up library migration first, then a proto bump.
|
|
371
|
+
*
|
|
372
|
+
* @generated from enum memoir.v1.JobKind
|
|
373
|
+
*/
|
|
374
|
+
export declare enum JobKind {
|
|
375
|
+
/**
|
|
376
|
+
* @generated from enum value: JOB_KIND_UNSPECIFIED = 0;
|
|
377
|
+
*/
|
|
378
|
+
UNSPECIFIED = 0,
|
|
379
|
+
/**
|
|
380
|
+
* Embed a memory's content + upsert its vector.
|
|
381
|
+
*
|
|
382
|
+
* @generated from enum value: JOB_KIND_EMBED = 1;
|
|
383
|
+
*/
|
|
384
|
+
EMBED = 1,
|
|
385
|
+
/**
|
|
386
|
+
* Run LLM extraction against an episodic memory.
|
|
387
|
+
*
|
|
388
|
+
* @generated from enum value: JOB_KIND_EXTRACT = 2;
|
|
389
|
+
*/
|
|
390
|
+
EXTRACT = 2,
|
|
391
|
+
/**
|
|
392
|
+
* Run NLI categorization against a semantic memory.
|
|
393
|
+
*
|
|
394
|
+
* @generated from enum value: JOB_KIND_CATEGORIZE = 3;
|
|
395
|
+
*/
|
|
396
|
+
CATEGORIZE = 3,
|
|
397
|
+
/**
|
|
398
|
+
* Re-derive semantic rows from a corrected episodic source.
|
|
399
|
+
*
|
|
400
|
+
* @generated from enum value: JOB_KIND_REPROCESS = 4;
|
|
401
|
+
*/
|
|
402
|
+
REPROCESS = 4
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Describes the enum memoir.v1.JobKind.
|
|
406
|
+
*/
|
|
407
|
+
export declare const JobKindSchema: GenEnum<JobKind>;
|
|
408
|
+
/**
|
|
409
|
+
* AdminService exposes operator-only triage of the write-behind queue.
|
|
410
|
+
*
|
|
411
|
+
* ⚠ Admin-only. Every RPC on this service is gated server-side on
|
|
412
|
+
* `caller.is_admin == true` from the existing AuthService middleware
|
|
413
|
+
* (see `apps/memoir-service/src/middleware/auth.rs`). Non-admin callers
|
|
414
|
+
* receive `PermissionDenied`. The proto carries no permission annotation;
|
|
415
|
+
* the handler is the enforcement point — do not wire AdminService under a
|
|
416
|
+
* handler that skips the admin check.
|
|
417
|
+
*
|
|
418
|
+
* Surface mirrors the library admin methods in
|
|
419
|
+
* `packages/memoir-core/src/client/mod.rs:443-505` and
|
|
420
|
+
* `packages/memoir-core/src/client/admin.rs`. memoir-service is a thin
|
|
421
|
+
* adapter; new admin functionality lands in memoir-core first.
|
|
422
|
+
*
|
|
423
|
+
* Excluded by design (operator PII boundary):
|
|
424
|
+
* - The original job payload and any content from the referenced memory
|
|
425
|
+
* are NEVER included in admin responses. Operators inspecting failures
|
|
426
|
+
* follow up via `MemoryService.Recall` against the source pid when they
|
|
427
|
+
* need the underlying memory's content.
|
|
428
|
+
*
|
|
429
|
+
* ── Queue inspection ─────────────────────────────────────────────────────
|
|
430
|
+
*
|
|
431
|
+
* @generated from service memoir.v1.AdminService
|
|
432
|
+
*/
|
|
433
|
+
export declare const AdminService: GenService<{
|
|
434
|
+
/**
|
|
435
|
+
* List failed jobs newest-first, capped at `limit`. Metadata only — no
|
|
436
|
+
* payload, no memory content. Pagination is limit-only in v0.1.
|
|
437
|
+
*
|
|
438
|
+
* @generated from rpc memoir.v1.AdminService.ListFailedJobs
|
|
439
|
+
*/
|
|
440
|
+
listFailedJobs: {
|
|
441
|
+
methodKind: "unary";
|
|
442
|
+
input: typeof ListFailedJobsRequestSchema;
|
|
443
|
+
output: typeof ListFailedJobsResponseSchema;
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Return the number of jobs currently in `pending` state. Cheap counter
|
|
447
|
+
* for queue-depth dashboards.
|
|
448
|
+
*
|
|
449
|
+
* @generated from rpc memoir.v1.AdminService.PendingJobsCount
|
|
450
|
+
*/
|
|
451
|
+
pendingJobsCount: {
|
|
452
|
+
methodKind: "unary";
|
|
453
|
+
input: typeof PendingJobsCountRequestSchema;
|
|
454
|
+
output: typeof PendingJobsCountResponseSchema;
|
|
455
|
+
};
|
|
456
|
+
/**
|
|
457
|
+
* Retry one failed job by id, clearing the attempt counter (operator
|
|
458
|
+
* intent overrides prior failure budget).
|
|
459
|
+
*
|
|
460
|
+
* @generated from rpc memoir.v1.AdminService.RetryJob
|
|
461
|
+
*/
|
|
462
|
+
retryJob: {
|
|
463
|
+
methodKind: "unary";
|
|
464
|
+
input: typeof RetryJobRequestSchema;
|
|
465
|
+
output: typeof RetryJobResponseSchema;
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* Permanently delete one failed job by id. The referenced memory row is
|
|
469
|
+
* untouched. Destructive — once a failed job is deleted, the memory's
|
|
470
|
+
* processing state is unrecoverable except by re-running `Remember`.
|
|
471
|
+
*
|
|
472
|
+
* @generated from rpc memoir.v1.AdminService.DeleteFailedJob
|
|
473
|
+
*/
|
|
474
|
+
deleteFailedJob: {
|
|
475
|
+
methodKind: "unary";
|
|
476
|
+
input: typeof DeleteFailedJobRequestSchema;
|
|
477
|
+
output: typeof DeleteFailedJobResponseSchema;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Bulk retry every failed job, optionally filtered by kind. Set
|
|
481
|
+
* `dry_run = true` to preview the affected count without modifying any
|
|
482
|
+
* rows — a wide retry against many failed extract jobs can DoS the
|
|
483
|
+
* configured LLM provider.
|
|
484
|
+
*
|
|
485
|
+
* @generated from rpc memoir.v1.AdminService.RetryFailedJobs
|
|
486
|
+
*/
|
|
487
|
+
retryFailedJobs: {
|
|
488
|
+
methodKind: "unary";
|
|
489
|
+
input: typeof RetryFailedJobsRequestSchema;
|
|
490
|
+
output: typeof RetryFailedJobsResponseSchema;
|
|
491
|
+
};
|
|
492
|
+
/**
|
|
493
|
+
* Clear the supersession marker on a memory, restoring it to active
|
|
494
|
+
* state. Operator-only counterpart to the internal supersede path
|
|
495
|
+
* performed by the contradiction-detection pass. Document for operators:
|
|
496
|
+
* do not call in normal flow.
|
|
497
|
+
*
|
|
498
|
+
* @generated from rpc memoir.v1.AdminService.Unsupersede
|
|
499
|
+
*/
|
|
500
|
+
unsupersede: {
|
|
501
|
+
methodKind: "unary";
|
|
502
|
+
input: typeof UnsupersedeRequestSchema;
|
|
503
|
+
output: typeof UnsupersedeResponseSchema;
|
|
504
|
+
};
|
|
505
|
+
/**
|
|
506
|
+
* Run the reconciliation passes: retry failed rows + clean orphan vectors
|
|
507
|
+
* out of the index. Heavyweight — may take many seconds on large stores.
|
|
508
|
+
* Unary, not streaming. memoir-ui should not poll this RPC; it's a
|
|
509
|
+
* human-initiated maintenance action.
|
|
510
|
+
*
|
|
511
|
+
* @generated from rpc memoir.v1.AdminService.Reconcile
|
|
512
|
+
*/
|
|
513
|
+
reconcile: {
|
|
514
|
+
methodKind: "unary";
|
|
515
|
+
input: typeof ReconcileRequestSchema;
|
|
516
|
+
output: typeof ReconcileResponseSchema;
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Extraction accuracy per (provider, model) over a scope slice — the
|
|
520
|
+
* read-only aggregate that proves extraction quality to a consumer
|
|
521
|
+
* (`accuracy = 1 − rejected/total`, rejected = corrected wrong extractions
|
|
522
|
+
* only). No LLM call. Scope fields on the request narrow the slice and are
|
|
523
|
+
* AND-combined; all-unset aggregates the whole store. Wraps memoir-core's
|
|
524
|
+
* `Client::extraction_stats`.
|
|
525
|
+
*
|
|
526
|
+
* @generated from rpc memoir.v1.AdminService.ExtractionStats
|
|
527
|
+
*/
|
|
528
|
+
extractionStats: {
|
|
529
|
+
methodKind: "unary";
|
|
530
|
+
input: typeof ExtractionStatsRequestSchema;
|
|
531
|
+
output: typeof ExtractionStatsResponseSchema;
|
|
532
|
+
};
|
|
533
|
+
}>;
|
|
534
|
+
//# sourceMappingURL=admin_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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