@engramx/idl 0.17.0-rc.2 → 0.17.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/engram.did CHANGED
@@ -1,6 +1,7 @@
1
1
  type X402SignRequest =
2
2
  record {
3
3
  amount: nat;
4
+ answerBySecs: opt nat;
4
5
  approvalId: opt text;
5
6
  chainId: nat;
6
7
  rationale: opt text;
@@ -107,6 +108,27 @@ type StorageReport =
107
108
  versionHistoryCount: nat;
108
109
  versionHistorySize: nat;
109
110
  };
111
+ type SshRule =
112
+ record {
113
+ activatesAtNs: int;
114
+ agent: AgentScope;
115
+ approval: Approval;
116
+ criticalOptions: vec record {
117
+ text;
118
+ text;
119
+ };
120
+ dailyIssueCap: nat;
121
+ endedAtNs: opt int;
122
+ ends: RuleEnd;
123
+ extensions: vec text;
124
+ maxLiveKeys: nat;
125
+ maxTtlSecs: nat;
126
+ name: text;
127
+ principals: vec text;
128
+ registeredAtNs: int;
129
+ registeredBy: principal;
130
+ ruleId: blob;
131
+ };
110
132
  type SpendingPolicy =
111
133
  record {
112
134
  allowedCallers: opt vec principal;
@@ -237,6 +259,27 @@ type SaleNotice =
237
259
  token: text;
238
260
  txRef: opt text;
239
261
  };
262
+ type RuleSpec =
263
+ record {
264
+ agent: AgentScope;
265
+ approval: opt Approval;
266
+ criticalOptions: vec record {
267
+ text;
268
+ text;
269
+ };
270
+ dailyIssueCap: opt nat;
271
+ ends: RuleEnd;
272
+ extensions: opt vec text;
273
+ maxLiveKeys: opt nat;
274
+ maxTtlSecs: opt nat;
275
+ name: text;
276
+ principals: vec text;
277
+ };
278
+ type RuleEnd =
279
+ variant {
280
+ atNs: int;
281
+ never;
282
+ };
240
283
  type Role =
241
284
  variant {
242
285
  Admin;
@@ -297,25 +340,43 @@ type ResyncReport =
297
340
  };
298
341
  startsAcknowledged: nat;
299
342
  };
343
+ type Result_99 =
344
+ variant {
345
+ Err: Error;
346
+ Ok: Accepted;
347
+ };
348
+ type Result_97 =
349
+ variant {
350
+ Err: Error;
351
+ Ok: Eip712Registration;
352
+ };
300
353
  type Result_95 =
301
354
  variant {
302
355
  Err: Error;
303
- Ok: AgentRecord;
356
+ Ok: record {
357
+ activatesAtNs: int;
358
+ ruleId: blob;
359
+ };
304
360
  };
305
361
  type Result_94 =
306
362
  variant {
307
363
  Err: Error;
308
- Ok: Accepted;
364
+ Ok: Conversion;
365
+ };
366
+ type Result_93 =
367
+ variant {
368
+ Err: Error;
369
+ Ok: CondenseResult;
309
370
  };
310
371
  type Result_92 =
311
372
  variant {
312
373
  Err: Error;
313
- Ok: Eip712Registration;
374
+ Ok: MemoryRangeExport;
314
375
  };
315
376
  type Result_90 =
316
377
  variant {
317
378
  Err: Error;
318
- Ok: Conversion;
379
+ Ok: Page_29;
319
380
  };
320
381
  type Result_9 =
