@engramx/idl 0.16.0-rc.2 → 0.16.0-rc.21

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
@@ -5,8 +5,14 @@ type X402SignOutcome =
5
5
  };
6
6
  type WriteReceipt =
7
7
  record {
8
+ atNs: int;
9
+ contentRoot: blob;
8
10
  head: blob;
11
+ prev: blob;
12
+ recordId: nat;
13
+ recordPrev: blob;
9
14
  seq: nat;
15
+ size: nat;
10
16
  version: nat;
11
17
  };
12
18
  type WorldIdRpContext =
@@ -56,12 +62,21 @@ type TokenAmount =
56
62
  Ckusdt: nat;
57
63
  Icp: nat;
58
64
  };
65
+ type TimersWake =
66
+ record {
67
+ gap: int;
68
+ needed: nat;
69
+ };
59
70
  type TimerHealth =
60
71
  record {
61
72
  alertTimerArmed: bool;
73
+ checkInsUnfinished: opt nat;
74
+ ic402Maintenance: opt Ic402Maintenance;
75
+ ic402MaintenanceTimerArmed: opt bool;
62
76
  jobExpiryArmed: bool;
63
77
  jobExpiryFastMode: bool;
64
78
  sessionExpiryArmed: bool;
79
+ upkeepRejected: opt nat;
65
80
  };
66
81
  type StorageReport =
67
82
  record {
@@ -127,6 +142,11 @@ type SignatureCounts =
127
142
  byCaller: vec CallerSignatureCount;
128
143
  total: nat;
129
144
  };
145
+ type SignIn =
146
+ record {
147
+ clientName: opt text;
148
+ token: BearerToken;
149
+ };
130
150
  type SessionIntent =
131
151
  record {
132
152
  costPerCall: opt nat;
@@ -168,6 +188,12 @@ type Seat =
168
188
  produced: nat;
169
189
  weeks: nat64;
170
190
  };
191
+ type SealedEntry =
192
+ record {
193
+ digest: blob;
194
+ entryHash: blob;
195
+ id: nat;
196
+ };
171
197
  type Role =
172
198
  variant {
173
199
  Admin;
@@ -183,6 +209,24 @@ type Role =
183
209
  Viewer;
184
210
  WasmAdmin;
185
211
  };
212
+ type RetentionPreviewRule =
213
+ record {
214
+ bytes: nat;
215
+ copies: nat;
216
+ files: nat;
217
+ notBeforeNs: opt int;
218
+ prefix: text;
219
+ };
220
+ type RetentionPreview =
221
+ record {
222
+ bytes: nat;
223
+ complete: bool;
224
+ copies: nat;
225
+ files: nat;
226
+ planned: nat;
227
+ rules: vec RetentionPreviewRule;
228
+ storedFiles: nat;
229
+ };
186
230
  type RetentionClassSpec =
187
231
  variant {
188
232
  vault;
@@ -213,347 +257,412 @@ type ResyncReport =
213
257
  type Result_9 =
214
258
  variant {
215
259
  Err: Error;
216
- Ok: SignedTransaction;
260
+ Ok: vec Seat;
261
+ };
262
+ type Result_83 =
263
+ variant {
264
+ Err: Error;
265
+ Ok: AgentRecord;
266
+ };
267
+ type Result_82 =
268
+ variant {
269
+ Err: Error;
270
+ Ok: record {activatesAtNs: int;};
271
+ };
272
+ type Result_81 =
273
+ variant {
274
+ Err: Error;
275
+ Ok: Eip712Registration;
276
+ };
277
+ type Result_80 =
278
+ variant {
279
+ Err: Error;
280
+ Ok: CondenseResult;
217
281
  };
218
282
  type Result_8 =
219
283
  variant {
220
284
  Err: Error;
221
- Ok: nat;
285
+ Ok: RailHealth;
286
+ };
287
+ type Result_79 =
288
+ variant {
289
+ Err: Error;
290
+ Ok: MemoryRangeExport;
291
+ };
292
+ type Result_77 =
293
+ variant {
294
+ Err: Error;
295
+ Ok: Page_25;
296
+ };
297
+ type Result_76 =
298
+ variant {
299
+ Err: Error;
300
+ Ok: AgentWriteReview;
301
+ };
302
+ type Result_75 =
303
+ variant {
304
+ Err: Error;
305
+ Ok: BackupMetadata;
306
+ };
307
+ type Result_74 =
308
+ variant {
309
+ Err: Error;
310
+ Ok: BackupRetention;
311
+ };
312
+ type Result_73 =
313
+ variant {
314
+ Err: Error;
315
+ Ok: vec BirthRecord;
316
+ };
317
+ type Result_72 =
318
+ variant {
319
+ Err: Error;
320
+ Ok: Brakes;
321
+ };
322
+ type Result_71 =
323
+ variant {
324
+ Err: Error;
325
+ Ok: ChildAllowanceRow;
222
326
  };
223
327
  type Result_70 =
224
328
  variant {
225
329
  Err: Error;
226
- Ok: AgentRecord;
330
+ Ok: ChildOpening;
227
331
  };
228
332
  type Result_7 =
229
333
  variant {
230
334
  Err: Error;
231
- Ok: vec Seat;
335
+ Ok: SignatureCounts;
232
336
  };
233
337
  type Result_69 =
234
338
  variant {
235
339
  Err: Error;
236
- Ok: Eip712Registration;
340
+ Ok: blob;
237
341
  };
238
342
  type Result_68 =
239
343
  variant {
240
344
  Err: Error;
241
- Ok: record {activatesAtNs: int;};
345
+ Ok: EvmAddresses;
242
346
  };
243
347
  type Result_67 =
244
348
  variant {
245
349
  Err: Error;
246
- Ok: CondenseResult;
350
+ Ok: AlertStatus;
247
351
  };
248
352
  type Result_66 =
249
353
  variant {
250
354
  Err: Error;
251
- Ok: MemoryRangeExport;
355
+ Ok: MemoryHistory;
356
+ };
357
+ type Result_65 =
358
+ variant {
359
+ Err: Error;
360
+ Ok: MemoryRetentionPolicy;
252
361
  };
253
362
  type Result_64 =
254
363
  variant {
255
364
  Err: Error;
256
- Ok: Page_21;
365
+ Ok: OwnerConsole;
257
366
  };
258
367
  type Result_63 =
259
368
  variant {
260
369
  Err: Error;
261
- Ok: AgentWriteReview;
370
+ Ok: record {paths: vec text;};
262
371
  };
263
372
  type Result_62 =
264
373
  variant {
265
374
  Err: Error;
266
- Ok: BackupMetadata;
375
+ Ok: SigningFloorStatus;
267
376
  };
268
377
  type Result_61 =
269
378
  variant {
270
379
  Err: Error;
271
- Ok: ChildAllowanceRow;
380
+ Ok: SpendCeiling;
272
381
  };
273
382
  type Result_60 =
274
383
  variant {
275
384
  Err: Error;
276
- Ok: ChildOpening;
385
+ Ok: SpendingPolicy;
277
386
  };
278
387
  type Result_6 =
279
388
  variant {
280
389
  Err: Error;
281
- Ok: RailHealth;
390
+ Ok: record {returned: nat;};
282
391
  };
283
392
  type Result_59 =
284
393
  variant {
285
394
  Err: Error;
286
- Ok: blob;
395
+ Ok: StorageReport;
287
396
  };
288
397
  type Result_58 =
289
398
  variant {
290
399
  Err: Error;
291
- Ok: EvmAddresses;
400
+ Ok: WalletBalances;
292
401
  };
293
402
  type Result_57 =
294
403
  variant {
295
404
  Err: Error;
296
- Ok: AlertStatus;
405
+ Ok: WorldIdConfig;
297
406
  };
298
407
  type Result_56 =
299
408
  variant {
300
409
  Err: Error;
301
- Ok: MemoryHistory;
410
+ Ok: WorldIdRpContext;
302
411
  };
303
412
  type Result_55 =
304
413
  variant {
305
414
  Err: Error;
306
- Ok: MemoryRetentionPolicy;
415
+ Ok: opt text;
307
416
  };
308
417
  type Result_54 =
309
418
  variant {
310
419
  Err: Error;
311
- Ok: OwnerConsole;
420
+ Ok: bool;
312
421
  };
313
422
  type Result_53 =
314
423
  variant {
315
424
  Err: Error;
316
- Ok: record {paths: vec text;};
425
+ Ok: text;
317
426
  };
318
427
  type Result_52 =
319
428
  variant {
320
429
  Err: Error;
321
- Ok: SigningFloorStatus;
430
+ Ok: Page_24;
322
431
  };
323
432
  type Result_51 =
324
433
  variant {
325
434
  Err: Error;
326
- Ok: SpendCeiling;
435
+ Ok: AgentSpendToday;
327
436
  };
328
437
  type Result_50 =
329
438
  variant {
330
439
  Err: Error;
331
- Ok: SpendingPolicy;
440
+ Ok: Page_22;
332
441
  };
333
442
  type Result_5 =
334
443
  variant {
335
444
  Err: Error;
336
- Ok: SignatureCounts;
445
+ Ok: Eip712SignatureOut;
337
446
  };
338
447
  type Result_49 =
339
448
  variant {
340
449
  Err: Error;
341
- Ok: StorageReport;
450
+ Ok: Page_21;
342
451
  };
343
452
  type Result_48 =
344
453
  variant {
345
454
  Err: Error;
346
- Ok: WalletBalances;
455
+ Ok: RecordPage;
347
456
  };
348
457
  type Result_47 =
349
458
  variant {
350
459
  Err: Error;
351
- Ok: WorldIdConfig;
460
+ Ok: Page_20;
352
461
  };
353
462
  type Result_46 =
354
463
  variant {
355
464
  Err: Error;
356
- Ok: WorldIdRpContext;
465
+ Ok: Page_19;
357
466
  };
358
467
  type Result_45 =
359
468
  variant {
360
469
  Err: Error;
361
- Ok: opt text;
470
+ Ok: CheckpointPage;
362
471
  };
363
472
  type Result_44 =
364
473
  variant {
365
474
  Err: Error;
366
- Ok: bool;
475
+ Ok: Page_17;
367
476
  };
368
477
  type Result_43 =
369
478
  variant {
370
479
  Err: Error;
371
- Ok: text;
480
+ Ok: Page_16;
372
481
  };
373
482
  type Result_42 =
374
483
  variant {
375
484
  Err: Error;
376
- Ok: Page_20;
485
+ Ok: Page_15;
377
486
  };
378
487
  type Result_41 =
379
488
  variant {
380
489
  Err: Error;
381
- Ok: Page_19;
490
+ Ok: Page_14;
382
491
  };
383
492
  type Result_40 =
384
493
  variant {
385
494
  Err: Error;
386
- Ok: Page_18;
495
+ Ok: Page_13;
387
496
  };
388
497
  type Result_4 =
389
498
  variant {
390
499
  Err: Error;
391
- Ok: Eip712SignatureOut;
500
+ Ok: X402SignOutcome;
392
501
  };
393
502
  type Result_39 =
394
503
  variant {
395
504
  Err: Error;
396
- Ok: Page_17;
505
+ Ok: Page_12;
397
506
  };
398
507
  type Result_38 =
399
508
  variant {
400
509
  Err: Error;
401
- Ok: Page_16;
510
+ Ok: ReceiptPage;
402
511
  };
403
512
  type Result_37 =
404
513
  variant {
405
514
  Err: Error;
406
- Ok: CheckpointPage;
515
+ Ok: Page_10;
407
516
  };
408
517
  type Result_36 =
409
518
  variant {
410
519
  Err: Error;
411
- Ok: Page_14;
520
+ Ok: LogPage;
412
521
  };
413
522
  type Result_35 =
414
523
  variant {
415
524
  Err: Error;
416
- Ok: Page_13;
525
+ Ok: Page_8;
417
526
  };
418
527
  type Result_34 =
419
528
  variant {
420
529
  Err: Error;
421
- Ok: Page_12;
530
+ Ok: Page_7;
422
531
  };
423
532
  type Result_33 =
424
533
  variant {
425
534
  Err: Error;
426
- Ok: Page_11;
535
+ Ok: Page_6;
427
536
  };
428
537
  type Result_32 =
429
538
  variant {
430
539
  Err: Error;
431
- Ok: Page_10;
540
+ Ok: PaymentSignatureCounts;
432
541
  };
433
542
  type Result_31 =
434
543
  variant {
435
544
  Err: Error;
436
- Ok: ReceiptPage;
545
+ Ok: Page_4;
437
546
  };
438
547
  type Result_30 =
439
548
  variant {
440
549
  Err: Error;
441
- Ok: Page_8;
550
+ Ok: Page_3;
442
551
  };
443
552
  type Result_3 =
444
553
  variant {
445
554
  Err: Error;
446
- Ok: X402SignOutcome;
555
+ Ok: ControlHandover;
447
556
  };
448
557
  type Result_29 =
449
558
  variant {
450
559
  Err: Error;
451
- Ok: LogPage;
560
+ Ok: Page_2;
452
561
  };
453
562
  type Result_28 =
454
563
  variant {
455
564
  Err: Error;
456
- Ok: Page_6;
565
+ Ok: Page_1;
457
566
  };
458
567
  type Result_27 =
459
568
  variant {
460
569
  Err: Error;
461
- Ok: Page_5;
570
+ Ok: Page;
462
571
  };
463
572
  type Result_26 =
464
573
  variant {
465
574
  Err: Error;
466
- Ok: Page_4;
575
+ Ok: AgentGrant;
467
576
  };
468
577
  type Result_25 =
469
578
  variant {
470
579
  Err: Error;
471
- Ok: PaymentSignatureCounts;
580
+ Ok: principal;
472
581
  };
473
582
  type Result_24 =
474
583
  variant {
475
584
  Err: Error;
476
- Ok: Page_2;
585
+ Ok: EngramSessionState;
477
586
  };
478
587
  type Result_23 =
479
588
  variant {
480
589
  Err: Error;
481
- Ok: Page_1;
590
+ Ok: Pairing;
482
591
  };
483
592
  type Result_22 =
484
593
  variant {
485
594
  Err: Error;
486
- Ok: Page;
595
+ Ok: CondensePreview;
487
596
  };
488
597
  type Result_21 =
489
598
  variant {
490
599
  Err: Error;
491
- Ok: principal;
600
+ Ok: RetentionPreview;
492
601
  };
493
602
  type Result_20 =
494
603
  variant {
495
604
  Err: Error;
496
- Ok: EngramSessionState;
605
+ Ok: vec BatchReadItem;
497
606
  };
498
607
  type Result_2 =
499
608
  variant {
500
609
  Err: Error;
501
- Ok: ControlHandover;
610
+ Ok;
502
611
  };
503
612
  type Result_19 =
504
613
  variant {
505
614
  Err: Error;
506
- Ok: Pairing;
615
+ Ok: MemoryByteChunk;
507
616
  };
508
617
  type Result_18 =
509
618
  variant {
510
619
  Err: Error;
511
- Ok: CondensePreview;
620
+ Ok: EngramEscrowRecovery;
512
621
  };
513
622
  type Result_17 =
514
623
  variant {
515
624
  Err: Error;
516
- Ok: vec BatchReadItem;
625
+ Ok: GuardianRecord;
517
626
  };
518
627
  type Result_16 =
519
628
  variant {
520
629
  Err: Error;
521
- Ok: MemoryByteChunk;
630
+ Ok: ResetReport;
522
631
  };
523
632
  type Result_15 =
524
633
  variant {
525
634
  Err: Error;
526
- Ok: GuardianRecord;
635
+ Ok: ResyncReport;
527
636
  };
528
637
  type Result_14 =
529
638
  variant {
530
639
  Err: Error;
531
- Ok: ResetReport;
640
+ Ok: nat;
532
641
  };
533
642
  type Result_13 =
534
643
  variant {
535
644
  Err: Error;
536
- Ok: ResyncReport;
645
+ Ok: SessionContext;
537
646
  };
538
647
  type Result_12 =
539
648
  variant {
540
649
  Err: Error;
541
- Ok: SessionContext;
650
+ Ok: MemoryFile;
542
651
  };
543
652
  type Result_11 =
544
653
  variant {
545
654
  Err: Error;
546
- Ok: MemoryFile;
655
+ Ok: BackupRetentionReport;
547
656
  };
548
657
  type Result_10 =
549
658
  variant {
550
659
  Err: Error;
551
- Ok: BackupRetentionReport;
660
+ Ok: SignedTransaction;
552
661
  };
553
662
  type Result_1 =
554
663
  variant {
555
664
  Err: Error;
556
- Ok;
665
+ Ok: TimersWake;
557
666
  };
558
667
  type Result =
559
668
  variant {
@@ -575,32 +684,25 @@ type Repudiation =
575
684
  reason: text;
576
685
  version: nat;
577
686
  };
578
- type RegisteredType =
687
+ type RecordPage =
579
688
  record {
580
- ackIrrevocable: bool;
581
- authorityClass: AuthorityClass;
582
- chainId: nat;
583
- cooloffEndsAtNs: int;
584
- dailySignCap: nat;
585
- destinationFields: vec text;
586
- domainName: text;
587
- domainSeparator: vec nat8;
588
- domainVersion: text;
589
- encodeTypeString: text;
590
- fields: vec record {
591
- text;
592
- text;
593
- };
594
- primaryType: text;
595
- registeredAtNs: int;
596
- typeHash: vec nat8;
597
- typeId: blob;
598
- verifyingContract: text;
689
+ hashFirstFrom: nat;
690
+ items: vec AuditEntry;
691
+ ringFloor: nat;
692
+ sealed: vec SealedEntry;
693
+ total: nat;
694
+ };
695
+ type RecordNote =
696
+ record {
697
+ about: nat;
698
+ atNs: int;
699
+ auditId: nat;
700
+ note: text;
599
701
  };
600
702
  type ReceiptPage =
601
703
  record {
602
704
  firstAvailableSeq: nat;
603
- page: Page_9;
705
+ page: Page_11;
604
706
  scannedThroughSeq: nat;
605
707
  };
606
708
  type RailHealth =
@@ -610,6 +712,7 @@ type RailHealth =
610
712
  freezeReservation: nat;
611
713
  memoryBytes: nat;
612
714
  paidVouchersConsumed: nat;
715
+ refundOwed: opt nat;
613
716
  sendHeadroom: nat;
614
717
  sessionsClosed: nat;
615
718
  sessionsClosing: nat;
@@ -628,9 +731,20 @@ type PurgedAgent =
628
731
  purgedAtNs: int;
629
732
  root: principal;
630
733
  };
734
+ type PaymentsStop =
735
+ variant {
736
+ dailySignatureLimit;
737
+ paymentsBrake;
738
+ signingFloor;
739
+ };
740
+ type PaymentsNow =
741
+ record {
742
+ largestPayment: opt nat;
743
+ leftToday: opt nat;
744
+ };
631
745
  type PaymentSignatureCounts =
632
746
  record {
633
- agents: Page_3;
747
+ agents: Page_5;
634
748
  day: int;
635
749
  limit: nat;
636
750
  marketplace: opt MarketplacePaymentSignatures;
@@ -646,6 +760,16 @@ type PaymentSignature =
646
760
  sender: text;
647
761
  signature: blob;
648
762
  };
763
+ type PaymentLimits =
764
+ record {
765
+ maxConcurrentSessions: opt nat;
766
+ maxPerDay: opt nat;
767
+ maxPerTransaction: opt nat;
768
+ maxSessionDeposit: opt nat;
769
+ maxSessionDuration: opt int;
770
+ rateLimitPerMinute: opt nat;
771
+ sessionIdleTimeout: opt int;
772
+ };
649
773
  type Pairing =
650
774
  record {
651
775
  agent: AgentRecord;
@@ -653,75 +777,71 @@ type Pairing =
653
777
  };
654
778
  type Page_9 =
655
779
  record {
656
- items: vec ExportReceiptRow;
780
+ items: vec MemoryLogEvent;
657
781
  total: nat;
658
782
  withheld: nat;
659
783
  };
660
784
  type Page_8 =
661
785
  record {
662
- items: vec record {
663
- lastModifiedAtNs: int;
664
- path: text;
665
- version: nat;
666
- };
786
+ items: vec ApprovalRequest;
667
787
  total: nat;
668
788
  withheld: nat;
669
789
  };
670
790
  type Page_7 =
671
791
  record {
672
- items: vec MemoryLogEvent;
792
+ items: vec EngramSessionState;
673
793
  total: nat;
674
794
  withheld: nat;
675
795
  };
676
796
  type Page_6 =
677
797
  record {
678
- items: vec ApprovalRequest;
798
+ items: vec OwnershipTransfer;
679
799
  total: nat;
680
800
  withheld: nat;
681
801
  };
682
802
  type Page_5 =
683
803
  record {
684
- items: vec EngramSessionState;
804
+ items: vec AgentPaymentSignatures;
685
805
  total: nat;
686
806
  withheld: nat;
687
807
  };
688
808
  type Page_4 =
689
809
  record {
690
- items: vec OwnershipTransfer;
810
+ items: vec PurgedAgent;
691
811
  total: nat;
692
812
  withheld: nat;
693
813
  };
694
814
  type Page_3 =
695
815
  record {
696
- items: vec AgentPaymentSignatures;
816
+ items: vec AuditEntry;
697
817
  total: nat;
698
818
  withheld: nat;
699
819
  };
