@memoryengine/client 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,1312 @@
1
+ /**
2
+ * RPC Contract - maps method names to input/output types
3
+ *
4
+ * This is the key to type inference: define the contract once,
5
+ * and both server validation and client types are derived from it.
6
+ */
7
+ import { z } from "zod";
8
+ export declare const authMethods: {
9
+ readonly "auth.login": {
10
+ input: z.ZodObject<{
11
+ identifier: z.ZodString;
12
+ password: z.ZodString;
13
+ }, z.core.$strip>;
14
+ _types: {
15
+ input: {
16
+ identifier: string;
17
+ password: string;
18
+ };
19
+ output: {
20
+ key: string;
21
+ principal: {
22
+ id: string;
23
+ email: string | null;
24
+ name: string;
25
+ superuser: boolean;
26
+ createrole: boolean;
27
+ can_login: boolean;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ readonly "auth.whoami": {
33
+ input: z.ZodObject<{}, z.core.$strip>;
34
+ _types: {
35
+ input: Record<string, never>;
36
+ output: {
37
+ principalId: string;
38
+ name: string;
39
+ email: string | null;
40
+ superuser: boolean;
41
+ createrole: boolean;
42
+ can_login: boolean;
43
+ };
44
+ };
45
+ };
46
+ readonly "auth.createApiKey": {
47
+ input: z.ZodObject<{
48
+ name: z.ZodString;
49
+ }, z.core.$strip>;
50
+ _types: {
51
+ input: {
52
+ name: string;
53
+ };
54
+ output: {
55
+ key: string;
56
+ id: string;
57
+ };
58
+ };
59
+ };
60
+ readonly "auth.listApiKeys": {
61
+ input: z.ZodObject<{}, z.core.$strip>;
62
+ _types: {
63
+ input: Record<string, never>;
64
+ output: {
65
+ id: string;
66
+ name: string;
67
+ expires_at: string;
68
+ created_at: string;
69
+ }[];
70
+ };
71
+ };
72
+ readonly "auth.revokeApiKey": {
73
+ input: z.ZodObject<{
74
+ keyId: z.ZodString;
75
+ }, z.core.$strip>;
76
+ _types: {
77
+ input: {
78
+ keyId: string;
79
+ };
80
+ output: {
81
+ success: true;
82
+ };
83
+ };
84
+ };
85
+ };
86
+ export declare const principalMethods: {
87
+ readonly "principal.list": {
88
+ input: z.ZodObject<{}, z.core.$strip>;
89
+ _types: {
90
+ input: Record<string, never>;
91
+ output: {
92
+ id: string;
93
+ email: string | null;
94
+ name: string;
95
+ superuser: boolean;
96
+ createrole: boolean;
97
+ can_login: boolean;
98
+ created_at: string;
99
+ }[];
100
+ };
101
+ };
102
+ readonly "principal.get": {
103
+ input: z.ZodObject<{
104
+ name: z.ZodString;
105
+ }, z.core.$strip>;
106
+ _types: {
107
+ input: {
108
+ name: string;
109
+ };
110
+ output: {
111
+ id: string;
112
+ email: string | null;
113
+ name: string;
114
+ superuser: boolean;
115
+ createrole: boolean;
116
+ can_login: boolean;
117
+ created_at: string;
118
+ };
119
+ };
120
+ };
121
+ readonly "principal.create": {
122
+ input: z.ZodObject<{
123
+ name: z.ZodString;
124
+ email: z.ZodOptional<z.ZodEmail>;
125
+ password: z.ZodOptional<z.ZodString>;
126
+ superuser: z.ZodOptional<z.ZodBoolean>;
127
+ createrole: z.ZodOptional<z.ZodBoolean>;
128
+ can_login: z.ZodOptional<z.ZodBoolean>;
129
+ }, z.core.$strip>;
130
+ _types: {
131
+ input: {
132
+ name: string;
133
+ email?: string | undefined;
134
+ password?: string | undefined;
135
+ superuser?: boolean | undefined;
136
+ createrole?: boolean | undefined;
137
+ can_login?: boolean | undefined;
138
+ };
139
+ output: {
140
+ id: string;
141
+ email: string | null;
142
+ name: string;
143
+ superuser: boolean;
144
+ createrole: boolean;
145
+ can_login: boolean;
146
+ };
147
+ };
148
+ };
149
+ readonly "principal.delete": {
150
+ input: z.ZodObject<{
151
+ name: z.ZodString;
152
+ }, z.core.$strip>;
153
+ _types: {
154
+ input: {
155
+ name: string;
156
+ };
157
+ output: {
158
+ success: true;
159
+ };
160
+ };
161
+ };
162
+ readonly "principal.setPassword": {
163
+ input: z.ZodObject<{
164
+ name: z.ZodString;
165
+ password: z.ZodString;
166
+ }, z.core.$strip>;
167
+ _types: {
168
+ input: {
169
+ name: string;
170
+ password: string;
171
+ };
172
+ output: {
173
+ success: true;
174
+ };
175
+ };
176
+ };
177
+ };
178
+ export declare const grantMethods: {
179
+ readonly "grant.create": {
180
+ input: z.ZodObject<{
181
+ principal_name: z.ZodString;
182
+ tree_path: z.ZodString;
183
+ actions: z.ZodArray<z.ZodEnum<{
184
+ read: "read";
185
+ create: "create";
186
+ update: "update";
187
+ delete: "delete";
188
+ }>>;
189
+ with_grant_option: z.ZodOptional<z.ZodBoolean>;
190
+ }, z.core.$strip>;
191
+ _types: {
192
+ input: {
193
+ principal_name: string;
194
+ tree_path: string;
195
+ actions: ("read" | "create" | "update" | "delete")[];
196
+ with_grant_option?: boolean | undefined;
197
+ };
198
+ output: {
199
+ success: true;
200
+ };
201
+ };
202
+ };
203
+ readonly "grant.revoke": {
204
+ input: z.ZodObject<{
205
+ principal_name: z.ZodString;
206
+ tree_path: z.ZodString;
207
+ }, z.core.$strip>;
208
+ _types: {
209
+ input: {
210
+ principal_name: string;
211
+ tree_path: string;
212
+ };
213
+ output: {
214
+ success: true;
215
+ };
216
+ };
217
+ };
218
+ readonly "grant.list": {
219
+ input: z.ZodObject<{
220
+ principal_name: z.ZodOptional<z.ZodString>;
221
+ }, z.core.$strip>;
222
+ _types: {
223
+ input: {
224
+ principal_name?: string | undefined;
225
+ };
226
+ output: {
227
+ id: string;
228
+ principal_id: string;
229
+ tree_path: string;
230
+ actions: string[];
231
+ with_grant_option: boolean;
232
+ granted_by: string | null;
233
+ created_at: string;
234
+ }[];
235
+ };
236
+ };
237
+ readonly "grant.check": {
238
+ input: z.ZodObject<{
239
+ tree_path: z.ZodString;
240
+ action: z.ZodEnum<{
241
+ read: "read";
242
+ create: "create";
243
+ update: "update";
244
+ delete: "delete";
245
+ }>;
246
+ }, z.core.$strip>;
247
+ _types: {
248
+ input: {
249
+ tree_path: string;
250
+ action: "read" | "create" | "update" | "delete";
251
+ };
252
+ output: {
253
+ allowed: boolean;
254
+ };
255
+ };
256
+ };
257
+ };
258
+ export declare const ownerMethods: {
259
+ readonly "owner.set": {
260
+ input: z.ZodObject<{
261
+ tree_path: z.ZodString;
262
+ principal_name: z.ZodString;
263
+ }, z.core.$strip>;
264
+ _types: {
265
+ input: {
266
+ tree_path: string;
267
+ principal_name: string;
268
+ };
269
+ output: {
270
+ success: true;
271
+ };
272
+ };
273
+ };
274
+ readonly "owner.remove": {
275
+ input: z.ZodObject<{
276
+ tree_path: z.ZodString;
277
+ }, z.core.$strip>;
278
+ _types: {
279
+ input: {
280
+ tree_path: string;
281
+ };
282
+ output: {
283
+ success: true;
284
+ };
285
+ };
286
+ };
287
+ readonly "owner.get": {
288
+ input: z.ZodObject<{
289
+ tree_path: z.ZodString;
290
+ }, z.core.$strip>;
291
+ _types: {
292
+ input: {
293
+ tree_path: string;
294
+ };
295
+ output: {
296
+ tree_path: string;
297
+ principal_id: string;
298
+ principal_name: string;
299
+ created_by: string | null;
300
+ created_at: string;
301
+ } | null;
302
+ };
303
+ };
304
+ readonly "owner.list": {
305
+ input: z.ZodObject<{
306
+ principal_name: z.ZodOptional<z.ZodString>;
307
+ }, z.core.$strip>;
308
+ _types: {
309
+ input: {
310
+ principal_name?: string | undefined;
311
+ };
312
+ output: {
313
+ tree_path: string;
314
+ principal_id: string;
315
+ principal_name: string;
316
+ created_by: string | null;
317
+ created_at: string;
318
+ }[];
319
+ };
320
+ };
321
+ };
322
+ export declare const roleMethods: {
323
+ readonly "role.addMember": {
324
+ input: z.ZodObject<{
325
+ role_name: z.ZodString;
326
+ member_name: z.ZodString;
327
+ with_admin_option: z.ZodOptional<z.ZodBoolean>;
328
+ }, z.core.$strip>;
329
+ _types: {
330
+ input: {
331
+ role_name: string;
332
+ member_name: string;
333
+ with_admin_option?: boolean | undefined;
334
+ };
335
+ output: {
336
+ success: true;
337
+ };
338
+ };
339
+ };
340
+ readonly "role.removeMember": {
341
+ input: z.ZodObject<{
342
+ role_name: z.ZodString;
343
+ member_name: z.ZodString;
344
+ }, z.core.$strip>;
345
+ _types: {
346
+ input: {
347
+ role_name: string;
348
+ member_name: string;
349
+ };
350
+ output: {
351
+ success: true;
352
+ };
353
+ };
354
+ };
355
+ readonly "role.listMembers": {
356
+ input: z.ZodObject<{
357
+ role_name: z.ZodString;
358
+ }, z.core.$strip>;
359
+ _types: {
360
+ input: {
361
+ role_name: string;
362
+ };
363
+ output: {
364
+ id: string;
365
+ name: string;
366
+ email: string | null;
367
+ superuser: boolean;
368
+ can_login: boolean;
369
+ with_admin_option: boolean;
370
+ created_at: string;
371
+ }[];
372
+ };
373
+ };
374
+ readonly "role.listForPrincipal": {
375
+ input: z.ZodObject<{
376
+ principal_name: z.ZodOptional<z.ZodString>;
377
+ }, z.core.$strip>;
378
+ _types: {
379
+ input: {
380
+ principal_name?: string | undefined;
381
+ };
382
+ output: {
383
+ id: string;
384
+ name: string;
385
+ created_at: string;
386
+ }[];
387
+ };
388
+ };
389
+ };
390
+ export declare const engramMethods: {
391
+ readonly "engram.create": {
392
+ input: z.ZodObject<{
393
+ id: z.ZodOptional<z.ZodUUID>;
394
+ content: z.ZodString;
395
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
396
+ tree: z.ZodOptional<z.ZodString>;
397
+ temporal: z.ZodOptional<z.ZodObject<{
398
+ start: z.ZodString;
399
+ end: z.ZodOptional<z.ZodString>;
400
+ }, z.core.$strip>>;
401
+ }, z.core.$strip>;
402
+ _types: {
403
+ input: {
404
+ content: string;
405
+ id?: string | undefined;
406
+ meta?: Record<string, unknown> | undefined;
407
+ tree?: string | undefined;
408
+ temporal?: {
409
+ start: string;
410
+ end?: string | undefined;
411
+ } | undefined;
412
+ };
413
+ output: {
414
+ id: string;
415
+ content: string;
416
+ meta: Record<string, unknown>;
417
+ tree: string;
418
+ temporal: string | null;
419
+ created_at: string;
420
+ updated_at: string | null;
421
+ has_embedding?: boolean | undefined;
422
+ };
423
+ };
424
+ };
425
+ readonly "engram.batchCreate": {
426
+ input: z.ZodObject<{
427
+ engrams: z.ZodArray<z.ZodObject<{
428
+ id: z.ZodOptional<z.ZodUUID>;
429
+ content: z.ZodString;
430
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
431
+ tree: z.ZodOptional<z.ZodString>;
432
+ temporal: z.ZodOptional<z.ZodObject<{
433
+ start: z.ZodString;
434
+ end: z.ZodOptional<z.ZodString>;
435
+ }, z.core.$strip>>;
436
+ }, z.core.$strip>>;
437
+ }, z.core.$strip>;
438
+ _types: {
439
+ input: {
440
+ engrams: {
441
+ content: string;
442
+ id?: string | undefined;
443
+ meta?: Record<string, unknown> | undefined;
444
+ tree?: string | undefined;
445
+ temporal?: {
446
+ start: string;
447
+ end?: string | undefined;
448
+ } | undefined;
449
+ }[];
450
+ };
451
+ output: {
452
+ ids: string[];
453
+ };
454
+ };
455
+ };
456
+ readonly "engram.get": {
457
+ input: z.ZodObject<{
458
+ id: z.ZodUUID;
459
+ }, z.core.$strip>;
460
+ _types: {
461
+ input: {
462
+ id: string;
463
+ };
464
+ output: {
465
+ id: string;
466
+ content: string;
467
+ meta: Record<string, unknown>;
468
+ tree: string;
469
+ temporal: string | null;
470
+ created_at: string;
471
+ updated_at: string | null;
472
+ has_embedding?: boolean | undefined;
473
+ };
474
+ };
475
+ };
476
+ readonly "engram.update": {
477
+ input: z.ZodObject<{
478
+ id: z.ZodUUID;
479
+ content: z.ZodOptional<z.ZodString>;
480
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
481
+ tree: z.ZodOptional<z.ZodString>;
482
+ temporal: z.ZodOptional<z.ZodObject<{
483
+ start: z.ZodString;
484
+ end: z.ZodOptional<z.ZodString>;
485
+ }, z.core.$strip>>;
486
+ }, z.core.$strip>;
487
+ _types: {
488
+ input: {
489
+ id: string;
490
+ content?: string | undefined;
491
+ meta?: Record<string, unknown> | undefined;
492
+ tree?: string | undefined;
493
+ temporal?: {
494
+ start: string;
495
+ end?: string | undefined;
496
+ } | undefined;
497
+ };
498
+ output: {
499
+ id: string;
500
+ content: string;
501
+ meta: Record<string, unknown>;
502
+ tree: string;
503
+ temporal: string | null;
504
+ created_at: string;
505
+ updated_at: string | null;
506
+ has_embedding?: boolean | undefined;
507
+ };
508
+ };
509
+ };
510
+ readonly "engram.delete": {
511
+ input: z.ZodObject<{
512
+ id: z.ZodUUID;
513
+ }, z.core.$strip>;
514
+ _types: {
515
+ input: {
516
+ id: string;
517
+ };
518
+ output: {
519
+ success: true;
520
+ };
521
+ };
522
+ };
523
+ readonly "engram.search": {
524
+ input: z.ZodObject<{
525
+ semantic: z.ZodOptional<z.ZodString>;
526
+ fulltext: z.ZodOptional<z.ZodString>;
527
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
528
+ tree: z.ZodOptional<z.ZodString>;
529
+ temporal: z.ZodOptional<z.ZodObject<{
530
+ contains: z.ZodOptional<z.ZodString>;
531
+ overlaps: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
532
+ within: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
533
+ }, z.core.$strip>>;
534
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
535
+ candidateLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
536
+ hybrid: z.ZodOptional<z.ZodObject<{
537
+ weights: z.ZodOptional<z.ZodObject<{
538
+ fulltext: z.ZodOptional<z.ZodNumber>;
539
+ semantic: z.ZodOptional<z.ZodNumber>;
540
+ }, z.core.$strip>>;
541
+ }, z.core.$strip>>;
542
+ }, z.core.$strip>;
543
+ _types: {
544
+ input: {
545
+ semantic?: string | undefined;
546
+ fulltext?: string | undefined;
547
+ meta?: Record<string, unknown> | undefined;
548
+ tree?: string | undefined;
549
+ temporal?: {
550
+ contains?: string | undefined;
551
+ overlaps?: [string, string] | undefined;
552
+ within?: [string, string] | undefined;
553
+ } | undefined;
554
+ limit?: number | undefined;
555
+ candidateLimit?: number | undefined;
556
+ hybrid?: {
557
+ weights?: {
558
+ fulltext?: number | undefined;
559
+ semantic?: number | undefined;
560
+ } | undefined;
561
+ } | undefined;
562
+ };
563
+ output: {
564
+ results: {
565
+ id: string;
566
+ content: string;
567
+ meta: Record<string, unknown>;
568
+ tree: string;
569
+ temporal: string | null;
570
+ created_at: string;
571
+ updated_at: string | null;
572
+ score: number;
573
+ has_embedding?: boolean | undefined;
574
+ }[];
575
+ total: number;
576
+ limit: number;
577
+ };
578
+ };
579
+ };
580
+ readonly "engram.mv": {
581
+ input: z.ZodObject<{
582
+ source: z.ZodString;
583
+ destination: z.ZodString;
584
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
585
+ }, z.core.$strip>;
586
+ _types: {
587
+ input: {
588
+ source: string;
589
+ destination: string;
590
+ dry_run?: boolean | undefined;
591
+ };
592
+ output: {
593
+ moved: number;
594
+ source: string;
595
+ destination: string;
596
+ };
597
+ };
598
+ };
599
+ };
600
+ /** All registered RPC methods */
601
+ export declare const rpcMethods: {
602
+ readonly "engram.create": {
603
+ input: z.ZodObject<{
604
+ id: z.ZodOptional<z.ZodUUID>;
605
+ content: z.ZodString;
606
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
607
+ tree: z.ZodOptional<z.ZodString>;
608
+ temporal: z.ZodOptional<z.ZodObject<{
609
+ start: z.ZodString;
610
+ end: z.ZodOptional<z.ZodString>;
611
+ }, z.core.$strip>>;
612
+ }, z.core.$strip>;
613
+ _types: {
614
+ input: {
615
+ content: string;
616
+ id?: string | undefined;
617
+ meta?: Record<string, unknown> | undefined;
618
+ tree?: string | undefined;
619
+ temporal?: {
620
+ start: string;
621
+ end?: string | undefined;
622
+ } | undefined;
623
+ };
624
+ output: {
625
+ id: string;
626
+ content: string;
627
+ meta: Record<string, unknown>;
628
+ tree: string;
629
+ temporal: string | null;
630
+ created_at: string;
631
+ updated_at: string | null;
632
+ has_embedding?: boolean | undefined;
633
+ };
634
+ };
635
+ };
636
+ readonly "engram.batchCreate": {
637
+ input: z.ZodObject<{
638
+ engrams: z.ZodArray<z.ZodObject<{
639
+ id: z.ZodOptional<z.ZodUUID>;
640
+ content: z.ZodString;
641
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
642
+ tree: z.ZodOptional<z.ZodString>;
643
+ temporal: z.ZodOptional<z.ZodObject<{
644
+ start: z.ZodString;
645
+ end: z.ZodOptional<z.ZodString>;
646
+ }, z.core.$strip>>;
647
+ }, z.core.$strip>>;
648
+ }, z.core.$strip>;
649
+ _types: {
650
+ input: {
651
+ engrams: {
652
+ content: string;
653
+ id?: string | undefined;
654
+ meta?: Record<string, unknown> | undefined;
655
+ tree?: string | undefined;
656
+ temporal?: {
657
+ start: string;
658
+ end?: string | undefined;
659
+ } | undefined;
660
+ }[];
661
+ };
662
+ output: {
663
+ ids: string[];
664
+ };
665
+ };
666
+ };
667
+ readonly "engram.get": {
668
+ input: z.ZodObject<{
669
+ id: z.ZodUUID;
670
+ }, z.core.$strip>;
671
+ _types: {
672
+ input: {
673
+ id: string;
674
+ };
675
+ output: {
676
+ id: string;
677
+ content: string;
678
+ meta: Record<string, unknown>;
679
+ tree: string;
680
+ temporal: string | null;
681
+ created_at: string;
682
+ updated_at: string | null;
683
+ has_embedding?: boolean | undefined;
684
+ };
685
+ };
686
+ };
687
+ readonly "engram.update": {
688
+ input: z.ZodObject<{
689
+ id: z.ZodUUID;
690
+ content: z.ZodOptional<z.ZodString>;
691
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
692
+ tree: z.ZodOptional<z.ZodString>;
693
+ temporal: z.ZodOptional<z.ZodObject<{
694
+ start: z.ZodString;
695
+ end: z.ZodOptional<z.ZodString>;
696
+ }, z.core.$strip>>;
697
+ }, z.core.$strip>;
698
+ _types: {
699
+ input: {
700
+ id: string;
701
+ content?: string | undefined;
702
+ meta?: Record<string, unknown> | undefined;
703
+ tree?: string | undefined;
704
+ temporal?: {
705
+ start: string;
706
+ end?: string | undefined;
707
+ } | undefined;
708
+ };
709
+ output: {
710
+ id: string;
711
+ content: string;
712
+ meta: Record<string, unknown>;
713
+ tree: string;
714
+ temporal: string | null;
715
+ created_at: string;
716
+ updated_at: string | null;
717
+ has_embedding?: boolean | undefined;
718
+ };
719
+ };
720
+ };
721
+ readonly "engram.delete": {
722
+ input: z.ZodObject<{
723
+ id: z.ZodUUID;
724
+ }, z.core.$strip>;
725
+ _types: {
726
+ input: {
727
+ id: string;
728
+ };
729
+ output: {
730
+ success: true;
731
+ };
732
+ };
733
+ };
734
+ readonly "engram.search": {
735
+ input: z.ZodObject<{
736
+ semantic: z.ZodOptional<z.ZodString>;
737
+ fulltext: z.ZodOptional<z.ZodString>;
738
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
739
+ tree: z.ZodOptional<z.ZodString>;
740
+ temporal: z.ZodOptional<z.ZodObject<{
741
+ contains: z.ZodOptional<z.ZodString>;
742
+ overlaps: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
743
+ within: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
744
+ }, z.core.$strip>>;
745
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
746
+ candidateLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
747
+ hybrid: z.ZodOptional<z.ZodObject<{
748
+ weights: z.ZodOptional<z.ZodObject<{
749
+ fulltext: z.ZodOptional<z.ZodNumber>;
750
+ semantic: z.ZodOptional<z.ZodNumber>;
751
+ }, z.core.$strip>>;
752
+ }, z.core.$strip>>;
753
+ }, z.core.$strip>;
754
+ _types: {
755
+ input: {
756
+ semantic?: string | undefined;
757
+ fulltext?: string | undefined;
758
+ meta?: Record<string, unknown> | undefined;
759
+ tree?: string | undefined;
760
+ temporal?: {
761
+ contains?: string | undefined;
762
+ overlaps?: [string, string] | undefined;
763
+ within?: [string, string] | undefined;
764
+ } | undefined;
765
+ limit?: number | undefined;
766
+ candidateLimit?: number | undefined;
767
+ hybrid?: {
768
+ weights?: {
769
+ fulltext?: number | undefined;
770
+ semantic?: number | undefined;
771
+ } | undefined;
772
+ } | undefined;
773
+ };
774
+ output: {
775
+ results: {
776
+ id: string;
777
+ content: string;
778
+ meta: Record<string, unknown>;
779
+ tree: string;
780
+ temporal: string | null;
781
+ created_at: string;
782
+ updated_at: string | null;
783
+ score: number;
784
+ has_embedding?: boolean | undefined;
785
+ }[];
786
+ total: number;
787
+ limit: number;
788
+ };
789
+ };
790
+ };
791
+ readonly "engram.mv": {
792
+ input: z.ZodObject<{
793
+ source: z.ZodString;
794
+ destination: z.ZodString;
795
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
796
+ }, z.core.$strip>;
797
+ _types: {
798
+ input: {
799
+ source: string;
800
+ destination: string;
801
+ dry_run?: boolean | undefined;
802
+ };
803
+ output: {
804
+ moved: number;
805
+ source: string;
806
+ destination: string;
807
+ };
808
+ };
809
+ };
810
+ readonly "role.addMember": {
811
+ input: z.ZodObject<{
812
+ role_name: z.ZodString;
813
+ member_name: z.ZodString;
814
+ with_admin_option: z.ZodOptional<z.ZodBoolean>;
815
+ }, z.core.$strip>;
816
+ _types: {
817
+ input: {
818
+ role_name: string;
819
+ member_name: string;
820
+ with_admin_option?: boolean | undefined;
821
+ };
822
+ output: {
823
+ success: true;
824
+ };
825
+ };
826
+ };
827
+ readonly "role.removeMember": {
828
+ input: z.ZodObject<{
829
+ role_name: z.ZodString;
830
+ member_name: z.ZodString;
831
+ }, z.core.$strip>;
832
+ _types: {
833
+ input: {
834
+ role_name: string;
835
+ member_name: string;
836
+ };
837
+ output: {
838
+ success: true;
839
+ };
840
+ };
841
+ };
842
+ readonly "role.listMembers": {
843
+ input: z.ZodObject<{
844
+ role_name: z.ZodString;
845
+ }, z.core.$strip>;
846
+ _types: {
847
+ input: {
848
+ role_name: string;
849
+ };
850
+ output: {
851
+ id: string;
852
+ name: string;
853
+ email: string | null;
854
+ superuser: boolean;
855
+ can_login: boolean;
856
+ with_admin_option: boolean;
857
+ created_at: string;
858
+ }[];
859
+ };
860
+ };
861
+ readonly "role.listForPrincipal": {
862
+ input: z.ZodObject<{
863
+ principal_name: z.ZodOptional<z.ZodString>;
864
+ }, z.core.$strip>;
865
+ _types: {
866
+ input: {
867
+ principal_name?: string | undefined;
868
+ };
869
+ output: {
870
+ id: string;
871
+ name: string;
872
+ created_at: string;
873
+ }[];
874
+ };
875
+ };
876
+ readonly "owner.set": {
877
+ input: z.ZodObject<{
878
+ tree_path: z.ZodString;
879
+ principal_name: z.ZodString;
880
+ }, z.core.$strip>;
881
+ _types: {
882
+ input: {
883
+ tree_path: string;
884
+ principal_name: string;
885
+ };
886
+ output: {
887
+ success: true;
888
+ };
889
+ };
890
+ };
891
+ readonly "owner.remove": {
892
+ input: z.ZodObject<{
893
+ tree_path: z.ZodString;
894
+ }, z.core.$strip>;
895
+ _types: {
896
+ input: {
897
+ tree_path: string;
898
+ };
899
+ output: {
900
+ success: true;
901
+ };
902
+ };
903
+ };
904
+ readonly "owner.get": {
905
+ input: z.ZodObject<{
906
+ tree_path: z.ZodString;
907
+ }, z.core.$strip>;
908
+ _types: {
909
+ input: {
910
+ tree_path: string;
911
+ };
912
+ output: {
913
+ tree_path: string;
914
+ principal_id: string;
915
+ principal_name: string;
916
+ created_by: string | null;
917
+ created_at: string;
918
+ } | null;
919
+ };
920
+ };
921
+ readonly "owner.list": {
922
+ input: z.ZodObject<{
923
+ principal_name: z.ZodOptional<z.ZodString>;
924
+ }, z.core.$strip>;
925
+ _types: {
926
+ input: {
927
+ principal_name?: string | undefined;
928
+ };
929
+ output: {
930
+ tree_path: string;
931
+ principal_id: string;
932
+ principal_name: string;
933
+ created_by: string | null;
934
+ created_at: string;
935
+ }[];
936
+ };
937
+ };
938
+ readonly "grant.create": {
939
+ input: z.ZodObject<{
940
+ principal_name: z.ZodString;
941
+ tree_path: z.ZodString;
942
+ actions: z.ZodArray<z.ZodEnum<{
943
+ read: "read";
944
+ create: "create";
945
+ update: "update";
946
+ delete: "delete";
947
+ }>>;
948
+ with_grant_option: z.ZodOptional<z.ZodBoolean>;
949
+ }, z.core.$strip>;
950
+ _types: {
951
+ input: {
952
+ principal_name: string;
953
+ tree_path: string;
954
+ actions: ("read" | "create" | "update" | "delete")[];
955
+ with_grant_option?: boolean | undefined;
956
+ };
957
+ output: {
958
+ success: true;
959
+ };
960
+ };
961
+ };
962
+ readonly "grant.revoke": {
963
+ input: z.ZodObject<{
964
+ principal_name: z.ZodString;
965
+ tree_path: z.ZodString;
966
+ }, z.core.$strip>;
967
+ _types: {
968
+ input: {
969
+ principal_name: string;
970
+ tree_path: string;
971
+ };
972
+ output: {
973
+ success: true;
974
+ };
975
+ };
976
+ };
977
+ readonly "grant.list": {
978
+ input: z.ZodObject<{
979
+ principal_name: z.ZodOptional<z.ZodString>;
980
+ }, z.core.$strip>;
981
+ _types: {
982
+ input: {
983
+ principal_name?: string | undefined;
984
+ };
985
+ output: {
986
+ id: string;
987
+ principal_id: string;
988
+ tree_path: string;
989
+ actions: string[];
990
+ with_grant_option: boolean;
991
+ granted_by: string | null;
992
+ created_at: string;
993
+ }[];
994
+ };
995
+ };
996
+ readonly "grant.check": {
997
+ input: z.ZodObject<{
998
+ tree_path: z.ZodString;
999
+ action: z.ZodEnum<{
1000
+ read: "read";
1001
+ create: "create";
1002
+ update: "update";
1003
+ delete: "delete";
1004
+ }>;
1005
+ }, z.core.$strip>;
1006
+ _types: {
1007
+ input: {
1008
+ tree_path: string;
1009
+ action: "read" | "create" | "update" | "delete";
1010
+ };
1011
+ output: {
1012
+ allowed: boolean;
1013
+ };
1014
+ };
1015
+ };
1016
+ readonly "principal.list": {
1017
+ input: z.ZodObject<{}, z.core.$strip>;
1018
+ _types: {
1019
+ input: Record<string, never>;
1020
+ output: {
1021
+ id: string;
1022
+ email: string | null;
1023
+ name: string;
1024
+ superuser: boolean;
1025
+ createrole: boolean;
1026
+ can_login: boolean;
1027
+ created_at: string;
1028
+ }[];
1029
+ };
1030
+ };
1031
+ readonly "principal.get": {
1032
+ input: z.ZodObject<{
1033
+ name: z.ZodString;
1034
+ }, z.core.$strip>;
1035
+ _types: {
1036
+ input: {
1037
+ name: string;
1038
+ };
1039
+ output: {
1040
+ id: string;
1041
+ email: string | null;
1042
+ name: string;
1043
+ superuser: boolean;
1044
+ createrole: boolean;
1045
+ can_login: boolean;
1046
+ created_at: string;
1047
+ };
1048
+ };
1049
+ };
1050
+ readonly "principal.create": {
1051
+ input: z.ZodObject<{
1052
+ name: z.ZodString;
1053
+ email: z.ZodOptional<z.ZodEmail>;
1054
+ password: z.ZodOptional<z.ZodString>;
1055
+ superuser: z.ZodOptional<z.ZodBoolean>;
1056
+ createrole: z.ZodOptional<z.ZodBoolean>;
1057
+ can_login: z.ZodOptional<z.ZodBoolean>;
1058
+ }, z.core.$strip>;
1059
+ _types: {
1060
+ input: {
1061
+ name: string;
1062
+ email?: string | undefined;
1063
+ password?: string | undefined;
1064
+ superuser?: boolean | undefined;
1065
+ createrole?: boolean | undefined;
1066
+ can_login?: boolean | undefined;
1067
+ };
1068
+ output: {
1069
+ id: string;
1070
+ email: string | null;
1071
+ name: string;
1072
+ superuser: boolean;
1073
+ createrole: boolean;
1074
+ can_login: boolean;
1075
+ };
1076
+ };
1077
+ };
1078
+ readonly "principal.delete": {
1079
+ input: z.ZodObject<{
1080
+ name: z.ZodString;
1081
+ }, z.core.$strip>;
1082
+ _types: {
1083
+ input: {
1084
+ name: string;
1085
+ };
1086
+ output: {
1087
+ success: true;
1088
+ };
1089
+ };
1090
+ };
1091
+ readonly "principal.setPassword": {
1092
+ input: z.ZodObject<{
1093
+ name: z.ZodString;
1094
+ password: z.ZodString;
1095
+ }, z.core.$strip>;
1096
+ _types: {
1097
+ input: {
1098
+ name: string;
1099
+ password: string;
1100
+ };
1101
+ output: {
1102
+ success: true;
1103
+ };
1104
+ };
1105
+ };
1106
+ readonly "auth.login": {
1107
+ input: z.ZodObject<{
1108
+ identifier: z.ZodString;
1109
+ password: z.ZodString;
1110
+ }, z.core.$strip>;
1111
+ _types: {
1112
+ input: {
1113
+ identifier: string;
1114
+ password: string;
1115
+ };
1116
+ output: {
1117
+ key: string;
1118
+ principal: {
1119
+ id: string;
1120
+ email: string | null;
1121
+ name: string;
1122
+ superuser: boolean;
1123
+ createrole: boolean;
1124
+ can_login: boolean;
1125
+ };
1126
+ };
1127
+ };
1128
+ };
1129
+ readonly "auth.whoami": {
1130
+ input: z.ZodObject<{}, z.core.$strip>;
1131
+ _types: {
1132
+ input: Record<string, never>;
1133
+ output: {
1134
+ principalId: string;
1135
+ name: string;
1136
+ email: string | null;
1137
+ superuser: boolean;
1138
+ createrole: boolean;
1139
+ can_login: boolean;
1140
+ };
1141
+ };
1142
+ };
1143
+ readonly "auth.createApiKey": {
1144
+ input: z.ZodObject<{
1145
+ name: z.ZodString;
1146
+ }, z.core.$strip>;
1147
+ _types: {
1148
+ input: {
1149
+ name: string;
1150
+ };
1151
+ output: {
1152
+ key: string;
1153
+ id: string;
1154
+ };
1155
+ };
1156
+ };
1157
+ readonly "auth.listApiKeys": {
1158
+ input: z.ZodObject<{}, z.core.$strip>;
1159
+ _types: {
1160
+ input: Record<string, never>;
1161
+ output: {
1162
+ id: string;
1163
+ name: string;
1164
+ expires_at: string;
1165
+ created_at: string;
1166
+ }[];
1167
+ };
1168
+ };
1169
+ readonly "auth.revokeApiKey": {
1170
+ input: z.ZodObject<{
1171
+ keyId: z.ZodString;
1172
+ }, z.core.$strip>;
1173
+ _types: {
1174
+ input: {
1175
+ keyId: string;
1176
+ };
1177
+ output: {
1178
+ success: true;
1179
+ };
1180
+ };
1181
+ };
1182
+ };
1183
+ /** Union of all method names */
1184
+ export type RpcMethodName = keyof typeof rpcMethods;
1185
+ /** Extract input type for a method */
1186
+ export type RpcInput<M extends RpcMethodName> = (typeof rpcMethods)[M]["_types"]["input"];
1187
+ /** Extract output type for a method */
1188
+ export type RpcOutput<M extends RpcMethodName> = (typeof rpcMethods)[M]["_types"]["output"];
1189
+ /** Get the input schema for runtime validation */
1190
+ export declare function getInputSchema<M extends RpcMethodName>(method: M): z.ZodObject<{
1191
+ identifier: z.ZodString;
1192
+ password: z.ZodString;
1193
+ }, z.core.$strip> | z.ZodObject<{
1194
+ name: z.ZodString;
1195
+ }, z.core.$strip> | z.ZodObject<{
1196
+ keyId: z.ZodString;
1197
+ }, z.core.$strip> | z.ZodObject<{
1198
+ id: z.ZodOptional<z.ZodUUID>;
1199
+ content: z.ZodString;
1200
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1201
+ tree: z.ZodOptional<z.ZodString>;
1202
+ temporal: z.ZodOptional<z.ZodObject<{
1203
+ start: z.ZodString;
1204
+ end: z.ZodOptional<z.ZodString>;
1205
+ }, z.core.$strip>>;
1206
+ }, z.core.$strip> | z.ZodObject<{
1207
+ engrams: z.ZodArray<z.ZodObject<{
1208
+ id: z.ZodOptional<z.ZodUUID>;
1209
+ content: z.ZodString;
1210
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1211
+ tree: z.ZodOptional<z.ZodString>;
1212
+ temporal: z.ZodOptional<z.ZodObject<{
1213
+ start: z.ZodString;
1214
+ end: z.ZodOptional<z.ZodString>;
1215
+ }, z.core.$strip>>;
1216
+ }, z.core.$strip>>;
1217
+ }, z.core.$strip> | z.ZodObject<{
1218
+ id: z.ZodUUID;
1219
+ content: z.ZodOptional<z.ZodString>;
1220
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1221
+ tree: z.ZodOptional<z.ZodString>;
1222
+ temporal: z.ZodOptional<z.ZodObject<{
1223
+ start: z.ZodString;
1224
+ end: z.ZodOptional<z.ZodString>;
1225
+ }, z.core.$strip>>;
1226
+ }, z.core.$strip> | z.ZodObject<{
1227
+ id: z.ZodUUID;
1228
+ }, z.core.$strip> | z.ZodObject<{
1229
+ id: z.ZodUUID;
1230
+ }, z.core.$strip> | z.ZodObject<{
1231
+ source: z.ZodString;
1232
+ destination: z.ZodString;
1233
+ dry_run: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1234
+ }, z.core.$strip> | z.ZodObject<{
1235
+ semantic: z.ZodOptional<z.ZodString>;
1236
+ fulltext: z.ZodOptional<z.ZodString>;
1237
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1238
+ tree: z.ZodOptional<z.ZodString>;
1239
+ temporal: z.ZodOptional<z.ZodObject<{
1240
+ contains: z.ZodOptional<z.ZodString>;
1241
+ overlaps: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
1242
+ within: z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
1243
+ }, z.core.$strip>>;
1244
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1245
+ candidateLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1246
+ hybrid: z.ZodOptional<z.ZodObject<{
1247
+ weights: z.ZodOptional<z.ZodObject<{
1248
+ fulltext: z.ZodOptional<z.ZodNumber>;
1249
+ semantic: z.ZodOptional<z.ZodNumber>;
1250
+ }, z.core.$strip>>;
1251
+ }, z.core.$strip>>;
1252
+ }, z.core.$strip> | z.ZodObject<{
1253
+ name: z.ZodString;
1254
+ }, z.core.$strip> | z.ZodObject<{
1255
+ name: z.ZodString;
1256
+ email: z.ZodOptional<z.ZodEmail>;
1257
+ password: z.ZodOptional<z.ZodString>;
1258
+ superuser: z.ZodOptional<z.ZodBoolean>;
1259
+ createrole: z.ZodOptional<z.ZodBoolean>;
1260
+ can_login: z.ZodOptional<z.ZodBoolean>;
1261
+ }, z.core.$strip> | z.ZodObject<{
1262
+ name: z.ZodString;
1263
+ }, z.core.$strip> | z.ZodObject<{
1264
+ name: z.ZodString;
1265
+ password: z.ZodString;
1266
+ }, z.core.$strip> | z.ZodObject<{
1267
+ principal_name: z.ZodString;
1268
+ tree_path: z.ZodString;
1269
+ actions: z.ZodArray<z.ZodEnum<{
1270
+ read: "read";
1271
+ create: "create";
1272
+ update: "update";
1273
+ delete: "delete";
1274
+ }>>;
1275
+ with_grant_option: z.ZodOptional<z.ZodBoolean>;
1276
+ }, z.core.$strip> | z.ZodObject<{
1277
+ principal_name: z.ZodString;
1278
+ tree_path: z.ZodString;
1279
+ }, z.core.$strip> | z.ZodObject<{
1280
+ principal_name: z.ZodOptional<z.ZodString>;
1281
+ }, z.core.$strip> | z.ZodObject<{
1282
+ tree_path: z.ZodString;
1283
+ action: z.ZodEnum<{
1284
+ read: "read";
1285
+ create: "create";
1286
+ update: "update";
1287
+ delete: "delete";
1288
+ }>;
1289
+ }, z.core.$strip> | z.ZodObject<{
1290
+ role_name: z.ZodString;
1291
+ member_name: z.ZodString;
1292
+ with_admin_option: z.ZodOptional<z.ZodBoolean>;
1293
+ }, z.core.$strip> | z.ZodObject<{
1294
+ role_name: z.ZodString;
1295
+ member_name: z.ZodString;
1296
+ }, z.core.$strip> | z.ZodObject<{
1297
+ role_name: z.ZodString;
1298
+ }, z.core.$strip> | z.ZodObject<{
1299
+ principal_name: z.ZodOptional<z.ZodString>;
1300
+ }, z.core.$strip> | z.ZodObject<{
1301
+ tree_path: z.ZodString;
1302
+ principal_name: z.ZodString;
1303
+ }, z.core.$strip> | z.ZodObject<{
1304
+ tree_path: z.ZodString;
1305
+ }, z.core.$strip> | z.ZodObject<{
1306
+ tree_path: z.ZodString;
1307
+ }, z.core.$strip> | z.ZodObject<{
1308
+ principal_name: z.ZodOptional<z.ZodString>;
1309
+ }, z.core.$strip> | z.ZodObject<{}, z.core.$strip>;
1310
+ /** Get the output schema for runtime response validation */
1311
+ export declare function getOutputSchema(method: string): z.ZodType | undefined;
1312
+ //# sourceMappingURL=rpc.d.ts.map