321
382
  variant {
@@ -325,47 +386,52 @@ type Result_9 =
325
386
  type Result_89 =
326
387
  variant {
327
388
  Err: Error;
328
- Ok: CondenseResult;
389
+ Ok: AgentWriteReview;
329
390
  };
330
391
  type Result_88 =
331
392
  variant {
332
393
  Err: Error;
333
- Ok: MemoryRangeExport;
394
+ Ok: BackupMetadata;
395
+ };
396
+ type Result_87 =
397
+ variant {
398
+ Err: Error;
399
+ Ok: BackupRetention;
334
400
  };
335
401
  type Result_86 =
336
402
  variant {
337
403
  Err: Error;
338
- Ok: Page_27;
404
+ Ok: vec BirthRecord;
339
405
  };
340
406
  type Result_85 =
341
407
  variant {
342
408
  Err: Error;
343
- Ok: AgentWriteReview;
409
+ Ok: Brakes;
344
410
  };
345
411
  type Result_84 =
346
412
  variant {
347
413
  Err: Error;
348
- Ok: BackupMetadata;
414
+ Ok: ChildAllowanceRow;
349
415
  };
350
416
  type Result_83 =
351
417
  variant {
352
418
  Err: Error;
353
- Ok: BackupRetention;
419
+ Ok: ChildOpening;
354
420
  };
355
421
  type Result_82 =
356
422
  variant {
357
423
  Err: Error;
358
- Ok: vec BirthRecord;
424
+ Ok: EvmAddresses;
359
425
  };
360
426
  type Result_81 =
361
427
  variant {
362
428
  Err: Error;
363
- Ok: Brakes;
429
+ Ok: AlertStatus;
364
430
  };
365
431
  type Result_80 =
366
432
  variant {
367
433
  Err: Error;
368
- Ok: ChildAllowanceRow;
434
+ Ok: blob;
369
435
  };
370
436
  type Result_8 =
371
437
  variant {
@@ -375,52 +441,52 @@ type Result_8 =
375
441
  type Result_79 =
376
442
  variant {
377
443
  Err: Error;
378
- Ok: ChildOpening;
444
+ Ok: KeyBackupStatus;
379
445
  };
380
446
  type Result_78 =
381
447
  variant {
382
448
  Err: Error;
383
- Ok: EvmAddresses;
449
+ Ok: MemoryHistory;
384
450
  };
385
451
  type Result_77 =
386
452
  variant {
387
453
  Err: Error;
388
- Ok: AlertStatus;
454
+ Ok: MemoryRetentionPolicy;
389
455
  };
390
456
  type Result_76 =
391
457
  variant {
392
458
  Err: Error;
393
- Ok: blob;
459
+ Ok: OwnerConsole;
394
460
  };
395
461
  type Result_75 =
396
462
  variant {
397
463
  Err: Error;
398
- Ok: KeyBackupStatus;
464
+ Ok: OwnerSignInView;
399
465
  };
400
466
  type Result_74 =
401
467
  variant {
402
468
  Err: Error;
403
- Ok: MemoryHistory;
469
+ Ok: opt Offer;
404
470
  };
405
471
  type Result_73 =
406
472
  variant {
407
473
  Err: Error;
408
- Ok: MemoryRetentionPolicy;
474
+ Ok: ProfileRead;
409
475
  };
410
476
  type Result_72 =
411
477
  variant {
412
478
  Err: Error;
413
- Ok: OwnerConsole;
479
+ Ok: record {paths: vec text;};
414
480
  };
415
481
  type Result_71 =
416
482
  variant {
417
483
  Err: Error;
418
- Ok: OwnerSignInView;
484
+ Ok: RecipientHistory;
419
485
  };
420
486
  type Result_70 =
421
487
  variant {
422
488
  Err: Error;
423
- Ok: opt Offer;
489
+ Ok: SigningFloorStatus;
424
490
  };
425
491
  type Result_7 =
426
492
  variant {
@@ -430,52 +496,52 @@ type Result_7 =
430
496
  type Result_69 =
431
497
  variant {
432
498
  Err: Error;
433
- Ok: ProfileRead;
499
+ Ok: SpendCeiling;
434
500
  };
435
501
  type Result_68 =
436
502
  variant {
437
503
  Err: Error;
438
- Ok: record {paths: vec text;};
504
+ Ok: SpendingPolicy;
439
505
  };
440
506
  type Result_67 =
441
507
  variant {
442
508
  Err: Error;
443
- Ok: RecipientHistory;
509
+ Ok: CaKey;
444
510
  };
445
511
  type Result_66 =
446
512
  variant {
447
513
  Err: Error;
448
- Ok: SigningFloorStatus;
514
+ Ok: StorageReport;
449
515
  };
450
516
  type Result_65 =
451
517
  variant {
452
518
  Err: Error;
453
- Ok: SpendCeiling;
519
+ Ok: WalletBalances;
454
520
  };
455
521
  type Result_64 =
456
522
  variant {
457
523
  Err: Error;
458
- Ok: SpendingPolicy;
524
+ Ok: WorldIdConfig;
459
525
  };
460
526
  type Result_63 =
461
527
  variant {
462
528
  Err: Error;
463
- Ok: StorageReport;
529
+ Ok: WorldIdRpContext;
464
530
  };
465
531
  type Result_62 =
466
532
  variant {
467
533
  Err: Error;
468
- Ok: WalletBalances;
534
+ Ok: opt text;
469
535
  };
470
536
  type Result_61 =
471
537
  variant {
472
538
  Err: Error;
473
- Ok: WorldIdConfig;
539
+ Ok: text;
474
540
  };
475
541
  type Result_60 =
476
542
  variant {
477
543
  Err: Error;
478
- Ok: WorldIdRpContext;
544
+ Ok: Page_28;
479
545
  };
480
546
  type Result_6 =
481
547
  variant {
@@ -485,27 +551,27 @@ type Result_6 =
485
551
  type Result_59 =
486
552
  variant {
487
553
  Err: Error;
488
- Ok: opt text;
554
+ Ok: Page_27;
489
555
  };
490
556
  type Result_58 =
491
557
  variant {
492
558
  Err: Error;
493
- Ok: text;
559
+ Ok: AgentSpendToday;
494
560
  };
495
561
  type Result_57 =
496
562
  variant {
497
563
  Err: Error;
498
- Ok: Page_26;
564
+ Ok: Page_25;
499
565
  };
500
566
  type Result_56 =
501
567
  variant {
502
568
  Err: Error;
503
- Ok: Page_25;
569
+ Ok: Page_24;
504
570
  };
505
571
  type Result_55 =
506
572
  variant {
507
573
  Err: Error;
508
- Ok: AgentSpendToday;
574
+ Ok: RecordPage;
509
575
  };
510
576
  type Result_54 =
511
577
  variant {
@@ -520,17 +586,17 @@ type Result_53 =
520
586
  type Result_52 =
521
587
  variant {
522
588
  Err: Error;
523
- Ok: RecordPage;
589
+ Ok: CheckpointPage;
524
590
  };
525
591
  type Result_51 =
526
592
  variant {
527
593
  Err: Error;
528
- Ok: Page_21;
594
+ Ok: Page_20;
529
595
  };
530
596
  type Result_50 =
531
597
  variant {
532
598
  Err: Error;
533
- Ok: Page_20;
599
+ Ok: Page_19;
534
600
  };
535
601
  type Result_5 =
536
602
  variant {
@@ -540,52 +606,52 @@ type Result_5 =
540
606
  type Result_49 =
541
607
  variant {
542
608
  Err: Error;
543
- Ok: CheckpointPage;
609
+ Ok: Page_18;
544
610
  };
545
611
  type Result_48 =
546
612
  variant {
547
613
  Err: Error;
548
- Ok: Page_18;
614
+ Ok: Page_17;
549
615
  };
550
616
  type Result_47 =
551
617
  variant {
552
618
  Err: Error;
553
- Ok: Page_17;
619
+ Ok: Page_16;
554
620
  };
555
621
  type Result_46 =
556
622
  variant {
557
623
  Err: Error;
558
- Ok: Page_16;
624
+ Ok: Page_15;
559
625
  };
560
626
  type Result_45 =
561
627
  variant {
562
628
  Err: Error;
563
- Ok: Page_15;
629
+ Ok: ReceiptPage;
564
630
  };
565
631
  type Result_44 =
566
632
  variant {
567
633
  Err: Error;
568
- Ok: Page_14;
634
+ Ok: Page_13;
569
635
  };
570
636
  type Result_43 =
571
637
  variant {
572
638
  Err: Error;
573
- Ok: Page_13;
639
+ Ok: LogPage;
574
640
  };
575
641
  type Result_42 =
576
642
  variant {
577
643
  Err: Error;
578
- Ok: ReceiptPage;
644
+ Ok: Page_11;
579
645
  };
580
646
  type Result_41 =
581
647
  variant {
582
648
  Err: Error;
583
- Ok: Page_11;
649
+ Ok: Page_10;
584
650
  };
585
651
  type Result_40 =
586
652
  variant {
587
653
  Err: Error;
588
- Ok: LogPage;
654
+ Ok: Page_9;
589
655
  };
590
656
  type Result_4 =
591
657
  variant {
@@ -595,52 +661,52 @@ type Result_4 =
595
661
  type Result_39 =
596
662
  variant {
597
663
  Err: Error;
598
- Ok: Page_9;
664
+ Ok: PaymentSignatureCounts;
599
665
  };
600
666
  type Result_38 =
601
667
  variant {
602
668
  Err: Error;
603
- Ok: Page_8;
669
+ Ok: Page_7;
604
670
  };
605
671
  type Result_37 =
606
672
  variant {
607
673
  Err: Error;
608
- Ok: Page_7;
674
+ Ok: Page_6;
609
675
  };
610
676
  type Result_36 =
611
677
  variant {
612
678
  Err: Error;
613
- Ok: PaymentSignatureCounts;
679
+ Ok: Page_5;
614
680
  };
615
681
  type Result_35 =
616
682
  variant {
617
683
  Err: Error;
618
- Ok: Page_5;
684
+ Ok: Page_4;
619
685
  };
620
686
  type Result_34 =
621
687
  variant {
622
688
  Err: Error;
623
- Ok: Page_4;
689
+ Ok: Page_3;
624
690
  };
625
691
  type Result_33 =
626
692
  variant {
627
693
  Err: Error;
628
- Ok: Page_3;
694
+ Ok: Page_2;
629
695
  };
630
696
  type Result_32 =
631
697
  variant {
632
698
  Err: Error;
633
- Ok: Page_2;
699
+ Ok: Page_1;
634
700
  };
635
701
  type Result_31 =
636
702
  variant {
637
703
  Err: Error;
638
- Ok: Page_1;
704
+ Ok: Page;
639
705
  };
640
706
  type Result_30 =
641
707
  variant {
642
708
  Err: Error;
643
- Ok: Page;
709
+ Ok: AgentGrant;
644
710
  };
645
711
  type Result_3 =
646
712
  variant {
@@ -650,52 +716,52 @@ type Result_3 =
650
716
  type Result_29 =
651
717
  variant {
652
718
  Err: Error;
653
- Ok: AgentGrant;
719
+ Ok: principal;
654
720
  };
655
721
  type Result_28 =
656
722
  variant {
657
723
  Err: Error;
658
- Ok: principal;
724
+ Ok: EngramSessionState;
659
725
  };
660
726
  type Result_27 =
661
727
  variant {
662
728
  Err: Error;
663
- Ok: EngramSessionState;
729
+ Ok: Pairing;
664
730
  };
665
731
  type Result_26 =
666
732
  variant {
667
733
  Err: Error;
668
- Ok: Pairing;
734
+ Ok: Plan;
669
735
  };
670
736
  type Result_25 =
671
737
  variant {
672
738
  Err: Error;
673
- Ok: Plan;
739
+ Ok: CondensePreview;
674
740
  };
675
741
  type Result_24 =
676
742
  variant {
677
743
  Err: Error;
678
- Ok: CondensePreview;
744
+ Ok: RetentionPreview;
679
745
  };
680
746
  type Result_23 =
681
747
  variant {
682
748
  Err: Error;
683
- Ok: RetentionPreview;
749
+ Ok: vec BatchReadItem;
684
750
  };
685
751
  type Result_22 =
686
752
  variant {
687
753
  Err: Error;
688
- Ok: vec BatchReadItem;
754
+ Ok: MemoryByteChunk;
689
755
  };
690
756
  type Result_21 =
691
757
  variant {
692
758
  Err: Error;
693
- Ok: MemoryByteChunk;
759
+ Ok: EngramEscrowRecovery;
694
760
  };
695
761
  type Result_20 =
696
762
  variant {
697
763
  Err: Error;
698
- Ok: EngramEscrowRecovery;
764
+ Ok: GuardianRecord;
699
765
  };
700
766
  type Result_2 =
701
767
  variant {
@@ -705,7 +771,7 @@ type Result_2 =
705
771
  type Result_19 =
706
772
  variant {
707
773
  Err: Error;
708
- Ok: GuardianRecord;
774
+ Ok: Outcome__1;
709
775
  };
710
776
  type Result_18 =
711
777
  variant {
@@ -747,6 +813,11 @@ type Result_11 =
747
813
  Err: Error;
748
814
  Ok: record {activatesAtNs: int;};
749
815
  };
816
+ type Result_100 =
817
+ variant {
818
+ Err: Error;
819
+ Ok: AgentRecord;
820
+ };
750
821
  type Result_10 =
751
822
  variant {
752
823
  Err: Error;
@@ -769,7 +840,7 @@ type ResetReport =
769
840
  filesCleared: nat;
770
841
  guardiansRemoved: nat;
771
842
  };
772
- type Request =
843
+ type Request__1 =
773
844
  variant {
774
845
  metadata: opt text;
775
846
  read: record {
@@ -778,6 +849,16 @@ type Request =
778
849
  platform: opt text;
779
850
  };
780
851
  };
852
+ type Request =
853
+ record {
854
+ answerBySecs: opt nat;
855
+ approvalId: opt text;
856
+ principals: vec text;
857
+ rationale: opt text;
858
+ ruleId: blob;
859
+ subjectKey: blob;
860
+ ttlSecs: nat;
861
+ };
781
862
  type Repudiation =
782
863
  record {
783
864
  atNs: int;
@@ -815,7 +896,7 @@ type RecipientHistory =
815
896
  type ReceiptPage =
816
897
  record {
817
898
  firstAvailableSeq: nat;
818
- page: Page_12;
899
+ page: Page_14;
819
900
  scannedThroughSeq: nat;
820
901
  };
821
902
  type RailHealth =
@@ -870,7 +951,7 @@ type PaymentsNow =
870
951
  };
871
952
  type PaymentSignatureCounts =
872
953
  record {
873
- agents: Page_6;
954
+ agents: Page_8;
874
955
  day: int;
875
956
  limit: nat;
876
957
  marketplace: opt MarketplacePaymentSignatures;
@@ -903,77 +984,77 @@ type Pairing =
903
984
  };
904
985
  type Page_9 =
905
986
  record {
906
- items: vec ApprovalRequest;
987
+ items: vec OwnershipTransfer;
907
988
  total: nat;
908
989
  withheld: nat;
909
990
  };
910
991
  type Page_8 =
911
992
  record {
912
- items: vec EngramSessionState;
993
+ items: vec AgentPaymentSignatures;
913
994
  total: nat;
914
995
  withheld: nat;
915
996
  };
916
997
  type Page_7 =
917
998
  record {
918
- items: vec OwnershipTransfer;
999
+ items: vec PurgedAgent;
919
1000
  total: nat;
920
1001
  withheld: nat;
921
1002
  };
922
1003
  type Page_6 =
923
1004
  record {
924
- items: vec AgentPaymentSignatures;
1005
+ items: vec AuditEntry;
925
1006
  total: nat;
926
1007
  withheld: nat;
927
1008
  };
928
1009
  type Page_5 =
929
1010
  record {
930
- items: vec PurgedAgent;
1011
+ items: vec RecordNote;
931
1012
  total: nat;
932
1013
  withheld: nat;
933
1014
  };
934
1015
  type Page_4 =
935
1016
  record {
936
- items: vec AuditEntry;
1017
+ items: vec Repudiation;
937
1018
  total: nat;
938
1019
  withheld: nat;
939
1020
  };
940
1021
  type Page_3 =
941
1022
  record {
942
- items: vec RecordNote;
1023
+ items: vec SellerView;
943
1024
  total: nat;
944
1025
  withheld: nat;
945
1026
  };
946
- type Page_27 =
1027
+ type Page_29 =
947
1028
  record {
948
1029
  items: vec OwnerRow;
949
1030
  total: nat;
950
1031
  withheld: nat;
951
1032
  };
952
- type Page_26 =
1033
+ type Page_28 =
953
1034
  record {
954
1035
  items: vec ActivitySnapshot;
955
1036
  total: nat;
956
1037
  withheld: nat;
957
1038
  };
958
- type Page_25 =
1039
+ type Page_27 =
959
1040
  record {
960
1041
  items: vec Entry__1;
961
1042
  total: nat;
962
1043
  withheld: nat;
963
1044
  };
964
- type Page_24 =
1045
+ type Page_26 =
965
1046
  record {
966
1047
  items: vec AgentSpendRow;
967
1048
  total: nat;
968
1049
  withheld: nat;
969
1050
  };
970
- type Page_23 =
1051
+ type Page_25 =
971
1052
  record {
972
1053
  items: vec AgentRecord;
973
1054
  total: nat;
974
1055
  withheld: nat;
975
1056
  };
976
- type Page_22 =
1057
+ type Page_24 =
977
1058
  record {
978
1059
  items: vec record {
979
1060
  name: text;
@@ -983,93 +1064,105 @@ type Page_22 =
983
1064
  total: nat;
984
1065
  withheld: nat;
985
1066
  };
986
- type Page_21 =
1067
+ type Page_23 =
987
1068
  record {
988
1069
  items: vec BackupMetadata;
989
1070
  total: nat;
990
1071
  withheld: nat;
991
1072
  };
992
- type Page_20 =
1073
+ type Page_22 =
993
1074
  record {
994
1075
  items: vec BearerToken;
995
1076
  total: nat;
996
1077
  withheld: nat;
997
1078
  };
1079
+ type Page_21 =
1080
+ record {
1081
+ items: vec CondenseCheckpointRow;
1082
+ total: nat;
1083
+ withheld: nat;
1084
+ };
1085
+ type Page_20 =
1086
+ record {
1087
+ items: vec CycleSnapshot;
1088
+ total: nat;
1089
+ withheld: nat;
1090
+ };
998
1091
  type Page_2 =
999
1092
  record {
1000
- items: vec Repudiation;
1093
+ items: vec SignIn;
1001
1094
  total: nat;
1002
1095
  withheld: nat;
1003
1096
  };
1004
1097
  type Page_19 =
1005
1098
  record {
1006
- items: vec CondenseCheckpointRow;
1099
+ items: vec text;
1007
1100
  total: nat;
1008
1101
  withheld: nat;
1009
1102
  };
1010
1103
  type Page_18 =
1011
1104
  record {
1012
- items: vec CycleSnapshot;
1105
+ items: vec Eip712Destination;
1013
1106
  total: nat;
1014
1107
  withheld: nat;
1015
1108
  };
1016
1109
  type Page_17 =
1017
1110
  record {
1018
- items: vec text;
1111
+ items: vec Eip712TypeView;
1019
1112
  total: nat;
1020
1113
  withheld: nat;
1021
1114
  };
1022
1115
  type Page_16 =
1023
1116
  record {
1024
- items: vec Eip712Destination;
1117
+ items: vec GuardianDispute;
1025
1118
  total: nat;
1026
1119
  withheld: nat;
1027
1120
  };
1028
1121
  type Page_15 =
1029
1122
  record {
1030
- items: vec Eip712TypeView;
1123
+ items: vec GuardianRecord;
1031
1124
  total: nat;
1032
1125
  withheld: nat;
1033
1126
  };
1034
1127
  type Page_14 =
1035
1128
  record {
1036
- items: vec GuardianDispute;
1129
+ items: vec ExportReceiptRow;
1037
1130
  total: nat;
1038
1131
  withheld: nat;
1039
1132
  };
1040
1133
  type Page_13 =
1041
1134
  record {
1042
- items: vec GuardianRecord;
1135
+ items: vec MemoryFileRow;
1043
1136
  total: nat;
1044
1137
  withheld: nat;
1045
1138
  };
1046
1139
  type Page_12 =
1047
1140
  record {
1048
- items: vec ExportReceiptRow;
1141
+ items: vec MemoryLogEvent;
1049
1142
  total: nat;
1050
1143
  withheld: nat;
1051
1144
  };
1052
1145
  type Page_11 =
1053
1146
  record {
1054
- items: vec MemoryFileRow;
1147
+ items: vec ApprovalRequest;
1055
1148
  total: nat;
1056
1149
  withheld: nat;
1057
1150
  };
1058
1151
  type Page_10 =
1059
1152
  record {
1060
- items: vec MemoryLogEvent;
1153
+ items: vec EngramSessionState;
1061
1154
  total: nat;
1062
1155
  withheld: nat;
1063
1156
  };
1064
1157
  type Page_1 =
1065
1158
  record {
1066
- items: vec SellerView;
1159
+ items: vec KeyView;
1067
1160
  total: nat;
1068
1161
  withheld: nat;
1069
1162
  };
1070
1163
  type Page =
1071
1164
  record {
1072
- items: vec SignIn;
1165
+ items: vec SshRule;
1073
1166
  total: nat;
1074
1167
  withheld: nat;
1075
1168
  };
@@ -1109,6 +1202,11 @@ type OwnerConsole =
1109
1202
  protectedPathCount: nat;
1110
1203
  unknownSessionRefusals: nat;
1111
1204
  };
1205
+ type Outcome__1 =
1206
+ variant {
1207
+ ApprovalPending: ApprovalRequest;
1208
+ Issued: Issued;
1209
+ };
1112
1210
  type Outcome =
1113
1211
  variant {
1114
1212
  MovedByEngram;
@@ -1333,7 +1431,22 @@ type LogPage =
1333
1431
  record {
1334
1432
  firstAvailableSeq: nat;
1335
1433
  head: blob;
1336
- page: Page_10;
1434
+ page: Page_12;
1435
+ };
1436
+ type KeyView =
1437
+ record {
1438
+ cancelledAtNs: opt int;
1439
+ fingerprint: text;
1440
+ firstAtNs: int;
1441
+ holder: principal;
1442
+ issued: nat;
1443
+ keyId: blob;
1444
+ lastSerial: nat;
1445
+ latestEndSecs: nat;
1446
+ live: bool;
1447
+ pk: blob;
1448
+ principals: vec text;
1449
+ ruleId: blob;
1337
1450
  };
1338
1451
  type KeyNomination =
1339
1452
  record {
@@ -1348,6 +1461,18 @@ type KeyBackupStatus =
1348
1461
  sealedAtNs: opt int;
1349
1462
  sealedFor: opt principal;
1350
1463
  };
1464
+ type Issued =
1465
+ record {
1466
+ certificate: blob;
1467
+ fingerprint: text;
1468
+ keyId: text;
1469
+ line: text;
1470
+ principals: vec text;
1471
+ ruleId: blob;
1472
+ serial: nat;
1473
+ validAfterSecs: nat;
1474
+ validBeforeSecs: nat;
1475
+ };
1351
1476
  type Ic402Maintenance =
1352
1477
  record {
1353
1478
  dailySpendRemoved: nat;
@@ -1544,7 +1669,7 @@ type Engram =
1544
1669
  /// nomination names. That check compares the caller inside the module, where
1545
1670
  /// test/key-replacement.test.mo runs it; this body names no roster gate, because the caller holds
1546
1671
  /// no role here until the move.
1547
- acceptAgentKeyNomination: (agentKey: principal) -> (Result_95);
1672
+ acceptAgentKeyNomination: (agentKey: principal) -> (Result_100);
1548
1673
  /// THE PRINCIPAL AN OFFER NAMES TAKES THE ENGRAM, as themselves. This is the only call that hands
1549
1674
  /// an owned engram to someone else, and on acceptance what the former owner granted is ended, not
1550
1675
  /// carried over.
@@ -1615,7 +1740,7 @@ type Engram =
1615
1740
  /// an expired offer (`OwnershipOffer.acceptRefusal`); an engram opened through another; a full
1616
1741
  /// custody chain; whatever the registry refuses (its own words, with a sentence saying the caller
1617
1742
  /// did not become the owner).
1618
- acceptOwnership: () -> (Result_94);
1743
+ acceptOwnership: () -> (Result_99);
1619
1744
  /// The person the owner asked again ACCEPTS: they become this engram's sign-in, and the sealed copy
1620
1745
  /// that came with the ask becomes the engram's (sealed for them). Until this call they have no power
1621
1746
  /// at all. Callable only by that person while the ask waits; refused (as at birth) if they are now
@@ -1695,7 +1820,7 @@ type Engram =
1695
1820
  };
1696
1821
  primaryType: text;
1697
1822
  verifyingContract: text;
1698
- }) -> (Result_92);
1823
+ }) -> (Result_97);
1699
1824
  /// THE ROLE-CONFLICT ARM (refusals are values, never traps), and why three refusals here are not
1700
1825
  /// the same refusal.
1701
1826
  ///
@@ -1725,6 +1850,14 @@ type Engram =
1725
1850
  /// Named callers: an owner console's seller list for an engram (signed in as its sign-in, for one
1726
1851
  /// opened through another), and the owner kit.
1727
1852
  addSeller: (payTo: text, perDayCapE6: nat, isPayout: bool) -> (Result_11);
1853
+ /// OWNER ONLY (the seated sign-in, in an engram opened through another). Adds a rule. It counts 24 hours
1854
+ /// after it is added (`activatesAtNs`), so a rule a stolen session adds can be seen and ended before it gives
1855
+ /// anything. Refused while payments are frozen: a freeze stops every new authority, and lifting it restarts
1856
+ /// the wait of a rule still waiting. The same shape twice is refused, ended or not: a rule is its shape, so
1857
+ /// adding one back means changing something, such as its name.
1858
+ /// Caller: the owner, with a direct call today (`icp canister call <engram> addSshRule`); the client CLI's
1859
+ /// `ssh rule add` when it ships.
1860
+ addSshRule: (spec: RuleSpec) -> (Result_95);
1728
1861
  /// AN AGENT CONVERTS THE ENGRAM'S BALANCE INTO COMPUTE, under the runway rule (`AgentConvert.mo`
1729
1862
  /// holds the rule and says why each number).
1730
1863
  ///
@@ -1748,7 +1881,7 @@ type Engram =
1748
1881
  /// stated: a removal landing DURING the biller's own conversion call cannot stop that call — it
1749
1882
  /// finishes, and the reply (`finishedBeforeRemovalSeen`) and the record row say so. One inter-canister
1750
1883
  /// call, bounded by one cap.
1751
- agentConvertBalance: (token: text, amountE6: opt nat) -> (Result_90);
1884
+ agentConvertBalance: (token: text, amountE6: opt nat) -> (Result_94);
1752
1885
  /// Returns the write RECEIPT, not just the version.
1753
1886
  ///
1754
1887
  /// The receipt was once computed and then thrown away: the audit detail stringified `seq=`/`head=`
@@ -1788,7 +1921,7 @@ type Engram =
1788
1921
  /// Gated on requireWritesNotPaused — unlike the export. This one destroys retained entries, which
1789
1922
  /// is exactly what a guardian pause exists to hold. No action alert is raised: the operation is
1790
1923
  /// owner-initiated, owner-only, and already chained into the audit log.
1791
- applyCondense: (toSeq: nat) -> (Result_89);
1924
+ applyCondense: (toSeq: nat) -> (Result_93);
1792
1925
  /// Owner-only: activate a guardian who has registered against an invite.
1793
1926
  ///
1794
1927
  /// Until this call the guardian is `#Pending` and can do NOTHING — registering is a claim, this
@@ -1870,13 +2003,13 @@ type Engram =
1870
2003
  ///
1871
2004
  /// The write half also refuses while writes are PAUSED.
1872
2005
  backupInit: (dbType: text, backupType: BackupType, parentBackupId:
1873
- opt text, declaredSha256: text, backupLabel: opt text) -> (Result_58);
2006
+ opt text, declaredSha256: text, backupLabel: opt text) -> (Result_61);
1874
2007
  /// Read one chunk of a finalized backup, by index.
1875
2008
  ///
1876
2009
  /// ⚠ GATED ON `read_backup`, which is NOT the permission the upload half uses — that one is
1877
2010
  /// `canAppendMemory`. Holding one says nothing about the other, deliberately: taking a backup and
1878
2011
  /// carrying it away are different authorities.
1879
- backupPullChunk: (backupId: text, chunkIndex: nat) -> (Result_76) query;
2012
+ backupPullChunk: (backupId: text, chunkIndex: nat) -> (Result_80) query;
1880
2013
  backupPushChunk: (backupId: text, chunkIndex: nat, data: blob) ->
1881
2014
  (Result_2);
1882
2015
  /// The OWNER cancels an agent's pending key nomination; the agent keeps its current key. Refused
@@ -1951,7 +2084,7 @@ type Engram =
1951
2084
  /// A name the owner gives meets the rule `renameAgent` applies: a line break or another control
1952
2085
  /// character is `#Invalid` (`People.nameRefusal`), as a rename to it would be.
1953
2086
  createAgentInvite: (name: text, permissions: AgentPermissions) ->
1954
- (Result_58);
2087
+ (Result_61);
1955
2088
  /// Owner-only: mint an invite for a GUARDIAN — an independent check on agents, not a
1956
2089
  /// co-owner and not a recovery agent.
1957
2090
  ///
@@ -1974,7 +2107,7 @@ type Engram =
1974
2107
  /// So an invite that fails to redeem for that reason is not a bad code. The rule exists because
1975
2108
  /// a check must be independent of the thing it checks.
1976
2109
  createGuardianInvite: (name: text, permissions: GuardianPermissions) ->
1977
- (Result_58);
2110
+ (Result_61);
1978
2111
  /// The sign-in GIVES ITSELF UP, or the person the owner asked again says no. They may say no, and
1979
2112
  /// the owner may ask again: whoever the kit names could otherwise not refuse a seat they never
1980
2113
  /// agreed to.
@@ -2032,6 +2165,12 @@ type Engram =
2032
2165
  /// revision, or a paid session's append) that succeeded, still held in full by the ring.
2033
2166
  /// One dispute per guardian per write (`#Conflict`, the first stands).
2034
2167
  disputeAgentWrite: (about: nat, reason: text) -> (Result_15);
2168
+ /// OWNER ONLY (as `addSshRule`). Ends a rule now: no certificate is given under it from this moment; those
2169
+ /// already given run to their own end unless their key is cancelled. ALLOWED WHILE FROZEN: ending takes
2170
+ /// authority away. The row stays, with the time it ended. A rule already ended is refused by name, never a
2171
+ /// silent success, and keeps its first end time.
2172
+ /// Caller: the owner, with a direct call today; the client CLI's `ssh rule end` when it ships.
2173
+ endSshRule: (ruleId: blob) -> (Result_2);
2035
2174
  /// Record that log entries [fromSeq, toSeq] were served, and return the root that proves it.
2036
2175
  ///
2037
2176
  /// This is the receipt ledgerfs Q2 requires before any of those entries may be condensed away.
@@ -2045,7 +2184,7 @@ type Engram =
2045
2184
  /// situation rather than a safety measure. It IS gated on requireMemoryAttached: a store that
2046
2185
  /// failed its integrity check must not attest anything it cannot vouch for.
2047
2186
  exportMemoryRange: (fromSeq: nat, toSeq: nat, authorFilter:
2048
- opt principal) -> (Result_88);
2187
+ opt principal) -> (Result_92);
2049
2188
  /// The payments brake, for the owner or an active guardian (`requireOwnerOrGuardian`). It was
2050
2189
  /// `guardianFreezePayments` before 0.16.0, and the prefix LIED about who may call it: an owner
2051
2190
  /// freezing their own payments is the ordinary case — the guardian is the exceptional one. A name
@@ -2091,7 +2230,7 @@ type Engram =
2091
2230
  /// Delivery status + config readback. Owner-only (the URL is a secret).
2092
2231
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2093
2232
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2094
- getActionAlertStatus: () -> (Result_77) query;
2233
+ getActionAlertStatus: () -> (Result_81) query;
2095
2234
  /// The agent-conversion rule's numbers.
2096
2235
  /// PUBLIC: the class of `getTopUpLimits` — a policy, nobody's data.
2097
2236
  /// The cap an agent meets is `min(maxPerCallE6, getTopUpLimits().maxCkusdcE6s)`.
@@ -2103,7 +2242,7 @@ type Engram =
2103
2242
  ///
2104
2243
  /// Refusal reason preserved from the trap: a grant is a power, and its absence and its
2105
2244
  /// concealment are different facts.
2106
- getAgentRevisablePaths: () -> (Result_68) query;
2245
+ getAgentRevisablePaths: () -> (Result_72) query;
2107
2246
  /// OWNER-ONLY: every engagement's seat weeks on this engram, with the agent's root — the day it
2108
2247
  /// paired, the days of its first and last payment signature, a 64-week map whose bit 0 is the week
2109
2248
  /// of the last one, and how many were produced. Never an amount, a recipient or a nonce.
@@ -2116,7 +2255,7 @@ type Engram =
2116
2255
  /// Two rows can name one root: an agent paired again after it left is a second engagement.
2117
2256
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2118
2257
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2119
- getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_86) query;
2258
+ getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_90) query;
2120
2259
  /// Owner: everything written into this engram by someone other than the owner since the last
2121
2260
  /// markAgentWritesReviewed() — agent appends/revisions AND paid-session appends (see
2122
2261
  /// qualifiesForReview for why those two families are recognised differently).
@@ -2126,7 +2265,7 @@ type Engram =
2126
2265
  /// aged out of the ring (the CHAIN still proves total count; this view can't show their bodies).
2127
2266
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2128
2267
  /// (`AccessControl.requireOwnerOrSignIn`); on a first engram only the owner reads it.
2129
- getAgentWriteReview: () -> (Result_85) query;
2268
+ getAgentWriteReview: () -> (Result_89) query;
2130
2269
  /// Why anchoring is or is not advancing. PUBLIC: ungated on purpose — detecting a stalled
2131
2270
  /// engram is the point, a gated read would fail-to-empty and hand a third party fabricated zeros,
2132
2271
  /// and none of these fields is a secret — `total` is already public via getCertifiedAuditHead.
@@ -2144,7 +2283,7 @@ type Engram =
2144
2283
  /// `getCertifiedAuditHead` serves the same head WITH the subnet certificate for a caller that needs
2145
2284
  /// to verify it was signed rather than asserted.
2146
2285
  getAuditHead: () -> (AuditHead) query;
2147
- getBackupMetadata: (backupId: text) -> (Result_84) query;
2286
+ getBackupMetadata: (backupId: text) -> (Result_88) query;
2148
2287
  /// How many backups of `dbType` each creator keeps, and whether that is the default. Without it the
2149
2288
  /// setting showed only on the device that last set it.
2150
2289
  ///
@@ -2154,7 +2293,7 @@ type Engram =
2154
2293
  /// denied"), a revoked or resigned agent, a guardian (guardians take no backups), a stranger and
2155
2294
  /// the anonymous caller. A kind the setter would refuse is `#Invalid` here too
2156
2295
  /// (`Backup.getRetention`). Records nothing (a query).
2157
- getBackupRetention: (dbType: text) -> (Result_83) query;
2296
+ getBackupRetention: (dbType: text) -> (Result_87) query;
2158
2297
  /// The canister this engram recognises as its rent biller — `null` until the registry pushes one.
2159
2298
  ///
2160
2299
  /// PUBLIC: a payer about to send money needs to know which biller this engram will accept credit
@@ -2171,7 +2310,7 @@ type Engram =
2171
2310
  /// `verifyBirthChain` checks both. Refused to anyone else by the combinator (`#ownerOnly`).
2172
2311
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2173
2312
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2174
- getBirthChain: () -> (Result_82) query;
2313
+ getBirthChain: () -> (Result_86) query;
2175
2314
  /// Each brake: on or off, and while on, who pulled it LAST (their key and whether as owner or
2176
2315
  /// guardian), since when, and the reason they gave — the same person and time as the newest brake
2177
2316
  /// entry on the record (`RecordWords.BrakePull`). For an owner's or a guardian's app. The OWNER and
@@ -2179,7 +2318,7 @@ type Engram =
2179
2318
  /// are refused (`#ownerOrGuardian` — an agent learns a brake is on from the refusal of what it tried,
2180
2319
  /// and needs no more). `pull` is null for a brake that is off, and for one carried on across the
2181
2320
  /// upgrade that added this read (who pulled it was not recorded then) — never a guessed pull.
2182
- getBrakes: () -> (Result_81) query;
2321
+ getBrakes: () -> (Result_85) query;
2183
2322
  /// `Wire.CertifiedAuditHead` (since 0.16.0), not an anonymous record. The registry, market and
2184
2323
  /// biller already served the shared type; the engram — the canister that IS the evidence product —
2185
2324
  /// was the one chain still answering in a shape of its own, missing `witness` entirely. One
@@ -2202,13 +2341,13 @@ type Engram =
2202
2341
  /// discarded when it returns, so a `denied` call here would record nothing while reading as if it
2203
2342
  /// did. The refusal is loud in the reply instead. WHAT WOULD MAKE THIS WRONG: a reason to record who
2204
2343
  /// asked — then this becomes an update that says so.
2205
- getChildAllowance: (agentPrincipal: principal) -> (Result_80) query;
2344
+ getChildAllowance: (agentPrincipal: principal) -> (Result_84) query;
2206
2345
  /// Owner-only, Billing-class: what opening an engram costs this engram, the balance below which an
2207
2346
  /// agent's request is refused, the balance now, and every agent's allowance. An app's cost sentence
2208
2347
  /// reads it. Cycles are owner-class information, as on `getOwnerConsole`.
2209
2348
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2210
2349
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2211
- getChildOpening: () -> (Result_79) query;
2350
+ getChildOpening: () -> (Result_83) query;
2212
2351
  /// Derive the key that opens the sealed copy, encrypted under the caller's transport public key —
2213
2352
  /// for the SIGN-IN alone (the combinator's `#ownerSignIn`; the key file is refused by name: only the
2214
2353
  /// sign-in opens the backup, and the key file holds the plaintext anyway). The derivation input is the
@@ -2224,7 +2363,7 @@ type Engram =
2224
2363
  /// `VetKeys.ManagementCanister.vetKdDeriveKey`. A query cannot await.
2225
2364
  /// Named callers: an owner's app signed in as the sign-in (the browser's recovery), and the owner
2226
2365
  /// kit's `--recover-key` signed by a key-file sign-in.
2227
- getEncryptedKeyBackupKey: (transportPublicKey: blob) -> (Result_76);
2366
+ getEncryptedKeyBackupKey: (transportPublicKey: blob) -> (Result_80);
2228
2367
  /// Derive the shared memory-encryption key, encrypted under the caller's transport
2229
2368
  /// public key. Gated to owner + read-agents (the same principals allowed to read
2230
2369
  /// memory). The client decrypts it locally with its transport secret key.
@@ -2249,7 +2388,7 @@ type Engram =
2249
2388
  /// cost. Stated here because an update used as a read must say why in its interface, rather than
2250
2389
  /// leave the reader to open the body.
2251
2390
  getEncryptedMemoryKey: (epoch: opt nat, transportPublicKey: blob) ->
2252
- (Result_76);
2391
+ (Result_80);
2253
2392
  /// `x402Support` REPORTS THE RAIL, not a constant (since 0.16.0).
2254
2393
  ///
2255
2394
  /// The card's config hardcodes `x402Support = true`, answering a buyer's question with a fact
@@ -2315,7 +2454,7 @@ type Engram =
2315
2454
  /// It refuses rather than half-answers: if either address cannot be derived the reply is
2316
2455
  /// `#Err`, never a record carrying an empty string (ic402's `getEvmAddress` answers `""` on a
2317
2456
  /// failed derivation — that is fail-to-empty on a money surface, and it stops here).
2318
- getEvmAddress: () -> (Result_78);
2457
+ getEvmAddress: () -> (Result_82);
2319
2458
  /// The owner's OWN EVM address, if they registered one — distinct from `getEvmAddress`, which is
2320
2459
  /// the address this canister derives for itself.
2321
2460
  ///
@@ -2332,7 +2471,7 @@ type Engram =
2332
2471
  /// the reader to open the body.
2333
2472
  /// Also callable by the seated sign-in of an engram opened through another, acting as the owner
2334
2473
  /// (`AccessControl.requireOwnerOrSignIn`); on a first engram only the owner.
2335
- getEvmSignerAddress: () -> (Result_58);
2474
+ getEvmSignerAddress: () -> (Result_61);
2336
2475
  /// PUBLIC: where this chain begins, for the stranger deciding whether to trust it.
2337
2476
  ///
2338
2477
  /// The fourth of the four evidence methods (`getAuditHead`, `getCertifiedAuditHead`,
@@ -2341,7 +2480,7 @@ type Engram =
2341
2480
  /// cannot verify it, and nothing here identifies anybody.
2342
2481
  getGenesisNote: () -> (GenesisNote) query;
2343
2482
  /// A guardian's own channel status (their URL is their secret — each guardian sees only theirs).
2344
- getGuardianAlertStatus: () -> (Result_77) query;
2483
+ getGuardianAlertStatus: () -> (Result_81) query;
2345
2484
  /// The sealed copy itself — opaque bytes only the sign-in can open. Readable by the sign-in (it
2346
2485
  /// opens them with the key `getEncryptedKeyBackupKey` derives for it) and by the key file, which
2347
2486
  /// holds the plaintext already and so learns nothing — it reads them to compare with the copy the kit
@@ -2351,7 +2490,7 @@ type Engram =
2351
2490
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
2352
2491
  /// Named callers: the owner kit (`--recover-key`, and its check after sealing), and an owner console
2353
2492
  /// signed in as the sign-in (the browser's recovery).
2354
- getKeyBackupCiphertext: () -> (Result_76) query;
2493
+ getKeyBackupCiphertext: () -> (Result_80) query;
2355
2494
  /// Whether this engram holds a sealed copy of its owner's key, for whom, since when, whether it is
2356
2495
  /// sealed for the sign-in seated now, and whether a copy waits with an ask (`Types.KeyBackupStatus`).
2357
2496
  /// Readable by the key file and the sign-in (`#ownerOrSignIn`); refused loudly to anyone else
@@ -2360,7 +2499,7 @@ type Engram =
2360
2499
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
2361
2500
  /// Named callers: the owner kit after it opens an engram (it prints whether the copy is stored), and
2362
2501
  /// an owner console showing an engram opened through another (whether recovery can work).
2363
- getKeyBackupStatus: () -> (Result_75) query;
2502
+ getKeyBackupStatus: () -> (Result_79) query;
2364
2503
  /// BLS verification key under which the owner kit seals the backup (`IbeCiphertext.encrypt` to the
2365
2504
  /// sign-in's principal) and the opener verifies the derived key. Served on-canister so the kit never
2366
2505
  /// has to know which master key this network uses (a wrong guess would seal a copy nobody can open).
@@ -2404,7 +2543,7 @@ type Engram =
2404
2543
  /// never renumbered: the next page starts at the last version returned plus one. Defaults
2405
2544
  /// return the whole history of any file a pre-FD engram could have held.
2406
2545
  getMemoryHistory: (path: text, start: opt nat, limit: opt nat) ->
2407
- (Result_74) query;
2546
+ (Result_78) query;
2408
2547
  /// PUBLIC: the epoch alone, and deliberately nothing else (a public rotation history would tell everyone, the party just cut off included, when an owner ended a trust relationship). A `rotatedAt[]`
2409
2548
  /// history would be a public, fleet-enumerable feed of when each owner terminated a trust
2410
2549
  /// relationship — readable by, among others, the party just terminated.
@@ -2439,7 +2578,7 @@ type Engram =
2439
2578
  /// Refusal reasons of both merge: an empty policy reads as "nothing is capped, every version kept
2440
2579
  /// forever" — a claim about what this engram will DESTROY — and an empty guard list reads as
2441
2580
  /// "nothing is held back".
2442
- getMemoryRetentionPolicy: () -> (Result_73) query;
2581
+ getMemoryRetentionPolicy: () -> (Result_77) query;
2443
2582
  /// The metrics reader this engram answers — `null` until the spawning registry names one.
2444
2583
  ///
2445
2584
  /// PUBLIC: an owner deciding whether to switch the read off needs to know who it is, and anyone
@@ -2452,7 +2591,7 @@ type Engram =
2452
2591
  /// see: the only row it can ever return is the caller's own, so "you are not a guardian here" is
2453
2592
  /// a fact about the caller, told to the caller. There is nothing to leak by omission — which is
2454
2593
  /// the test the #NotFound arm sets.
2455
- getMyGuardianStatus: () -> (Result_19) query;
2594
+ getMyGuardianStatus: () -> (Result_20) query;
2456
2595
  /// The gated half of the old `status()` (split in 0.16.0; `about()` is the public half).
2457
2596
  ///
2458
2597
  /// Every field is bare — no masking, no `authorized` discriminator — because reaching this record
@@ -2461,7 +2600,7 @@ type Engram =
2461
2600
  /// `cyclesBalance` is a bare `Nat`. Widening it to `opt nat` so a refusal could be `null` broke
2462
2601
  /// every published client and bought a masked answer nobody had asked for (no consumer read the
2463
2602
  /// masked `0`). Behind a gate there is nobody to mask it from.
2464
- getOwnerConsole: () -> (Result_72) query;
2603
+ getOwnerConsole: () -> (Result_76) query;
2465
2604
  /// The engram's sign-in, as `Types.OwnerSignInView` describes it: whether this engram was opened
2466
2605
  /// through another, who its sign-in is, whether the caller is it, and any decline or waiting ask.
2467
2606
  /// Readable by the owner's key, the sign-in, and the person a waiting ask goes to (they need to see
@@ -2470,16 +2609,16 @@ type Engram =
2470
2609
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
2471
2610
  /// Named callers: an owner console showing an engram opened through another (who signs in, and a
2472
2611
  /// waiting ask with Accept and Decline), and the owner kit after it opens one.
2473
- getOwnerSignIn: () -> (Result_71) query;
2612
+ getOwnerSignIn: () -> (Result_75) query;
2474
2613
  /// The open offer, to the two parties to it: the owner and the principal it names. `null` when
2475
2614
  /// none is open or it has expired. Anyone else is refused: an offer names a principal who has not
2476
2615
  /// agreed to anything yet, so it is not public the way the custody chain is.
2477
- getOwnershipOffer: () -> (Result_70) query;
2616
+ getOwnershipOffer: () -> (Result_74) query;
2478
2617
  /// Read the four profile fields in one bounded batch. Raw per-field results preserve SDK
2479
2618
  /// decryption and first-failure ordering; only an explicit NotFound means an unset field.
2480
2619
  /// Query reads retain existing permission and owner visibility, without changing read counts.
2481
2620
  /// Callers: EngramClient.getProfile (ProfileManager.getProfile, the local MCP profile tool).
2482
- getProfile: () -> (Result_69) query;
2621
+ getProfile: () -> (Result_73) query;
2483
2622
  /// Owner + agents only (agents need it to avoid writing protected paths).
2484
2623
  ///
2485
2624
  /// A NAMED RECORD, not a Page: the setter replaces this list wholesale, so there is no window to
@@ -2491,7 +2630,7 @@ type Engram =
2491
2630
  /// path on this engram is protected", and an agent consults this list precisely to avoid
2492
2631
  /// writing one — so a fabricated empty here does not merely misinform, it invites the write the
2493
2632
  /// list exists to prevent.
2494
- getProtectedPaths: () -> (Result_68) query;
2633
+ getProtectedPaths: () -> (Result_72) query;
2495
2634
  /// What an approval card shows beside a payment to `payTo` (`Types.RecipientHistory`): whether an x402
2496
2635
  /// signature from this engram has paid it before and since when, whether it is a listed seller and
2497
2636
  /// counts now, and whether the history is full (then "not paid before" may be one it forgot). Read
@@ -2502,7 +2641,7 @@ type Engram =
2502
2641
  /// never), so a card can say "paid 3 times, largest $12"; the history forgets the address paid
2503
2642
  /// longest ago when full.
2504
2643
  /// Named callers: an owner's app, on its approval card for a payment request.
2505
- getRecipientHistory: (payTo: text) -> (Result_67) query;
2644
+ getRecipientHistory: (payTo: text) -> (Result_71) query;
2506
2645
  /// Whether the metrics reader's read is answered — `true` from birth.
2507
2646
  ///
2508
2647
  /// PUBLIC: the promise that an owner can switch this read off can be checked only if the switch
@@ -2516,7 +2655,7 @@ type Engram =
2516
2655
  /// fabrication) — the signers refuse in that state too, so the refusal is the truth.
2517
2656
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2518
2657
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2519
- getSigningFloor: () -> (Result_66) query;
2658
+ getSigningFloor: () -> (Result_70) query;
2520
2659
  /// The registry that spawned this engram, if it recorded one.
2521
2660
  ///
2522
2661
  /// PUBLIC: it is the provenance claim. An engram asserting it is part of a fleet, under that
@@ -2537,7 +2676,7 @@ type Engram =
2537
2676
  /// "none" and a spend of 0 are both real answers, so a fabricated one would be read as fact.
2538
2677
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2539
2678
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2540
- getSpendCeiling: () -> (Result_65) query;
2679
+ getSpendCeiling: () -> (Result_69) query;
2541
2680
  /// Read the caps in force for a caller.
2542
2681
  ///
2543
2682
  /// OWNER-ONLY, and this is where it diverges from the market's inbound twin, which is public.
@@ -2552,8 +2691,17 @@ type Engram =
2552
2691
  /// owner yet is refused the same way rather than answered `#Conflict`. It never fails soft:
2553
2692
  /// spending caps are the owner's custody configuration, and a default-looking answer would
2554
2693
  /// understate the real limits to anyone probing them.
2555
- getSpendPolicy: (caller: opt principal) -> (Result_64) query;
2556
- getStorageStats: () -> (Result_63) query;
2694
+ getSpendPolicy: (caller: opt principal) -> (Result_68) query;
2695
+ /// ANYONE. The engram's SSH certificate key: the raw 32 bytes, the line a server's trust file takes
2696
+ /// (`SshPolicy.caLine`), and its fingerprint as `ssh-keygen -l` prints it. The same line is served at
2697
+ /// `GET /.well-known/engramx-mandate-ca`.
2698
+ ///
2699
+ /// PUBLIC: a public key lets nobody sign, and a server's administrator needs it before any agent asks.
2700
+ /// UPDATE, NOT QUERY: the first read after an upgrade asks the network for the key, which a query cannot await.
2701
+ /// Callers: anyone, a server's administrator above all; the same line is served at the web address, which
2702
+ /// `curl` reads. The client CLI's `ssh ca` when it ships.
2703
+ getSshCaKey: () -> (Result_67);
2704
+ getStorageStats: () -> (Result_66) query;
2557
2705
  /// Timer arm-state. PUBLIC and deliberately so: these timers are self-arming to save cycles,
2558
2706
  /// and an optimisation nobody can verify is an optimisation nobody should trust. Cheap to read,
2559
2707
  /// leaks nothing (booleans about this engram's own scheduling).
@@ -2620,7 +2768,7 @@ type Engram =
2620
2768
  /// The ledger failure is `#Unavailable`, not `#Invalid`: a dependency refused or timed out, the
2621
2769
  /// request was fine, and retry is the correct response. That is the one arm in the whole set that
2622
2770
  /// means "try again", and it is the reason `Error` is a closed variant rather than a sentence.
2623
- getWalletBalances: () -> (Result_62);
2771
+ getWalletBalances: () -> (Result_65);
2624
2772
  /// Cycles-only getter used by EngramClient.walletBalance and its stdio MCP/OpenClaw callers.
2625
2773
  /// The earlier walletBalance/walletBalances one-letter pair remains retired: this name states
2626
2774
  /// the unit, while getWalletBalances retains the distinct full token-wallet operation.
@@ -2634,7 +2782,7 @@ type Engram =
2634
2782
  /// read: three empty strings with `configured = false` is a VALID-LOOKING answer meaning "this
2635
2783
  /// engram has no World ID configuration" — handed to a caller who merely lacks a grant. The
2636
2784
  /// fabrication is indistinguishable from the truth by construction.
2637
- getWorldIdConfig: () -> (Result_61) query;
2785
+ getWorldIdConfig: () -> (Result_64) query;
2638
2786
  /// UPDATE, NOT QUERY: this awaits THREE system calls — `raw_rand()` for the nonce,
2639
2787
  /// `Call.signWithEcdsa` for the signature, and `worldIdRpPublicKey()` for the derived key. A
2640
2788
  /// query can do none of them.
@@ -2643,7 +2791,7 @@ type Engram =
2643
2791
  /// Valid iff the derived signer address (getWorldIdRpSignerAddress) is registered for this rp_id in
2644
2792
  /// the World Developer Portal. Short-lived (300s TTL, idkit-server's default) and single-purpose —
2645
2793
  /// it authorizes opening one verification request, nothing else.
2646
- getWorldIdRpContext: () -> (Result_60);
2794
+ getWorldIdRpContext: () -> (Result_63);
2647
2795
  /// Owner-only: the EVM address derived from the engram's dedicated World ID RP signing key (the
2648
2796
  /// "worldid-rp" tECDSA path). Register THIS address as the rp_id's signer in the World Developer
2649
2797
  /// Portal — the engram never holds or exports a private key (only threshold shares exist, on the
@@ -2655,7 +2803,7 @@ type Engram =
2655
2803
  /// a query without silently retiring its denial record (the refusal-over-fabrication class).
2656
2804
  /// Also callable by the seated sign-in of an engram opened through another, acting as the owner
2657
2805
  /// (`AccessControl.requireOwnerOrSignIn`); on a first engram only the owner.
2658
- getWorldIdRpSignerAddress: () -> (Result_58);
2806
+ getWorldIdRpSignerAddress: () -> (Result_61);
2659
2807
  /// The verified IDKitResult, verbatim, as World's /api/v4/verify accepted it — the re-checkable
2660
2808
  /// artifact behind verifiedHuman. OWNER ONLY, because it carries the NULLIFIER: the owner's
2661
2809
  /// unique-human pseudonym. An agent never needs it, and a guardian is a check on agents, not a party
@@ -2669,7 +2817,7 @@ type Engram =
2669
2817
  ///
2670
2818
  /// The public, anonymous answer to "is a human behind this engram" is `about().verifiedHuman`,
2671
2819
  /// which is a boolean and leaks nothing.
2672
- getWorldIdVerification: () -> (Result_59) query;
2820
+ getWorldIdVerification: () -> (Result_62) query;
2673
2821
  /// THE EMERGENCY FAMILY (refusals are values, never traps). Every refusal below is `#Refused` or
2674
2822
  /// `#NotFound`, and the absence of a `#Conflict` here is the point: these are the calls someone
2675
2823
  /// makes while something is going wrong, and the only two answers that help are "you may not do
@@ -2724,7 +2872,7 @@ type Engram =
2724
2872
  ///
2725
2873
  /// Owner-only: only the engram owner can authorize a Connector install.
2726
2874
  issueAuthCode: (redirectUri: text, scope: text, codeChallenge: text,
2727
- clientId: opt text) -> (Result_58);
2875
+ clientId: opt text) -> (Result_61);
2728
2876
  /// Hourly (timestamp, totalMemoryReads, totalMemoryWrites) snapshots, ~30 days.
2729
2877
  /// Same guard as `listCycleSnapshots` (any role). Diff consecutive rows for a per-engram activity
2730
2878
  /// time-series (retention instrumentation).
@@ -2734,7 +2882,7 @@ type Engram =
2734
2882
  /// Refusal reason preserved, and it is the sharpest of this family: a masked `[]` reads as a
2735
2883
  /// DORMANT engram and corrupts retention math — a fabricated empty here does not just misinform a
2736
2884
  /// reader, it feeds a wrong number into a decision about destroying data.
2737
- listActivitySnapshots: (start: nat, limit: nat) -> (Result_57) query;
2885
+ listActivitySnapshots: (start: nat, limit: nat) -> (Result_60) query;
2738
2886
  /// The owner or a seated owner sign-in reads paired and connected grants in one typed roster.
2739
2887
  /// Existing lists keep their signatures and records. Rows retain each list's relative order:
2740
2888
  /// paired first, then sign-ins. `active` means grant status/expiry/issuer standing only, not
@@ -2742,7 +2890,7 @@ type Engram =
2742
2890
  /// This new method carries the tagged shape rather than widening a shipped response variant.
2743
2891
  /// Callers: an owner console's agent list (paired agents and sign-ins on one page, with the
2744
2892
  /// admission count), read by the owner or a seated sign-in.
2745
- listAgentRoster: (start: nat, limit: nat) -> (Result_56) query;
2893
+ listAgentRoster: (start: nat, limit: nat) -> (Result_59) query;
2746
2894
  /// OWNER-ONLY: what each agent has spent today, beside the daily limit in force for it, so an app's
2747
2895
  /// agent rows can say "$0.50 of $5.00 today". Read from the state the payment path already keeps —
2748
2896
  /// `outboundSpendToday`, through `SpendCeiling.callerSpentOn` (the reader `x402SignFor` uses) — and
@@ -2760,7 +2908,7 @@ type Engram =
2760
2908
  /// the calling key, or under another day boundary.
2761
2909
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2762
2910
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2763
- listAgentSpendToday: (start: nat, limit: nat) -> (Result_55) query;
2911
+ listAgentSpendToday: (start: nat, limit: nat) -> (Result_58) query;
2764
2912
  /// THE PAGE EXEMPLAR (since 0.16.0). A trap became `#Refused`, and a bare array became
2765
2913
  /// `Result<Page<T>>`: refusals are values, and a list answers the one page shape.
2766
2914
  ///
@@ -2778,7 +2926,7 @@ type Engram =
2778
2926
  /// A method that filters rows by caller sets it — the row-level honesty rule.
2779
2927
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2780
2928
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2781
- listAgents: (start: nat, limit: nat) -> (Result_54) query;
2929
+ listAgents: (start: nat, limit: nat) -> (Result_57) query;
2782
2930
  /// The GUARDIAN-audience projection of the agent roster — three fields, not the full record.
2783
2931
  ///
2784
2932
  /// Two audiences, two methods (one result shape per method; the disclosure law), rather than one
@@ -2790,7 +2938,7 @@ type Engram =
2790
2938
  /// Refusal reason preserved: `[]` reads as "this engram has no agents", and this is the list a
2791
2939
  /// guardian consults BEFORE REVOKING ONE. A fabricated empty here does not merely misinform —
2792
2940
  /// it tells someone acting under emergency powers that there is nothing to act on.
2793
- listAgentsForGuardian: (start: nat, limit: nat) -> (Result_53) query;
2941
+ listAgentsForGuardian: (start: nat, limit: nat) -> (Result_56) query;
2794
2942
  /// Owner-only: rows carry caller, amount, operation and free-text rationale. The SDK omits it.
2795
2943
  ///
2796
2944
  /// The optional leading filter stays (a list may take an optional leading filter): an app calls
@@ -2803,7 +2951,7 @@ type Engram =
2803
2951
  ///
2804
2952
  /// Refusal reason preserved: `[]` reads as "nothing is awaiting the owner's decision".
2805
2953
  listApprovalRequests: (statusFilter: opt ApprovalStatus, start: nat,
2806
- limit: nat) -> (Result_39) query;
2954
+ limit: nat) -> (Result_42) query;
2807
2955
  /// `total` IS THE HEAD COUNTER, and on this method that is the entire point.