700
- type Page_21 =
820
+ type Page_25 =
701
821
  record {
702
822
  items: vec OwnerRow;
703
823
  total: nat;
704
824
  withheld: nat;
705
825
  };
706
- type Page_20 =
826
+ type Page_24 =
707
827
  record {
708
828
  items: vec ActivitySnapshot;
709
829
  total: nat;
710
830
  withheld: nat;
711
831
  };
712
- type Page_2 =
832
+ type Page_23 =
713
833
  record {
714
- items: vec PurgedAgent;
834
+ items: vec AgentSpendRow;
715
835
  total: nat;
716
836
  withheld: nat;
717
837
  };
718
- type Page_19 =
838
+ type Page_22 =
719
839
  record {
720
840
  items: vec AgentRecord;
721
841
  total: nat;
722
842
  withheld: nat;
723
843
  };
724
- type Page_18 =
844
+ type Page_21 =
725
845
  record {
726
846
  items: vec record {
727
847
  name: text;
@@ -731,66 +851,87 @@ type Page_18 =
731
851
  total: nat;
732
852
  withheld: nat;
733
853
  };
734
- type Page_17 =
854
+ type Page_20 =
735
855
  record {
736
856
  items: vec BackupMetadata;
737
857
  total: nat;
738
858
  withheld: nat;
739
859
  };
740
- type Page_16 =
860
+ type Page_2 =
861
+ record {
862
+ items: vec RecordNote;
863
+ total: nat;
864
+ withheld: nat;
865
+ };
866
+ type Page_19 =
741
867
  record {
742
868
  items: vec BearerToken;
743
869
  total: nat;
744
870
  withheld: nat;
745
871
  };
746
- type Page_15 =
872
+ type Page_18 =
747
873
  record {
748
874
  items: vec CondenseCheckpointRow;
749
875
  total: nat;
750
876
  withheld: nat;
751
877
  };
752
- type Page_14 =
878
+ type Page_17 =
753
879
  record {
754
880
  items: vec CycleSnapshot;
755
881
  total: nat;
756
882
  withheld: nat;
757
883
  };
758
- type Page_13 =
884
+ type Page_16 =
759
885
  record {
760
886
  items: vec text;
761
887
  total: nat;
762
888
  withheld: nat;
763
889
  };
890
+ type Page_15 =
891
+ record {
892
+ items: vec Eip712Destination;
893
+ total: nat;
894
+ withheld: nat;
895
+ };
896
+ type Page_14 =
897
+ record {
898
+ items: vec Eip712TypeView;
899
+ total: nat;
900
+ withheld: nat;
901
+ };
902
+ type Page_13 =
903
+ record {
904
+ items: vec GuardianDispute;
905
+ total: nat;
906
+ withheld: nat;
907
+ };
764
908
  type Page_12 =
765
909
  record {
766
- items: vec RegisteredType;
910
+ items: vec GuardianRecord;
767
911
  total: nat;
768
912
  withheld: nat;
769
913
  };
770
914
  type Page_11 =
771
915
  record {
772
- items: vec record {
773
- activeFromNs: int;
774
- address: text;
775
- };
916
+ items: vec ExportReceiptRow;
776
917
  total: nat;
777
918
  withheld: nat;
778
919
  };
779
920
  type Page_10 =
780
921
  record {
781
- items: vec GuardianRecord;
922
+ items: vec MemoryFileRow;
782
923
  total: nat;
783
924
  withheld: nat;
784
925
  };
785
926
  type Page_1 =
786
927
  record {
787
- items: vec AuditEntry;
928
+ items: vec Repudiation;
788
929
  total: nat;
789
930
  withheld: nat;
790
931
  };
791
932
  type Page =
792
933
  record {
793
- items: vec Repudiation;
934
+ items: vec SignIn;
794
935
  total: nat;
795
936
  withheld: nat;
796
937
  };
@@ -962,6 +1103,13 @@ type MemoryHistory =
962
1103
  retainedCount: nat;
963
1104
  versions: vec MemoryVersionSummary;
964
1105
  };
1106
+ type MemoryFileRow =
1107
+ record {
1108
+ lastModifiedAtNs: int;
1109
+ lastModifiedBy: opt principal;
1110
+ path: text;
1111
+ version: nat;
1112
+ };
965
1113
  type MemoryFile =
966
1114
  record {
967
1115
  content: blob;
@@ -1009,13 +1157,22 @@ type LogPage =
1009
1157
  record {
1010
1158
  firstAvailableSeq: nat;
1011
1159
  head: blob;
1012
- page: Page_7;
1160
+ page: Page_9;
1013
1161
  };
1014
1162
  type KeyNomination =
1015
1163
  record {
1016
1164
  atNs: int;
1017
1165
  key: principal;
1018
1166
  };
1167
+ type Ic402Maintenance =
1168
+ record {
1169
+ dailySpendRemoved: nat;
1170
+ lastRunAtNs: int;
1171
+ more: bool;
1172
+ rateLimitRemoved: nat;
1173
+ revokedGrantsRemoved: nat;
1174
+ runs: nat;
1175
+ };
1019
1176
  type HttpResponse =
1020
1177
  record {
1021
1178
  body: blob;
@@ -1073,6 +1230,16 @@ type GuardianPermissions =
1073
1230
  canRevokeAgents: bool;
1074
1231
  scopes: opt vec text;
1075
1232
  };
1233
+ type GuardianDispute =
1234
+ record {
1235
+ about: nat;
1236
+ atNs: int;
1237
+ auditId: nat;
1238
+ guardian: principal;
1239
+ path: opt text;
1240
+ reason: text;
1241
+ version: opt nat;
1242
+ };
1076
1243
  type GenesisNote =
1077
1244
  record {
1078
1245
  genesisAtNs: int;
@@ -1139,6 +1306,11 @@ type EngramSessionState =
1139
1306
  status: EngramSessionStatus;
1140
1307
  voucherCount: nat;
1141
1308
  };
1309
+ type EngramEscrowRecovery =
1310
+ record {
1311
+ amountE6: nat;
1312
+ blockIndex: nat;
1313
+ };
1142
1314
  type Engram =
1143
1315
  service {
1144
1316
  /// ⟨0.16.0⟩ `about()` — the ONE public projection, replacing `status()` and absorbing `metrics()`.
@@ -1170,10 +1342,17 @@ type Engram =
1170
1342
  /// nomination names. That check compares the caller inside the module, where
1171
1343
  /// test/key-replacement.test.mo runs it; this body names no roster gate, because the caller holds
1172
1344
  /// no role here until the move.
1173
- acceptAgentKeyNomination: (agentKey: principal) -> (Result_70);
1345
+ acceptAgentKeyNomination: (agentKey: principal) -> (Result_83);
1174
1346
  /// Consensus transform for the alert webhook outcall: collapse the response to status-only so
1175
1347
  /// replicas agree regardless of response headers/body (we only care that the POST landed 2xx).
1176
1348
  ///
1349
+ /// ⟨CORRECTED 2026-10-21⟩ No longer a consensus transform: the alert outcall is non-replicated
1350
+ /// (`is_replicated = ?false` in `scanAndPost`), so ONE node sends the POST and runs this on its
1351
+ /// own response — there are no replicas to agree, and "on every replica" below now means "on that
1352
+ /// node". It stays so the response is collapsed to status-only before the engram reads it. The
1353
+ /// PUBLIC reasoning below is unchanged: the outcall protocol still calls it with no caller identity.
1354
+ /// `worldIdTransform` is still a true consensus transform (World ID stays replicated).
1355
+ ///
1177
1356
  /// PUBLIC: not a choice. The management canister invokes a transform on every replica as part of
1178
1357
  /// the HTTP-outcall protocol, and that invocation carries no caller identity to gate on — a gate
1179
1358
  /// here would refuse the only caller there is and break every alert this canister sends. Safe
@@ -1183,9 +1362,32 @@ type Engram =
1183
1362
  context: blob;
1184
1363
  response: HttpRequestResult;
1185
1364
  }) -> (HttpRequestResult) query;
1365
+ /// Owner-managed destination allowlist (D7). Additions LOOSEN and wait 24h; removals TIGHTEN
1366
+ /// and apply instantly — the ratified asymmetry, applied to the one mutable policy surface.
1367
+ ///
1368
+ /// ⟨2026-10-14, the owner's ruling 4A⟩ ONE LIST PER REGISTERED ACTION. `addEvmWithdrawDestination`,
1369
+ /// `removeEvmWithdrawDestination` and `listEvmWithdrawDestinations` — one list for every action —
1370
+ /// are REMOVED; these three take the action's `typeId`. Same rules, per action: the owner only; an
1371
+ /// addition activates after 24 hours and is refused while payments are frozen; a removal is instant
1372
+ /// and works while frozen; a value is 1–128 characters (an address, or a venue value such as an
1373
+ /// account name). The action must be registered: a destination list belongs to an action, and a
1374
+ /// list for no action would be a value nothing checks. The caller is the owner's app.
1375
+ addEip712Destination: (typeId: blob, value: text) -> (Result_82);
1186
1376
  /// Register a typed-data shape as signable. Owner-only, freeze-gated (a registration is a grant
1187
1377
  /// of FUTURE authority — a frozen engram must not be able to widen what it can sign), and the
1188
1378
  /// shape is IMMUTABLE: any change mints a new typeId.
1379
+ ///
1380
+ /// ⟨2026-10-14, the owner's rulings 3A and 5A⟩ ONE BAR FOR EVERY REGISTRATION — the class the owner
1381
+ /// names is stored as a label and decides nothing. Every registration: records the irrevocability
1382
+ /// acknowledgement (`ackIrrevocable = true`); has no opaque field (`bytes`, `bytes1..32`); names at
1383
+ /// least one destination field OR carries a must-equal rule; passes the watchers — an owner alert
1384
+ /// webhook set, enabled AND with its money class on, and an `#Active` guardian holding
1385
+ /// `canFreezePayments`; and waits `Eip712Policy.COOLOFF_NS` (72 hours). It may carry per-field
1386
+ /// rules (`fieldRules`: "at most N" read as a plain decimal with D places, "must equal X"), which
1387
+ /// are part of the registered shape — inside the typeId, stored in `eip712FieldRules`, enforced in
1388
+ /// `eip712SignFor` before the cap reservation. Before this, a withdrawal registered as `#standard`
1389
+ /// needed no webhook, no guardian and no destination field, waited one hour, and signed to any
1390
+ /// address. Intrinsic checks still come first and the watchers last (the 2026-08-06 re-ordering).
1189
1391
  addEip712Type: (spec:
1190
1392
  record {
1191
1393
  ackIrrevocable: bool;
@@ -1200,16 +1402,17 @@ type Engram =
1200
1402
  destinationFields: vec text;
1201
1403
  domainName: text;
1202
1404
  domainVersion: text;
1405
+ fieldRules: vec record {
1406
+ text;
1407
+ Eip712FieldRule;
1408
+ };
1203
1409
  fields: vec record {
1204
1410
  text;
1205
1411
  text;
1206
1412
  };
1207
1413
  primaryType: text;
1208
1414
  verifyingContract: text;
1209
- }) -> (Result_69);
1210
- /// Owner-managed destination allowlist (D7). Additions LOOSEN and wait 24h; removals TIGHTEN
1211
- /// and apply instantly — the ratified asymmetry, applied to the one mutable policy surface.
1212
- addEvmWithdrawDestination: (dest: text) -> (Result_68);
1415
+ }) -> (Result_81);
1213
1416
  /// ⟨0.16.0, L1⟩ THE ROLE-CONFLICT ARM, and why three refusals here are not the same refusal.
1214
1417
  ///
1215
1418
  /// This method had five distinct ways to say no through one `text`, and a caller could only tell
@@ -1219,7 +1422,16 @@ type Engram =
1219
1422
  /// permitted but this engram's state says no — the principal already holds an incompatible role,
1220
1423
  /// or the roster is full. Only the last is worth an agent's time to resolve.
1221
1424
  addGuardian: (guardianPrincipal: principal, name: text, permissions:
1222
- GuardianPermissions) -> (Result_1);
1425
+ GuardianPermissions) -> (Result_2);
1426
+ /// ⟨2026-10-21, the owner's round-11 answer b⟩ OWNER-ONLY: put a note on any entry of this
1427
+ /// engram's record — words, nothing else. Appends a chained `record.note` entry
1428
+ /// (`about=<id> note=<words>`) and keeps the note for `listRecordNotes`; answers the new entry's
1429
+ /// id. The entry noted may be any entry ever appended (`about` below the head), including one the
1430
+ /// ring no longer holds in full. An agent, a guardian, a stranger and the anonymous caller are
1431
+ /// refused by `requireOwner`'s own words. Empty words, words over `RecordWords.WORDS_MAX` or
1432
+ /// holding a line break are `#Invalid`; an id past the head is `#NotFound`; nothing is recorded
1433
+ /// on any refusal.
1434
+ addRecordNote: (about: nat, note: text) -> (Result_14);
1223
1435
  /// Returns the write RECEIPT, not just the version.
1224
1436
  ///
1225
1437
  /// The receipt was always computed and then thrown away: MemoryRouter hands back
@@ -1251,7 +1463,7 @@ type Engram =
1251
1463
  /// Gated on requireWritesNotPaused — unlike the export. This one destroys retained entries, which
1252
1464
  /// is exactly what a guardian pause exists to hold. No action alert is raised: the operation is
1253
1465
  /// owner-initiated, owner-only, and already chained into the audit log.
1254
- applyCondense: (toSeq: nat) -> (Result_67);
1466
+ applyCondense: (toSeq: nat) -> (Result_80);
1255
1467
  /// Owner-only: activate a guardian who has registered against an invite.
1256
1468
  ///
1257
1469
  /// Until this call the guardian is `#Pending` and can do NOTHING — registering is a claim, this
@@ -1260,7 +1472,7 @@ type Engram =
1260
1472
  ///
1261
1473
  /// `#Conflict("Guardian is already active")` when there is nothing to do — the refusal says the
1262
1474
  /// state the caller asked for is the state that holds, rather than pretending it acted.
1263
- approveGuardian: (guardianPrincipal: principal) -> (Result_1);
1475
+ approveGuardian: (guardianPrincipal: principal) -> (Result_2);
1264
1476
  /// Owner-only: approve one pending over-limit request, letting the agent retry the operation
1265
1477
  /// its policy refused.
1266
1478
  ///
@@ -1281,11 +1493,11 @@ type Engram =
1281
1493
  /// Refuses `#NotFound` for an unknown id, and `#Conflict` NAMING THE STATUS when the request is
1282
1494
  /// no longer pending — already approved, denied or expired. The status is in the message because
1283
1495
  /// "not pending" is the one refusal here an owner acts on differently depending on which it is.
1284
- approveRequest: (requestId: text) -> (Result_1);
1496
+ approveRequest: (requestId: text) -> (Result_2);
1285
1497
  /// Discard a backup started by `backupInit` and never finalized. The way out of a failed upload,
1286
1498
  /// and the reason a stalled one need not occupy space indefinitely. Same gate as the rest of the
1287
1499
  /// write half: owner, or an agent holding `canAppendMemory`.
1288
- backupAbort: (backupId: text) -> (Result_1);
1500
+ backupAbort: (backupId: text) -> (Result_2);
1289
1501
  /// Close a backup started by `backupInit` and mark it usable.
1290
1502
  ///
1291
1503
  /// ⚠ ONLY THE CREATOR MAY FINALIZE — `#Refused("Not the creator of this backup")`. An agent
@@ -1298,7 +1510,7 @@ type Engram =
1298
1510
  ///
1299
1511
  /// It does NOT verify the `sha256` declared at init; see that method for what the digest is and
1300
1512
  /// is not.
1301
- backupFinalize: (backupId: text) -> (Result_1);
1513
+ backupFinalize: (backupId: text) -> (Result_2);
1302
1514
  /// Begin a chunked backup upload. Returns the `backupId` every later call in the sequence needs.
1303
1515
  ///
1304
1516
  /// **THE SEQUENCE**, which no individual signature here conveys:
@@ -1322,24 +1534,24 @@ type Engram =
1322
1534
  ///
1323
1535
  /// The write half also refuses while writes are PAUSED.
1324
1536
  backupInit: (dbType: text, backupType: BackupType, parentBackupId:
1325
- opt text, sha256: text, backupLabel: opt text) -> (Result_43);
1537
+ opt text, sha256: text, backupLabel: opt text) -> (Result_53);
1326
1538
  /// Read one chunk of a finalized backup, by index.
1327
1539
  ///
1328
1540
  /// ⚠ GATED ON `read_backup`, which is NOT the permission the upload half uses — that one is
1329
1541
  /// `canAppendMemory`. Holding one says nothing about the other, deliberately: taking a backup and
1330
1542
  /// carrying it away are different authorities.
1331
- backupPullChunk: (backupId: text, chunkIndex: nat) -> (Result_59) query;
1543
+ backupPullChunk: (backupId: text, chunkIndex: nat) -> (Result_69) query;
1332
1544
  backupPushChunk: (backupId: text, chunkIndex: nat, data: blob) ->
1333
- (Result_1);
1545
+ (Result_2);
1334
1546
  /// The OWNER cancels an agent's pending key nomination; the agent keeps its current key. Refused
1335
1547
  /// by name when the agent is unknown or has nothing pending — never a silent success.
1336
- cancelAgentKeyNomination: (agentKey: principal) -> (Result_1);
1548
+ cancelAgentKeyNomination: (agentKey: principal) -> (Result_2);
1337
1549
  /// Close a session the caller paid for: settle what was consumed, refund the remainder.
1338
1550
  ///
1339
1551
  /// PAYER-ONLY, enforced inside the gateway. This is the exit that did not exist — `endSession`
1340
1552
  /// and `forceCloseSession` were on the MARKET, which is withheld, and whose escrow subaccount is
1341
1553
  /// under a different principal entirely, so its close could never have reached these funds.
1342
- closeSession: (sessionId: text) -> (Result_1);
1554
+ closeSession: (sessionId: text) -> (Result_2);
1343
1555
  /// Convert the engram's OWN earned ckUSDC/ckUSDT into its OWN cycles, via the cashier — the
1344
1556
  /// engram-self top-up path. Owner-only; per-call cap + cooldown (irreversible); NOT freeze-gated
1345
1557
  /// (infrastructure funding). Flow: read the engram's deposit address on the cashier, move the
@@ -1361,7 +1573,7 @@ type Engram =
1361
1573
  /// ⟨2026-10-02⟩ The second parameter is NAMED `amountE6` now, as the census row above rules the
1362
1574
  /// pair — e6 base units of the token named first. A name only: Candid passes arguments by
1363
1575
  /// position, so nothing on the wire moved.
1364
- convertEarningsToCycles: (token: text, amountE6: nat) -> (Result_8);
1576
+ convertEarningsToCycles: (token: text, amountE6: nat) -> (Result_14);
1365
1577
  /// Owner-only: mint a single-use invite code an agent redeems with `pairAgent`.
1366
1578
  ///
1367
1579
  /// ⚠ READ THIS BEFORE INVITING SOMEONE BACK. Pairing is ONE-SHOT PER PRINCIPAL on
@@ -1379,8 +1591,18 @@ type Engram =
1379
1591
  ///
1380
1592
  /// A principal that is already a GUARDIAN cannot become an agent — a guardian is an
1381
1593
  /// independent check on agents, so one wallet must not hold both.
1594
+ ///
1595
+ /// ⟨2026-10-29, the owner's ruling "a"⟩ `name` MAY BE EMPTY (or only whitespace): the agent is then
1596
+ /// named after its key when it pairs — "agent-" and the key's first five characters, e.g.
1597
+ /// "agent-hsffu" (`People.nameAtPairing` says why five, and the first). ⟨2026-10-29, later, beside "its key"⟩ Its
1598
+ /// PERMANENT key (the root it enrolled with), not the key that pairs, so the name stays right across
1599
+ /// a key replacement and matches the app's "Copy permanent key". A name the owner gives
1600
+ /// always wins. Before this an empty name was refused, so an app that wanted no name had to invent
1601
+ /// one ("agent"), and two agents read alike.
1602
+ /// ⟨2026-10-29, review F7⟩ A name the owner gives meets the rule `renameAgent` applies: a line break
1603
+ /// or another control character is `#Invalid` (`People.nameRefusal`), as a rename to it would be.
1382
1604
  createAgentInvite: (name: text, permissions: AgentPermissions) ->
1383
- (Result_43);
1605
+ (Result_53);
1384
1606
  /// Owner-only: mint an invite for a GUARDIAN — an independent check on agents, not a
1385
1607
  /// co-owner and not a recovery agent.
1386
1608
  ///
@@ -1403,7 +1625,7 @@ type Engram =
1403
1625
  /// So an invite that fails to redeem for that reason is not a bad code. The rule exists because
1404
1626
  /// a check must be independent of the thing it checks.
1405
1627
  createGuardianInvite: (name: text, permissions: GuardianPermissions) ->
1406
- (Result_43);
1628
+ (Result_53);
1407
1629
  /// OWNER-ONLY deletion of a stored backup.
1408
1630
  ///
1409
1631
  /// ⚠ NOT THE SAME GATE AS THE REST OF THE FAMILY, and the asymmetry is deliberate: `backupInit`,