2808
2956
  ///
2809
2957
  /// The audit log is a bounded RING: it trims its tail, so "rows you can read" and "entries that
@@ -2828,7 +2976,7 @@ type Engram =
2828
2976
  /// of a body, or a stranger reaching `items` (test/record-view.test.mo pins both); or a reader who
2829
2977
  /// must see the whole record without being the owner or a guardian — the public certified head is
2830
2978
  /// the answer for integrity, and nothing else is.
2831
- listAuditEntries: (start: nat, limit: nat) -> (Result_52) query;
2979
+ listAuditEntries: (start: nat, limit: nat) -> (Result_55) query;
2832
2980
  /// ONE SHAPE FOR EVERY CALLER (since 0.16.0: refusals are values, and a list answers the one page
2833
2981
  /// shape).
2834
2982
  ///
@@ -2849,7 +2997,7 @@ type Engram =
2849
2997
  /// There is no `dbTypeFilter` on the wire. The capability remains: `EngramClient.listBackups` keeps
2850
2998
  /// its optional filter and applies it to the page, so no caller loses the ability to ask "backups
2851
2999
  /// of this database" — it stops being a thing the canister has to page around.
2852
- listBackups: (start: nat, limit: nat) -> (Result_51) query;
3000
+ listBackups: (start: nat, limit: nat) -> (Result_54) query;
2853
3001
  /// List all bearer tokens — Active, Revoked, and Expired. An owner's app uses this to show the
2854
3002
  /// installed connectors (claude.ai, Claude Desktop, etc.).
2855
3003
  /// Refusal reason preserved from the trap: `[]` reads as "no connector is installed on this
@@ -2861,7 +3009,7 @@ type Engram =
2861
3009
  /// the store's honesty.
2862
3010
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2863
3011
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2864
- listBearerTokens: (start: nat, limit: nat) -> (Result_50) query;
3012
+ listBearerTokens: (start: nat, limit: nat) -> (Result_53) query;
2865
3013
  /// The condense checkpoints in the retained log at or above `startSeq`, oldest first.
2866
3014
  ///
2867
3015
  /// The other half of `listMemoryExportReceipts`'s split (since 0.16.0). A checkpoint is the only
@@ -2871,12 +3019,12 @@ type Engram =
2871
3019
  ///
2872
3020
  /// Owner-only like every other archive surface, and for the same structural reason: these rows
2873
3021
  /// carry the chain positions and roots of entries whose paths were inside the hash preimage.
2874
- listCondenseCheckpoints: (startSeq: nat, limit: nat) -> (Result_49) query;
2875
- listCycleSnapshots: (start: nat, limit: nat) -> (Result_48) query;
3022
+ listCondenseCheckpoints: (startSeq: nat, limit: nat) -> (Result_52) query;
3023
+ listCycleSnapshots: (start: nat, limit: nat) -> (Result_51) query;
2876
3024
  /// Same `withheld` treatment as listMemoryFiles — the tombstone listing filtered reserved paths