@@ -1414,7 +1636,7 @@ type Engram =
1414
1636
  ///
1415
1637
  /// `backupAbort` is the agent's way out of a failed UPLOAD; it discards something never
1416
1638
  /// finalized. This removes a finished backup, which is a different act on a different object.
1417
- deleteBackup: (backupId: text) -> (Result_1);
1639
+ deleteBackup: (backupId: text) -> (Result_2);
1418
1640
  /// ⟨0.16.0, census §10 item 16⟩ RETURNS A REAL RECEIPT, not `R<()>`. The receipt was already
1419
1641
  /// being computed and written into the audit line — `receiptSuffix(r)` — and then discarded, so
1420
1642
  /// a caller could not cite the seq its own delete produced and had to go looking for it in a log
@@ -1430,36 +1652,23 @@ type Engram =
1430
1652
  /// Terminal: a denied request cannot be approved afterwards. Like `approveRequest` it refuses
1431
1653
  /// `#NotFound` for an unknown id and `#Conflict` when the request is no longer pending, and it
1432
1654
  /// does not change the policy — the next request over the same limit will be raised again.
1433
- denyRequest: (requestId: text, reason: text) -> (Result_1);
1434
- /// Force the tECDSA derivation and return the address.
1435
- ///
1436
- /// It exists because the gateway's own derivation fires from a timer that is lazy on some
1437
- /// replicas, and until it lands the EVM quote advertises the `0x0` fallback and settle fails
1438
- /// closed — a live money surface quoting an address that cannot receive.
1439
- ///
1440
- /// ⟨0.16.0, B-2⟩ Derivation now comes from `EvmIdentity`, and the return type carries the
1441
- /// outcome: this used to answer `""` on failure, which is a Text a caller can and did paste into
1442
- /// a payment flow. An empty string is not an address, and saying so is the difference between a
1443
- /// failed derivation and an address of nothing.
1444
- ///
1445
- /// ⚠ TRANSITIONAL: it also primes the ic402 gate, because the gate still settles commerce on this
1446
- /// canister until those 47 methods move. That second call disappears with them — it is listed in
1447
- /// the move order in the spec's B-2 addendum, not left for someone to find.
1448
- ///
1449
- /// PUBLIC: it inherits `getEvmAddress`'s gate rather than choosing one, and could not usefully be
1450
- /// narrower — it exists so a caller can make the derivation happen BEFORE a payment flow, and the
1451
- /// derivation itself is ungated. Idempotent and bounded to the same one-derivation-per-lifetime
1452
- /// work, so an anonymous caller can cause it once and no more.
1453
- /// ⟨L7⟩ UPDATE, NOT QUERY, and this one does not merely await — it WRITES. The body awaits
1454
- /// `EvmIdentity.deriveAddress` (the management canister's `ecdsa_public_key`) and
1455
- /// `gate.deriveEvmRecipientAt` ⟨renamed 2026-09-22 with the path⟩, then caches the result in `evmAddressCache`. So a query is
1456
- /// impossible twice over: it could not await the derivation, and it could not keep the answer.
1457
- /// Named `ensure*` rather than `get*` for that reason — the write is the point, and a read verb
1458
- /// would have promised a cheapness this cannot deliver.
1459
- ///
1460
- /// ⟨Marker added 2026-08-23; the census row said "L7 mark added per review" and no mark was at
1461
- /// the site.⟩
1462
- ensureEvmReady: () -> (Result_43);
1655
+ denyRequest: (requestId: text, reason: text) -> (Result_2);
1656
+ /// ⟨2026-10-21, the owner's round-11 answer c⟩ A NEW GUARDIAN POWER, words only: an ACTIVE
1657
+ /// guardian disputes an agent's write. It never moves money, stops anything or changes a grant.
1658
+ /// Appends a chained `record.dispute` entry (`about=<id> reason=<words>`) and keeps the dispute
1659
+ /// for `listGuardianDisputes`; answers the new entry's id. NOT ALERTED, deliberately: a
1660
+ /// `guardian.*` operation would fall in the alerts' #guardian class, and which entries reach a
1661
+ /// phone is the held alerts round's to decide (`ActionAlerts.classify` answers null for
1662
+ /// `record.*`). The owner sees it on the record's Disputes tab.
1663
+ ///
1664
+ /// WHO: every active guardian — no grant bit (`RecordWords` header says why). The OWNER is refused
1665
+ /// by name (`RecordWords.OWNER_DISPUTES_ELSEWHERE` — the owner's dispute is
1666
+ /// `repudiateMemoryWrite`); an agent and a stranger get "Not a guardian", a pending guardian "Guardian
1667
+ /// is pending approval", the anonymous caller the anonymous refusal.
1668
+ /// WHAT: an entry the owner's review would show (`qualifiesForReview` — an agent's append or
1669
+ /// revision, or a paid session's append) that succeeded, still held in full by the ring.
1670
+ /// One dispute per guardian per write (`#Conflict`, the first stands).
1671
+ disputeAgentWrite: (about: nat, reason: text) -> (Result_14);
1463
1672
  /// Record that log entries [fromSeq, toSeq] were served, and return the root that proves it.
1464
1673
  ///
1465
1674
  /// This is the receipt ledgerfs Q2 requires before any of those entries may be condensed away.
@@ -1473,7 +1682,7 @@ type Engram =
1473
1682
  /// situation rather than a safety measure. It IS gated on requireMemoryAttached: a store that
1474
1683
  /// failed its integrity check must not attest anything it cannot vouch for.
1475
1684
  exportMemoryRange: (fromSeq: nat, toSeq: nat, authorFilter:
1476
- opt principal) -> (Result_66);
1685
+ opt principal) -> (Result_79);
1477
1686
  /// ⟨0.16.0, L2.2 — renamed from `guardianFreezePayments`⟩ The prefix LIED about who may call it.
1478
1687
  /// The gate is `requireOwnerOrGuardian`, and an owner freezing their own payments is the ordinary
1479
1688
  /// case — the guardian is the exceptional one. A name that says otherwise sends an owner looking
@@ -1489,6 +1698,8 @@ type Engram =
1489
1698
  /// individual method's body finds nothing — the check is one level down.⟩
1490
1699
  /// · `addEip712Type` and `addEvmWithdrawDestination` — pre-staging for a later payout is the
1491
1700
  /// thing a brake most needs to stop, so the destination list is frozen along with the signing.
1701
+ /// ⟨2026-10-14, the owner's ruling 4A⟩ `addEvmWithdrawDestination` is removed; its place is
1702
+ /// `addEip712Destination` (one list per registered action), freeze-gated the same way.
1492
1703
  /// · `sessionReadMemory` and `sessionAppendMemory` — the paid-memory rail, money coming IN.
1493
1704
  ///
1494
1705
  /// AND WHAT IT DELIBERATELY DOES NOT, stated so the absence is not read as an oversight:
@@ -1503,9 +1714,17 @@ type Engram =
1503
1714
  ///
1504
1715
  /// ⚠ The three exclusions are a reading of intent, not a ruling: no declaration stated the scope
1505
1716
  /// before this one. If any of them is wrong, this comment is where the argument should happen.
1506
- freezePayments: () -> (Result_1);
1717
+ freezePayments: () -> (Result_2);
1718
+ /// ⟨2026-10-21, the owner's round-11 answer d⟩ `freezePayments` with a reason the strip and the
1719
+ /// guardian page show ("Sam froze payments: 'a payment I didn't expect'"). A NEW method, not an
1720
+ /// argument on `freezePayments`: a shipped argument tuple is frozen. Same callers, same grant, same
1721
+ /// brake: the owner, or an active guardian holding `canFreezePayments`; an agent, a stranger, a
1722
+ /// pending guardian and the anonymous caller are refused by `requireOwnerOrGuardian`'s own words.
1723
+ /// An empty reason is no reason; a reason too long or holding a line break is `#Invalid` and the
1724
+ /// brake is NOT pulled — the caller pulls it with `freezePayments`, or shortens the words.
1725
+ freezePaymentsWithReason: (reason: text) -> (Result_2);
1507
1726
  /// Delivery status + config readback. Owner-only (the URL is a secret).
1508
- getActionAlertStatus: () -> (Result_57) query;
1727
+ getActionAlertStatus: () -> (Result_67) query;
1509
1728
  /// Agents need to know what they may revise, so they can read it too. Whole-value config, same
1510
1729
  /// carve-out as getProtectedPaths — and kept a SEPARATE method from it deliberately (L2.2): a
1511
1730
  /// protected path and a revisable path are opposite grants, and one accessor for both would be a
@@ -1513,7 +1732,7 @@ type Engram =
1513
1732
  ///
1514
1733
  /// Refusal reason preserved from the trap: a grant is a power, and its absence and its
1515
1734
  /// concealment are different facts.
1516
- getAgentRevisablePaths: () -> (Result_53) query;
1735
+ getAgentRevisablePaths: () -> (Result_63) query;
1517
1736
  /// OWNER-ONLY: every engagement's seat weeks on this engram, with the agent's root — the day it
1518
1737
  /// paired, the days of its first and last payment signature, a 64-week map whose bit 0 is the week
1519
1738
  /// of the last one, and how many were produced. Never an amount, a recipient or a nonce.
@@ -1524,7 +1743,7 @@ type Engram =
1524
1743
  /// order. Anyone else is refused by name (`#Refused getAgentSeatWeeks: …`), never answered with an
1525
1744
  /// empty page. Paged; `total` is every engagement ever paired here (a reset keeps the rows).
1526
1745
  /// Two rows can name one root: an agent paired again after it left is a second engagement.
1527
- getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_64) query;
1746
+ getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_77) query;
1528
1747
  /// Owner: everything written into this engram by someone other than the owner since the last
1529
1748
  /// markAgentWritesReviewed() — agent appends/revisions AND paid-session appends (see
1530
1749
  /// qualifiesForReview for why those two families are recognised differently).
@@ -1532,7 +1751,7 @@ type Engram =
1532
1751
  /// them — the UI must page (markAgentWritesReviewed(?lastShownId)) and must NOT present 200
1533
1752
  /// as a total. `earliest` discloses ring eviction — if cursor < earliest, entries between them
1534
1753
  /// aged out of the ring (the CHAIN still proves total count; this view can't show their bodies).
1535
- getAgentWriteReview: () -> (Result_63) query;
1754
+ getAgentWriteReview: () -> (Result_76) query;
1536
1755
  /// Why anchoring is or is not advancing. PUBLIC: ungated on purpose — detecting a stalled
1537
1756
  /// engram is the point, a gated read would fail-to-empty and hand a third party fabricated zeros,
1538
1757
  /// and none of these fields is a secret — `total` is already public via getCertifiedAuditHead.
@@ -1551,7 +1770,18 @@ type Engram =
1551
1770
  /// below serves the same head WITH the subnet certificate for a caller that needs to verify it
1552
1771
  /// was signed rather than asserted.
1553
1772
  getAuditHead: () -> (AuditHead) query;
1554
- getBackupMetadata: (backupId: text) -> (Result_62) query;
1773
+ getBackupMetadata: (backupId: text) -> (Result_75) query;
1774
+ /// ⟨2026-10-21, the owner's round-11 answer m: a backup-retention getter⟩ How many backups of
1775
+ /// `dbType` each creator keeps, and whether that is the default — the read `setBackupRetention`
1776
+ /// lacked, so "Keeps your newest 3" showed only on the phone that last set it.
1777
+ ///
1778
+ /// WHO: the OWNER, and an active AGENT holding `canAppendMemory` — the permission that lets it
1779
+ /// upload backups, which are exactly the backups this number bounds (`#perm(#append_memory)`).
1780
+ /// Refused, each by the gate's own words: an agent without that permission ("Permission
1781
+ /// denied"), a revoked or resigned agent, a guardian (guardians take no backups), a stranger and
1782
+ /// the anonymous caller. A kind the setter would refuse is `#Invalid` here too
1783
+ /// (`Backup.getRetention`). Records nothing (a query).
1784
+ getBackupRetention: (dbType: text) -> (Result_74) query;
1555
1785
  /// The cashier this engram recognises as its rent biller — `null` until the registry pushes one.
1556
1786
  ///
1557
1787
  /// PUBLIC: a payer about to send money needs to know which cashier this engram will accept credit
@@ -1559,6 +1789,23 @@ type Engram =
1559
1789
  /// never become rent. The registry publishes the same fact as `getRentBiller`; publishing it here
1560
1790
  /// too is what lets the two be COMPARED, which is the only way to catch a mismatch.
1561
1791
  getBillerId: () -> (opt principal) query;
1792
+ /// This engram's BIRTH CHAIN, root first: its own record last, its parent's before it, and so on
1793
+ /// ⟨2026-10-26, the owner's lineage ruling L3A⟩.
1794
+ ///
1795
+ /// OWNER ONLY. The owner decides whom to show it to — the chain names the engrams this one descends
1796
+ /// from, which is the owner's to disclose, not the registry's. The certified half is at the registry
1797
+ /// (`getCertifiedBirth`, public, revealing only whether a fingerprint is present); the client's
1798
+ /// `verifyBirthChain` checks both. Refused to anyone else by the combinator (`#ownerOnly`).
1799
+ getBirthChain: () -> (Result_73) query;
1800
+ /// ⟨2026-10-21, the owner's round-11 answer d⟩ Each brake: on or off, and while on, who pulled it
1801
+ /// LAST (their key and whether as owner or guardian), since when, and the reason they gave — the
1802
+ /// same person and time as the newest brake entry on the record (`RecordWords.BrakePull`). For the
1803
+ /// owner's status strip and the guardian page. The OWNER and ACTIVE GUARDIANS may read it; an
1804
+ /// agent, a stranger, a pending guardian and the anonymous caller are refused (`#ownerOrGuardian`
1805
+ /// — an agent learns a brake is on from the refusal of what it tried, and needs no more). `pull`
1806
+ /// is null for a brake that is off, and for one carried on across the upgrade that added this
1807
+ /// read (who pulled it was not recorded then) — never a guessed pull.
1808
+ getBrakes: () -> (Result_72) query;
1562
1809
  /// ⟨0.16.0, L9/L10 — census row⟩ `Wire.CertifiedAuditHead`, not an anonymous record. The
1563
1810
  /// registry, market and cashier already served the shared type; the engram — the canister that
1564
1811
  /// IS the evidence product — was the one chain still answering in a shape of its own, missing
@@ -1581,11 +1828,11 @@ type Engram =
1581
1828
  /// query's state writes are discarded when it returns, and the `denied` call first written here
1582
1829
  /// recorded nothing while reading as if it did. The refusal is loud in the reply instead. WHAT
1583
1830
  /// WOULD MAKE THIS WRONG: a reason to record who asked — then this becomes an update that says so.
1584
- getChildAllowance: (agentPrincipal: principal) -> (Result_61) query;
1831
+ getChildAllowance: (agentPrincipal: principal) -> (Result_71) query;
1585
1832
  /// Owner-only, Billing-class: what opening an engram costs this engram, the balance below which an
1586
1833
  /// agent's request is refused, the balance now, and every agent's allowance. The console's cost
1587
1834
  /// sentence reads it. Cycles are owner-class information, as on the owner's console read.
1588
- getChildOpening: () -> (Result_60) query;
1835
+ getChildOpening: () -> (Result_70) query;
1589
1836
  /// Derive the shared memory-encryption key, encrypted under the caller's transport
1590
1837
  /// public key. Gated to owner + read-agents (the same principals allowed to read
1591
1838
  /// memory). The client decrypts it locally with its transport secret key.
@@ -1610,7 +1857,7 @@ type Engram =
1610
1857
  /// cost. Stated here because L7 requires the reason be readable from the interface rather than
1611
1858
  /// inferred by opening the body — which is exactly what had to happen to write this line.
1612
1859
  getEncryptedMemoryKey: (epoch: opt nat, transportPublicKey: blob) ->
1613
- (Result_59);
1860
+ (Result_69);
1614
1861
  /// ⟨0.16.0, owner ruling 2026-08-20 — option (a)⟩ `x402Support` REPORTS THE RAIL, not a constant.
1615
1862
  ///
1616
1863
  /// The card's config hardcodes `x402Support = true`, answering a buyer's question with a fact
@@ -1635,10 +1882,6 @@ type Engram =
1635
1882
  /// has never met this engram what it is and how to transact with it. A card behind a gate cannot
1636
1883
  /// be discovered, and the ERC-8004 ecosystem it participates in assumes an open read.
1637
1884
  getEngramCard: () -> (AgentCard) query;
1638
- /// PUBLIC: the engram's permanent spawn ordinal — a provable, non-sensitive fact. It identifies a
1639
- /// canister, never a person.
1640
- /// null = spawned before numbering existed; the owner can backfill via syncEngramNumber().
1641
- getEngramNumber: () -> (opt nat) query;
1642
1885
  /// Re-pointed at `EvmIdentity` (B-2): custody derivation no longer routes through the ic402
1643
1886
  /// Gateway, which is leaving for the market canister. Behaviour is unchanged for a caller — same
1644
1887
  /// address, same tECDSA key — but the engram no longer needs a marketplace to know its own
@@ -1709,7 +1952,7 @@ type Engram =
1709
1952
  /// It refuses rather than half-answers: if either address cannot be derived the reply is
1710
1953
  /// `#Err`, never a record carrying an empty string (ic402's `getEvmAddress` answers `""` on a
1711
1954
  /// failed derivation — that is fail-to-empty on a money surface, and it stops here).
1712
- getEvmAddress: () -> (Result_58);
1955
+ getEvmAddress: () -> (Result_68);
1713
1956
  /// The owner's OWN EVM address, if they registered one — distinct from `getEvmAddress`, which is
1714
1957
  /// the address this canister derives for itself.
1715
1958
  ///
@@ -1724,7 +1967,7 @@ type Engram =
1724
1967
  /// the management canister's `ecdsa_public_key`. A query cannot await, so the round-trip is the
1725
1968
  /// cost — stated here because L7 requires the reason be readable from the interface rather than
1726
1969
  /// inferred by opening the body.
1727
- getEvmSignerAddress: () -> (Result_43);
1970
+ getEvmSignerAddress: () -> (Result_53);
1728
1971
  /// PUBLIC: where this chain begins, for the stranger deciding whether to trust it.
1729
1972
  ///
1730
1973
  /// The fourth of the four evidence methods (`getAuditHead`, `getCertifiedAuditHead`,
@@ -1733,7 +1976,7 @@ type Engram =
1733
1976
  /// cannot verify it, and nothing here identifies anybody.
1734
1977
  getGenesisNote: () -> (GenesisNote) query;
1735
1978
  /// A guardian's own channel status (their URL is their secret — each guardian sees only theirs).
1736
- getGuardianAlertStatus: () -> (Result_57) query;
1979
+ getGuardianAlertStatus: () -> (Result_67) query;
1737
1980
  /// The market this engram will accept signing requests from — `null` until the registry pushes
1738
1981
  /// one at spawn, which is why `requireMarket` refuses fleet-wide today.
1739
1982
  ///
@@ -1763,7 +2006,7 @@ type Engram =
1763
2006
  /// never renumbered: the next page starts at the last version returned plus one. Defaults
1764
2007
  /// return the whole history of any file a pre-FD engram could have held.
1765
2008
  getMemoryHistory: (path: text, start: opt nat, max: opt nat) ->
1766
- (Result_56) query;
2009
+ (Result_66) query;
1767
2010
  /// PUBLIC: the epoch alone, and deliberately nothing else (rotation study D4). A `rotatedAt[]`
1768
2011
  /// history would be a public, fleet-enumerable feed of when each owner terminated a trust
1769
2012
  /// relationship — readable by, among others, the party just terminated.
@@ -1804,7 +2047,7 @@ type Engram =
1804
2047
  /// Refusal reasons of both merge: an empty policy reads as "nothing is capped, every version kept
1805
2048
  /// forever" — a claim about what this engram will DESTROY — and an empty guard list reads as
1806
2049
  /// "nothing is held back".
1807
- getMemoryRetentionPolicy: () -> (Result_55) query;
2050
+ getMemoryRetentionPolicy: () -> (Result_65) query;
1808
2051
  /// The metrics reader this engram answers — `null` until the spawning registry names one.
1809
2052
  ///
1810
2053
  /// PUBLIC: an owner deciding whether to switch the read off needs to know who it is, and anyone
@@ -1817,7 +2060,7 @@ type Engram =
1817
2060
  /// see: the only row it can ever return is the caller's own, so "you are not a guardian here" is
1818
2061
  /// a fact about the caller, told to the caller. There is nothing to leak by omission — which is
1819
2062
  /// the test the #NotFound arm sets.
1820
- getMyGuardianStatus: () -> (Result_15) query;
2063
+ getMyGuardianStatus: () -> (Result_17) query;
1821
2064
  /// ⟨0.16.0, NEW⟩ The gated half of the status() split.
1822
2065
  ///
1823
2066
  /// Every field is bare — no masking, no `authorized` discriminator — because reaching this record
@@ -1827,7 +2070,7 @@ type Engram =
1827
2070
  /// was `nat`, then widened to `opt nat` so a refusal could be `null`, which broke every published
1828
2071
  /// client (rule 4) and bought a masked answer nobody had asked for — the census could not even
1829
2072
  /// find a consumer that read the masked `0`. Behind a gate there is nobody to mask it from.