2877
3025
  /// for non-owners just as silently, and a caller could not tell a filtered tombstone list from a
2878
3026
  /// complete one. Counted before slicing, so policy-hidden rows never blur into paging.
2879
- listDeletedMemoryFiles: (start: nat, limit: nat) -> (Result_47) query;
3027
+ listDeletedMemoryFiles: (start: nat, limit: nat) -> (Result_50) query;
2880
3028
  /// On the engram, not the market (commerce is the market's, signing is here): withdrawal custody
2881
3029
  /// does not leave.
2882
3030
  ///
@@ -2892,7 +3040,7 @@ type Engram =
2892
3040
  /// `value`, not `address`: a list may hold a venue value that is no address. Readable by the owner,
2893
3041
  /// an active agent or an active guardian.
2894
3042
  listEip712Destinations: (typeId: blob, start: nat, limit: nat) ->
2895
- (Result_46) query;
3043
+ (Result_49) query;
2896
3044
  /// The registered shapes — encodeTypeString is the display artifact, verbatim.
2897
3045
  /// On the engram, not the market (commerce is the market's, signing is here): EIP-712 signing is
2898
3046
  /// custody, and custody does not leave.
@@ -2904,19 +3052,19 @@ type Engram =
2904
3052
  /// Each row carries its per-field rules (`fieldRules`), joined in from `eip712FieldRules` — they
2905
3053
  /// are part of what the type authorises, so a reader of the list must not have to make a second
2906
3054
  /// call to learn them. The row type is `Eip712TypeView`.
2907
- listEip712Types: (start: nat, limit: nat) -> (Result_45) query;
3055
+ listEip712Types: (start: nat, limit: nat) -> (Result_48) query;
2908
3056
  /// Guardians' disputes, oldest first. Same visibility as `listRepudiations` and `listRecordNotes`:
2909
3057
  /// the owner and ACTIVE guardians read the rows; an agent gets an empty page whose `withheld` counts
2910
3058
  /// them (an agent reads only the entries it caused, and a dispute is the guardian's entry, not the
2911
3059
  /// agent's); a stranger, a pending guardian and the anonymous caller are refused.
2912
- listGuardianDisputes: (start: nat, limit: nat) -> (Result_44) query;
3060
+ listGuardianDisputes: (start: nat, limit: nat) -> (Result_47) query;
2913
3061
  /// Accessible by owner and guardians.
2914
3062
  ///
2915
3063
  /// Refusal reason carried over from the trap, because it is the sharpest example of why this
2916
3064
  /// surface may not fail soft: `[]` reads as "this engram has nobody who can freeze payments or
2917
3065
  /// pause writes" — a claim about who can STOP it. A caller who cannot tell that from "you may not