1830
- getOwnerConsole: () -> (Result_54) query;
2073
+ getOwnerConsole: () -> (Result_64) query;
1831
2074
  /// Owner + agents only (agents need it to avoid writing protected paths).
1832
2075
  ///
1833
2076
  /// A NAMED RECORD, not a Page: the setter replaces this list wholesale, so there is no window to
@@ -1839,7 +2082,7 @@ type Engram =
1839
2082
  /// path on this engram is protected", and an agent consults this list precisely to avoid
1840
2083
  /// writing one — so a fabricated empty here does not merely misinform, it invites the write the
1841
2084
  /// list exists to prevent.
1842
- getProtectedPaths: () -> (Result_53) query;
2085
+ getProtectedPaths: () -> (Result_63) query;
1843
2086
  /// Whether the metrics reader's read is answered — `true` from birth.
1844
2087
  ///
1845
2088
  /// PUBLIC: the promise that an owner can switch this read off can be checked only if the switch
@@ -1848,7 +2091,10 @@ type Engram =
1848
2091
  /// Owner-only, Billing-class: the signing floor, the balance, one signature's price, and how many
1849
2092
  /// payment signatures the balance carries above the floor before `signX402Payment` is refused by
1850
2093
  /// name. The same numbers the check uses, so Billing can say only what the engram enforces.
1851
- getSigningFloor: () -> (Result_52) query;
2094
+ /// ⟨2026-11-01, "6 fix"⟩ Refused by name (`#Unavailable`) while this engram has not read its own
2095
+ /// freezing setting: there is no floor to serve then, and a 30-day figure would be a made-up one
2096
+ /// (ADR-0002) — the signers refuse in that state too, so the refusal is the truth on Billing.
2097
+ getSigningFloor: () -> (Result_62) query;
1852
2098
  /// The registry that spawned this engram, if it recorded one.
1853
2099
  ///
1854
2100
  /// PUBLIC: it is the provenance claim. An engram asserting it is part of a fleet, under that
@@ -1865,7 +2111,7 @@ type Engram =
1865
2111
  /// configuration, and the engram-wide total would also tell one agent how much the others spent.
1866
2112
  /// A refusal names this method (`Gated.gatedResult`) rather than answering null/0 — a ceiling of
1867
2113
  /// "none" and a spend of 0 are both real answers, so a fabricated one would be read as fact.
1868
- getSpendCeiling: () -> (Result_51) query;
2114
+ getSpendCeiling: () -> (Result_61) query;
1869
2115
  /// Read the caps in force for a caller.
1870
2116
  ///
1871
2117
  /// OWNER-ONLY, and this is where it diverges from the market's inbound twin, which is public.
@@ -1873,8 +2119,8 @@ type Engram =
1873
2119
  /// Here the engram serves no 402s at all: these caps are the owner's private custody
1874
2120
  /// configuration, and publishing them would tell any caller exactly how large a signing request
1875
2121
  /// can be before it needs an approval nobody is watching for.
1876
- getSpendPolicy: (caller: opt principal) -> (Result_50) query;
1877
- getStorageStats: () -> (Result_49) query;
2122
+ getSpendPolicy: (caller: opt principal) -> (Result_60) query;
2123
+ getStorageStats: () -> (Result_59) query;
1878
2124
  /// Timer arm-state. PUBLIC and deliberately so: these timers are self-arming to save cycles,
1879
2125
  /// and an optimisation nobody can verify is an optimisation nobody should trust. Cheap to read,
1880
2126
  /// leaks nothing (booleans about our own scheduling).
@@ -1898,6 +2144,10 @@ type Engram =
1898
2144
  /// because a persistent actor re-runs its init body BEFORE postupgrade restores stable sessions,
1899
2145
  /// so a predicate-gated arm would skip exactly the canisters that have live ones. The first tick
1900
2146
  /// disarms it. Still true minutes after an upgrade is a real bug — report it upstream.
2147
+ /// ⟨2026-10-07, beside the paragraph above⟩ The session sweep's interval is 300 seconds now (the
2148
+ /// owner's decision of that day; set in the actor body), so "one interval" is up to five minutes,
2149
+ /// and true five minutes after an upgrade is still expected. True ten minutes after, with no session
2150
+ /// open, is the bug.
1901
2151
  /// NOT the whole timer story. The hourly CYCLE timer — which also carries audit anchoring — is
1902
2152
  /// deliberately absent: it is a `transient let` armed unconditionally at init, so an "armed"
1903
2153
  /// boolean for it would read true forever and tell you nothing, exactly the false-positive the
@@ -1907,6 +2157,18 @@ type Engram =
1907
2157
  /// PUBLIC: the same standing as the two liveness reads above. Booleans and timestamps about this
1908
2158
  /// canister's own timers — nothing about content, callers or money — and a liveness signal only
1909
2159
  /// its owner can read cannot tell a third party that the engram is still running.
2160
+ /// ⟨2026-10-28, the owner's ruling "1"⟩ The three ic402 flags read FALSE WHILE THE TIMERS ARE PAUSED.
2161
+ /// The pause's id sweep cancels ic402's sweeps, but ic402 keeps their stale ids, so its own
2162
+ /// "armed" reads would answer true for a timer that no longer exists (a fabricated answer,
2163
+ /// ADR-0002). `alertTimerArmed` needs no guard: the sweep nulls `alertTimerId` itself.
2164
+ /// ⟨2026-10-29, the owner's ruling "A", beside the line above⟩ …the sweep zeroes the arm, and an arm
2165
+ /// past its due time reads stale. `alertTimerArmed` is TRUE ONLY WHILE A DELIVERY IS OWED OR RETRYING
2166
+ /// (the alert drain is a one-shot armed per owed delivery); alerts configured on a quiet engram read
2167
+ /// false, and that is correct — the IDLE STEADY STATE line above now holds with a webhook set too.
2168
+ /// It reads the arm's DUE TIME, not only its id (`ActionAlerts.armLive`): a job that traps before its
2169
+ /// first await rolls back its own `alertTimerId := null`, so a bare id would read armed forever.
2170
+ /// ONE BOUNDED UNTRUTH (the spec's critic, F12): for ARM_STALE_NS (120 s) after the due time of such a
2171
+ /// trapped job, the flag reads true although no timer exists.
1910
2172
  getTimerHealth: () -> (TimerHealth) query;
1911
2173
  /// PUBLIC: a cap identifies no user, and a caller deserves to know the rule before it stops them.
1912
2174
  ///
@@ -1941,12 +2203,12 @@ type Engram =
1941
2203
  /// ⟨L7⟩ MARKER ADDED 2026-08-23, reasoning above UNCHANGED — this block already said "Stays an
1942
2204
  /// UPDATE, marked per L7: it awaits three ICRC-1 ledgers". It was marked in prose and invisible
1943
2205
  /// to any gate; the glyph is what `scripts/check-update-for-read.mjs` matches.
1944
- getWalletBalances: () -> (Result_48);
2206
+ getWalletBalances: () -> (Result_58);
1945
2207
  /// Refusal reason preserved, and it is the clearest case of why a masked read is worse than no
1946
2208
  /// read: three empty strings with `configured = false` is a VALID-LOOKING answer meaning "this
1947
2209
  /// engram has no World ID configuration" — handed to a caller who merely lacks a grant. The
1948
2210
  /// fabrication is indistinguishable from the truth by construction.
1949
- getWorldIdConfig: () -> (Result_47) query;
2211
+ getWorldIdConfig: () -> (Result_57) query;
1950
2212
  /// ⟨L7⟩ UPDATE, NOT QUERY: this awaits THREE system calls — `raw_rand()` for the nonce,
1951
2213
  /// `Call.signWithEcdsa` for the signature, and `worldIdRpPublicKey()` for the derived key. A
1952
2214
  /// query can do none of them.
@@ -1955,7 +2217,7 @@ type Engram =
1955
2217
  /// Valid iff the derived signer address (getWorldIdRpSignerAddress) is registered for this rp_id in
1956
2218
  /// the World Developer Portal. Short-lived (300s TTL, idkit-server's default) and single-purpose —
1957
2219
  /// it authorizes opening one verification request, nothing else.
1958
- getWorldIdRpContext: () -> (Result_46);
2220
+ getWorldIdRpContext: () -> (Result_56);
1959
2221
  /// Owner-only: the EVM address derived from the engram's dedicated World ID RP signing key (the
1960
2222
  /// "worldid-rp" tECDSA path). Register THIS address as the rp_id's signer in the World Developer
1961
2223
  /// Portal — the engram never holds or exports a private key (only threshold shares exist, on the
@@ -1965,7 +2227,7 @@ type Engram =
1965
2227
  /// awaits `worldIdRpPublicKey()` (management `ecdsa_public_key`), and it calls `denied()` on
1966
2228
  /// refusal — a state write, which a query cannot perform. So even if the key were cached this
1967
2229
  /// could not become a query without silently retiring its denial record (ADR-0002's class).
1968
- getWorldIdRpSignerAddress: () -> (Result_43);
2230
+ getWorldIdRpSignerAddress: () -> (Result_53);
1969
2231
  /// The verified IDKitResult, verbatim, as World's /api/v4/verify accepted it — the re-checkable
1970
2232
  /// artifact behind verifiedHuman. Role-gated because it carries the NULLIFIER.
1971
2233
  /// `Result<opt Text>` — and the double wrapper is the entire point, not redundancy.
@@ -1984,13 +2246,13 @@ type Engram =
1984
2246
  /// `///`, so the dead name was PUBLISHED in engram.did and pointed every client at a method the
1985
2247
  /// canister does not serve. The tombstones below and at `about()` are historical and correct as
1986
2248
  /// written; this one was present tense, which is the difference that matters.⟩
1987
- getWorldIdVerification: () -> (Result_45) query;
2249
+ getWorldIdVerification: () -> (Result_55) query;
1988
2250
  /// ⟨0.16.0, L1⟩ THE EMERGENCY FAMILY. Every refusal below is `#Refused` or `#NotFound`, and the
1989
2251
  /// absence of a `#Conflict` here is the point: these are the calls someone makes while something
1990
2252
  /// is going wrong, and the only two answers that help are "you may not do this" and "there is
1991
2253
  /// nothing by that name". A missing PERMISSION is `#Refused` rather than `#Conflict` — the
1992
2254
  /// guardian's standing is what fell short, and no change to engram state would let them through.
1993
- guardianRevokeAgent: (agentPrincipal: principal) -> (Result_1);
2255
+ guardianRevokeAgent: (agentPrincipal: principal) -> (Result_2);
1994
2256
  /// The HTTP surface: canister-info JSON, OAuth discovery documents, and the MCP route's query
1995
2257
  /// half. See the `http_request_update` twin below for what upgrades and why.
1996
2258
  ///
@@ -2059,7 +2321,7 @@ type Engram =
2059
2321
  ///
2060
2322
  /// Owner-gated because it reports on custody posture, and answered as a Result so that a
2061
2323
  /// wrong-identity caller gets a refusal rather than a bare `false` that reads as "no address yet".
2062
- isEvmAddressCached: () -> (Result_44) query;
2324
+ isEvmAddressCached: () -> (Result_54) query;
2063
2325
  /// Issue an OAuth authorization code. Called by an OAuth client's sign-in bridge
2064
2326
  /// (an `/auth/connector`-style route) after II authentication. The client then
2065
2327
  /// redirects the user's browser to `redirectUri` with `?code=<this>` so the
@@ -2067,7 +2329,7 @@ type Engram =
2067
2329
  ///
2068
2330
  /// Owner-only: only the engram owner can authorize a Connector install.
2069
2331
  issueAuthCode: (redirectUri: text, scope: text, codeChallenge: text,
2070
- clientId: opt text) -> (Result_43);
2332
+ clientId: opt text) -> (Result_53);
2071
2333
  /// ⟨0.16.0⟩ `getCycleSnapshotSource` DELETED — folded into `CycleSnapshot.source`, one label per
2072
2334
  /// ROW. A single label for a whole ring misattributes every row recorded under the other source,
2073
2335
  /// and the source flips by design (self-call first, balance on fallback). Its documentation of
@@ -2081,7 +2343,24 @@ type Engram =
2081
2343
  /// Refusal reason preserved, and it is the sharpest of this family: a masked `[]` reads as a
2082
2344
  /// DORMANT engram and corrupts retention math — a fabricated empty here does not just misinform a
2083
2345
  /// reader, it feeds a wrong number into a decision about destroying data.
2084
- listActivitySnapshots: (start: nat, limit: nat) -> (Result_42) query;
2346
+ listActivitySnapshots: (start: nat, limit: nat) -> (Result_52) query;
2347
+ /// ⟨2026-10-21, round 11 item l — the owner's answer "round 11: a, b, c, d, e, f, g, h, i, j, k, l,
2348
+ /// m."⟩ OWNER-ONLY: what each agent has spent today, beside the daily limit in force for it, so the
2349
+ /// agent rows can say "$0.50 of $5.00 today" where they said a count of payments. Read from the
2350
+ /// state the payment path already keeps — `outboundSpendToday`, through `SpendCeiling.callerSpentOn`
2351
+ /// (the reader `x402SignFor` uses) — and the limits from `gate.getPolicy(<the agent's key>)`, the
2352
+ /// policy `x402SignFor` checks, on the UTC day it checks (`SpendCeiling.dayIndex`). Amounts are the
2353
+ /// token's minor units, as the record's `amount=` writes them. No new state.
2354
+ ///
2355
+ /// OWNER-ONLY for `getSpendCeiling`'s reason: one agent's spending is the owner's custody
2356
+ /// information, and would tell another agent how much it spent. Everyone else — an agent, a
2357
+ /// guardian, a stranger, the anonymous caller — is refused by name (`#Refused
2358
+ /// listAgentSpendToday: …`), never answered with zeros. Paged like `listAgents`, in its order, one
2359
+ /// row per agent record; a row's `spentToday` is null, not 0, where no daily limit is in force,
2360
+ /// because the payment path keeps no figure then (`SpendCeiling.AgentSpendRow` says why).
2361
+ /// WHAT WOULD MAKE THIS WRONG: `x402SignFor` keeping the per-caller total by something other than
2362
+ /// the calling key, or under another day boundary.
2363
+ listAgentSpendToday: (start: nat, limit: nat) -> (Result_51) query;
2085
2364
  /// ⟨0.16.0⟩ THE PAGE EXEMPLAR. Trap → `#Refused`, bare array → `Result<Page<T>>` (L1 + L3).
2086
2365
  ///
2087
2366
  /// The refusal prose that used to be `gatedTrap`'s `whyNotEmpty` argument is not lost — it is why
@@ -2096,7 +2375,7 @@ type Engram =
2096
2375
  ///
2097
2376
  /// `withheld` is 0: this roster is owner-only in whole, so there is no partial-visibility case.
2098
2377
  /// A method that filters rows by caller sets it — see L1's row-level honesty rule.
2099
- listAgents: (start: nat, limit: nat) -> (Result_41) query;
2378
+ listAgents: (start: nat, limit: nat) -> (Result_50) query;
2100
2379
  /// The GUARDIAN-audience projection of the agent roster — three fields, not the full record.
2101
2380
  ///
2102
2381
  /// Two audiences, two methods (L1/L8), rather than one method masking fields by caller: a
@@ -2108,7 +2387,7 @@ type Engram =
2108
2387
  /// Refusal reason preserved: `[]` reads as "this engram has no agents", and this is the list a
2109
2388
  /// guardian consults BEFORE REVOKING ONE. A fabricated empty here does not merely misinform —
2110
2389
  /// it tells someone acting under emergency powers that there is nothing to act on.
2111
- listAgentsForGuardian: (start: nat, limit: nat) -> (Result_40) query;
2390
+ listAgentsForGuardian: (start: nat, limit: nat) -> (Result_49) query;
2112
2391
  /// Owner-only: rows carry caller, amount, operation and free-text rationale. The SDK omits it.
2113
2392
  ///
2114
2393
  /// The optional leading filter SURVIVES the L3 reshape — ratified (census tier-2 #8) rather than
@@ -2121,7 +2400,7 @@ type Engram =
2121
2400
  ///
2122
2401
  /// Refusal reason preserved: `[]` reads as "nothing is awaiting the owner's decision".
2123
2402
  listApprovalRequests: (statusFilter: opt ApprovalStatus, start: nat,
2124
- limit: nat) -> (Result_28) query;
2403
+ limit: nat) -> (Result_35) query;
2125
2404
  /// ⟨0.16.0⟩ `total` IS THE HEAD COUNTER, and on this method that is the entire point.
2126
2405
  ///
2127
2406
  /// The audit log is a bounded RING: it trims its tail, so "rows you can read" and "entries that
@@ -2141,7 +2420,21 @@ type Engram =
2141
2420
  /// For the owner and a guardian `withheld` is 0 and the page is the span. WHAT WOULD MAKE THIS
2142
2421
  /// WRONG: a reader who must see the whole record without being the owner or a guardian — the
2143
2422
  /// public certified head is the answer for integrity, and nothing else is.
2144
- listAuditEntries: (start: nat, limit: nat) -> (Result_23) query;
2423
+ ///
2424
+ /// ⟨2026-10-15, the owner's ruling 6B of 2026-10-14⟩ PUBLIC NOW, AND THE COUNT BECAME ROWS. The
2425
+ /// reply is a `Wire.RecordPage`: every entry in the span the reader may not see in full comes back
2426
+ /// as a hash-only row in `sealed` (id, SHA-256 of its body, entry hash) instead of being counted in
2427
+ /// `withheld`, so `items.size() + sealed.size()` is the span examined. Each entry is hashed first,
2428
+ /// then chained (`AuditLog`), so those rows are enough to walk from any entry to the certified
2429
+ /// head — which is what lets a stranger check one entry without the owner. A caller with no role,
2430
+ /// the anonymous caller included, is a stranger (`RecordView.readerFrom`) and gets only sealed
2431
+ /// rows; the owner and guardians still see every entry, an agent its own. Nothing here refuses,
2432
+ /// so the read's former refusal ("Anonymous caller not allowed") is gone from it.
2433
+ /// `ringFloor` says where the ring starts — a `start` below it begins at it — and `hashFirstFrom`
2434
+ /// where this record switched to the hash-first rule. A sealed row costs one SHA-256 of its body
2435
+ /// at read time; nothing new is stored. WHAT WOULD MAKE THIS WRONG: a sealed row carrying any part
2436
+ /// of a body, or a stranger reaching `items` (test/record-view.test.mo pins both).
2437
+ listAuditEntries: (start: nat, limit: nat) -> (Result_48) query;
2145
2438
  /// ⟨0.16.0, L1 + L3 — census-ruled⟩ THE TWO-MECHANISM EXCEPTION DISSOLVES.
2146
2439
  ///
2147
2440
  /// This method used to answer THREE ways to one question: a list, an `#Err` text, and a trap,
@@ -2165,7 +2458,7 @@ type Engram =
2165
2458
  /// `dbTypeFilter` DIES on the wire (census). The capability does not: `EngramClient.listBackups`
2166
2459
  /// keeps its optional filter and applies it to the page, so no caller loses the ability to ask
2167
2460
  /// "backups of this database" — it stops being a thing the canister has to page around.
2168
- listBackups: (start: nat, limit: nat) -> (Result_39) query;
2461
+ listBackups: (start: nat, limit: nat) -> (Result_47) query;
2169
2462
  /// List all bearer tokens — Active, Revoked, and Expired. Owner uses this in
2170
2463
  /// the dashboard to show installed Connectors (claude.ai, Claude Desktop, etc.).
2171
2464
  /// Refusal reason preserved from the trap: `[]` reads as "no connector is installed on this
@@ -2175,7 +2468,7 @@ type Engram =
2175
2468
  /// `bearerTokenStore.list()` already resolves each token's status at read time (a token that
2176
2469
  /// merely stopped being used is reported `#Expired`, not a stale `#Active`), so the page carries
2177
2470
  /// the same honesty the store gained on 2026-08-17.
2178
- listBearerTokens: (start: nat, limit: nat) -> (Result_38) query;
2471
+ listBearerTokens: (start: nat, limit: nat) -> (Result_46) query;
2179
2472
  /// The condense checkpoints in the retained log at or above `startSeq`, oldest first.
2180
2473
  ///
2181
2474
  /// ⟨0.16.0, NEW⟩ The other half of the split above. A checkpoint is the only surviving record of a
@@ -2185,25 +2478,18 @@ type Engram =
2185
2478
  ///
2186
2479
  /// Owner-only like every other archive surface, and for the same structural reason: these rows
2187
2480
  /// carry the chain positions and roots of entries whose paths were inside the hash preimage.
2188
- listCondenseCheckpoints: (startSeq: nat, max: nat) -> (Result_37) query;
2481
+ listCondenseCheckpoints: (startSeq: nat, max: nat) -> (Result_45) query;
2189
2482
  /// ⟨0.16.0⟩ `metrics()` DELETED — absorbed by `about()`.
2190
2483
  ///
2191
2484
  /// Two public projections of one canister (L2.2): `metrics()` and `status()` both answered "what
2192
2485
  /// is this engram like" and disagreed on which counters they carried, so a consumer had to fetch
2193
2486
  /// both and know which one owned each field. Every field here survives on `about()`, day-flooring
2194
2487
  /// included.
2195
- listCycleSnapshots: (start: nat, limit: nat) -> (Result_36) query;
2488
+ listCycleSnapshots: (start: nat, limit: nat) -> (Result_44) query;
2196
2489
  /// Same `withheld` treatment as listMemoryFiles — the tombstone listing filtered reserved paths
2197
2490
  /// for non-owners just as silently, and a caller could not tell a filtered tombstone list from a
2198
2491
  /// complete one. Counted before slicing, so policy-hidden rows never blur into paging.
2199
- listDeletedMemoryFiles: (start: nat, limit: nat) -> (Result_35) query;
2200
- /// The registered shapes — E3: encodeTypeString is the display artifact, verbatim.
2201
- /// Stays on the engram under B1 (hybrid): EIP-712 signing is custody, and custody does not leave.
2202
- ///
2203
- /// Refusal reason preserved: `[]` reads as "this engram can sign nothing" — a claim about SIGNING
2204
- /// AUTHORITY, which is not a thing to hand an unauthorized reader. The public trail of every
2205
- /// registration remains the audit chain under getCertifiedAuditHead.
2206
- listEip712Types: (start: nat, limit: nat) -> (Result_34) query;
2492
+ listDeletedMemoryFiles: (start: nat, limit: nat) -> (Result_43) query;
2207
2493
  /// Stays on the engram under B1 (hybrid): withdrawal custody does not leave.
2208
2494
  ///
2209
2495
  /// NAMED item, not a `(Text, Int)` tuple. The Int is an activation time, and a bare Int beside a
@@ -2212,14 +2498,37 @@ type Engram =
2212
2498
  /// Refusal reason preserved, and it has two halves that matter separately: `[]` reads as "this
2213
2499
  /// engram may withdraw nowhere", OR — worse — as "no allowlist is in force", which is the
2214
2500
  /// opposite security posture. It also erases any pending 24h activation from view.
2215
- listEvmWithdrawDestinations: (start: nat, limit: nat) -> (Result_33) query;
2501
+ ///
2502
+ /// ⟨2026-10-14, 4A⟩ One action's list: `typeId` names the action, and an unregistered one is
2503
+ /// `#NotFound` rather than an empty page (an empty page means "this action may sign to nothing").
2504
+ /// The item's field is `value`, not `address`: a list may hold a venue value that is no address.
2505
+ /// Readable by the owner, an active agent or an active guardian, as the old list was.
2506
+ listEip712Destinations: (typeId: blob, start: nat, limit: nat) ->
2507
+ (Result_42) query;
2508
+ /// The registered shapes — E3: encodeTypeString is the display artifact, verbatim.
2509
+ /// Stays on the engram under B1 (hybrid): EIP-712 signing is custody, and custody does not leave.
2510
+ ///
2511
+ /// Refusal reason preserved: `[]` reads as "this engram can sign nothing" — a claim about SIGNING
2512
+ /// AUTHORITY, which is not a thing to hand an unauthorized reader. The public trail of every
2513
+ /// registration remains the audit chain under getCertifiedAuditHead.
2514
+ ///
2515
+ /// ⟨2026-10-14, the owner's ruling 3A⟩ Each row carries its per-field rules (`fieldRules`), joined in
2516
+ /// from `eip712FieldRules` — they are part of what the type authorises, so a reader of the list must
2517
+ /// not have to make a second call to learn them. The row type is `Eip712TypeView`.
2518
+ listEip712Types: (start: nat, limit: nat) -> (Result_41) query;
2519
+ /// ⟨2026-10-21, round 11 c⟩ Guardians' disputes, oldest first. Same visibility as
2520
+ /// `listRepudiations` and `listRecordNotes`: the owner and ACTIVE guardians read the rows; an
2521
+ /// agent gets an empty page whose `withheld` counts them (ruling 16 B holds — a dispute is the
2522
+ /// guardian's entry, not the agent's); a stranger, a pending guardian and the anonymous caller are
2523
+ /// refused.
2524
+ listGuardianDisputes: (start: nat, limit: nat) -> (Result_40) query;
2216
2525
  /// Accessible by owner and guardians.
2217
2526
  ///
2218
2527
  /// Refusal reason carried over from the trap, because it is the sharpest example of why this
2219
2528
  /// surface may not fail soft: `[]` reads as "this engram has nobody who can freeze payments or
2220
2529
  /// pause writes" — a claim about who can STOP it. A caller who cannot tell that from "you may not
2221
2530
  /// see the roster" has been told the engram is unguarded when it may be fully guarded.
2222
- listGuardians: (start: nat, limit: nat) -> (Result_32) query;
2531
+ listGuardians: (start: nat, limit: nat) -> (Result_39) query;
2223
2532
  /// The export receipts in the retained log at or above `startSeq`, oldest first.
2224
2533
  ///
2225
2534
  /// ⟨0.16.0, L3⟩ ONE LIST, ONE QUESTION. This method used to return receipts AND checkpoints
@@ -2235,7 +2544,7 @@ type Engram =
2235
2544
  ///
2236
2545
  /// Read `MemoryRouter.ReceiptPage` before reading `page.total` as a receipt count. It is not one;
2237
2546
  /// it is the chain's length, and the declaration says why.
2238
- listMemoryExportReceipts: (startSeq: nat, max: nat) -> (Result_31) query;
2547
+ listMemoryExportReceipts: (startSeq: nat, max: nat) -> (Result_38) query;
2239
2548
  /// ⟨0.16.0⟩ THE `withheld` EXEMPLAR — L1 names this exact method as the defect it fixes.
2240
2549
  ///
2241
2550
  /// A non-owner's answer silently dropped every `config/` and `secrets/` row. Not "refused the
@@ -2251,7 +2560,16 @@ type Engram =
2251
2560
  /// Note the count is computed from the unfiltered list before slicing, so it reports rows hidden
2252
2561
  /// by POLICY, never rows merely off the end of this page — those are `total`'s job. Conflating
2253
2562
  /// the two would rebuild the ambiguity in a new place.
2254
- listMemoryFiles: (start: nat, limit: nat) -> (Result_30) query;
2563
+ ///
2564
+ /// ⟨2026-10-21, the owner's round-11 answer k: an author on every file row⟩ Each row also
2565
+ /// carries `lastModifiedBy` (`Types.MemoryFileRow`): the key that wrote the file's current
2566
+ /// version, so a phone's file list can say "changed 2 h ago by Recorder" without a read per
2567
+ /// file. It is what `readMemory` already serves to the same callers under the same gate, so it
2568
+ /// tells no caller anything it could not read. Born `opt` (ADR-0018 rule 1). Looked up only for
2569
+ /// the rows of THIS page (`MemoryRouter.info`), after the slice, so the cost is one lookup per
2570
+ /// row served, never one per file stored. A WIDENED REPLY: a reader that decodes the row by
2571
+ /// position rather than by field name breaks — none in this repository does.
2572
+ listMemoryFiles: (start: nat, limit: nat) -> (Result_37) query;
2255
2573
  /// One page of the memory log, seq-ordered, optionally narrowed to one author.
2256
2574
  ///
2257
2575
  /// THE WINDOW IS THE CURSOR, and the page now states it. The window is
@@ -2277,7 +2595,7 @@ type Engram =
2277
2595
  /// with the disclosures that make the page verifiable — the hidden-bound defect the census itself
2278
2596
  /// names on previewCondense's row.
2279
2597
  listMemoryLog: (startSeq: nat, max: nat, authorFilter: opt principal) ->
2280
- (Result_29) query;
2598
+ (Result_36) query;
2281
2599
  /// The caller's OWN spend-approval requests. ⟨0.16.0, L1 + L3 — fixed 2026-08-18⟩
2282
2600
  ///
2283
2601
  /// Two defects in seven lines, and the first is the one this release exists to remove:
@@ -2294,7 +2612,7 @@ type Engram =
2294
2612
  /// to see, so `total` over their own rows is the honest count and nothing is hidden FROM them.
2295
2613
  /// (The unbounded MAP is filed separately — pruning an approval record destroys evidence of what
2296
2614
  /// was asked, which is a retention ruling rather than a shape fix.)
2297
- listMyApprovalRequests: (start: nat, limit: nat) -> (Result_28) query;
2615
+ listMyApprovalRequests: (start: nat, limit: nat) -> (Result_35) query;
2298
2616
  /// The payer's own sessions, live ones first. PAYER-SCOPED: a caller sees only their own, which
2299
2617
  /// is why this needs no role — a session id is not a secret from the person who paid for it.
2300
2618
  ///
@@ -2303,7 +2621,7 @@ type Engram =
2303
2621
  /// It took no arguments, and a cursor added after the freeze is an argument-list change every
2304
2622
  /// client would break on — the market paged its own pending withdrawals before its cut for the
2305
2623
  /// same reason. The order is the order sessions were opened.
2306
- listMySessions: (start: nat, limit: nat) -> (Result_27) query;
2624
+ listMySessions: (start: nat, limit: nat) -> (Result_34) query;
2307
2625
  ///
2308
2626
  /// ⟨0.16.0, L3⟩ Paged and enveloped like every other `list*`, and the envelope here is uniformity
2309
2627
  /// rather than gating: this method cannot refuse anybody, so `#Err` is unreachable on it. That is
@@ -2316,7 +2634,7 @@ type Engram =
2316
2634
  /// asked by strangers. `verifyEngramActiveOwner` on the registry answers only about the owner
2317
2635
  /// IT recorded, so this chain is what a caller composes with when currency matters — which it
2318
2636
  /// cannot do if it needs a role here.
2319
- listOwnershipTransfers: (start: nat, limit: nat) -> (Result_26) query;
2637
+ listOwnershipTransfers: (start: nat, limit: nat) -> (Result_33) query;
2320
2638
  /// ⟨2026-09-29, the platform's question from the build review⟩ OWNER-ONLY: how many payment
2321
2639
  /// signatures each agent has obtained today, and the daily limit (200, `PaymentSignCap`). The
2322
2640
  /// owner's console stated the rule and showed no number, because nothing served one; a number it
@@ -2332,7 +2650,7 @@ type Engram =
2332
2650
  /// marketplace's one shared count today is in the reply's `marketplace` field, with the limit this
2333
2651
  /// engram enforces for it — beside the agents, never a row among them
2334
2652
  /// (`PaymentSignCap.marketplaceRow`). Null when no marketplace is set.
2335
- listPaymentSignatureCounts: (start: nat, limit: nat) -> (Result_25) query;
2653
+ listPaymentSignatureCounts: (start: nat, limit: nat) -> (Result_32) query;
2336
2654
  /// Agent records removed by a reset. Each row is a NAMED record with the fields `principal`,
2337
2655
  /// `name`, `registeredAt` and `purgedAt` — read them BY NAME, never by position.
2338
2656
  /// ⟨2026-09-29, the vocabulary ruling: pairing is the one verb that admits an agent⟩ The field
@@ -2372,7 +2690,7 @@ type Engram =
2372
2690
  /// `invite` its enrolment named, and `ended` — why and on what day its engagement ended (its own
2373
2691
  /// earlier ending, or the reset) — the facts `resyncAgentEdges` re-sends. The stored rows are
2374
2692
  /// served as they are.
2375
- listPurgedAgents: (start: nat, limit: nat) -> (Result_24) query;
2693
+ listPurgedAgents: (start: nat, limit: nat) -> (Result_31) query;
2376
2694
  /// ⟨0.16.0⟩ ONE ACCESSOR, folding `readReadLog` and `getDenialLog` — and the fold only became
2377
2695
  /// safe because of a change made earlier in this same leg.
2378
2696
  ///
@@ -2434,7 +2752,13 @@ type Engram =
2434
2752
  /// on the chained record — the same `RecordView` filter, and `withheld` counts what it removed
2435
2753
  /// together with what `successFilter` removed. WHAT WOULD MAKE THIS WRONG: see `listAuditEntries`.
2436
2754
  listReadLog: (successFilter: opt bool, start: nat, limit: nat) ->
2437
- (Result_23) query;
2755
+ (Result_30) query;
2756
+ /// ⟨2026-10-21, round 11 b⟩ The owner's notes, oldest first. Same visibility as
2757
+ /// `listRepudiations`, for the same reason: the owner and ACTIVE guardians read the rows; an agent
2758
+ /// reads only the entries it caused (follow-up 16 B), and every note is the owner's, so an agent
2759
+ /// gets an empty page whose `withheld` counts the notes in its window — never "there are none". A
2760
+ /// stranger, a pending guardian and the anonymous caller are refused.
2761
+ listRecordNotes: (start: nat, limit: nat) -> (Result_29) query;
2438
2762
  /// Same visibility as listAuditEntries: the owner, this engram's agents, and ACTIVE guardians
2439
2763
  /// see disputes. An unauthorized read REFUSES — it does not return an empty list, because an
2440
2764
  /// empty list reads as "no disputes have been filed", which is a claim, not an absence of one.
@@ -2449,7 +2773,16 @@ type Engram =
2449
2773
  /// window — which says disputes exist without showing them, never "none have been filed". WHAT
2450
2774
  /// WOULD MAKE THIS WRONG: a ruling that an agent may see the disputes of its own writes; this would
2451
2775
  /// then have to look up each disputed version's writer, which it does not do today.
2452
- listRepudiations: (start: nat, limit: nat) -> (Result_22) query;
2776
+ listRepudiations: (start: nat, limit: nat) -> (Result_28) query;
2777
+ /// ⟨2026-10-21, the owner's round-11 answer f⟩ OWNER-ONLY: the sign-ins, each with the name its app
2778
+ /// registered. The same tokens, in the same order and paged the same way, as `listBearerTokens`,
2779
+ /// each beside `clientName` — the RFC 7591 `client_name` the app registered when the token was
2780
+ /// issued (`People.SignIn` says when it is null, and that it is the app's own claim). A phone
2781
+ /// owner read "localhost" for every app signed in through a local bridge and could not tell two
2782
+ /// apps apart. A NEW method rather than a field on `BearerToken`: that record is stored (M0170)
2783
+ /// and `listBearerTokens`' reply is shipped (never widened). An agent, a guardian, a stranger and
2784
+ /// the anonymous caller are refused, by `listBearerTokens`' own gate and for its reason.
2785
+ listSignIns: (start: nat, limit: nat) -> (Result_27) query;
2453
2786
  /// Owner: advance the review cursor — "I have seen everything up to and including uptoAuditId"
2454
2787
  /// (null = everything at the current head). Bounded so the attestation can never cover entries
2455
2788
  /// the console did not render; clamped monotonic (the cursor never moves backward) and to the
@@ -2459,13 +2792,31 @@ type Engram =
2459
2792
  /// (every family qualifiesForReview admits is written to auditLogger, so they share that space),
2460
2793
  /// and this never inspects an operation or a role. Widening what the review shows therefore
2461
2794
  /// changes only which ids the console can pass here — it cannot desynchronise the cursor.
2462
- markAgentWritesReviewed: (uptoAuditId: opt nat) -> (Result_8);
2795
+ markAgentWritesReviewed: (uptoAuditId: opt nat) -> (Result_14);
2796
+ /// ⟨2026-10-21, the owner's round-11 answer g⟩ AN AGENT READS ITS OWN GRANT — to the calling key
2797
+ /// only (`People.AgentGrant`): what it may read, where it may write, its rate, and the payment
2798
+ /// limits enforced against that key. It reveals nothing a refusal does not already say, and lets
2799
+ /// an agent correct itself before it writes rather than after the owner explains a refusal by
2800
+ /// hand. `getSpendPolicy` and `listAgents` stay owner-only; this answers one row, the caller's.
2801
+ ///
2802
+ /// WHO: an ACTIVE agent (`Gated.authorize(#agentOrOwner)`). Refused, each by its own text: the
2803
+ /// owner by name (`People.OWNER_HAS_NO_GRANT`), a revoked or resigned agent ("Agent is revoked" /
2804
+ /// "Agent has resigned" — an ended agent may do nothing, and its old grant would read as powers),
2805
+ /// a guardian and a stranger ("Not authorized"), the anonymous caller. A query: it writes nothing.
2806
+ ///
2807
+ /// ⟨2026-10-29, the owner's ruling "b: fix"⟩ It also says whether the payments brake is on and what
2808
+ /// the key could pay now (`paymentsFrozen`, `paymentsNow`), read from the values `x402SignFor`
2809
+ /// checks — the brake, the key's policy and stored total, the engram-wide ceiling and total — so
2810
+ /// the caps alone no longer read as money an agent can spend. `People.SpendState` names each one.
2811
+ /// ⟨2026-10-29, review F2⟩ And which whole-key refusal stops every payment now, if one does
2812
+ /// (`paymentsStoppedBy`: the brake, the signing floor, the daily count of payment signatures).
2813
+ myGrant: () -> (Result_26) query;
2463
2814
  /// The AGENT's current key nominates the key that will replace it. Nothing moves yet: the new
2464
2815
  /// key must accept, by its own call, within 24 hours (`acceptAgentKeyNomination`). One pending
2465
2816
  /// nomination per agent — a new one replaces the earlier one, and the record says which. Refused,
2466
2817
  /// with nothing changed, for a caller that is not an active agent here and for a key that could
2467
2818
  /// not hold the record (`KeyReplacement.nomineeRefusal`).
2468
- nominateAgentKey: (newKey: principal) -> (Result_1);
2819
+ nominateAgentKey: (newKey: principal) -> (Result_2);
2469
2820
  /// An AGENT paired here asks this engram to open an engram of its own. This engram attaches 1.3 T of
2470
2821
  /// its own cycles to the registry's `sysSpawnChild`; the agent's lasting key owns what is opened, and
2471
2822
  /// the engram is recorded as opened through this one. Answers the new engram's canister id.
@@ -2494,15 +2845,15 @@ type Engram =
2494
2845
  ///
2495
2846
  /// WHAT WOULD MAKE THIS WRONG: an await added between `ChildAllowance.take` and the registry call; the
2496
2847
  /// registry's `CHILD_MIN_ATTACHED_CYCLES` moving without `CHILD_ATTACH_CYCLES`.
2497
- openChildEngram: () -> (Result_21);
2498
- openSession: (config: SessionConfig, sig: PaymentSignature) -> (Result_20);
2848
+ openChildEngram: () -> (Result_25);
2849
+ openSession: (config: SessionConfig, sig: PaymentSignature) -> (Result_24);
2499
2850
  /// Withdraw tokens to the owner's principal. This is the ONLY way to
2500
2851
  /// move tokens out of the engram to an external address, and the
2501
2852
  /// destination is always hardcoded to the owner.
2502
2853
  /// NOT freeze-gated: the owner always controls their own funds.
2503
2854
  /// Guardian freeze only blocks agent/public operations.
2504
2855
  ownerWithdraw: (amount: TokenAmount, ownerAuth: opt ActionAuth) ->
2505
- (Result_8);
2856
+ (Result_14);
2506
2857
  /// ⟨0.16.0⟩ `payRentFromEarnings` DELETED — ruled TWICE (B1 and B2), and it was the single
2507
2858
  /// clearest violation of the OSS/platform split in this repo.
2508
2859
  ///
@@ -2560,10 +2911,13 @@ type Engram =
2560
2911
  pairAgent: (arg: record {
2561
2912
  code: text;
2562
2913
  enrolment: Enrolment;
2563
- }) -> (Result_19);
2914
+ }) -> (Result_23);
2564
2915
  /// ⟨0.16.0, L2.2 — renamed from `guardianPauseWrites`⟩ Same correction as freezePayments above:
2565
2916
  /// owner-or-guardian, and `resumeWrites` never carried the prefix either.
2566
- pauseWrites: () -> (Result_1);
2917
+ pauseWrites: () -> (Result_2);
2918
+ /// ⟨2026-10-21, the owner's round-11 answer d⟩ `pauseWrites` with a reason; everything said of
2919
+ /// `freezePaymentsWithReason` holds, with `canPauseWrites` as the guardian's grant.
2920
+ pauseWritesWithReason: (reason: text) -> (Result_2);
2567
2921
  /// What condensing through `toSeq` would do, and whether it is unlocked. COMMITS NOTHING — it is
2568
2922
  /// a query, so it structurally cannot; a preview that wrote would be its own trap.
2569
2923
  ///
@@ -2582,7 +2936,7 @@ type Engram =
2582
2936
  ///
2583
2937
  /// `unlocked` is the export-receipt gate ONLY. It is not a promise the condense will land: the
2584
2938
  /// history-budget delta is checked at commit time and can still refuse a short prefix.
2585
- previewCondense: (toSeq: nat) -> (Result_18) query;
2939
+ previewCondense: (toSeq: nat) -> (Result_22) query;
2586
2940
  /// A quote for a session this caller has not opened and is not committed to — the intent a
2587
2941
  /// buyer signs against. Pure dry run, no state, no funds.
2588
2942
  ///
@@ -2610,6 +2964,27 @@ type Engram =
2610
2964
  /// ⟨2026-10-02⟩ Answers the house `Types.SessionIntent` — ic402's intent with `expiry` spelled
2611
2965
  /// `expiryNs`. Same value, same meaning; only the name carries the unit now.
2612
2966
  previewOpenSession: () -> (SessionIntent) query;