2918
3066
  /// see the roster" has been told the engram is unguarded when it may be fully guarded.
2919
- listGuardians: (start: nat, limit: nat) -> (Result_43) query;
3067
+ listGuardians: (start: nat, limit: nat) -> (Result_46) query;
2920
3068
  /// The export receipts in the retained log at or above `startSeq`, oldest first.
2921
3069
  ///
2922
3070
  /// ONE LIST, ONE QUESTION (since 0.16.0). This method used to return receipts AND checkpoints
@@ -2932,7 +3080,7 @@ type Engram =
2932
3080
  ///
2933
3081
  /// Read `MemoryRouter.ReceiptPage` before reading `page.total` as a receipt count. It is not one;
2934
3082
  /// it is the chain's length, and the declaration says why.
2935
- listMemoryExportReceipts: (startSeq: nat, limit: nat) -> (Result_42) query;
3083
+ listMemoryExportReceipts: (startSeq: nat, limit: nat) -> (Result_45) query;
2936
3084
  /// THE `withheld` EXEMPLAR (since 0.16.0): this method is the defect the field was added to fix.
2937
3085
  ///
2938
3086
  /// A non-owner's answer silently dropped every `config/` and `secrets/` row. Not "refused the
@@ -2956,7 +3104,7 @@ type Engram =
2956
3104
  /// `opt`). Looked up only for the rows of THIS page (`MemoryRouter.info`), after the slice, so the
2957
3105
  /// cost is one lookup per row served, never one per file stored. A WIDENED REPLY: a reader that
2958
3106
  /// decodes the row by position rather than by field name breaks — none in this repository does.
2959
- listMemoryFiles: (start: nat, limit: nat) -> (Result_41) query;
3107
+ listMemoryFiles: (start: nat, limit: nat) -> (Result_44) query;
2960
3108
  /// One page of the memory log, seq-ordered, optionally narrowed to one author.
2961
3109
  ///
2962
3110
  /// THE WINDOW IS THE CURSOR, and the page states it. The window is
@@ -2979,7 +3127,7 @@ type Engram =
2979
3127
  ///
2980
3128
  /// The count argument is `limit`, as on every other list.
2981
3129
  listMemoryLog: (startSeq: nat, limit: nat, authorFilter: opt principal) ->
2982
- (Result_40) query;
3130
+ (Result_43) query;
2983
3131
  /// The caller's OWN spend-approval requests. Refusals are values and the reply is the one page
2984
3132
  /// shape (since 0.16.0), which closed two defects:
2985
3133
  ///
@@ -2995,7 +3143,7 @@ type Engram =
2995
3143
  /// to see, so `total` over their own rows is the honest count and nothing is hidden FROM them.
2996
3144
  /// (The MAP itself stays unbounded: pruning an approval record destroys evidence of what was
2997
3145
  /// asked, which is a retention question rather than a shape fix, and it is still open.)
2998
- listMyApprovalRequests: (start: nat, limit: nat) -> (Result_39) query;
3146
+ listMyApprovalRequests: (start: nat, limit: nat) -> (Result_42) query;
2999
3147
  /// The payer's own sessions, live ones first. PAYER-SCOPED: a caller sees only their own, which
3000
3148
  /// is why this needs no role — a session id is not a secret from the person who paid for it.
3001
3149
  ///
@@ -3003,7 +3151,7 @@ type Engram =
3003
3151
  /// `total` is how many of the caller's sessions still exist. Paged from the start because a cursor
3004
3152
  /// added after release is an argument-list change every client would break on. The order is the
3005
3153
  /// order sessions were opened.
3006
- listMySessions: (start: nat, limit: nat) -> (Result_38) query;
3154
+ listMySessions: (start: nat, limit: nat) -> (Result_41) query;
3007
3155
  /// Paged and enveloped like every other `list*` (the one page shape), and the envelope here is
3008
3156
  /// uniformity rather than gating: this method cannot refuse anybody, so `#Err` is unreachable on it.
3009
3157
  /// That is deliberate — a verifier that reads this chain reads several other lists beside it, and
@@ -3015,7 +3163,7 @@ type Engram =
3015
3163
  /// asked by strangers. `verifyEngramActiveOwner` on the registry answers only about the owner
3016
3164
  /// IT recorded, so this chain is what a caller composes with when currency matters — which it
3017
3165
  /// cannot do if it needs a role here.
3018
- listOwnershipTransfers: (start: nat, limit: nat) -> (Result_37) query;
3166
+ listOwnershipTransfers: (start: nat, limit: nat) -> (Result_40) query;
3019
3167
  /// OWNER-ONLY: how many payment signatures each agent has obtained today, and the daily limit (200,
3020
3168
  /// `PaymentSignCap`). Served because an app that states the rule has no number to show without it,
3021
3169
  /// and a number it made up would be a fabricated zero. Anyone else is refused by name (`#Refused
@@ -3029,7 +3177,7 @@ type Engram =
3029
3177
  /// so beside it).
3030
3178
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
3031
3179
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
3032
- listPaymentSignatureCounts: (start: nat, limit: nat) -> (Result_36) query;
3180
+ listPaymentSignatureCounts: (start: nat, limit: nat) -> (Result_39) query;
3033
3181
  /// Agent records removed by a reset (or by an accepted change of owner, `acceptOwnership`). Each row
3034
3182
  /// is a NAMED record — `principal`, `name`, `pairedAt` and `purgedAt`, and also the agent's `root`,
3035
3183
  /// the `invite` its enrolment named, and `ended` (why and on what day its engagement ended: its own
@@ -3059,7 +3207,7 @@ type Engram =
3059
3207
  ///
3060
3208
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
3061
3209
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
3062
- listPurgedAgents: (start: nat, limit: nat) -> (Result_35) query;
3210
+ listPurgedAgents: (start: nat, limit: nat) -> (Result_38) query;
3063
3211
  /// ONE ACCESSOR over the read log (since 0.16.0, folding `readReadLog` and `getDenialLog`): every
3064
3212
  /// row, or only successes, or only refusals and failures (`successFilter`).
3065
3213
  ///
@@ -3104,13 +3252,13 @@ type Engram =
3104
3252
  /// webhook auto-disables, expiry sweeps and MCP rate limits. Do not narrow this to a name it does
3105
3253
  /// not carry.
3106
3254
  listReadLog: (successFilter: opt bool, start: nat, limit: nat) ->
3107
- (Result_34) query;
3255
+ (Result_37) query;
3108
3256
  /// The owner's notes, oldest first. Same visibility as `listRepudiations`, for the same reason: the
3109
3257
  /// owner and ACTIVE guardians read the rows; an agent reads only the entries it caused, and every
3110
3258
  /// note is the owner's, so an agent gets an empty page whose `withheld` counts the notes in its
3111
3259
  /// window — never "there are none". A stranger, a pending guardian and the anonymous caller are
3112
3260
  /// refused.
3113
- listRecordNotes: (start: nat, limit: nat) -> (Result_33) query;
3261
+ listRecordNotes: (start: nat, limit: nat) -> (Result_36) query;
3114
3262
  /// The owner and ACTIVE guardians see the disputes. An agent gets an empty page whose `withheld`
3115
3263
  /// counts the rows in its window — which says disputes exist without showing them, never "none have
3116
3264
  /// been filed": the visibility is `listAuditEntries`', where an agent reads only the record entries
@@ -3123,14 +3271,14 @@ type Engram =
3123
3271
  /// can be mistaken for an absence of disputes is worse than no record at all. Not public by design.
3124
3272
  ///
3125
3273
  /// RENAMED from `getRepudiations` (a `get*` returns one value, a `list*` a page).
3126
- listRepudiations: (start: nat, limit: nat) -> (Result_32) query;
3274
+ listRepudiations: (start: nat, limit: nat) -> (Result_35) query;
3127
3275
  /// The seller list, a page at a time, as `Types.SellerView` (a raise whose wait is over shown applied;
3128
3276
  /// `liveNow` — false for every row while an engram opened through another has no sign-in seated; what
3129
3277
  /// x402 reserved for each today). For the key file and the sign-in in an engram opened
3130
3278
  /// through another, the owner in a first engram; refused loudly to anyone else — never an empty page,
3131
3279
  /// which would read as "no sellers". A QUERY: the refusal is in the reply, not the denial log.
3132
3280
  /// Named callers: an owner console's seller list.
3133
- listSellers: (start: nat, limit: nat) -> (Result_31) query;
3281
+ listSellers: (start: nat, limit: nat) -> (Result_34) query;
3134
3282
  /// OWNER-ONLY: the sign-ins, each with the name its app registered. The same tokens, in the same
3135
3283
  /// order and paged the same way, as `listBearerTokens`, each beside `clientName` — the RFC 7591
3136
3284
  /// `client_name` the app registered when the token was issued (`People.SignIn` says when it is null,
@@ -3141,7 +3289,18 @@ type Engram =
3141
3289
  /// `listBearerTokens`' own gate and for its reason.
3142
3290
  /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
3143
3291
  /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
3144
- listSignIns: (start: nat, limit: nat) -> (Result_30) query;
3292
+ listSignIns: (start: nat, limit: nat) -> (Result_33) query;
3293
+ /// The agent keys this engram has given certificates to, one row for each key under each rule, in the order
3294
+ /// given: the owner and a guardian see every row; an agent sees the rows of the keys given to it (its lasting
3295
+ /// identity, so every key it holds), and `withheld` counts the rows it is not shown. Anyone else is refused.
3296
+ /// Callers: the owner, a guardian and an agent, with a direct call today; the client CLI's `ssh status` when it
3297
+ /// ships.
3298
+ listSshKeys: (start: nat, limit: nat) -> (Result_32) query;
3299
+ /// The owner's SSH rules, ended ones included (each says when it ended and when it counts from), in the order
3300
+ /// added. For the owner, an active agent (which needs a rule's id to ask under it) or an active guardian.
3301
+ /// Callers: the owner and an agent (which needs a rule's id to ask under it), with a direct call today; the
3302
+ /// client CLI's `ssh rule list` and the local tool server's `engram_list_ssh_rules` when they ship.
3303
+ listSshRules: (start: nat, limit: nat) -> (Result_31) query;
3145
3304
  /// Owner: advance the review cursor — "I have seen everything up to and including uptoAuditId"
3146
3305
  /// (null = everything at the current head). Bounded so the attestation can never cover entries
3147
3306
  /// the app did not render; clamped monotonic (the cursor never moves backward) and to the
@@ -3169,7 +3328,7 @@ type Engram =
3169
3328
  /// read as money an agent can spend. `People.SpendState` names each one. And which whole-key refusal
3170
3329
  /// stops every payment now, if one does (`paymentsStoppedBy`: the brake, the signing floor, the daily
3171
3330
  /// count of payment signatures).
3172
- myGrant: () -> (Result_29) query;
3331
+ myGrant: () -> (Result_30) query;
3173
3332
  /// The AGENT's current key nominates the key that will replace it. Nothing moves yet: the new
3174
3333
  /// key must accept, by its own call, within 24 hours (`acceptAgentKeyNomination`). One pending
3175
3334
  /// nomination per agent — a new one replaces the earlier one, and the record says which. Refused,