2967
+ /// ⟨2026-10-21, the owner's round-11 answer k: a trim preview⟩ What a PROPOSED history policy
2968
+ /// would remove from the store as it stands — "about N old copies in F files would be removed" —
2969
+ /// asked BEFORE the owner saves it. A query: nothing is saved, armed or evicted.
2970
+ ///
2971
+ /// WHO: the OWNER only (`#ownerOnly`). An agent, a guardian, a stranger and the anonymous caller
2972
+ /// are each refused with `requireOwner`'s words; the setter it previews is owner-only too.
2973
+ ///
2974
+ /// HOW: the proposal must pass the setter's own checks (`retentionEntriesRefusal`), so the preview
2975
+ /// never answers for a policy the setter would refuse. The guards a save would arm are computed
2976
+ /// exactly as the setter computes them (`RetentionPolicy.armGuards`), and each file is planned by
2977
+ /// the planner the sweep executes (`MemoryRouter.previewEviction` → `Retention.plan`), as the
2978
+ /// owner (the sweep's `maintainPrincipal`), AT THE INSTANT its guard lets go — so a rule that
2979
+ /// waits 14 days is counted as it will stand then, when the agent floor has released more. Per
2980
+ /// rule: copies, files, bytes and `notBeforeNs`. The count is "about": writes before the rule
2981
+ /// takes effect change it.
2982
+ /// HONEST WHEN CUT SHORT: `complete = false` when the planning budget
2983
+ /// (`MemoryRouter.PREVIEW_MAX_DROPS`) ran out — the totals are then a floor, and say so.
2984
+ previewRetention: (entries: vec record {
2985
+ text;
2986
+ RetentionClassSpec;
2987
+ }) -> (Result_21) query;
2613
2988
  /// Read one memory file at its current version.
2614
2989
  ///
2615
2990
  /// Gated on the `read_memory` permission, so an agent holding that grant reaches it — unlike
@@ -2624,7 +2999,7 @@ type Engram =
2624
2999
  /// counter here could never persist; read counting lives on the update path
2625
3000
  /// (`sessionReadContext` and the MCP reads). A caller measuring engram usage from this method
2626
3001
  /// will measure nothing.
2627
- readMemory: (path: text) -> (Result_11) query;
3002
+ readMemory: (path: text) -> (Result_12) query;
2628
3003
  /// Read many paths in one call. Per-path Results are KEPT — partial success is the point, and
2629
3004
  /// one unreadable path must not fail the other nine.
2630
3005
  ///
@@ -2640,7 +3015,7 @@ type Engram =
2640
3015
  /// Both are now what they are: a single `#Err` for the whole call. `#Ok` still carries a row per
2641
3016
  /// path, each with its own Result — a refused RESERVED path sits beside a readable one, which is
2642
3017
  /// a genuine per-path fact.
2643
- readMemoryBatch: (paths: vec text) -> (Result_17) query;
3018
+ readMemoryBatch: (paths: vec text) -> (Result_20) query;
2644
3019
  /// ⟨0.16.0⟩ `getMemoryRetentionGuards` DELETED — folded into `getMemoryRetentionPolicy` above.
2645
3020
  /// It was the second L2.1 array-returning `get*`, and separating it from the policy it modifies
2646
3021
  /// was the defect described there. Its own docs are preserved at the fold site.
@@ -2651,7 +3026,7 @@ type Engram =
2651
3026
  /// see it cannot know whether it has the whole range, which is how silent truncation gets
2652
3027
  /// reintroduced. Loop while `more` is true, advancing by the bytes actually returned.
2653
3028
  readMemoryBytes: (path: text, offset: nat, len: nat, version: opt nat) ->
2654
- (Result_16) query;
3029
+ (Result_19) query;
2655
3030
  /// The escrow exit for a session whose settle cannot pay.
2656
3031
  ///
2657
3032
  /// PAYER-ONLY, enforced inside the gateway, and deliberately not owner-triggered: the payer's own
@@ -2706,7 +3081,15 @@ type Engram =
2706
3081
  /// the transfer pays its own fee from the escrow. A session still reads `closing` only when its
2707
3082
  /// close trapped after one of its awaits, or an earlier version left it there, and of that one the
2708
3083
  /// line above still holds.
2709
- recoverEscrow: (sessionId: text, amountE6: nat) -> (Result_8);
3084
+ ///
3085
+ /// ⟨2026-10-07, the owner's decision of that day⟩ WHAT IT ANSWERS: what came back. `amountE6` is
3086
+ /// the ckUSDC base units transferred to the payer's own account (the amount asked, capped at the
3087
+ /// session's unconsumed deposit; the transfer's fee comes out of the escrow on top), and
3088
+ /// `blockIndex` is the ledger block of that transfer. Until this date it answered a bare `nat` that
3089
+ /// was the block index alone, which read as the amount. If the session's record is removed before
3090
+ /// the amount can be read back — a session closed in the same moment as the recovery and cleaned up
3091
+ /// during its transfer — it answers `#Other` naming the block, never a guessed amount.
3092
+ recoverEscrow: (sessionId: text, amountE6: nat) -> (Result_18);
2710
3093
  /// ⟨0.16.0, L1⟩ A REDEMPTION PATH, where the arm choice is a disclosure decision.
2711
3094
  ///
2712
3095
  /// Four of these refusals are about the CODE and one is about the caller. The code arms restate
@@ -2720,13 +3103,16 @@ type Engram =
2720
3103
  /// rather than `()`. The new guardian learns, in the same reply, the name and permissions the
2721
3104
  /// owner's invite gave them and that they cannot act until approved; before, that took a second
2722
3105
  /// read they had no reason to know to make.
2723
- registerGuardian: (code: text) -> (Result_15);
3106
+ registerGuardian: (code: text) -> (Result_17);
2724
3107
  /// Remove a per-caller override so that caller reverts to — and keeps TRACKING — the global caps.
2725
3108
  ///
2726
3109
  /// It travels with its pair and is never dropped alone: without it the only way "back" from an
2727
3110
  /// override is to overwrite it with a frozen copy of the global policy, which then stops
2728
3111
  /// following later changes. That makes every override permanent in effect.
2729
- removeCallerSpendPolicy: (caller: principal) -> (Result_1);
3112
+ removeCallerSpendPolicy: (caller: principal) -> (Result_2);
3113
+ /// ⟨2026-10-14, 4A⟩ Remove a destination from one action's list. Instant, and NOT freeze-gated:
3114
+ /// removal TIGHTENS, and a frozen engram must still be able to shrink what it could sign to.
3115
+ removeEip712Destination: (typeId: blob, value: text) -> (Result_2);
2730
3116
  /// De-register a type that has NEVER SIGNED. Exists because of a hazard the first external
2731
3117
  /// validation found within hours (consumer report, 2026-08-06): a bare-name #standard registration —
2732
3118
  /// cheap, no watcher preconditions — permanently blocked the guarded namespaced registration
@@ -2736,8 +3122,9 @@ type Engram =
2736
3122
  /// removes only authority that was never exercised, which is removing nothing but the mistake.
2737
3123
  /// NOT freeze-gated, same reasoning as removeEvmWithdrawDestination: this is TIGHTENING, and a
2738
3124
  /// frozen engram must still be able to shrink what it could sign.
2739
- removeEip712Type: (typeId: blob) -> (Result_1);
2740
- removeEvmWithdrawDestination: (dest: text) -> (Result_1);
3125
+ /// ⟨2026-10-14⟩ `removeEvmWithdrawDestination` is now `removeEip712Destination` (ruling 4A); same
3126
+ /// reasoning. Removing a type now also drops its rules and its own destination list.
3127
+ removeEip712Type: (typeId: blob) -> (Result_2);
2741
3128
  /// Owner-only: remove a guardian from the roster.
2742
3129
  ///
2743
3130
  /// Unlike revoking an agent this is NOT terminal for the principal — the guardian roster does
@@ -2746,12 +3133,23 @@ type Engram =
2746
3133
  ///
2747
3134
  /// `#NotFound` rather than `#Refused` when there is no such guardian: only the owner reaches this
2748
3135
  /// line, so the roster is theirs and its contents are not a secret being withheld from them.
2749
- removeGuardian: (guardianPrincipal: principal) -> (Result_1);
3136
+ removeGuardian: (guardianPrincipal: principal) -> (Result_2);
3137
+ /// ⟨2026-10-21, the owner's round-11 answer a⟩ OWNER-ONLY: give an agent a new name. A name was
3138
+ /// fixed at the invite, and two agents both called "agent" is how the 2026-10-20 session started.
3139
+ /// Only the VALUE of the stored `AgentRecord.name` changes — no new state, no reshaped record —
3140
+ /// and the change is on the record as `agent.rename` (`principal=<key> name=<new name>`, the name
3141
+ /// last). An ended agent may be renamed too (`People.renameTarget` says why).
3142
+ /// Refused: an agent (itself included), a guardian and a stranger by `requireOwner`'s "Not owner",
3143
+ /// the anonymous caller by its own text; a name that is empty, over `MAX_NAME_LENGTH` or holds a
3144
+ /// line break is `#Invalid` (`People.nameRefusal`); an unknown key is `#NotFound`; the agent's
3145
+ /// current name is `#Conflict`. Nothing changes on any refusal. Not alerted: the owner is the one
3146
+ /// renaming (`ActionAlerts.classify` answers null for `agent.rename`).
3147
+ renameAgent: (agentPrincipal: principal, name: text) -> (Result_2);
2750
3148
  /// Owner disavows a specific memory write, in the open. Marks — never deletes: the content and
2751
3149
  /// the original audit entry stay exactly where they were; this appends a chained
2752
3150
  /// `memory.repudiate` entry and lists the (path, version) so readers can see the dispute.
2753
3151
  repudiateMemoryWrite: (path: text, version: nat, reason: text) ->
2754
- (Result_8);
3152
+ (Result_14);
2755
3153
  /// ⚠ OWNER-ONLY BULK RESET. Destructive, and wider than its name suggests.
2756
3154
  ///
2757
3155
  /// It severs EVERY grant surface that can outlive a role — agents, guardians, invites and
@@ -2779,7 +3177,7 @@ type Engram =
2779
3177
  /// NOT unbounded. It caps at MAX_ENTRIES and trims its oldest tenth on overflow, so on any engram
2780
3178
  /// long-lived enough for the rent model to apply, the reset entry is not guaranteed to still be
2781
3179
  /// there. `agentPurgeLog` is the evidence that does not age out — which is why it exists.
2782
- resetEngram: () -> (Result_14);
3180
+ resetEngram: () -> (Result_16);
2783
3181
  /// ⟨2026-09-28, owner decision: an agent can resign from an engram, and the resignation is
2784
3182
  /// recorded⟩ The AGENT ends its own engagement with this engram.
2785
3183
  ///
@@ -2798,11 +3196,11 @@ type Engram =
2798
3196
  /// The roster change and its chained audit line commit BEFORE the registry is told, so a registry
2799
3197
  /// that is down cannot leave the agent half-resigned; a missed notice is logged by
2800
3198
  /// `notifyRegistryAgentEdge`. WHAT WOULD MAKE THIS WRONG: a second path that sets `#Resigned`.
2801
- resignAgent: () -> (Result_1);
3199
+ resignAgent: () -> (Result_2);
2802
3200
  /// OWNER-ONLY release of the write pause, with the same one-way shape as `unfreezePayments`: a
2803
3201
  /// guardian holding `canPauseWrites` can stop writes without the owner and cannot restart them,
2804
3202
  /// and the owner can always restart them. A tripwire rather than a lock.
2805
- resumeWrites: () -> (Result_1);
3203
+ resumeWrites: () -> (Result_2);
2806
3204
  /// Self-heal: re-send every ACTIVE agent's start to the spawning registry (idempotent — the
2807
3205
  /// registry mints no duplicate for an open engagement), for when a notice was missed. Owner-only.
2808
3206
  /// Returns how many the registry ACKNOWLEDGED. ⟨2026-09-28: it used to count sends that did not
@@ -2825,11 +3223,11 @@ type Engram =
2825
3223
  /// all that is left to send is the ending, and the registry has nothing to end. The report lists
2826
3224
  /// each such engagement under `cannotBeRecorded` (key, root, invite, and how and when it ended),
2827
3225
  /// apart from `notRecorded`, so the owner sees them rather than silence.
2828
- resyncAgentEdges: () -> (Result_13);
3226
+ resyncAgentEdges: () -> (Result_15);
2829
3227
  /// Return to managed custody: the engram adds the registry back as a controller ALONGSIDE the
2830
3228
  /// owner — it does not remove the owner. The inverse of `claimSovereignty`, and the reason
2831
3229
  /// sovereignty is not a one-way door.
2832
- returnToManaged: () -> (Result_1);
3230
+ returnToManaged: () -> (Result_2);
2833
3231
  /// Replace the whole content of an EXISTING file.
2834
3232
  ///
2835
3233
  /// This is the one thing agents could never do before: every agent write was an append,
@@ -2862,7 +3260,7 @@ type Engram =
2862
3260
  /// human means a different wallet.
2863
3261
  ///
2864
3262
  /// To narrow what an agent may do rather than end its access, use `setAgentPermissions`.
2865
- revokeAgent: (agentPrincipal: principal) -> (Result_1);
3263
+ revokeAgent: (agentPrincipal: principal) -> (Result_2);
2866
3264
  /// Owner-only panic button: revoke EVERY active agent at once. Returns how many were revoked.
2867
3265
  ///
2868
3266
  /// ⚠ IT REVOKES ONLY AGENTS. Invites and connector bearer tokens are separate surfaces with
@@ -2879,7 +3277,7 @@ type Engram =
2879
3277
  /// written, and only then does it await one notification per revoked agent. So a notification
2880
3278
  /// that fails leaves the agents revoked here regardless — a partial notify is not a partial
2881
3279
  /// revocation, which is the direction that matters for a panic button.
2882
- revokeAllAgents: () -> (Result_8);
3280
+ revokeAllAgents: () -> (Result_14);
2883
3281
  /// Owner-only panic button: revoke every connector bearer token at once. Returns how many.
2884
3282
  ///
2885
3283
  /// The THIRD independent surface — hosted connectors authenticate with bearer tokens, not with
@@ -2888,7 +3286,7 @@ type Engram =
2888
3286
  /// holding a live session.
2889
3287
  ///
2890
3288
  /// Tokens are re-issuable: revoking them is not permanent the way revoking an agent is.
2891
- revokeAllBearerTokens: () -> (Result_8);
3289
+ revokeAllBearerTokens: () -> (Result_14);
2892
3290
  /// ⟨0.16.0⟩ `removeAllGuardians` DELETED — test-only (L6), and verified NOT part of KILL-SWITCH's
2893
3291
  /// mass-revoke set. The destructive phase-07 suite iterates `removeGuardian` instead, so nothing
2894
3292
  /// loses a capability: what dies is a bulk spelling no runbook ever invoked.
@@ -2900,10 +3298,10 @@ type Engram =
2900
3298
  ///
2901
3299
  /// Unlike revoking an agent, this costs nothing permanently — an invite is a one-time code,
2902
3300
  /// so voiding it and minting a fresh one is the ordinary path.
2903
- revokeAllInvites: () -> (Result_8);
3301
+ revokeAllInvites: () -> (Result_14);
2904
3302
  /// Revoke a bearer token by its public tokenId. Idempotent.
2905
3303
  /// Subsequent /mcp requests using this token will be rejected.
2906
- revokeBearerToken: (tokenId: text) -> (Result_1);
3304
+ revokeBearerToken: (tokenId: text) -> (Result_2);
2907
3305
  /// ⟨0.16.0, census §10 item 16⟩ RETURNS A REAL RECEIPT, not `R<()>` — same reason as the delete
2908
3306
  /// above, and sharper here: a rollback WRITES A NEW VERSION, so the caller's next question is
2909
3307
  /// always "which version am I on now". `r.version` was already read for the audit line.
@@ -2926,14 +3324,7 @@ type Engram =
2926
3324
  /// `#Conflict` rather than `#Refused` for a `#Revoked` or `#Resigned` record: the caller IS the
2927
3325
  /// agent on that record, so its standing is not the problem — the record's state is. An
2928
3326
  /// agent reading `#Refused` would go looking for a permission that was never missing.
2929
- rotateAgentKeyHash: (newPublicKeyHash: text) -> (Result_1);
2930
- /// One-time onboarding seed: writes a starter file so the first read-back is non-empty.
2931
- ///
2932
- /// Owner-only, and it REFUSES once any memory exists — so it can only ever add the initial
2933
- /// placeholder and can never overwrite real content. Deliberately NOT counted as a write (no
2934
- /// `totalMemoryWrites`, no `firstWriteAt`): it is a system seed rather than activity, and
2935
- /// counting it would corrupt both the write metrics and time-to-first-write for every engram.
2936
- seedMemory: (path: text, content: blob) -> (Result);
3327
+ rotateAgentKeyHash: (newPublicKeyHash: text) -> (Result_2);
2937
3328
  /// Append to a memory file against a PAID x402 session voucher — the write half of the paid rail,
2938
3329
  /// authorized by the voucher rather than by a role.
2939
3330
  /// ⟨2026-09-30, ic402 2.17.0⟩ Authorized by the payer's own call with the voucher: only the
@@ -2977,7 +3368,7 @@ type Engram =
2977
3368
  /// ⚠ RAW STORED BYTES, like `readMemoryBatch`. On a Private (encrypted) engram the content is
2978
3369
  /// CIPHERTEXT; the key-holding SDK decrypts it. A caller without the key gets bytes it cannot
2979
3370
  /// read, not an error.
2980
- sessionReadContext: (clientLabel: text) -> (Result_12);
3371
+ sessionReadContext: (clientLabel: text) -> (Result_13);
2981
3372
  /// Read one memory file against a PAID x402 session voucher. No role, no invite — the voucher is
2982
3373
  /// the authorization, which is what makes this the engram's one rail a stranger can pay to use.
2983
3374
  ///
@@ -3007,14 +3398,15 @@ type Engram =
3007
3398
  /// session must not be the side door: without this guard a stranger holding a fraction-of-a-
3008
3399
  /// cent voucher could read `secrets/*`.
3009
3400
  /// · Payments are frozen on this engram.
3010
- sessionReadMemory: (voucher: Voucher, path: text) -> (Result_11);
3401
+ sessionReadMemory: (voucher: Voucher, path: text) -> (Result_12);
3011
3402
  /// Configure action alerts: an https webhook that receives new chained-audit entries matching the
3012
3403
  /// enabled event classes (money / approvals / guardian / agentWrites), batched, at most one
3013
- /// POST per minute. Owner-only. Payloads carry audit METADATA (operation, caller, role, bounded
3404
+ /// POST per minute. ⟨2026-10-29⟩ Delivered within seconds of the action (a 5 s batch window), and
3405
+ /// nothing runs while nothing is owed. Owner-only. Payloads carry audit METADATA (operation, caller, role, bounded
3014
3406
  /// details) — never memory file contents. Setting a URL (re)arms delivery FROM NOW: the cursor
3015
3407
  /// jumps to the current end of the log so history is not replayed. Passing url = null disables.
3016
3408
  /// The URL itself is never written to the audit log (webhook URLs often embed secret tokens).
3017
- setActionAlertConfig: (cfg: AlertConfig) -> (Result_1);
3409
+ setActionAlertConfig: (cfg: AlertConfig) -> (Result_2);
3018
3410
  /// Owner-only: replace an existing agent's permission set. The way to NARROW what an agent
3019
3411
  /// may do without ending their access — `revokeAgent` is terminal for that principal, this is
3020
3412
  /// not.
@@ -3030,7 +3422,7 @@ type Engram =
3030
3422
  /// forward is to grant read to your own agents instead, or to switch to Connected mode first —
3031
3423
  /// both of which the message says.
3032
3424
  setAgentPermissions: (agentPrincipal: principal, permissions:
3033
- AgentPermissions) -> (Result_1);
3425
+ AgentPermissions) -> (Result_2);
3034
3426
  /// Paths an agent holding a grant may REVISE rather than only append to.
3035
3427
  ///
3036
3428
  /// Matching is EXACT, except that an entry ending in "/" grants everything beneath it. A grant
@@ -3038,7 +3430,7 @@ type Engram =
3038
3430
  /// real use case is rotating dated files under a prefix, and per-file grants would be unusable
3039
3431
  /// for that. What a bare prefix would do — "MEMORY.md" also matching "MEMORY.md.bak" — is the
3040
3432
  /// kind of accident a permission surface must not have.
3041
- setAgentRevisablePaths: (paths: vec text) -> (Result_1);
3433
+ setAgentRevisablePaths: (paths: vec text) -> (Result_2);
3042
3434
  /// ⟨0.16.0 — census row⟩ Returns the APPLIED config, which is how this closes the
3043
3435
  /// setter-without-a-getter gap without adding a method: the write is the read.
3044
3436
  ///
@@ -3047,10 +3439,16 @@ type Engram =
3047
3439
  /// called it an "ops floor: retention enforcement deletes owner backup data silently", mitigated
3048
3440
  /// by a `Debug.print` nobody reads. An owner lowering the cap is destroying their own backups;
3049
3441
  /// they are told how many, in the reply and in the audit line.
3050
- setBackupRetention: (dbType: text, maxBackups: nat) -> (Result_10);
3442
+ ///
3443
+ /// ⟨2026-10-21, the owner's round-11 answers h and m⟩ The number now bounds EACH creator's
3444
+ /// backups of the kind (`Backup.enforceRetention`): an agent's finalize prunes only that agent's
3445
+ /// own, and this setter applies the number to every creator's set, so `prunedBackups` counts
3446
+ /// across all of them. "The write is the read" above went stale for a second phone, which never
3447
+ /// made the write: `getBackupRetention` is the read.
3448
+ setBackupRetention: (dbType: text, maxBackups: nat) -> (Result_11);
3051
3449
  /// Override the caps for ONE caller — an agent this owner trusts more, or less, than the rest.
3052
3450
  setCallerSpendPolicy: (caller: principal, policy: SpendingPolicy) ->
3053
- (Result_1);
3451
+ (Result_2);
3054
3452
  /// Owner-only: set how many engrams `agentPrincipal`'s agent may open of its own through this
3055
3453
  /// engram. Kept by the agent's lasting key, so it carries over a key replacement. Any count is
3056
3454
  /// accepted; the registry lets a lasting key open one engram through a parent, ever, so 1 or more
@@ -3061,7 +3459,7 @@ type Engram =
3061
3459
  /// back. The change is written to the record under `agent.childAllowance.set`, which is in the
3062
3460
  /// alerts' money class (`ActionAlerts.classify`), so an owner or guardian with an alert channel
3063
3461
  /// hears of it.
3064
- setChildAllowance: (agentPrincipal: principal, allowed: nat) -> (Result_1);
3462
+ setChildAllowance: (agentPrincipal: principal, allowed: nat) -> (Result_2);
3065
3463
  /// ⟨0.16.0⟩ `getEncryptedMemoryKeyForEpoch` DELETED — folded into `getEncryptedMemoryKey`'s epoch
3066
3464
  /// argument — see that method for the fold and the `null`-means-CURRENT rule.
3067
3465
  /// Owner-only: turn client-side memory encryption (Private mode) on or off for FUTURE writes.
@@ -3084,7 +3482,7 @@ type Engram =
3084
3482
  ///
3085
3483
  /// Private mode also closes the paid read rail by construction: a paid session holds no key, so
3086
3484
  /// `sessionReadMemory` refuses on an encrypted engram whatever `setPaidMemoryReadEnabled` says.
3087
- setEncryptionEnabled: (enabled: bool) -> (Result_1);
3485
+ setEncryptionEnabled: (enabled: bool) -> (Result_2);
3088
3486
  /// Register the owner's EVM address for withdrawals.
3089
3487
  ///
3090
3488
  /// First set: immediate — no guardian needed.
@@ -3095,13 +3493,18 @@ type Engram =
3095
3493
  ///
3096
3494
  /// The guardian doesn't approve the change — the owner is sovereign.
3097
3495
  /// The guardian's existence is the gate, not their active consent.
3098
- setEvmOwnerAddress: (evmAddress: text) -> (Result_1);
3496
+ setEvmOwnerAddress: (evmAddress: text) -> (Result_2);
3099
3497
  /// A guardian arms their OWN webhook over the guarded engram's audit stream (same event
3100
3498
  /// classes and payload as the owner channel — audit metadata, never memory file contents;
3101
3499
  /// the guardian honesty rail: integrity, not content). Active guardians only. Arming starts
3102
3500
  /// from NOW (no history replay); url = null disarms and frees the slot.
3103
- setGuardianAlertConfig: (cfg: AlertConfig) -> (Result_1);
3104
- /// Per-prefix retention policy. Longest prefix wins; anything unmatched keeps everything.
3501
+ setGuardianAlertConfig: (cfg: AlertConfig) -> (Result_2);
3502
+ /// Per-prefix retention policy. The longest rule that covers a path wins; anything uncovered
3503
+ /// keeps everything.
3504
+ ///
3505
+ /// ⟨2026-10-21, the owner's round-11 answer i⟩ "Covers" is the folder matcher
3506
+ /// (`AgentPaths.covers`, through `RetentionPolicy.resolve`): a rule ending in "/" governs
3507
+ /// everything beneath it, any other rule exactly one path. It was bare text prefix until that day.
3105
3508
  ///
3106
3509
  /// A CHANGE does not take effect immediately, in EITHER direction: every prefix whose EFFECTIVE
3107
3510
  /// class moves is guarded for the same window as the agent floor, so history cannot be
@@ -3113,7 +3516,7 @@ type Engram =
3113
3516
  vec record {
3114
3517
  text;
3115
3518
  RetentionClassSpec;
3116
- }) -> (Result_1);
3519
+ }) -> (Result_2);
3117
3520
  /// Owner-only: open or close the monetized read rail. When disabled (the default), sessionReadMemory
3118
3521
  /// fails closed for every voucher-bearer — selling the owner's memory is opt-in, not the default.
3119
3522
  ///
@@ -3124,26 +3527,26 @@ type Engram =
3124
3527
  ///
3125
3528
  /// `getEngramCard`'s `x402Support` reports THIS flag, so a buyer can read the rail's state before
3126
3529
  /// paying rather than discovering it in a refusal.
3127
- setPaidMemoryReadEnabled: (enabled: bool) -> (Result_1);
3530
+ setPaidMemoryReadEnabled: (enabled: bool) -> (Result_2);
3128
3531
  /// Open or close the paid-memory WRITE rail (RB4). Owner-only, like its read twin.
3129
3532
  ///
3130
3533
  /// Kept as a SEPARATE flag rather than widening `setPaidMemoryReadEnabled` into one switch: an
3131
3534
  /// owner selling read access has not thereby agreed to sell write access, and a single flag makes
3132
3535
  /// the larger permission ride in on the smaller one. Two flags is the shape that lets an owner
3133
3536
  /// say yes to one and no to the other, which is the common case.
3134
- setPaidMemoryWriteEnabled: (enabled: bool) -> (Result_1);
3537
+ setPaidMemoryWriteEnabled: (enabled: bool) -> (Result_2);
3135
3538
  /// ⟨0.16.0, L1⟩ Every validation refusal here is `#Invalid` and the cap is `#Conflict`, and the
3136
3539
  /// split is worth stating once for the whole whole-value-config family below: a malformed path is
3137
3540
  /// the CALLER'S to fix and retrying with a corrected list works, while "max 20" is a property of
3138
3541
  /// this engram that no argument gets around. A caller that cannot tell those apart either edits
3139
3542
  /// forever or gives up on a request that was one character from valid.
3140
- setProtectedPaths: (paths: vec text) -> (Result_1);
3543
+ setProtectedPaths: (paths: vec text) -> (Result_2);
3141
3544
  /// OWNER-ONLY: switch the metrics reader's read of the seat weeks off (`false`) or back on (`true`).
3142
3545
  /// On from birth, by the owner's ruling of 2026-10-02. Off, `sysGetAgentSeatWeeks` refuses the
3143
3546
  /// reader by name, naming this switch; the rows are still kept and the owner still reads them. Each
3144
3547
  /// call is a chained record entry (`metrics.setSeatWeeksReadEnabled`, the new and the old value), so
3145
3548
  /// when the read was on or off is part of the record. Anyone else is refused by name.
3146
- setSeatWeeksReadEnabled: (enabled: bool) -> (Result_1);
3549
+ setSeatWeeksReadEnabled: (enabled: bool) -> (Result_2);
3147
3550
  /// Set the most this engram may spend per day ACROSS EVERY CALLER — five agents, the owner and the
3148
3551
  /// marketplace together. `null` removes the ceiling. ⟨2026-09-28⟩
3149
3552
  /// ⟨CORRECTED 2026-09-29, review finding X-8: "spend" was too wide. The ceiling covers the x402
@@ -3153,6 +3556,10 @@ type Engram =
3153
3556
  /// bounded instead by each registered type's daily count and destination list; and agent-
3154
3557
  /// registration transactions (`signEngramRegistration`), bounded by three per caller per day and
3155
3558
  /// the 500-gwei gas ceiling. Whether the ceiling should cover them is a separate owner question.⟩
3559
+ /// ⟨2026-10-14, the owner's rulings 3A, 4A and 5A⟩ Typed-data signatures are now bounded by each
3560
+ /// registered type's daily count, its per-field rules ("at most N", "must equal X") and ITS OWN
3561
+ /// destination list, and the signing floor (`SigningFloor`) guards them as it guards x402 payments.
3562
+ /// They are still not counted against this ceiling.
3156
3563
  ///
3157
3564
  /// WHY: the owner decided on 2026-09-28 to add one daily spending ceiling across all callers on an
3158
3565
  /// engram and keep the limit of five agents. Every other spending limit is per caller, so without
@@ -3181,7 +3588,7 @@ type Engram =
3181
3588
  /// The record entry `spend.setCeiling` carries the new AND the previous value, so a widening is
3182
3589
  /// distinguishable from a tightening afterwards — the reason `spend.setPolicy` records its limits.
3183
3590
  /// Not blocked by a payments freeze, like `setSpendPolicy`: setting a limit moves no money.
3184
- setSpendCeiling: (maxPerDay: opt nat) -> (Result_1);
3591
+ setSpendCeiling: (maxPerDay: opt nat) -> (Result_2);
3185
3592
  /// Set this engram's spending caps.
3186
3593
  ///
3187
3594
  /// The audit row records the LIMITS, not merely that a change happened, so a WIDENING is
@@ -3191,7 +3598,7 @@ type Engram =
3191
3598
  /// Raising a cap RESOLVES pending approval requests it now covers — that is the second half of
3192
3599
  /// the escalation an agent starts when it hits a limit, and without it the queue is a place
3193
3600
  /// requests go to expire.
3194
- setSpendPolicy: (policy: SpendingPolicy) -> (Result_1);
3601
+ setSpendPolicy: (policy: SpendingPolicy) -> (Result_2);
3195
3602
  /// Owner-only: set YOUR OWN safety rails on the funding path — a per-top-up ckUSDC ceiling and a
3196
3603
  /// minimum gap between top-ups. Read them back with `getTopUpLimits`.
3197
3604
  ///
@@ -3215,12 +3622,12 @@ type Engram =
3215
3622
  record {
3216
3623
  cooldownSeconds: nat;
3217
3624
  maxCkusdcE6s: nat;
3218
- }) -> (Result_1);
3625
+ }) -> (Result_2);
3219
3626
  /// Owner sets the World ID app_id + action + rp_id from their World Developer Portal (rp_id appears
3220
3627
  /// after "Enable World ID 4.0" on a production app). The action MUST be configured there with
3221
3628
  /// max_verifications = Unlimited (idempotent /verify → survives IC consensus). After setting this,
3222
3629
  /// register getWorldIdRpSignerAddress() as the rp_id's signer address in the Portal.
3223
- setWorldIdConfig: (appId: text, action: text, rpId: text) -> (Result_1);
3630
+ setWorldIdConfig: (appId: text, action: text, rpId: text) -> (Result_2);
3224
3631
  /// Submit a verified-human proof: the IDKitResult from the frontend's World ID flow, forwarded
3225
3632
  /// VERBATIM (compact JSON, as JSON.stringify emits) to World's /api/v4/verify/{rp_id} over an HTTPS
3226
3633
  /// outcall (never trust the client). The v4 endpoint verifies both 4.0 proofs and legacy 3.0 proofs,
@@ -3229,7 +3636,7 @@ type Engram =
3229
3636
  /// store to the payload the verifier actually accepted. Only proof_of_human credentials are accepted
3230
3637
  /// (selfie is farmable, passport/mnc are document identity — a different tier). Sets worldIdVerified
3231
3638
  /// and stores the result ONLY on a real verification success — never self-asserted.
3232
- setWorldIdProof: (resultJson: text, nullifier: text) -> (Result_1);
3639
+ setWorldIdProof: (resultJson: text, nullifier: text) -> (Result_2);
3233
3640
  /// Sign a registered type. ONE call, owner-only, freeze-gated — the delay lives on registration
3234
3641
  /// (D2), never here: an emergency withdrawal must not need two owner round-trips.
3235
3642
  ///
@@ -3239,7 +3646,7 @@ type Engram =
3239
3646
  signEip712: (typeId: blob, values: vec record {
3240
3647
  text;
3241
3648
  Eip712Value;
3242
- }) -> (Result_4);
3649
+ }) -> (Result_5);
3243
3650
  /// Sign the engram's own ERC-8004 registration tx for client-side broadcast: the engram signs, the client
3244
3651
  /// broadcasts and keeps the resulting registration id.
3245
3652
  ///
@@ -3274,7 +3681,7 @@ type Engram =
3274
3681
  maxFeePerGas: nat;
3275
3682
  maxPriorityFeePerGas: nat;
3276
3683
  nonce: nat;
3277
- }) -> (Result_9);
3684
+ }) -> (Result_10);
3278
3685
  /// Sign an EIP-3009 authorization for x402 payment. Agent-accessible.
3279
3686
  /// Client probes the URL, extracts chain/token/recipient/amount from the 402, and calls this.
3280
3687
  /// Canister signs → returns header → client retries with header.
@@ -3305,34 +3712,27 @@ type Engram =
3305
3712
  tokenAddress: text;
3306
3713
  tokenName: text;
3307
3714
  tokenVersion: text;
3308
- }) -> (Result_3);
3309
- /// Self-heal: if the registry's spawn-time push was missed, the owner pulls the number from
3310
- /// the spawning registry. Idempotent; fails closed if the registry has no record.
3311
- syncEngramNumber: () -> (Result_8);
3312
- /// Genesis seed — the atomic "spawn only when there's real content" primitive. The spawning
3313
- /// REGISTRY pushes the owner's first real memory immediately after install, so a canister is
3314
- /// never spawned holding nothing (see the registry's `provisionEngram` optional genesis).
3315
- ///
3316
- /// Gated `spawnedBy`-only and ONE-SHOT: it refuses once any file exists, so it can seed and never
3317
- /// overwrite. Unlike the owner-only `seedMemory` placeholder this is REAL owner content, so it
3318
- /// IS counted as an owner write (`firstWriteAt`, `totalMemoryWrites`) and is authored by the
3319
- /// OWNER rather than by the registry principal that called it. It never touches the
3320
- /// agent metrics.
3321
- ///
3322
- /// ⚠ THE PAYLOAD IS `Nat` AND MUST STAY `Nat`, which is a constraint on any client of this
3323
- /// method rather than an internal detail. Its only caller is the registry, over an
3324
- /// inter-canister boundary, through a hand-declared actor type — and the registry is ROUTINELY a
3325
- /// different version from the engram template it is seeding: it upgrades before the fleet does,
3326
- /// and during a transition it can serve a template older than itself. A return-type change here
3327
- /// breaks genesis provisioning across that skew. That is measured, not predicted: the registry
3328
- /// trapped with "IDL error: unexpected IDL type when parsing Nat" while seeding an engram built
3329
- /// at the staging tag. A receipt would buy nothing anyway — the caller does `ignore await`.
3330
- ///
3331
- /// ⚠ ORDERING: upload the engram TEMPLATE first, then upgrade the registry. The reverse leaves a
3332
- /// window where a spawn seeds an old-shape engram with a new-shape expectation; the reply fails
3333
- /// to decode and `provisionEngram` dies on a trap its own `try/catch` cannot reach (ADR-0001),
3334
- /// failing the WHOLE SPAWN rather than just the seed.
3335
- sysApplyGenesisSeed: (path: text, content: blob) -> (Result_8);
3715
+ }) -> (Result_4);
3716
+ /// ⟨2026-10-21, the owner's round-11 answer e⟩ A GUARDIAN STEPS DOWN: the caller ends their own
3717
+ /// guardianship of this engram. It removes a power from the one who holds it and grants none.
3718
+ /// Before, only the owner could remove a guardian, so one who wanted out could only stop watching
3719
+ /// without anyone knowing — worse than an honest exit on the record.
3720
+ ///
3721
+ /// WHO: anyone holding a guardian record here, `#Pending` or `#Active`; never refused for the
3722
+ /// record's state. The owner is refused by name (`People.OWNER_IS_NO_GUARDIAN`: their way is
3723
+ /// `removeGuardian`); an agent or a stranger is `#NotFound` (`People.NOT_A_GUARDIAN`, a fact about
3724
+ /// the caller told to the caller, as `resignAgent` does); the anonymous caller is refused.
3725
+ ///
3726
+ /// WHAT IT RECORDS: one `guardian.stepDown` entry under `#Guardian`
3727
+ /// (`principal=<key> was=active|pending name=<name>`). Being a `guardian.*` operation it reaches
3728
+ /// the owner's and the other guardians' alerts in the #guardian class, on by default, and the
3729
+ /// guardian who left gets one farewell delivery before their channel goes (the drain's lazy
3730
+ /// cleanup in `drainActionAlerts`, as for a removed guardian).
3731
+ ///
3732
+ /// WHAT IT LEAVES: a brake this guardian pulled stays on — lifting one is the owner's; their
3733
+ /// disputes stay on the record. Like `removeGuardian`, it is not terminal: the owner may invite
3734
+ /// the same person again.
3735
+ stepDownAsGuardian: () -> (Result_2);
3336
3736
  /// OWNER force-close, for a session the payer abandoned.
3337
3737
  ///
3338
3738
  /// ⟨R1b, ruled 2026-08-26: owner-gated, NO guardian.⟩ It moves someone else's money, and only ever
@@ -3352,7 +3752,7 @@ type Engram =
3352
3752
  /// stays false here until it is renamed too. Left for the owner: the rename is free until the cut
3353
3753
  /// and a break after it, and it also moves `packages/client/README.md` and
3354
3754
  /// `docs/AGENT-ONBOARDING.md`, which name it.
3355
- sysForceCloseSession: (sessionId: text) -> (Result_1);
3755
+ sysForceCloseSession: (sessionId: text) -> (Result_2);
3356
3756
  /// The metrics reader the registry designated reads every engagement's seat weeks, in one call.
3357
3757
  ///
3358
3758
  /// CALLER: the metrics reader the spawning registry named on this engram (`metricsReaderId`), and
@@ -3369,11 +3769,14 @@ type Engram =
3369
3769
  /// owner can see every time the reader read. A refusal is `#Refused` naming this method and the
3370
3770
  /// class (`SeatWeeks.readRefusal`), never an empty list: an empty list is a real answer ("no agent
3371
3771
  /// has paired here"), and a fabricated one would be counted as one.
3372
- sysGetAgentSeatWeeks: () -> (Result_7);
3772
+ sysGetAgentSeatWeeks: () -> (Result_9);
3373
3773
  /// The metrics reader the registry designated reads this engram's paid-rail health, in one call:
3374
3774
  /// the balance and the line it must stay above, the memory that line is computed from, the sessions
3375
3775
  /// by state, the escrow open sessions hold, the vouchers spent and the refused ones
3376
- /// (`RailHealth.RailHealth` says what each is, and what is never in it).
3776
+ /// (`RailHealth.RailHealth` says what each is, and what is never in it). ⟨2026-10-08, ic402 2.18.0⟩
3777
+ /// And `refundOwed`: the closed sessions whose refund failed and whose payer has not yet recovered
3778
+ /// it — counted from the close, never read from the ledger; `opt` from birth, and null (an engram
3779
+ /// that does not count) is never 0.
3377
3780
  ///
3378
3781
  /// CALLER: the metrics reader the spawning registry named on this engram (`metricsReaderId`), and
3379
3782
  /// nobody else — the owner reads its balance through `getOwnerConsole`. Answered only while the
@@ -3388,7 +3791,7 @@ type Engram =
3388
3791
  /// (`RailHealth.readRefusal`), never a zero balance: a made-up zero would read as an engram about
3389
3792
  /// to freeze. Called by another canister, a query runs replicated and this engram pays for it —
3390
3793
  /// a few million cycles an hour, the cost of being watched.
3391
- sysGetRailHealth: () -> (Result_6) query;
3794
+ sysGetRailHealth: () -> (Result_8) query;
3392
3795
  /// The cashier reads how many signatures this engram has produced, per caller and in total.
3393
3796
  /// ⟨2026-09-28⟩ The owner's decision of that date: a running counter on the engram, exported to
3394
3797
  /// the cashier — and to nobody else (`AccessControl.requireCashierForSignatureCounts`).
@@ -3411,7 +3814,20 @@ type Engram =
3411
3814
  /// bills from this: the number comes from a canister its owner controls and can reinstall, so bill
3412
3815
  /// only engrams the registry confirms run published code, and read a lower count than last time as
3413
3816
  /// a reinstall — the reasoning is at `signaturesByCaller`.
3414
- sysGetSignatureCounts: () -> (Result_5);
3817
+ sysGetSignatureCounts: () -> (Result_7);
3818
+ /// Note a restart the registry just made: what this engram owes for it, the floor a repayment may
3819
+ /// not go under, and until when to keep its timers quiet.
3820
+ ///
3821
+ /// CALLER: the registry that spawned this engram, from inside its owner's `restartMyStoppedEngram`,
3822
+ /// and nobody else (ADR-0020) — the same authority as `sysSetBillerId`. The owner's next conversion
3823
+ /// that lands pays the loan back first. The loan is capped at `RestartRepay.LOAN_MAX_CYCLES` and
3824
+ /// the quiet window at 30 minutes, whatever the registry says.
3825
+ sysNoteRestart: (r:
3826
+ record {
3827
+ keepCycles: nat;
3828
+ loan: nat;
3829
+ quietUntilNs: int;
3830
+ }) -> (Result_2);
3415
3831
  /// Rent lifecycle notice — how the OWNER (not the agent) learns their subscription lapsed. D6