@@ -3216,8 +3375,8 @@ type Engram =
3216
3375
  /// registry's own door took (`sysSpawnChild` → `sysOpenChild`). An older kit calling the old name is
3217
3376
  /// rejected (IC0536) with nothing spent; it can never open an engram without a sign-in by accident.
3218
3377
  /// Named caller: the owner kit's `open-engram` command, signed by the agent's session key.
3219
- openChild: (req: record {signIn: opt principal;}) -> (Result_28);
3220
- openSession: (config: SessionConfig, sig: PaymentSignature) -> (Result_27);
3378
+ openChild: (req: record {signIn: opt principal;}) -> (Result_29);
3379
+ openSession: (config: SessionConfig, sig: PaymentSignature) -> (Result_28);
3221
3380
  /// Withdraw tokens to the owner's principal. This is the ONLY way to
3222
3381
  /// move tokens out of the engram to an external address, and the
3223
3382
  /// destination is always hardcoded to the owner.
@@ -3265,7 +3424,7 @@ type Engram =
3265
3424
  pairAgent: (arg: record {
3266
3425
  code: text;
3267
3426
  enrolment: Enrolment;
3268
- }) -> (Result_26);
3427
+ }) -> (Result_27);
3269
3428
  /// The writes brake. It was `guardianPauseWrites` before 0.16.0; the prefix went for the reason
3270
3429
  /// `freezePayments` gives: owner-or-guardian, and `resumeWrites` never carried the prefix either.
3271
3430
  pauseWrites: () -> (Result_2);
@@ -3277,7 +3436,7 @@ type Engram =
3277
3436
  /// this query does not combine their budgets or impose the hosted MCP limit on SDK callers.
3278
3437
  /// Callers: EngramClient.listSessions and readSessions (SessionManager's readers, the local MCP
3279
3438
  /// session tool).
3280
- planSessionRead: (request: Request) -> (Result_25) query;
3439
+ planSessionRead: (request: Request__1) -> (Result_26) query;
3281
3440
  /// What condensing through `toSeq` would do, and whether it is unlocked. COMMITS NOTHING — it is
3282
3441
  /// a query, so it structurally cannot; a preview that wrote would be its own trap.
3283
3442
  ///
@@ -3296,7 +3455,7 @@ type Engram =
3296
3455
  ///
3297
3456
  /// `unlocked` is the export-receipt gate ONLY. It is not a promise the condense will land: the
3298
3457
  /// history-budget delta is checked at commit time and can still refuse a short prefix.
3299
- previewCondense: (toSeq: nat) -> (Result_24) query;
3458
+ previewCondense: (toSeq: nat) -> (Result_25) query;
3300
3459
  /// A quote for a session this caller has not opened and is not committed to — the intent a
3301
3460
  /// buyer signs against. Pure dry run, no state, no funds.
3302
3461
  ///
@@ -3340,7 +3499,7 @@ type Engram =
3340
3499
  previewRetention: (entries: vec record {
3341
3500
  text;
3342
3501
  RetentionClassSpec;
3343
- }) -> (Result_23) query;
3502
+ }) -> (Result_24) query;
3344
3503
  /// Read one memory file at its current version.
3345
3504
  ///
3346
3505
  /// Gated on the `read_memory` permission, so an agent holding that grant reaches it — unlike
@@ -3371,7 +3530,7 @@ type Engram =
3371
3530
  /// Both are now what they are: a single `#Err` for the whole call. `#Ok` still carries a row per
3372
3531
  /// path, each with its own Result — a refused RESERVED path sits beside a readable one, which is
3373
3532
  /// a genuine per-path fact.
3374
- readMemoryBatch: (paths: vec text) -> (Result_22) query;
3533
+ readMemoryBatch: (paths: vec text) -> (Result_23) query;
3375
3534
  /// One page of a file's content — the paged read the whole-file surfaces point at.
3376
3535
  ///
3377
3536
  /// `version = null` reads the live file; a version reads that version as it was recorded.
@@ -3379,7 +3538,7 @@ type Engram =
3379
3538
  /// see it cannot know whether it has the whole range, which is how silent truncation gets
3380
3539
  /// reintroduced. Loop while `more` is true, advancing by the bytes actually returned.
3381
3540
  readMemoryBytes: (path: text, offset: nat, len: nat, version: opt nat) ->
3382
- (Result_21) query;
3541
+ (Result_22) query;
3383
3542
  /// The escrow exit for a session whose refund could not be paid.
3384
3543
  ///
3385
3544
  /// PAYER-ONLY, enforced inside the gateway, and deliberately not owner-triggered: the payer's own
@@ -3426,7 +3585,7 @@ type Engram =
3426
3585
  /// to recover, no such session). Read the MESSAGE, not the arm; one arm per kind of refusal needs
3427
3586
  /// the library to carry them. (The payments-frozen refusal in the body is this engram's own, and
3428
3587
  /// is state.)
3429
- recoverEscrow: (sessionId: text, amountE6: nat) -> (Result_20);
3588
+ recoverEscrow: (sessionId: text, amountE6: nat) -> (Result_21);
3430
3589
  /// A REDEMPTION PATH (refusals are values, never traps), where the arm choice is a disclosure
3431
3590
  /// decision.
3432
3591
  ///
@@ -3441,7 +3600,7 @@ type Engram =
3441
3600
  /// `()`. The new guardian learns, in the same reply, the name and permissions the owner's invite
3442
3601
  /// gave them and that they cannot act until approved; otherwise that would take a second read they
3443
3602
  /// had no reason to know to make.
3444
- registerGuardian: (code: text) -> (Result_19);
3603
+ registerGuardian: (code: text) -> (Result_20);
3445
3604
  /// Remove a per-caller override so that caller reverts to — and keeps TRACKING — the global caps.
3446
3605
  ///
3447
3606
  /// It travels with its pair and is never dropped alone: without it the only way "back" from an
@@ -3494,6 +3653,20 @@ type Engram =
3494
3653
  /// `memory.repudiate` entry and lists the (path, version) so readers can see the dispute.
3495
3654
  repudiateMemoryWrite: (path: text, version: nat, reason: text) ->
3496
3655
  (Result_15);
3656
+ /// AN AGENT OR THE OWNER. Ask for an SSH user certificate for `req.subjectKey` (the agent's SSH public-key
3657
+ /// blob) under the owner's rule `req.ruleId`, with these user names and this lifetime. Answers inside `Ok`
3658
+ /// either `#Issued` (the certificate, its line for the key's `-cert.pub` file, its serial and window) or
3659
+ /// `#ApprovalPending` (the request filed for the owner's answer, by `req.answerBySecs` or 24 hours; ask
3660
+ /// again with its id once approved). A lifetime above the rule's longest is refused, never shortened.
3661
+ /// Refusals, in the engram's five kinds, each say what happened and that nothing was signed:
3662
+ /// `#Refused` (not the owner or an active agent; the rule names another agent), `#Invalid` (an input; a
3663
+ /// user name or lifetime outside the rule; the approval does not cover this request), `#NotFound` (no such
3664
+ /// rule), `#Conflict` (frozen; below the signing floor; a count reached; the rule does not count yet or has
3665
+ /// ended; no reason where approval is needed; too many waiting), `#Unavailable` (the network's signer
3666
+ /// failed: everything reserved was handed back, and it is safe to ask again).
3667
+ /// Caller: an agent (or the owner), with a direct call today; the client CLI's `ssh request` and the local
3668
+ /// tool server's `engram_request_ssh_certificate` when they ship.
3669
+ requestSshCertificate: (req: Request) -> (Result_19);
3497
3670
  /// ⚠ OWNER-ONLY BULK RESET. Destructive, and wider than its name suggests.
3498
3671
  ///
3499
3672
  /// It severs EVERY grant surface that can outlive a role — agents, guardians, invites and
@@ -3639,9 +3812,19 @@ type Engram =
3639
3812
  /// Unlike revoking an agent, this costs nothing permanently — an invite is a one-time code,
3640
3813
  /// so voiding it and minting a fresh one is the ordinary path.
3641
3814
  revokeAllInvites: () -> (Result_15);
3815
+ /// OWNER ONLY. Cancel every agent key this engram has certified and not yet cancelled; answers how many keys
3816
+ /// this cancelled (0 when there were none, which is a true answer: nothing was left to cancel).
3817
+ /// Caller: the owner, with a direct call today; the client CLI's `ssh revoke-all` when it ships.
3818
+ revokeAllSshKeys: () -> (Result_15);
3642
3819
  /// Revoke a bearer token by its public tokenId. Idempotent.
3643
3820
  /// Subsequent /mcp requests using this token will be rejected.
3644
3821
  revokeBearerToken: (tokenId: text) -> (Result_2);
3822
+ /// OWNER ONLY (the seated sign-in, in an engram opened through another). Cancel the agent key whose id is
3823
+ /// `keyId` (the SHA-256 digest `listSshKeys` shows, whose base64 is the fingerprint), under every rule it was
3824
+ /// given a certificate under. Refused: `#Invalid` for an id that is not 32 bytes, `#NotFound` for a key this
3825
+ /// engram never certified, `#Conflict` for a key already cancelled.
3826
+ /// Caller: the owner, with a direct call today; the client CLI's `ssh revoke` when it ships.
3827
+ revokeSshKey: (keyId: blob) -> (Result_2);
3645
3828
  /// RETURNS A REAL RECEIPT, not `R<()>` (since 0.16.0) — same reason as the delete above, and
3646
3829
  /// sharper here: a rollback WRITES A NEW VERSION, so the caller's next question is always "which
3647
3830
  /// version am I on now". `r.version` was already read for the audit line.
@@ -4766,7 +4949,7 @@ type ChildAllowanceRow =
4766
4949
  type CheckpointPage =
4767
4950
  record {
4768
4951
  firstAvailableSeq: nat;
4769
- page: Page_19;
4952
+ page: Page_21;
4770
4953
  scannedThroughSeq: nat;
4771
4954
  };
4772
4955
  type CertifiedAuditHead =
@@ -4789,6 +4972,12 @@ type CallerSignatureCount =
4789
4972
  role: Role;
4790
4973
  root: opt principal;
4791
4974
  };
4975
+ type CaKey =
4976
+ record {
4977
+ fingerprint: text;
4978
+ line: text;
4979
+ publicKey: blob;
4980
+ };
4792
4981
  type Brakes =
4793
4982
  record {
4794
4983
  payments: BrakeState;
@@ -4932,6 +5121,12 @@ type ApprovalRequest =
4932
5121
  rationale: text;
4933
5122
  status: ApprovalStatus;
4934
5123
  };
5124
+ type Approval =
5125
+ variant {
5126
+ each;
5127
+ none;
5128
+ overTtlSecs: nat;
5129
+ };
4935
5130
  type AnchorPushStatus =
4936
5131
  record {
4937
5132
  anchorTickAtNs: opt int;
@@ -4996,7 +5191,7 @@ type AgentStatus =
4996
5191
  };
4997
5192
  type AgentSpendToday =
4998
5193
  record {
4999
- agents: Page_24;
5194
+ agents: Page_26;
5000
5195
  dayStartNs: int;
5001
5196
  };
5002
5197
  type AgentSpendRow =
@@ -5006,6 +5201,11 @@ type AgentSpendRow =
5006
5201
  root: principal;
5007
5202
  spentToday: opt nat;
5008
5203
  };
5204
+ type AgentScope =
5205
+ variant {
5206
+ anyAgent;
5207
+ only: principal;
5208
+ };
5009
5209
  type AgentRecord =
5010
5210
  record {
5011
5211
  earlierKeys: vec HeldKey;