3416
3832
  /// shipped the handoff but every alarm it added talks to the operating service's watchdog; the
3417
3833
  /// doc named the debt plainly: "an owner learns of their own lapse only by looking." This closes
@@ -3422,7 +3838,7 @@ type Engram =
3422
3838
  /// Gated exactly like sysRecordFeeEvent (spawnedBy or cashierId): the sweep is the only thing that
3423
3839
  /// OBSERVES the transition, so it is the only thing that can report it. The state whitelist is
3424
3840
  /// closed — this is a lifecycle feed, not a free-text push surface into the owner's audit chain.
3425
- sysNotifyRentLifecycle: (state: text, detail: text) -> (Result_1);
3841
+ sysNotifyRentLifecycle: (state: text, detail: text) -> (Result_2);
3426
3842
  /// ⟨0.16.0⟩ `getWalletActivation()` DELETED — folded to `about().walletActivatedAtNs`, with its
3427
3843
  /// custody-posture rationale carried onto the field. "Can this thing hold money" is a question a
3428
3844
  /// counterparty is entitled to ask before dealing with an engram, which is why it stays public.
@@ -3454,7 +3870,7 @@ type Engram =
3454
3870
  /// The audit line records this engram as the subject, and `surface=endpoint-listed` is what names
3455
3871
  /// the origin: only the configured market can pass that value, so the line cannot be produced by
3456
3872
  /// any other caller.
3457
- sysNotifyWalletActivity: (surface: text) -> (Result_1);
3873
+ sysNotifyWalletActivity: (surface: text) -> (Result_2);
3458
3874
  /// The rent RECEIPT seam (B2): the cashier tells this engram that money moved on its behalf, and
3459
3875
  /// the engram appends a `fee.recorded` line to its own audit chain. It computes nothing.
3460
3876
  ///
@@ -3489,7 +3905,32 @@ type Engram =
3489
3905
  cycles: nat;
3490
3906
  paidThroughNs: opt int;
3491
3907
  scheduleVersion: opt text;
3492
- }) -> (Result_1);
3908
+ }) -> (Result_2);
3909
+ /// Give back what a paid security update advanced this engram and the install did not use.
3910
+ ///
3911
+ /// CALLER: the registry that spawned this engram, right after it installed a security update it
3912
+ /// paid for, and nobody else (ADR-0020). Sends the smallest of: the advance, what this engram holds
3913
+ /// above its balance before the update, and what sits above its 30-day reserve plus send headroom
3914
+ /// (`RestartRepay.giveBack`) — attached to the registry's `sysRepayUpgradeAdvance`, which accepts no
3915
+ /// more than it advanced. The registry writes off what is not returned; nothing is owed after.
3916
+ /// ⟨CORRECTED 2026-10-28, beside "its 30-day reserve" above — the owner's ruling "1"⟩ The reserve is
3917
+ /// this engram's freezing reserve at its own setting (`freezeReservation` = `lineEstimate`), not a
3918
+ /// 30-day figure: about 430B more at a ~305-day setting.
3919
+ /// ⟨2026-10-26, the owner's review choice 1B: "take back only what we added; anything left over goes
3920
+ /// to the 90-day write-off"⟩ The registry now names the ONE advance it is asking for (`advanceId`,
3921
+ /// the one its deposit for this install put on its ledger) and `advance` is that advance's amount
3922
+ /// alone — never the sum of every advance this engram has out. The engram passes the id back to
3923
+ /// `sysRepayUpgradeAdvance` unchanged, and the registry settles that advance only. The engram's own
3924
+ /// caps are unchanged (`RestartRepay.giveBack`). HONEST LIMIT, unchanged by 1B: the engram cannot
3925
+ /// tell its owner's top-up from the unused advance, so when the install used part of the advance and
3926
+ /// the owner added compute meanwhile, up to the part the install used can still come from the
3927
+ /// owner's top-up (the cap is the advance, not its unused part).
3928
+ sysReturnUpgradeAdvance: (a:
3929
+ record {
3930
+ advance: nat;
3931
+ advanceId: nat;
3932
+ balanceBefore: nat;
3933
+ }) -> (Result_6);
3493
3934
  /// Point this engram at the biller that converts its tokens → cycles. Settable, not hardcoded:
3494
3935
  /// coupling is by principal id, so the same wasm runs against any deployment's biller.
3495
3936
  ///
@@ -3505,10 +3946,22 @@ type Engram =
3505
3946
  /// `convertEarningsToCycles` fails closed against a null biller, and with the owner leg gone
3506
3947
  /// nobody but the spawning registry can fix it. That refusal therefore names the real remedy
3507
3948
  /// rather than telling an owner to run a call they can no longer make.
3508
- sysSetBillerId: (id: principal) -> (Result_1);
3509
- /// One-shot assignment of the spawn ordinal — callable ONLY by the spawning registry, ONLY
3510
- /// while unset. Neither the owner nor any later registry can change an assigned number.
3511
- sysSetEngramNumber: (n: nat) -> (Result_1);
3949
+ sysSetBillerId: (id: principal) -> (Result_2);
3950
+ /// Give this engram its BIRTH CHAIN: its ancestors' birth records and its own, root first, its own
3951
+ /// last ⟨2026-10-26, the owner's lineage rulings L2C-lite and L3A⟩.
3952
+ ///
3953
+ /// CALLER: the registry that spawned this engram, from its birth push or its sweep's retry, and
3954
+ /// nobody else (ADR-0020) — the same authority as `sysSetBillerId`, through the named gate
3955
+ /// `AccessControl.requireSpawningRegistry`. ⚠ THE REGISTRY'S CLIENT DECLARATION IS HAND-WRITTEN
3956
+ /// (`sysSetBirthChain : ([BirthRecord.BirthRecord]) -> async Wire.Result<()>`, in `mintAndPush`): a
3957
+ /// different reply type here traps inside the registry's callback, and a different name leaves every
3958
+ /// newborn without its record, silently retried. test/lineage-wiring.test.ts holds the two equal.
3959
+ ///
3960
+ /// SET ONCE: the same chain again answers `#Ok` and changes nothing (the registry's sweep may re-send
3961
+ /// a push whose reply was lost); a different one is refused `#Conflict`. THE ENGRAM DOES NOT HASH:
3962
+ /// it checks only that the chain ends with its own record. The fingerprints are the registry's to
3963
+ /// certify and the client's `verifyBirthChain` to check.
3964
+ sysSetBirthChain: (chain: vec BirthRecord) -> (Result_2);
3512
3965
  /// Point this engram at the commerce satellite allowed to ask it for signatures. ⟨0.16.0, B1⟩
3513
3966
  ///
3514
3967
  /// SAME AUTHORITY AS `sysSetBillerId`, and for a stronger reason. That one routes money; this one
@@ -3520,7 +3973,7 @@ type Engram =
3520
3973
  /// never be sold through the market, and no owner action fixes it. Both `sysSign*` methods refuse
3521
3974
  /// against a null pointer and their refusals name the registry as the remedy rather than telling
3522
3975
  /// an owner to run a call they cannot make.
3523
- sysSetMarketId: (id: principal) -> (Result_1);
3976
+ sysSetMarketId: (id: principal) -> (Result_2);
3524
3977
  /// Name the metrics reader allowed to read this engram's seat weeks (`sysGetAgentSeatWeeks`).
3525
3978
  /// ⟨2026-10-02, the owner's ruling of that day⟩
3526
3979
  ///
@@ -3535,9 +3988,12 @@ type Engram =
3535
3988
  /// A CANISTER ONLY: a person's principal, the anonymous principal or the management canister is
3536
3989
  /// refused `#Invalid` and nothing changes — a person named here would be handed this engram's seat
3537
3990
  /// counts. Set or replaced, never cleared: the owner's control is the switch
3538
- /// (`setSeatWeeksReadEnabled`), not the pointer. The chained record entry
3991
+ /// (`setSeatWeeksReadEnabled`), not the pointer.
3992
+ /// ⟨CORRECTED 2026-10-26, the owner's lineage ruling L6A⟩ "Set or replaced" is no longer true: it is
3993
+ /// SET ONCE. The same reader again answers `#Ok` and changes nothing; another is refused `#Conflict`
3994
+ /// (`AccessControl.setOnce` says why). Still never cleared. The chained record entry
3539
3995
  /// (`metrics.sysSetMetricsReaderId`) is the evidence of when the read was granted, and to whom.
3540
- sysSetMetricsReaderId: (reader: principal) -> (Result_1);
3996
+ sysSetMetricsReaderId: (reader: principal) -> (Result_2);
3541
3997
  /// The market asks this engram to sign a registered type — B1's seam, settlement leg. ⟨0.16.0⟩
3542
3998
  ///
3543
3999
  /// THE ENGRAM DOES NOT TRUST THE MARKET WITH ANYTHING BEYOND "ask". Every control that bounds
@@ -3545,13 +4001,16 @@ type Engram =
3545
4001
  /// (the market cannot introduce a shape), its cool-off must have elapsed, its per-type daily cap
3546
4002
  /// still binds, the destination allowlist still fails closed, and a payments freeze still stops
3547
4003
  /// it. What the market supplies is the request; what the engram supplies is the whole policy.
4004
+ /// ⟨2026-10-14⟩ And the type's per-field rules, its own destination list (ruling 4A) and the
4005
+ /// signing floor (ruling 5A) — all in `eip712SignFor`, so they bind the market as they bind the
4006
+ /// owner; a refusal here is on the chained record under the market's caller and role.
3548
4007
  ///
3549
4008
  /// That is what "signatures only" means in code, and it is why this method needs no new authority
3550
4009
  /// model: an unregistered typeId is refused for the market exactly as it is for the owner.
3551
4010
  sysSignEip712: (typeId: blob, values: vec record {
3552
4011
  text;
3553
4012
  Eip712Value;
3554
- }) -> (Result_4);
4013
+ }) -> (Result_5);
3555
4014
  /// The market asks this engram to sign an x402 payment — B1's seam, the paid-request leg. ⟨0.16.0⟩
3556
4015
  ///
3557
4016
  /// THE MARKET SUPPLIES THE REQUEST; THE ENGRAM SUPPLIES THE POLICY. Every control below the caller
@@ -3568,14 +4027,16 @@ type Engram =
3568
4027
  /// for ALL market traffic; per-seller limits are not expressible in the store it reads.
3569
4028
  sysSignX402Payment: (chainId: nat, tokenAddress: text, recipient:
3570
4029
  text, amount: nat, tokenName: text, tokenVersion: text, rationale:
3571
- opt text, approvalId: opt text) -> (Result_3);
4030
+ opt text, approvalId: opt text) -> (Result_4);
3572
4031
  /// Write an `alerts.test` entry into the audit log; the drain timer delivers it to the webhook
3573
- /// within ~60s. Owner-only; requires a configured URL so the test can actually go somewhere.
3574
- testActionAlert: () -> (Result_1);
4032
+ /// within ~60s. ⟨2026-10-29, beside "within ~60s"⟩ Within seconds (a minute if a delivery was just
4033
+ /// made). Owner-only; requires a configured URL so the test can actually go somewhere.
4034
+ testActionAlert: () -> (Result_2);
3575
4035
  /// Guardian test alert — an audited guardian action (`alerts.test`, role Guardian) that every
3576
- /// armed channel (owner + guardians) receives within ~60s. Requires the caller's own channel
4036
+ /// armed channel (owner + guardians) receives within ~60s (⟨2026-10-29⟩ within seconds; a minute if
4037
+ /// a delivery was just made). Requires the caller's own channel
3577
4038
  /// to be armed so the test has somewhere to land for them.
3578
- testGuardianAlert: () -> (Result_1);
4039
+ testGuardianAlert: () -> (Result_2);
3579
4040
  /// RENAMED from `init` (L2.4). This is the OWNERSHIP-TRANSFER method — the most consequential
3580
4041
  /// owner-facing operation on the canister — and it was named for first-time setup, colliding with
3581
4042
  /// the actor's own `service : (initArgs)`. A reader scanning for "how does ownership move" found
@@ -3613,7 +4074,7 @@ type Engram =
3613
4074
  /// control to the same owner again and reports it, and it writes NO entry to
3614
4075
  /// `listOwnershipTransfers` (until this day it wrote one from the owner to themselves, a hand-on
3615
4076
  /// that did not happen). The record entry says it was a report. `ControlHandover.isReport`.
3616
- transferOwnership: (newOwner: principal) -> (Result_2);
4077
+ transferOwnership: (newOwner: principal) -> (Result_3);
3617
4078
  /// OWNER-ONLY release of the payment freeze — and the asymmetry with `freezePayments` is the
3618
4079
  /// governance design, not an oversight.
3619
4080
  ///
@@ -3625,7 +4086,18 @@ type Engram =
3625
4086
  /// unilaterally.
3626
4087
  /// So a guardian's freeze is a TRIPWIRE, not a lock — it buys the time it takes the owner to
3627
4088
  /// look, and no more.
3628
- unfreezePayments: () -> (Result_1);
4089
+ unfreezePayments: () -> (Result_2);
4090
+ /// Wake this engram's timers after it paused them to save compute near its freezing line. Owner
4091
+ /// only. Refused, by name, below the room the hourly check-in needs; then nothing is armed.
4092
+ ///
4093
+ /// CALLER: the engram's owner, from the owner's app (its status line and its compute page), and
4094
+ /// nobody else (ADR-0020). ⟨2026-10-28, the owner's ruling "1": "it wakes on the next payment, agent
4095
+ /// request or your Wake"⟩ The automatic doors (the biller's receipt, Convert, an agent's MCP request)
4096
+ /// wake it when compute lands with room; this is the owner's door, for compute that arrived with no
4097
+ /// receipt (a bare top-up). It always reads the engram's own balance (no rate limit, no free filter),
4098
+ /// so a refusal states what the engram measured. Both figures in a refusal are its own READING above
4099
+ /// its line, which runs ~82B below the true figure, so the engram never calls it the gap.
4100
+ wakeTimers: () -> (Result_1);
3629
4101
  /// Consensus transform for the World ID /verify outcall. Replicas each call independently, so the raw
3630
4102
  /// response (timestamps, `uses`, request-id headers) is non-deterministic. Collapse it to a single
3631
4103
  /// canonical byte — "1" iff HTTP 200 AND the body asserts success — with no headers, so every replica
@@ -3670,6 +4142,32 @@ type Eip712Value =
3670
4142
  string: text;
3671
4143
  uint: nat;
3672
4144
  };
4145
+ type Eip712TypeView =
4146
+ record {
4147
+ ackIrrevocable: bool;
4148
+ authorityClass: AuthorityClass;
4149
+ chainId: nat;
4150
+ cooloffEndsAtNs: int;
4151
+ dailySignCap: nat;
4152
+ destinationFields: vec text;
4153
+ domainName: text;
4154
+ domainSeparator: vec nat8;
4155
+ domainVersion: text;
4156
+ encodeTypeString: text;
4157
+ fieldRules: vec record {
4158
+ text;
4159
+ Eip712FieldRule;
4160
+ };
4161
+ fields: vec record {
4162
+ text;
4163
+ text;
4164
+ };
4165
+ primaryType: text;
4166
+ registeredAtNs: int;
4167
+ typeHash: vec nat8;
4168
+ typeId: blob;
4169
+ verifyingContract: text;
4170
+ };
3673
4171
  type Eip712SignatureOut =
3674
4172
  record {
3675
4173
  digest: blob;
@@ -3684,6 +4182,19 @@ type Eip712Registration =
3684
4182
  encodeTypeString: text;
3685
4183
  typeId: blob;
3686
4184
  };
4185
+ type Eip712FieldRule =
4186
+ variant {
4187
+ atMost: record {
4188
+ decimals: nat;
4189
+ max: nat;
4190
+ };
4191
+ mustEqual: text;
4192
+ };
4193
+ type Eip712Destination =
4194
+ record {
4195
+ activeFromNs: int;
4196
+ value: text;
4197
+ };
3687
4198
  type Eip3009Authorization =
3688
4199
  record {
3689
4200
  from: text;
@@ -3772,7 +4283,7 @@ type ChildAllowanceRow =
3772
4283
  type CheckpointPage =
3773
4284
  record {
3774
4285
  firstAvailableSeq: nat;
3775
- page: Page_15;
4286
+ page: Page_18;
3776
4287
  scannedThroughSeq: nat;
3777
4288
  };
3778
4289
  type CertifiedAuditHead =
@@ -3790,6 +4301,38 @@ type CallerSignatureCount =
3790
4301
  role: Role;
3791
4302
  root: opt principal;
3792
4303
  };
4304
+ type Brakes =
4305
+ record {
4306
+ payments: BrakeState;
4307
+ writes: BrakeState;
4308
+ };
4309
+ type BrakeState =
4310
+ record {
4311
+ on: bool;
4312
+ pull: opt BrakePull;
4313
+ };
4314
+ type BrakeRole =
4315
+ variant {
4316
+ Guardian;
4317
+ Owner;
4318
+ };
4319
+ type BrakePull =
4320
+ record {
4321
+ atNs: int;
4322
+ by: principal;
4323
+ reason: opt text;
4324
+ role: BrakeRole;
4325
+ };
4326
+ type BirthRecord =
4327
+ record {
4328
+ bornAtNs: int;
4329
+ child: principal;
4330
+ number: nat;
4331
+ parent: opt principal;
4332
+ parentFingerprint: opt blob;
4333
+ secret: blob;
4334
+ version: nat;
4335
+ };
3793
4336
  type BearerTokenStatus =
3794
4337
  variant {
3795
4338
  Active;
@@ -3834,6 +4377,12 @@ type BackupRetentionReport =
3834
4377
  maxBackups: nat;
3835
4378
  prunedBackups: nat;
3836
4379
  };
4380
+ type BackupRetention =
4381
+ record {
4382
+ dbType: text;
4383
+ isDefault: bool;
4384
+ maxBackups: nat;
4385
+ };
3837
4386
  type BackupMetadata =
3838
4387
  record {
3839
4388
  backupId: text;
@@ -3902,12 +4451,17 @@ type AnchorPushStatus =
3902
4451
  attemptTotal: nat;
3903
4452
  cadenceSeconds: nat;
3904
4453
  carrierArmedAtNs: int;
4454
+ checkInIntervalSeconds: opt nat;
3905
4455
  currentTotal: nat;
3906
4456
  lastError: text;
4457
+ nextAnchorAttemptAtNs: opt int;
4458
+ nextCheckInDueAtNs: opt int;
3907
4459
  okAtNs: opt int;
3908
4460
  okTotal: nat;
3909
4461
  skipCursor: nat;
3910
4462
  timerTickAtNs: opt int;
4463
+ timersPauseReason: opt text;
4464
+ timersPausedAtNs: opt int;
3911
4465
  };
3912
4466
  type AlertStatus =
3913
4467
  record {
@@ -3952,6 +4506,18 @@ type AgentStatus =
3952
4506
  Resigned;
3953
4507
  Revoked;
3954
4508
  };
4509
+ type AgentSpendToday =
4510
+ record {
4511
+ agents: Page_23;
4512
+ dayStartNs: int;
4513
+ };
4514
+ type AgentSpendRow =
4515
+ record {
4516
+ agent: principal;
4517
+ maxPerDay: opt nat;
4518
+ root: principal;
4519
+ spentToday: opt nat;
4520
+ };
3955
4521
  type AgentRecord =
3956
4522
  record {
3957
4523
  earlierKeys: vec HeldKey;
@@ -3985,6 +4551,16 @@ type AgentPaymentSignatures =
3985
4551
  root: principal;
3986
4552
  signedToday: nat;
3987
4553
  };
4554
+ type AgentGrant =
4555
+ record {
4556
+ key: principal;
4557
+ name: text;
4558
+ paymentLimits: PaymentLimits;
4559
+ paymentsFrozen: opt bool;
4560
+ paymentsNow: opt PaymentsNow;
4561
+ paymentsStoppedBy: opt PaymentsStop;
4562
+ permissions: AgentPermissions;
4563
+ };
3988
4564
  type AgentEnding =
3989
4565
  record {
3990
4566
  day: int;
@@ -4019,14 +4595,14 @@ type ActionAuth =
4019
4595
  };
4020
4596
  type About =
4021
4597
  record {
4598
+ activeAgentCount: opt nat;
4022
4599
  agentCount: nat;
4023
4600
  agentMemoryReads: nat;
4024
4601
  agentMemoryWrites: nat;
4025
4602
  auditLogSize: nat;
4026
4603
  backupCount: nat;
4027
- distinctReaderClients: nat;
4028
- distinctReaderPrincipals: nat;
4029
4604
  encryptionEnabled: bool;
4605
+ endedAgentCount: opt nat;
4030
4606
  firstAgentWriteAtNs: opt int;
4031
4607
  firstWriteAtNs: opt int;
4032
4608
  guardianCount: nat;
@@ -4038,6 +4614,7 @@ type About =
4038
4614
  paidMemoryReadEnabled: bool;
4039
4615
  paidMemoryWriteEnabled: bool;
4040
4616
  paymentsFrozen: bool;
4617
+ timersPausedSinceDayNs: opt int;
4041
4618
  totalBackupSize: nat;
4042
4619
  totalMemoryReads: nat;
4043
4620
  totalMemoryWrites: nat;