@engramx/idl 0.16.1 → 0.17.0-rc.1
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 +1184 -1508
- package/dist/engram.idl.d.ts +1170 -1496
- package/dist/market.did +257 -309
- package/dist/market.idl.d.ts +257 -309
- package/dist/registry.did +703 -849
- package/dist/registry.idl.d.ts +695 -841
- package/package.json +1 -1
package/dist/registry.idl.d.ts
CHANGED
|
@@ -459,21 +459,19 @@ export interface _SERVICE {
|
|
|
459
459
|
* / docs/ENCRYPTION-OPERATIONS.md, "Canister-id binding"). Abandoning is starting over, not
|
|
460
460
|
* / migrating, and the caller must be told so before they do it.
|
|
461
461
|
* /
|
|
462
|
-
* /
|
|
463
|
-
* /
|
|
462
|
+
* / REFUSED for an engram opened through another: it is never abandoned, so it stays on this
|
|
463
|
+
* / registry's security updates for life; it ends by its parent's cut-off or by running dry.
|
|
464
464
|
* /
|
|
465
|
-
* /
|
|
466
|
-
* /
|
|
467
|
-
* /
|
|
468
|
-
* /
|
|
469
|
-
* /
|
|
470
|
-
* / engram runs.
|
|
465
|
+
* / WITHDRAW YOUR DIGITAL DOLLARS FIRST. Nobody pays for an abandoned engram, and it is not
|
|
466
|
+
* / recoverable: when its compute runs out it stops, and the network erases it about 30 days
|
|
467
|
+
* / later. An abandoned engram is never recovered once it is erased (`recoverMyEngram` refuses it,
|
|
468
|
+
* / and the biller refuses its top-ups), so whatever its wallet still holds then stays at its address
|
|
469
|
+
* / with no program that can move it. Withdraw it while the engram runs.
|
|
471
470
|
*/
|
|
472
471
|
abandonMyEngram: ActorMethod<[], Result>;
|
|
473
472
|
/**
|
|
474
|
-
* /
|
|
475
|
-
* /
|
|
476
|
-
* / `acceptedAtNs`.
|
|
473
|
+
* / THE NAMED PRINCIPAL ACCEPTS AN ENGRAM OFFERED TO THEM, as themselves. This is the registry's
|
|
474
|
+
* / only evidence that they agreed, and the only writer of `acceptedAtNs`.
|
|
477
475
|
* /
|
|
478
476
|
* / IT STILL MOVES NOTHING. It marks the offer accepted; the record and control of the code move
|
|
479
477
|
* / when the caller then calls `acceptOwnership` on the engram, which reports here
|
|
@@ -493,8 +491,8 @@ export interface _SERVICE {
|
|
|
493
491
|
*/
|
|
494
492
|
addChangelogEntry: ActorMethod<[string, string], Result>;
|
|
495
493
|
/**
|
|
496
|
-
* /
|
|
497
|
-
* /
|
|
494
|
+
* / The CALLER appends one dated statement to ITS OWN track record. Nothing is deleted, and nobody
|
|
495
|
+
* / adjudicates.
|
|
498
496
|
* /
|
|
499
497
|
* / AGENT-ONLY BY CONSTRUCTION: the record written is `msg.caller`'s, so nobody can write to
|
|
500
498
|
* / another agent's record, and a caller with no recorded engagement is REFUSED (there is no record
|
|
@@ -506,9 +504,9 @@ export interface _SERVICE {
|
|
|
506
504
|
* / dispute exists and its day; the statement's words stay out of it, readable by the agent through
|
|
507
505
|
* / `listMyAgentDisputes`. The append is recorded in the chained audit log (length, not words).
|
|
508
506
|
* /
|
|
509
|
-
* /
|
|
510
|
-
* /
|
|
511
|
-
* /
|
|
507
|
+
* / The caller is the agent's ROOT key — records are kept per agent (one root key per agent, with an
|
|
508
|
+
* / enrolled key per client), so a key for one engram has no record here and is refused like any
|
|
509
|
+
* / stranger. Disputing is the root's act, not an engram key's.
|
|
512
510
|
*/
|
|
513
511
|
appendAgentDispute: ActorMethod<[string], Result>;
|
|
514
512
|
/**
|
|
@@ -528,14 +526,14 @@ export interface _SERVICE {
|
|
|
528
526
|
* / `returnToManaged` adds the registry back ALONGSIDE the owner. Sovereignty is a door, not a
|
|
529
527
|
* / cliff.
|
|
530
528
|
* /
|
|
531
|
-
* /
|
|
532
|
-
* /
|
|
529
|
+
* / REFUSED for an engram opened through another: it stays managed by this registry for life, and
|
|
530
|
+
* / its key is never a controller.
|
|
533
531
|
*/
|
|
534
532
|
claimSovereignty: ActorMethod<[], Result>;
|
|
535
533
|
/**
|
|
536
|
-
* /
|
|
537
|
-
* /
|
|
538
|
-
* /
|
|
534
|
+
* / The named principal declines an offer, or takes back an acceptance made before
|
|
535
|
+
* / `acceptOwnership` was called on the engram. The row is removed, so a report of that change of
|
|
536
|
+
* / owner is refused until the engram's owner offers again.
|
|
539
537
|
*/
|
|
540
538
|
declineEngramOffer: ActorMethod<[Principal], Result>;
|
|
541
539
|
/**
|
|
@@ -556,10 +554,10 @@ export interface _SERVICE {
|
|
|
556
554
|
/**
|
|
557
555
|
* / Chunked WASM upload — for WASMs that exceed single-call ingress limits.
|
|
558
556
|
* / Flow: engramWasmInit → engramWasmPushChunk (×N) → engramWasmFinalize(hash)
|
|
559
|
-
* /
|
|
560
|
-
* /
|
|
561
|
-
* /
|
|
562
|
-
* /
|
|
557
|
+
* / This line is the only written record of the upload protocol, and the hand-IDL client that follows
|
|
558
|
+
* / it (scripts/upload-engram-wasm.mjs) must name the same three methods: when the line and the
|
|
559
|
+
* / script named the methods' pre-0.16.0 names, the upload died at its first call with IC0536. A
|
|
560
|
+
* / stale flow comment is not cosmetic here.
|
|
563
561
|
*/
|
|
564
562
|
engramWasmInit: ActorMethod<[], Result>;
|
|
565
563
|
/**
|
|
@@ -589,35 +587,28 @@ export interface _SERVICE {
|
|
|
589
587
|
* / its LIVE freezing reservation, which is memory-scaled, so a large engram can be low at a
|
|
590
588
|
* / balance a small one would be comfortable at.
|
|
591
589
|
* /
|
|
592
|
-
* /
|
|
593
|
-
* /
|
|
594
|
-
* /
|
|
595
|
-
* /
|
|
596
|
-
* /
|
|
597
|
-
* / `listEngrams` settled at its own declaration).
|
|
598
|
-
* /
|
|
599
|
-
* / ⟨Marker added 2026-08-23. The 0.16.0 interface plan's row for this method already cited the
|
|
600
|
-
* / update-for-read rule and
|
|
601
|
-
* / the site did not carry it — invisible to the deploying side's update-for-read check, whose
|
|
602
|
-
* / population is read-VERB names and this one is a noun. That check now reads the plan's
|
|
603
|
-
* / update-for-read citations as a second population for exactly this blind spot.⟩
|
|
590
|
+
* / UPDATE, NOT QUERY, for two reasons, stated here rather than left to be inferred from a body
|
|
591
|
+
* / that scans a fleet. It awaits `ic.canister_status` once per engram in the page, so no query
|
|
592
|
+
* / could produce the figures at all; and it calls `denied()` on refusal, a state write a query
|
|
593
|
+
* / cannot perform, so making it a query would also retire the record of who was turned away (the
|
|
594
|
+
* / refusal-over-fabrication class, the same one `listEngrams` settled at its own declaration).
|
|
604
595
|
*/
|
|
605
596
|
fleetCycleHealth: ActorMethod<[bigint, bigint, bigint], Result_31>;
|
|
606
597
|
/**
|
|
607
|
-
* / PUBLIC:
|
|
608
|
-
* /
|
|
598
|
+
* / PUBLIC: `fleetSummary` — the ONE public projection of this registry (since 0.16.0: same concept,
|
|
599
|
+
* / same name across canisters), replacing `status()` and ABSORBING `publicMetrics()`.
|
|
609
600
|
* /
|
|
610
601
|
* / Two public aggregates of one canister was the same naming defect the engram had with
|
|
611
602
|
* / status()/metrics(): both answered "what is this registry like", they disagreed about which
|
|
612
603
|
* / counters they carried (status had cycles and the wasm hash, publicMetrics had unique owners,
|
|
613
604
|
* / sovereign engrams and registrySince), and a caller had to know which one held the field they
|
|
614
|
-
* / wanted.
|
|
605
|
+
* / wanted.
|
|
615
606
|
* /
|
|
616
607
|
* / Merged, not concatenated: `totalEngrams` and `activeEngrams` appeared in BOTH and are counted
|
|
617
608
|
* / once here, by the same pass.
|
|
618
609
|
* /
|
|
619
610
|
* / Everything in it identifies nobody — counts, a version, a hash, a cycle balance — which is why
|
|
620
|
-
* / it is ungated
|
|
611
|
+
* / it is ungated.
|
|
621
612
|
*/
|
|
622
613
|
fleetSummary: ActorMethod<[], FleetSummary>;
|
|
623
614
|
/**
|
|
@@ -644,33 +635,28 @@ export interface _SERVICE {
|
|
|
644
635
|
* / PUBLIC: who holds authority here. A refusal a caller cannot attribute is a refusal they
|
|
645
636
|
* / cannot appeal, so the roster is readable by everyone the roster can refuse.
|
|
646
637
|
* /
|
|
647
|
-
* /
|
|
648
|
-
* /
|
|
649
|
-
* /
|
|
650
|
-
* /
|
|
651
|
-
* /
|
|
652
|
-
* /
|
|
653
|
-
* / means one reader answers the question fleet-wide.
|
|
638
|
+
* / The shared `AdminRoles` shape (since 0.16.0: same concept, same name across canisters), not a
|
|
639
|
+
* / registry-specific record. It was `{ admin; wasmAdmin }`, which could not express the ROOT
|
|
640
|
+
* / identity at all — the principal that bootstraps the first admin and can reclaim the role was
|
|
641
|
+
* / simply absent from the published answer, so "who can take this canister back" was a fact only
|
|
642
|
+
* / the source told you. A list of (role, holder) carries every authority this canister has, and the
|
|
643
|
+
* / same shape on every canister means one reader answers the question fleet-wide.
|
|
654
644
|
*/
|
|
655
645
|
getAdminRoles: ActorMethod<[], AdminRoles>;
|
|
656
646
|
/**
|
|
657
|
-
* / PUBLIC:
|
|
647
|
+
* / PUBLIC: renamed from `operatorEdgeStats` in 0.16.0, and the GATE IS DROPPED.
|
|
658
648
|
* /
|
|
659
649
|
* / The old refusal existed because a ZEROED aggregate reads as "no agent runs any engram" — a
|
|
660
|
-
* / growth figure
|
|
661
|
-
* /
|
|
662
|
-
* /
|
|
663
|
-
* /
|
|
664
|
-
* / the
|
|
665
|
-
* /
|
|
666
|
-
* /
|
|
667
|
-
* /
|
|
668
|
-
* /
|
|
669
|
-
* /
|
|
670
|
-
* / ⟨CORRECTED 2026-09-29: one name for one thing — both fields are renamed.⟩
|
|
671
|
-
* / · `agents` (was `distinctOperators`): agents, by root key, with at least one live
|
|
672
|
-
* / engagement. The old name was kept for a hand-written reader outside this repo, which has
|
|
673
|
-
* / since had to translate it back to "agents" in two places.
|
|
650
|
+
* / growth figure a dashboard renders as fact — and an unreadable aggregate must show as UNKNOWN,
|
|
651
|
+
* / never as zero. That reasoning was right about the danger and wrong about the remedy: two counts
|
|
652
|
+
* / that name nobody are not a disclosure, and gating them created the very unreadable-aggregate
|
|
653
|
+
* / problem the comment was worried about. Answering everyone removes both the fabricated zero AND
|
|
654
|
+
* / the need to distinguish it from a real one.
|
|
655
|
+
* /
|
|
656
|
+
* / One name for one thing:
|
|
657
|
+
* / · `agents` (was `distinctOperators`): distinct agents, by root key, with at least one live
|
|
658
|
+
* / engagement. The index is keyed by root (one root key per agent, with an enrolled key per
|
|
659
|
+
* / client), so an agent on twenty-five engrams counts once.
|
|
674
660
|
* / · `liveEngagements` (was `totalEdges`): agent–engram engagements live NOW, one per agent
|
|
675
661
|
* / per engram. "Total" read as all-time, but an engagement leaves this count the moment it
|
|
676
662
|
* / ends (the live index forgets it; the agent's record keeps it — `getAgentStanding`), and
|
|
@@ -680,9 +666,8 @@ export interface _SERVICE {
|
|
|
680
666
|
*/
|
|
681
667
|
getAgentEdgeStats: ActorMethod<[], { agents: bigint; liveEngagements: bigint }>;
|
|
682
668
|
/**
|
|
683
|
-
* /
|
|
684
|
-
* /
|
|
685
|
-
* / day of the first engagement, and whether (and on what day) the agent disputed it.
|
|
669
|
+
* / ONE AGENT'S CERTIFIED TRACK RECORD — counts by ending reason, live engagements, the day of the
|
|
670
|
+
* / first engagement, and whether (and on what day) the agent disputed it.
|
|
686
671
|
* /
|
|
687
672
|
* / SERVES THE STORED BYTES, on the `getCertifiedAnchor` pattern: the leaf is decoded from exactly
|
|
688
673
|
* / what `putStandingLeaf` certified, so what is served equals what is proven by construction.
|
|
@@ -692,54 +677,52 @@ export interface _SERVICE {
|
|
|
692
677
|
* / was meant to replace, so there is no role gate. But a record spanning fewer than
|
|
693
678
|
* / `Engagements.STANDING_MIN_DISTINCT_ENGRAMS` distinct engrams is served ONLY to the agent itself:
|
|
694
679
|
* / at one or two engrams the summary IS their owners' experience, which is identification by
|
|
695
|
-
* / inference (
|
|
696
|
-
* /
|
|
697
|
-
* /
|
|
698
|
-
* /
|
|
699
|
-
* /
|
|
700
|
-
* /
|
|
701
|
-
* /
|
|
702
|
-
* /
|
|
703
|
-
* /
|
|
704
|
-
* /
|
|
705
|
-
* /
|
|
706
|
-
* /
|
|
707
|
-
* /
|
|
708
|
-
* /
|
|
709
|
-
* / as one with the engrams it replaced. The refusal's sentence says so.
|
|
680
|
+
* / inference (the project's own reading of the law, not legal advice). That refusal is LOUD, names
|
|
681
|
+
* / this method, and covers a record of zero engagements with the same words, so the refusal itself
|
|
682
|
+
* / does not distinguish "never engaged" from "engaged in one to four engrams". The agent itself
|
|
683
|
+
* / reading an empty record gets `#NotFound` — it is asking about itself, so there is nothing to hide
|
|
684
|
+
* / from it.
|
|
685
|
+
* /
|
|
686
|
+
* / A THIN SELF-READ IS UNCERTIFIED: below the threshold the record is not in the certified tree at
|
|
687
|
+
* / all (its hash would leak it through every other witness), so the agent is served its summary
|
|
688
|
+
* / folded from the records, with `certificate = null` and an empty `witness`. At and above the
|
|
689
|
+
* / threshold every reader gets the stored bytes with their proof.
|
|
690
|
+
* /
|
|
691
|
+
* / The threshold counts TOPS, not engrams (`Engagements.distinctTops`): engrams opened from one
|
|
692
|
+
* / engram count as one, and an engram counts as one with the engrams it replaced. The refusal's
|
|
693
|
+
* / sentence says so.
|
|
710
694
|
* /
|
|
711
695
|
* / WHAT IT NEVER DOES: score, rank, recommend, or refuse anyone work. The decision to refuse an
|
|
712
|
-
* / agent belongs to the owner's own engram
|
|
713
|
-
* /
|
|
714
|
-
* /
|
|
715
|
-
* /
|
|
716
|
-
* /
|
|
717
|
-
* /
|
|
718
|
-
* /
|
|
719
|
-
* /
|
|
720
|
-
* /
|
|
721
|
-
* /
|
|
722
|
-
* /
|
|
723
|
-
* /
|
|
724
|
-
* /
|
|
725
|
-
* /
|
|
726
|
-
* / is
|
|
727
|
-
* /
|
|
728
|
-
* / record of its own here; asking about one gets the refusal or, from the key itself, `#NotFound`.
|
|
696
|
+
* / agent belongs to the owner's own engram.
|
|
697
|
+
* /
|
|
698
|
+
* / COUNTS, NOT INDEPENDENCE — READ THIS BEFORE TRUSTING A RECORD. The certificate proves that this
|
|
699
|
+
* / registry holds these counts for this agent. It does NOT prove that the engrams behind them belong
|
|
700
|
+
* / to different people. The registry links two engrams only through a parent or a predecessor;
|
|
701
|
+
* / engrams opened under separate principals are unlinked, and one party can open several. So one
|
|
702
|
+
* / party can give its own agent a certified record with no one else involved (a run on PocketIC on
|
|
703
|
+
* / 2026-11-15 showed it: a stranger was refused at one engram, and served a certified record of five
|
|
704
|
+
* / live engagements and no bad endings once four more engrams, opened under four other principals,
|
|
705
|
+
* / had paired the same root). The five-engram threshold is a privacy floor, never a defence against
|
|
706
|
+
* / a made-up record. A reader must not take these counts as other owners' experience of the agent.
|
|
707
|
+
* /
|
|
708
|
+
* / `agent` is the agent's ROOT principal (one root key per agent, with an enrolled key per client)
|
|
709
|
+
* / — the identity an owner sees as `root` on each key in their own `listAgents`. "The agent itself"
|
|
710
|
+
* / is a caller holding that root key. A key for one engram has no record of its own here; asking
|
|
711
|
+
* / about one gets the refusal or, from the key itself, `#NotFound`.
|
|
729
712
|
*/
|
|
730
713
|
getAgentStanding: ActorMethod<[Principal], Result_30>;
|
|
731
714
|
/**
|
|
732
715
|
* / Fleet-wide anchoring liveness. Exists because ABSENCE is otherwise uninformative: an engram
|
|
733
716
|
* / that never wrote, one still on a template without the push, and one whose push is broken all
|
|
734
|
-
* / render as an empty
|
|
735
|
-
* / dead push looks exactly like a quiet engram
|
|
717
|
+
* / render as an empty `listAnchors`. Nothing distinguishes the first from the third, so a silently
|
|
718
|
+
* / dead push looks exactly like a quiet engram.
|
|
736
719
|
* /
|
|
737
720
|
* / A non-zero engramsAnchored with a recent lastAnchorAtNs is positive evidence that the path is
|
|
738
721
|
* / alive SOMEWHERE, which is what makes an individual engram's silence interpretable.
|
|
739
722
|
* /
|
|
740
723
|
* / PUBLIC: the same reader who needs the anchors needs to know whether to believe their absence.
|
|
741
724
|
* /
|
|
742
|
-
* /
|
|
725
|
+
* / The ring also holds the TREASURY ANCHORER's chain (`getTreasuryAnchorId`), and
|
|
743
726
|
* / `engramsAnchored`, `totalAnchors` and `lastAnchorAtNs` count it as one more chain. The
|
|
744
727
|
* / engram-only pair leaves it out: `engramChainsAnchored` (always present on a registry that
|
|
745
728
|
* / serves it, 0 when no engram has anchored) and `lastEngramAnchorAtNs`. Read those to ask
|
|
@@ -757,7 +740,7 @@ export interface _SERVICE {
|
|
|
757
740
|
* / decode with to_candid's standard encoding) carries the anchor AND its conflict count, so the
|
|
758
741
|
* / certified answer is self-contained: a verifier learns "this head, at this count, disputed or
|
|
759
742
|
* / not" from subnet-signed data alone. null = no anchor witnessed (which getAnchorStats makes
|
|
760
|
-
* / interpretable). Same verification recipe as
|
|
743
|
+
* / interpretable). Same verification recipe as `getCertifiedAuditHead`, path ["anchors", <principal>].
|
|
761
744
|
* /
|
|
762
745
|
* / PUBLIC: a proof a caller must be authorized to fetch rests on the authority it was meant to
|
|
763
746
|
* / replace. The certificate's whole value is that a stranger can check it against the NNS root
|
|
@@ -765,18 +748,19 @@ export interface _SERVICE {
|
|
|
765
748
|
*/
|
|
766
749
|
getCertifiedAnchor: ActorMethod<[Principal], [] | [CertifiedAnchor]>;
|
|
767
750
|
/**
|
|
768
|
-
* /
|
|
751
|
+
* / Named `getCertifiedAuditHead` on every chain canister (same concept, same name; renamed back to
|
|
752
|
+
* / it in 0.16.0).
|
|
769
753
|
* /
|
|
770
|
-
* / It
|
|
771
|
-
* / changed (certified_data became a merkle tree root covering the head AND the anchor set,
|
|
772
|
-
* / old certified_data == headHash byte-compare was gone), and a loud method-not-found was
|
|
773
|
-
* / better than a stale verifier quietly reporting verified=false forever.
|
|
754
|
+
* / It had been renamed AWAY from that on 2026-08-03, deliberately and for a good reason: the
|
|
755
|
+
* / semantics changed (certified_data became a merkle tree root covering the head AND the anchor set,
|
|
756
|
+
* / so the old certified_data == headHash byte-compare was gone), and a loud method-not-found was
|
|
757
|
+
* / judged better than a stale verifier quietly reporting verified=false forever.
|
|
774
758
|
* /
|
|
775
|
-
* /
|
|
776
|
-
* / at the 0.16.0 genesis
|
|
777
|
-
* / the same question under two names, which is the cost the rename was paying to
|
|
778
|
-
* / that no longer
|
|
779
|
-
* / canister has no witness to give, rather than an empty blob that decodes as one.
|
|
759
|
+
* / That argument's premise did not survive 0.16.0. It protected deployed verifiers, and every chain
|
|
760
|
+
* / restarted fresh at the 0.16.0 genesis, so there were none. What remained was a fleet where three
|
|
761
|
+
* / canisters answered the same question under two names, which is the cost the rename was paying to
|
|
762
|
+
* / avoid a hazard that no longer existed. `witness` is `?Blob` to match the shared type — null where
|
|
763
|
+
* / a canister has no witness to give, rather than an empty blob that decodes as one.
|
|
780
764
|
* /
|
|
781
765
|
* / Verify: (1) validate `certificate` against the IC root key; (2) extract
|
|
782
766
|
* / /canister/<id>/certified_data from it; (3) reconstruct the root of `witness` (IC-spec hash
|
|
@@ -790,9 +774,8 @@ export interface _SERVICE {
|
|
|
790
774
|
*/
|
|
791
775
|
getCertifiedAuditHead: ActorMethod<[], CertifiedAuditHead>;
|
|
792
776
|
/**
|
|
793
|
-
* / The certified proof that a birth record's FINGERPRINT is in this registry's tree
|
|
794
|
-
* /
|
|
795
|
-
* / — the half of an engram's birth chain the engram cannot give itself.
|
|
777
|
+
* / The certified proof that a birth record's FINGERPRINT is in this registry's tree — the half of
|
|
778
|
+
* / an engram's birth chain the engram cannot give itself.
|
|
796
779
|
* /
|
|
797
780
|
* / PUBLIC: a proof a caller had to hold a role to fetch rests on the authority it was meant to
|
|
798
781
|
* / replace. It reveals only whether a fingerprint is present: the key is a salted hash (the record's
|
|
@@ -802,29 +785,26 @@ export interface _SERVICE {
|
|
|
802
785
|
* /
|
|
803
786
|
* / Verify as for `getCertifiedAnchor`, path ["births", <fingerprint>], leaf bytes = [0x01] (the
|
|
804
787
|
* / client's `verifyBirthChain` does it for a whole chain). `null` when absent, as `getCertifiedAnchor`
|
|
805
|
-
* / answers: there is no certified absence proof (a build choice
|
|
788
|
+
* / answers: there is no certified absence proof (a build choice, not a requirement). A
|
|
806
789
|
* / `fingerprint` that is not 32 bytes is never a fingerprint, and answers `null` before the lookup.
|
|
807
790
|
*/
|
|
808
791
|
getCertifiedBirth: ActorMethod<[Uint8Array | number[]], [] | [CertifiedBirth]>;
|
|
809
792
|
/**
|
|
810
|
-
* /
|
|
811
|
-
* /
|
|
812
|
-
* /
|
|
813
|
-
* /
|
|
814
|
-
* /
|
|
815
|
-
* /
|
|
816
|
-
* / absent, so the read never discloses a key file's principal); whether the parent is a first
|
|
817
|
-
* / engram; and whether it is registered, `#Active` and not abandoned (`isRegisteredActiveEngram`'s
|
|
818
|
-
* / rule).
|
|
793
|
+
* / WHAT THE KIT OFFERS AS A NEW ENGRAM'S SIGN-IN, read before it opens one through `parent`. The
|
|
794
|
+
* / answer: the parent's owner — ONLY when the parent is a first engram (the kit offers that
|
|
795
|
+
* / principal as the default sign-in only then, after it prints it and the person running the agent
|
|
796
|
+
* / confirms it is theirs; for a parent opened through another the field is absent, so the read never
|
|
797
|
+
* / discloses a key file's principal); whether the parent is a first engram; and whether it is
|
|
798
|
+
* / registered, `#Active` and not abandoned (`isRegisteredActiveEngram`'s rule).
|
|
819
799
|
* /
|
|
820
800
|
* / CALLER: a lasting key with a LIVE engagement with `parent` at this registry, in either store
|
|
821
801
|
* / (`Engagements.hasOpenEither` — the same fact `sysOpenChild`'s admission reads, so exactly the
|
|
822
802
|
* / keys that may be opened an engram through `parent` may read what it offers). It discloses the
|
|
823
803
|
* / parent's owner to the parent's own engaged agent, the party `getParentOf` answers once the child
|
|
824
|
-
* / exists. Anyone else is REFUSED loudly (refusal over fabrication), in the same words whether or
|
|
825
|
-
* / an engram, so a refusal tells a stranger nothing. A QUERY, so the refusal is not
|
|
826
|
-
* / log (`denied` says why a query cannot write). `#NotFound` only to an engaged
|
|
827
|
-
* / parent this registry holds no owner for.
|
|
804
|
+
* / exists. Anyone else is REFUSED loudly (refusal over fabrication), in the same words whether or
|
|
805
|
+
* / not `parent` is an engram, so a refusal tells a stranger nothing. A QUERY, so the refusal is not
|
|
806
|
+
* / in the denial log (`denied` says why a query cannot write). `#NotFound` only to an engaged
|
|
807
|
+
* / caller, for a parent this registry holds no owner for.
|
|
828
808
|
* / Called by: the owner kit's opening of an engram through a parent, signed by the agent's lasting
|
|
829
809
|
* / key, before it names the new engram's sign-in.
|
|
830
810
|
*/
|
|
@@ -839,37 +819,34 @@ export interface _SERVICE {
|
|
|
839
819
|
*/
|
|
840
820
|
getConsentOrigin: ActorMethod<[], [] | [string]>;
|
|
841
821
|
/**
|
|
842
|
-
* / The ATTESTABLE custody-mode fact
|
|
843
|
-
* /
|
|
844
|
-
* /
|
|
845
|
-
* /
|
|
846
|
-
* /
|
|
847
|
-
* /
|
|
848
|
-
* /
|
|
849
|
-
* /
|
|
850
|
-
* /
|
|
851
|
-
* /
|
|
852
|
-
* /
|
|
853
|
-
* /
|
|
854
|
-
* /
|
|
855
|
-
* /
|
|
856
|
-
* /
|
|
857
|
-
* /
|
|
858
|
-
* /
|
|
859
|
-
* / is not a mode at all — it is this registry declining to make a claim about a canister it did
|
|
860
|
-
* / not spawn, which is a different kind of answer and now looks like one.
|
|
861
|
-
* /
|
|
862
|
-
* / Derived from records, never probed: a canister_status call would trap for exactly the
|
|
863
|
-
* / canisters we are not the controller of, i.e. the sovereign ones this read exists to identify.
|
|
822
|
+
* / The ATTESTABLE custody-mode fact, derived from the registry's OWN transition records
|
|
823
|
+
* / (`claimSovereignty` / `returnToManaged` maintain `sovereignEngramIds`) — NOT from the network:
|
|
824
|
+
* / `probeCustodyMode` is the live read, and differs from this one when an owner changed the
|
|
825
|
+
* / controllers by hand.
|
|
826
|
+
* /
|
|
827
|
+
* / PUBLIC: free and ungated, for good. Custody mode is a trust fact a proof about an engram
|
|
828
|
+
* / carries: managed = the registry's operator can warrant its own controller conduct; sovereign =
|
|
829
|
+
* / registry-side facts only. (Money-origin, by contrast, is payer-blind and never a record fact.)
|
|
830
|
+
* /
|
|
831
|
+
* / Custody is a VARIANT (since 0.16.0): `CustodyMode` is `#Managed | #Sovereign`, and the no-claim
|
|
832
|
+
* / case answers `#Err(#NotFound)`, saying WHY rather than being a third string. "unknown" as text
|
|
833
|
+
* / sat beside "sovereign" and "managed" as if it were a third custody mode. It is not a mode at all
|
|
834
|
+
* / — it is this registry declining to make a claim about a canister it did not spawn, which is a
|
|
835
|
+
* / different kind of answer and now looks like one.
|
|
836
|
+
* /
|
|
837
|
+
* / Derived from records, never probed: a query makes no call, so it answers for any canister this
|
|
838
|
+
* / registry spawned at no cost to anyone.
|
|
864
839
|
*/
|
|
865
840
|
getCustodyMode: ActorMethod<[Principal], Result_11>;
|
|
866
841
|
/**
|
|
867
|
-
* / Cycles-health probe —
|
|
868
|
-
* /
|
|
842
|
+
* / Cycles-health probe — the registry's own cycle balance and its operating-reserve floor, nothing
|
|
843
|
+
* / else (money is the biller's, cycles are the registry's). `scripts/audit-chain/health-alert.mjs
|
|
844
|
+
* / --canister <registry id>` reads it and exits non-zero when the balance is under the floor, or
|
|
845
|
+
* / close to it.
|
|
869
846
|
* /
|
|
870
847
|
* / PUBLIC: whether this registry can still afford to spawn is a fact every prospective owner
|
|
871
|
-
* / depends on and none of them can otherwise observe. Cycles only, by construction
|
|
872
|
-
* /
|
|
848
|
+
* / depends on and none of them can otherwise observe. Cycles only, by construction: the money is on
|
|
849
|
+
* / the biller, so there is no balance here to withhold.
|
|
873
850
|
*/
|
|
874
851
|
getCycleReserveStatus: ActorMethod<
|
|
875
852
|
[],
|
|
@@ -880,41 +857,36 @@ export interface _SERVICE {
|
|
|
880
857
|
* / fact (its assignment is in the hash-chained audit log). null = spawned before numbering
|
|
881
858
|
* / existed, or by another registry.
|
|
882
859
|
* /
|
|
883
|
-
* / ⟨0.16.0, the vocabulary ruling of 2026-08-17⟩ RENAMED from `sysEngramNumberOf`. The `sys` prefix names
|
|
884
|
-
* / the CALLER TIER a method was built for, and this one was never gated — it is a bare public
|
|
885
|
-
* / query, as the line above says. A prefix that reads as an authorization claim while carrying
|
|
886
|
-
* / none is worse than no prefix: it invites a reader to assume a gate that does not exist, and
|
|
887
|
-
* / a disclosure sweep grepping `sys*` would have counted this as tiered surface it is not.
|
|
888
|
-
* /
|
|
889
860
|
* / PUBLIC: the spawn ordinal is a permanent, dual-recorded fact about an engram that its owner
|
|
890
861
|
* / publishes by existing — engram #7 is #7 to everyone. It identifies a canister, never a person.
|
|
891
862
|
* /
|
|
892
|
-
* /
|
|
893
|
-
* /
|
|
894
|
-
* /
|
|
895
|
-
* /
|
|
896
|
-
* /
|
|
897
|
-
* /
|
|
898
|
-
* /
|
|
899
|
-
* /
|
|
863
|
+
* / THE NAME. It was `sysEngramNumberOf` before 0.16.0. The `sys` prefix names the CALLER TIER a
|
|
864
|
+
* / method was built for, and this one was never gated — it is a bare public query. A prefix that
|
|
865
|
+
* / reads as an authorization claim while carrying none is worse than no prefix: it invites a reader
|
|
866
|
+
* / to assume a gate that does not exist, and a disclosure sweep grepping `sys*` would have counted
|
|
867
|
+
* / this as tiered surface it is not. It was then `getEngramNumber` until 2026-10-02, while the
|
|
868
|
+
* / engram served `getEngramNumber()` with no argument: one name with two arities on two canisters is
|
|
869
|
+
* / what a hand-written client cannot tell apart (a structural actor type matches either target), so
|
|
870
|
+
* / it follows the rule `getMarketCanister` already follows: distinct names on distinct canisters.
|
|
871
|
+
* / `…Of` says what the argument is for. The engram no longer serves `getEngramNumber` at all (its
|
|
872
|
+
* / copy of the number went with the genesis seed), so this is the one read of an engram's number.
|
|
900
873
|
*/
|
|
901
874
|
getEngramNumberOf: ActorMethod<[Principal], [] | [bigint]>;
|
|
902
875
|
/**
|
|
903
|
-
* /
|
|
904
|
-
* /
|
|
905
|
-
* /
|
|
906
|
-
* /
|
|
907
|
-
* /
|
|
908
|
-
* /
|
|
909
|
-
* / `listMyAgentDisputes`'s empty list.
|
|
876
|
+
* / What a lasting key opened through a parent: the engram, the engram it was opened from, and the
|
|
877
|
+
* / cut-off's time if there is one. GATED: readable by the key itself (an agent asking about its
|
|
878
|
+
* / own), the owner of the engram it was opened from (whose console shows it), an admin or an audit
|
|
879
|
+
* / viewer. Anyone else is REFUSED — the same words whether or not the key opened anything, so the
|
|
880
|
+
* / refusal tells a stranger nothing. `#NotFound` only to a permitted reader, for a key that opened
|
|
881
|
+
* / nothing: a true answer, like `listMyAgentDisputes`'s empty list.
|
|
910
882
|
*/
|
|
911
883
|
getEngramOpenedThrough: ActorMethod<[Principal], Result_24>;
|
|
912
884
|
/**
|
|
913
885
|
* / The i-th 1 MiB slice of the attested engram wasm (0-indexed). The caller reassembles all
|
|
914
886
|
* / chunks in order and MUST verify sha256(reassembled) == getEngramWasmHash before installing —
|
|
915
|
-
* / the hash is the attestation; the bytes are a convenience.
|
|
916
|
-
* / PUBLIC:
|
|
917
|
-
* /
|
|
887
|
+
* / the hash is the attestation; the bytes are a convenience.
|
|
888
|
+
* / PUBLIC: an out-of-range index is `#NotFound`, not an empty blob (no fabricated empties, since
|
|
889
|
+
* / 0.16.0).
|
|
918
890
|
* /
|
|
919
891
|
* / The empty blob was indistinguishable from a legitimately empty chunk AND from "no wasm is
|
|
920
892
|
* / staged at all" — and this is the surface a verifier walks to reassemble a template and check
|
|
@@ -924,26 +896,24 @@ export interface _SERVICE {
|
|
|
924
896
|
*/
|
|
925
897
|
getEngramWasmChunk: ActorMethod<[bigint], Result_28>;
|
|
926
898
|
/**
|
|
927
|
-
* / The stored template's release class
|
|
928
|
-
* /
|
|
929
|
-
* /
|
|
930
|
-
* /
|
|
931
|
-
* /
|
|
932
|
-
* /
|
|
933
|
-
* /
|
|
934
|
-
* / It returned "security" or "feature" as `Text`, so every consumer compared strings and no
|
|
935
|
-
* / compiler anywhere could catch a typo or a third class arriving. A variant makes the set closed
|
|
936
|
-
* / and the comparison checked — and this value gates whether an upgrade is funded, so a caller
|
|
937
|
-
* / that silently fails to match "security" funds nothing and reports no error.
|
|
938
|
-
* / ⟨CORRECTED 2026-10-26, later — the owner's restart choice of that day: "pay whenever the engram is
|
|
939
|
-
* / missing any security release, whatever the latest release is labelled"⟩ "#Feature — the
|
|
940
|
-
* / registry pays for no install" no longer holds for every engram: an engram still missing an
|
|
899
|
+
* / The stored template's release class.
|
|
900
|
+
* /
|
|
901
|
+
* / PUBLIC: FREE and UNGATED, because it is the checkable half of a public promise about which
|
|
902
|
+
* / installs the registry pays for. The funding rule it checks: #Security — the registry pays for
|
|
903
|
+
* / the install on every running engram it can reach, any size; #Feature — the registry pays for no
|
|
904
|
+
* / install, and each engram runs it on its own compute. One exception: an engram still missing an
|
|
941
905
|
* / earlier security release is paid as a security update even while this reads #Feature, because
|
|
942
|
-
* / the current template carries that fix (UpgradeFunding.effectiveClass) — unless the current
|
|
906
|
+
* / the current template carries that fix (`UpgradeFunding.effectiveClass`) — unless the current
|
|
943
907
|
* / template is itself behind a security release (an older build re-uploaded), which cannot deliver
|
|
944
|
-
* / the fix. An engram missing no security release is
|
|
945
|
-
* /
|
|
946
|
-
* /
|
|
908
|
+
* / the fix. An engram missing no security release is never paid for a #Feature install. So this
|
|
909
|
+
* / value is the declared label, not the whole funding rule: the `upgrade.topUp` audit line says
|
|
910
|
+
* / `class=Security declared=Feature` when the two differ.
|
|
911
|
+
* /
|
|
912
|
+
* / The release class is a VARIANT, not a stringly-typed enum (since 0.16.0). It returned "security"
|
|
913
|
+
* / or "feature" as `Text`, so every consumer compared strings and no compiler anywhere could catch
|
|
914
|
+
* / a typo or a third class arriving. A variant makes the set closed and the comparison checked —
|
|
915
|
+
* / and this value gates whether an upgrade is funded, so a caller that silently fails to match
|
|
916
|
+
* / "security" funds nothing and reports no error.
|
|
947
917
|
*/
|
|
948
918
|
getEngramWasmClass: ActorMethod<[], ReleaseClass>;
|
|
949
919
|
/**
|
|
@@ -963,15 +933,13 @@ export interface _SERVICE {
|
|
|
963
933
|
*/
|
|
964
934
|
getEngramWasmInfo: ActorMethod<[], EngramWasmInfo>;
|
|
965
935
|
/**
|
|
966
|
-
* /
|
|
967
|
-
* /
|
|
968
|
-
* /
|
|
969
|
-
* /
|
|
936
|
+
* / UPDATE, NOT QUERY, and NOT because of a system call — this body awaits nothing. The update
|
|
937
|
+
* / exists so the DENIAL IS RECORDED: `denied()` is a state write, and a query cannot write. Exactly
|
|
938
|
+
* / the argument `listEngrams` settled at its own declaration, and the same conclusion: a query here
|
|
939
|
+
* / would silently retire the record of who was refused.
|
|
970
940
|
* /
|
|
971
|
-
* /
|
|
972
|
-
* /
|
|
973
|
-
* / trapping-to-refuse; it did not give queries the ability to
|
|
974
|
-
* / write, which is the thing this actually depends on.
|
|
941
|
+
* / The one-Result-shape rule retired trapping-to-refuse as a reason for an update; it did not give
|
|
942
|
+
* / queries the ability to write, which is the thing this depends on.
|
|
975
943
|
*/
|
|
976
944
|
getFleetMetrics: ActorMethod<[], Result_27>;
|
|
977
945
|
/**
|
|
@@ -982,28 +950,21 @@ export interface _SERVICE {
|
|
|
982
950
|
/**
|
|
983
951
|
* / What the last upgrade attempt actually DID — the additive answer to "was I upgraded, or was
|
|
984
952
|
* / I already current?". A #Skipped result variant would have broken every deployed decoder and
|
|
985
|
-
* / scored a skip as a FAILURE in
|
|
986
|
-
* /
|
|
987
|
-
* / ⚠ `
|
|
988
|
-
* / It does NOT date the engram's running code — a re-run fleet push marches
|
|
989
|
-
* / nothing changes.
|
|
990
|
-
* /
|
|
991
|
-
* /
|
|
992
|
-
* /
|
|
993
|
-
* / the
|
|
994
|
-
* / self-upgrade or a manual install shows up as a change with no matching upgrade. Renaming here is
|
|
995
|
-
* / free: the record is built at the query boundary, and the stable state it reads keeps its own
|
|
996
|
-
* / spelling.
|
|
997
|
-
* / ⟨CORRECTED 2026-10-02: "by any hand … shows up" is false, and so is "stamped only when code
|
|
998
|
-
* / actually changed" above, read without its limit.⟩ `changedAtNs` is written at exactly two
|
|
999
|
-
* / places, both right after THIS registry's own successful install on the engram
|
|
1000
|
-
* / (`upgradeMyEngram` and `upgradeEngram`), in the same step that writes `atNs` with
|
|
1001
|
-
* / `upgraded = true`. Nothing here reads the engram's module hash from the network to stamp it. So
|
|
953
|
+
* / scored a skip as a FAILURE in tooling that greps the result for "Ok". PUBLIC: an owner deciding
|
|
954
|
+
* / whether their engram got a security fix should not need a key to find out.
|
|
955
|
+
* / ⚠ `atNs` is the time of THIS REGISTRY's last upgrade CALL, including a no-op on an
|
|
956
|
+
* / already-current engram. It does NOT date the engram's running code — a re-run fleet push marches
|
|
957
|
+
* / `atNs` forward while nothing changes. `changedAtNs` dates only the code changes this registry
|
|
958
|
+
* / made: it is written at exactly two places, both right after this registry's own successful
|
|
959
|
+
* / install on the engram (`upgradeMyEngram` and `upgradeEngram`), in the same step that writes
|
|
960
|
+
* / `atNs` with `upgraded = true`, and it is null for an engram this registry has not upgraded since
|
|
961
|
+
* / the field shipped. Nothing here reads the engram's module hash from the network to stamp it, so
|
|
1002
962
|
* / an install made by any other controller — a manual upgrade or reinstall — or a sovereign
|
|
1003
|
-
* / engram's own upgrade does NOT move it
|
|
1004
|
-
* /
|
|
1005
|
-
* /
|
|
1006
|
-
* /
|
|
963
|
+
* / engram's own upgrade does NOT move it and does NOT show up in this read. To see a change made by
|
|
964
|
+
* / another hand, read the engram's module hash from the network directly (it is public in the
|
|
965
|
+
* / canister's state) and check it with `isOfficialEngramWasm`; nothing in this canister makes that
|
|
966
|
+
* / comparison for you. (The two ns timestamps carry the `Ns` suffix since 0.16.0; the record is
|
|
967
|
+
* / built at the query boundary, and the stable state it reads keeps its own spelling.)
|
|
1007
968
|
*/
|
|
1008
969
|
getLastUpgrade: ActorMethod<[Principal], [] | [LastUpgrade]>;
|
|
1009
970
|
/**
|
|
@@ -1042,21 +1003,18 @@ export interface _SERVICE {
|
|
|
1042
1003
|
*/
|
|
1043
1004
|
getMyReservation: ActorMethod<[], [] | [ReservationView]>;
|
|
1044
1005
|
/**
|
|
1045
|
-
* / CALLER: the
|
|
1046
|
-
* / restart, when the next
|
|
1047
|
-
* / with no engram here — never "0 owed" to a caller it cannot answer for
|
|
1048
|
-
* /
|
|
1049
|
-
* /
|
|
1050
|
-
* /
|
|
1051
|
-
* / we lend"⟩ "when the next restart is allowed" now reads "when the registry can next LEND to a
|
|
1052
|
-
* / restart": `nextRestartAtNs` is only the weekly limit on a loan. A restart on the owner's own
|
|
1053
|
-
* / compute is allowed now, whatever it says. Field name and shape unchanged.
|
|
1006
|
+
* / CALLER: the owner's app, for the owner (every method names its caller). What the caller's engram
|
|
1007
|
+
* / owes from a restart, when the registry can next LEND to a restart, and whether one is open.
|
|
1008
|
+
* / Refused loudly to anyone with no engram here — never "0 owed" to a caller it cannot answer for
|
|
1009
|
+
* / (refusal over fabrication). `nextRestartAtNs` is only the weekly limit on a loan: a restart on
|
|
1010
|
+
* / the owner's own compute is allowed now, whatever it says. `openUntilNs` reads the open restart's
|
|
1011
|
+
* / `finishByNs` (`restartsOpen`): when the call or the sweep will have started the engram.
|
|
1054
1012
|
*/
|
|
1055
1013
|
getMyRestartStatus: ActorMethod<[], Result_26>;
|
|
1056
1014
|
/**
|
|
1057
|
-
* /
|
|
1058
|
-
* /
|
|
1059
|
-
* /
|
|
1015
|
+
* / How many engrams were ever opened, and how — lifetime sizes of state this registry never
|
|
1016
|
+
* / deletes, plus the two counters of refused openings (`Funnel.OpeningCounts` names each). All
|
|
1017
|
+
* / O(1); a reader differences them day to day.
|
|
1060
1018
|
* /
|
|
1061
1019
|
* / CALLERS: the admin and the audit viewers (the deployment's metrics reader holds a viewer
|
|
1062
1020
|
* / grant). Anyone else is REFUSED by name with their class — never a zero, which would read as
|
|
@@ -1065,39 +1023,39 @@ export interface _SERVICE {
|
|
|
1065
1023
|
*/
|
|
1066
1024
|
getOpeningCounts: ActorMethod<[], Result_25>;
|
|
1067
1025
|
/**
|
|
1068
|
-
* / Where an engram was opened from
|
|
1069
|
-
* /
|
|
1070
|
-
* /
|
|
1071
|
-
* /
|
|
1026
|
+
* / Where an engram was opened from: the engram, the engram it was opened from, and the cut-off's
|
|
1027
|
+
* / time if there is one. A child reads its own parent by its canister id, so a handed-on child can
|
|
1028
|
+
* / read its parent — `getEngramOpenedThrough` is keyed by the lasting key that OPENED the engram,
|
|
1029
|
+
* / which a new owner does not hold.
|
|
1072
1030
|
* /
|
|
1073
1031
|
* / CALLER: the engram's CURRENT owner, the current owner of the engram it was opened from, or this
|
|
1074
|
-
* / registry's admin and audit viewers (
|
|
1075
|
-
* / answered first; anyone else goes through the registry's combinator
|
|
1076
|
-
* / refuses every other caller in the same words whether or not the id is
|
|
1077
|
-
* / tells a stranger nothing. A QUERY, so the refusal is not written to the
|
|
1078
|
-
* / says why a query cannot write).
|
|
1032
|
+
* / registry's admin and audit viewers (every method names its caller). Reuses `parentOf`; no new
|
|
1033
|
+
* / state. The two owners are answered first; anyone else goes through the registry's combinator
|
|
1034
|
+
* / (`#adminOrViewer`), which refuses every other caller in the same words whether or not the id is
|
|
1035
|
+
* / an engram, so a refusal tells a stranger nothing. A QUERY, so the refusal is not written to the
|
|
1036
|
+
* / denial log (`denied` says why a query cannot write).
|
|
1079
1037
|
* / `#NotFound` only to a permitted reader: a first engram has no parent (a true answer), and an id
|
|
1080
|
-
* / this registry never opened is said to be one, not passed off as a first engram (refusal over
|
|
1081
|
-
* /
|
|
1082
|
-
* / gate unchanged.
|
|
1038
|
+
* / this registry never opened is said to be one, not passed off as a first engram (refusal over
|
|
1039
|
+
* / fabrication). This read changed neither `listChildrenOf` nor the change-of-owner gate.
|
|
1083
1040
|
*/
|
|
1084
1041
|
getParentOf: ActorMethod<[Principal], Result_24>;
|
|
1085
1042
|
/**
|
|
1086
|
-
* / PUBLIC: CALLER:
|
|
1087
|
-
* / registry last REINSTALLED the engram on its own id after the
|
|
1088
|
-
* / or null — never recovered.
|
|
1089
|
-
* / record that restarted is a fact about the record that a stranger
|
|
1090
|
-
* / is certified in the engram's anchor leaf (`recoveredAtNs`,
|
|
1091
|
-
* /
|
|
1092
|
-
* / the
|
|
1093
|
-
* /
|
|
1043
|
+
* / PUBLIC: CALLER: an owner's app, the owner kit and anyone checking an engram's record (every
|
|
1044
|
+
* / method names its caller). When this registry last REINSTALLED the engram on its own id after the
|
|
1045
|
+
* / network erased it (`recoverMyEngram`), or null — never recovered. Public for
|
|
1046
|
+
* / `getAbandonedAtNs`'s reason: a record that restarted is a fact about the record that a stranger
|
|
1047
|
+
* / checking it needs, and the same date is certified in the engram's anchor leaf (`recoveredAtNs`,
|
|
1048
|
+
* / with its `era`).
|
|
1049
|
+
* / Set when the reinstall BEGINS — the old record's anchors are set aside in the same message,
|
|
1050
|
+
* / before the install (`recoverMyEngram` says why) — so while a recover's install has not landed,
|
|
1051
|
+
* / the engram can read erased with this set; the compute probes' `recoverOpen` says one is open.
|
|
1094
1052
|
*/
|
|
1095
1053
|
getRecoveredAtNs: ActorMethod<[Principal], [] | [bigint]>;
|
|
1096
1054
|
/**
|
|
1097
|
-
* /
|
|
1098
|
-
* /
|
|
1099
|
-
* /
|
|
1100
|
-
* /
|
|
1055
|
+
* / How far agents reach across owners — COUNTS ONLY: agents by how many trees their record spans
|
|
1056
|
+
* / (1 · 2 · 3–4 · 5+), engrams opened through a parent that are live or cut off, and engrams that
|
|
1057
|
+
* / paired an agent within seven days of opening. No principal, no row, no per-agent figure
|
|
1058
|
+
* / (`Funnel.referralCounts` says what is folded and how `exclude` drops a tree).
|
|
1101
1059
|
* /
|
|
1102
1060
|
* / `exclude`: the deployment's own accounts (owner keys, agent roots, engram ids), at most 1,000.
|
|
1103
1061
|
* / An agent on it is dropped whole; an engagement whose engram's tree touches it is dropped.
|
|
@@ -1108,17 +1066,15 @@ export interface _SERVICE {
|
|
|
1108
1066
|
*/
|
|
1109
1067
|
getReferralCounts: ActorMethod<[Array<Principal>], Result_23>;
|
|
1110
1068
|
/**
|
|
1111
|
-
* /
|
|
1112
|
-
* /
|
|
1113
|
-
* /
|
|
1114
|
-
* /
|
|
1115
|
-
* /
|
|
1116
|
-
* /
|
|
1117
|
-
* / more than an hour behind `atNs` is a lost clock. `Types.RegistryHealth` says what each field
|
|
1118
|
-
* / means, and why every field is `opt` and always filled.
|
|
1069
|
+
* / THE REGISTRY'S HEALTH IN ONE READ: its cycle reserve, its roster, its anchoring counts — the
|
|
1070
|
+
* / same answers `getCycleReserveStatus`, `getAdminRoles` and `getAnchorStats` give, which stay
|
|
1071
|
+
* / served unchanged for everyone who reads them one at a time — and the stamps of its clock, which
|
|
1072
|
+
* / wakes only at the deadlines it records (with a six-hour net) and so is silent by design:
|
|
1073
|
+
* / `clock.nextWakeAtNs` more than an hour behind `atNs` is a lost clock. `Types.RegistryHealth`
|
|
1074
|
+
* / says what each field means, and why every field is `opt` and always filled.
|
|
1119
1075
|
* /
|
|
1120
|
-
* / CALLER: the deployment's monitor, once an hour, under the audit-viewer grant its daily
|
|
1121
|
-
* / reading already holds (
|
|
1076
|
+
* / CALLER: the deployment's monitor, once an hour, under the audit-viewer grant its daily
|
|
1077
|
+
* / count-of-use reading already holds (every method names its caller). Also the admin.
|
|
1122
1078
|
* /
|
|
1123
1079
|
* / GATED, LIKE THE COUNT-OF-USE READS THAT MONITOR MAKES (`getOpeningCounts`): the admin or an audit
|
|
1124
1080
|
* / viewer; anyone else is REFUSED by name — never an empty or zero reading. A QUERY: its refusal is
|
|
@@ -1134,9 +1090,9 @@ export interface _SERVICE {
|
|
|
1134
1090
|
getRentBiller: ActorMethod<[], [] | [Principal]>;
|
|
1135
1091
|
/**
|
|
1136
1092
|
* / Public transparency: is the gate armed, and which identity issuers are exempt?
|
|
1137
|
-
* /
|
|
1138
|
-
* /
|
|
1139
|
-
* /
|
|
1093
|
+
* / It carries `inviteIssuer` (since 0.16.0), closing a setter-without-a-getter gap without adding
|
|
1094
|
+
* / a method: `setInviteIssuer` could write a principal that nothing could read back, so "who may
|
|
1095
|
+
* / mint reserve invites" was unanswerable from outside.
|
|
1140
1096
|
* /
|
|
1141
1097
|
* / It serves the EFFECTIVE issuer, not the raw `?Principal`. The stored value is null until
|
|
1142
1098
|
* / someone sets it and `effectiveInviteIssuer()` then falls back to the admin — which is what
|
|
@@ -1150,30 +1106,28 @@ export interface _SERVICE {
|
|
|
1150
1106
|
*/
|
|
1151
1107
|
getReserveGateConfig: ActorMethod<[], ReserveGateConfig>;
|
|
1152
1108
|
/**
|
|
1153
|
-
* / PUBLIC: CALLER:
|
|
1154
|
-
* /
|
|
1155
|
-
* /
|
|
1156
|
-
* /
|
|
1157
|
-
* /
|
|
1158
|
-
* / identities hold between any two messages
|
|
1159
|
-
* / advancePaid = advanceReturned + advanceWrittenOff +
|
|
1160
|
-
* /
|
|
1161
|
-
* /
|
|
1162
|
-
* /
|
|
1163
|
-
* /
|
|
1164
|
-
* / `
|
|
1165
|
-
* /
|
|
1166
|
-
* /
|
|
1167
|
-
* /
|
|
1168
|
-
* / release
|
|
1169
|
-
* /
|
|
1170
|
-
* /
|
|
1171
|
-
* /
|
|
1172
|
-
* /
|
|
1173
|
-
* /
|
|
1174
|
-
* /
|
|
1175
|
-
* / such an archive is kept durably is an operator's choice, not this registry's. The fleet totals
|
|
1176
|
-
* / this method answers are exact regardless.
|
|
1109
|
+
* / PUBLIC: CALLER: a status page, or anyone checking what the registry spends (every method names
|
|
1110
|
+
* / its caller). What the registry has lent to restart stopped engrams — lent, repaid, written off,
|
|
1111
|
+
* / outstanding — and what engrams gave back of the compute a paid security update advanced them
|
|
1112
|
+
* / (returned, written off). Ungated, because a subsidy the registry would not publish is one it
|
|
1113
|
+
* / should not spend. `getUpgradeSubsidyTotal` stays the gross figure.
|
|
1114
|
+
* / Written off, but exact: two identities hold between any two messages, lent = repaid +
|
|
1115
|
+
* / writtenOff + outstanding, and advancePaid = advanceReturned + advanceWrittenOff +
|
|
1116
|
+
* / advanceOutstanding.
|
|
1117
|
+
* / These totals are fleet-wide. PER RELEASE, read the audit chain: every line that moves an advance
|
|
1118
|
+
* / names the release it was paid for, `template=<module hash>` (and `version=` when the release
|
|
1119
|
+
* / history names one) — `upgrade.topUp` (paid, `added=`), `upgrade.advance.returned` (`returned=`,
|
|
1120
|
+
* / `writtenOff=`) and `upgrade.advance.writtenOff` (`writtenOff=`, including the 90-day write-off of
|
|
1121
|
+
* / an advance left outstanding). Summed by `template=` over a COMPLETE copy of the chain, they give
|
|
1122
|
+
* / each release's paid, returned and written-off figures exactly; what is still out per release is
|
|
1123
|
+
* / paid − returned − written off. Restart-loan lines are not per release (a loan pays for no
|
|
1124
|
+
* / release). A per-release sum read from the registry alone can miss lines: the registry keeps the
|
|
1125
|
+
* / most recent 10,000 audit entries (AuditLog's `MAX_ENTRIES`; on overflow it drops back to 9,000,
|
|
1126
|
+
* / oldest first), and a give-back or a 90-day write-off can land long after its `upgrade.topUp` line
|
|
1127
|
+
* / was dropped. Exact per-release figures need an archive of the chain kept from the first line on
|
|
1128
|
+
* / (scripts/audit-chain/monitor.mjs `--archive`); whether such an archive is kept durably is an
|
|
1129
|
+
* / operator's choice, not this registry's. The fleet totals this method answers are exact
|
|
1130
|
+
* / regardless.
|
|
1177
1131
|
*/
|
|
1178
1132
|
getRestartTotals: ActorMethod<[], RestartTotals>;
|
|
1179
1133
|
/**
|
|
@@ -1183,30 +1137,27 @@ export interface _SERVICE {
|
|
|
1183
1137
|
getScreeningDenylistSize: ActorMethod<[], bigint>;
|
|
1184
1138
|
/**
|
|
1185
1139
|
* / How many engram template releases this registry has declared `#Security` — the class that
|
|
1186
|
-
* / skips any delay and whose install the registry pays for on every running engram
|
|
1187
|
-
* /
|
|
1188
|
-
* /
|
|
1189
|
-
* /
|
|
1190
|
-
* /
|
|
1191
|
-
* /
|
|
1192
|
-
* /
|
|
1193
|
-
* /
|
|
1194
|
-
* /
|
|
1195
|
-
* /
|
|
1196
|
-
* /
|
|
1197
|
-
* /
|
|
1198
|
-
* / on us that only we can read.
|
|
1140
|
+
* / skips any delay and whose install the registry pays for on every running engram. The count is
|
|
1141
|
+
* / published, not the list. It moves only when a template's class is declared INTO `#Security`
|
|
1142
|
+
* / (`setEngramWasmClass`), never on `#Feature`, never down. It counts TEMPLATES, not declarations:
|
|
1143
|
+
* / each distinct template (by its module hash) counts once, the first time it is declared
|
|
1144
|
+
* / `#Security`. Re-declaring it — which a deploy does after every upload — or flipping it to
|
|
1145
|
+
* / `#Feature` and back changes nothing; counting declarations would count one security release
|
|
1146
|
+
* / deployed five times as five.
|
|
1147
|
+
* /
|
|
1148
|
+
* / PUBLIC: it is the checkable half of an unenforced policy — the feature/security rule is
|
|
1149
|
+
* / published without code holding the registry's operator to it, so the one thing a stranger can
|
|
1150
|
+
* / watch is how often the operator reaches for the class that skips the wait. A gated count would be
|
|
1151
|
+
* / a check on the operator that only the operator can read.
|
|
1199
1152
|
*/
|
|
1200
1153
|
getSecurityReleaseCount: ActorMethod<[], bigint>;
|
|
1201
1154
|
/**
|
|
1202
|
-
* /
|
|
1203
|
-
* /
|
|
1204
|
-
* /
|
|
1205
|
-
* / (`totalCyclesAllocated`) so neither figure is inflated by the other.
|
|
1155
|
+
* / Cumulative cycles accepted at the sponsored door (`sysOpenChild`) and forwarded into engrams
|
|
1156
|
+
* / opened through another — cycles the calling engrams attached, never the registry's own. Kept
|
|
1157
|
+
* / apart from the grant counter (`totalCyclesAllocated`) so neither figure is inflated by the other.
|
|
1206
1158
|
* /
|
|
1207
|
-
* / PUBLIC: for the reason `getUpgradeSubsidyTotal` is — a number
|
|
1208
|
-
* / should not forward. It names no engram and no owner.
|
|
1209
|
-
* / "PUBLIC," and a rationale check that looks for the colon form read the method as unexplained.)
|
|
1159
|
+
* / PUBLIC: for the reason `getUpgradeSubsidyTotal` is — a number the registry would not publish is
|
|
1160
|
+
* / one it should not forward. It names no engram and no owner.
|
|
1210
1161
|
*/
|
|
1211
1162
|
getSponsoredCyclesTotal: ActorMethod<[], bigint>;
|
|
1212
1163
|
/**
|
|
@@ -1219,7 +1170,8 @@ export interface _SERVICE {
|
|
|
1219
1170
|
*/
|
|
1220
1171
|
getTreasuryAnchorId: ActorMethod<[], [] | [Principal]>;
|
|
1221
1172
|
/**
|
|
1222
|
-
* /
|
|
1173
|
+
* / `null` MEANS NEVER CHOSE (since 0.16.0, against fabricated answers). It used to mean
|
|
1174
|
+
* / `#AutoUpdate`.
|
|
1223
1175
|
* /
|
|
1224
1176
|
* / Returning the shipped default for a caller who has never expressed a preference is a
|
|
1225
1177
|
* / fabricated CONSENT: the registry answered "this owner opted into automatic upgrades" when the
|
|
@@ -1229,7 +1181,7 @@ export interface _SERVICE {
|
|
|
1229
1181
|
* /
|
|
1230
1182
|
* / The default still APPLIES; it is just no longer REPORTED as a choice. A caller that wants
|
|
1231
1183
|
* / effective behaviour reads null as "AutoUpdate applies", and one that wants to know whether the
|
|
1232
|
-
* / owner ever decided can
|
|
1184
|
+
* / owner ever decided can tell.
|
|
1233
1185
|
*/
|
|
1234
1186
|
getUpdatePreference: ActorMethod<[], [] | [UpdatePreference]>;
|
|
1235
1187
|
/**
|
|
@@ -1237,31 +1189,26 @@ export interface _SERVICE {
|
|
|
1237
1189
|
* / observable. Admin/viewer-gated: it reveals which engrams needed help, which is a nudge toward
|
|
1238
1190
|
* / who is underfunded.
|
|
1239
1191
|
* /
|
|
1240
|
-
* / This exists because the ledger was
|
|
1241
|
-
* /
|
|
1242
|
-
* /
|
|
1243
|
-
* /
|
|
1244
|
-
* /
|
|
1245
|
-
* / nothing could observe it. Untestable state guarding against a farming attack is the wrong
|
|
1246
|
-
* / thing to leave unobserved.
|
|
1247
|
-
* / ⟨0.16.0⟩ The refusal becomes a value, and the envelope finally separates the two nulls.
|
|
1192
|
+
* / This read exists because the ledger was otherwise unobservable. It is the guard that bounds
|
|
1193
|
+
* / funding to one deposit per engram per release even when install_code never succeeds — closing
|
|
1194
|
+
* / the interleave drain where an owner burns the deposit between the registry's canister_status
|
|
1195
|
+
* / read and the install, leaving the module hash unchanged and the engram eligible again.
|
|
1196
|
+
* / Untestable state guarding against a farming attack is the wrong thing to leave unobserved.
|
|
1248
1197
|
* /
|
|
1249
|
-
* /
|
|
1250
|
-
* /
|
|
1251
|
-
* /
|
|
1198
|
+
* / The refusal is a value (since 0.16.0), and the envelope separates the two nulls. `?Text` had to
|
|
1199
|
+
* / carry both "you may not ask" and "this engram was never funded for an upgrade" — and the second
|
|
1200
|
+
* / is a claim about THE REGISTRY'S OWN SPEND, not an absence of one. `#Ok(null)` means never funded,
|
|
1201
|
+
* / `#Err(#Refused)` means not your business, and no caller has to guess which.
|
|
1252
1202
|
*/
|
|
1253
1203
|
getUpgradeFundedTemplate: ActorMethod<[Principal], Result_21>;
|
|
1254
1204
|
/**
|
|
1255
|
-
* / Cumulative cycles the registry has granted to engrams for upgrades —
|
|
1256
|
-
* / security-update funding
|
|
1257
|
-
* /
|
|
1258
|
-
* /
|
|
1259
|
-
* /
|
|
1260
|
-
* / "a feature update it installs is
|
|
1261
|
-
* / not paid for" now excepts an engram still missing an earlier security release: that install is
|
|
1262
|
-
* / paid as a security update and counted here (UpgradeFunding.effectiveClass).
|
|
1205
|
+
* / Cumulative cycles the registry has granted to engrams for upgrades — the meter on
|
|
1206
|
+
* / security-update funding. The registry pays only for security updates on running engrams: the
|
|
1207
|
+
* / pull is never refused, and a feature update it installs is not paid for, except on an engram
|
|
1208
|
+
* / still missing an earlier security release, whose install is paid as a security update and
|
|
1209
|
+
* / counted here (`UpgradeFunding.effectiveClass`).
|
|
1263
1210
|
* /
|
|
1264
|
-
* / PUBLIC: a subsidy
|
|
1211
|
+
* / PUBLIC: a subsidy the registry would not publish is one it should not spend. Free and ungated.
|
|
1265
1212
|
*/
|
|
1266
1213
|
getUpgradeSubsidyTotal: ActorMethod<[], bigint>;
|
|
1267
1214
|
/**
|
|
@@ -1294,9 +1241,9 @@ export interface _SERVICE {
|
|
|
1294
1241
|
| { Err: { description: string; error_code: bigint } }
|
|
1295
1242
|
>;
|
|
1296
1243
|
/**
|
|
1297
|
-
* / Is `hash` (lowercase hex sha256) a build
|
|
1298
|
-
* / code
|
|
1299
|
-
* / a co-controller and could have installed their own wasm.
|
|
1244
|
+
* / Is `hash` (lowercase hex sha256) a build this registry published? The trust question for an
|
|
1245
|
+
* / engram whose code the registry cannot verify by controllership — a sovereign engram, or a managed
|
|
1246
|
+
* / one whose owner is a co-controller and could have installed their own wasm.
|
|
1300
1247
|
* /
|
|
1301
1248
|
* / PUBLIC: this IS the verification surface, and a verification surface nobody can call verifies
|
|
1302
1249
|
* / nothing. Free and ungated for the same reason.
|
|
@@ -1313,7 +1260,7 @@ export interface _SERVICE {
|
|
|
1313
1260
|
*/
|
|
1314
1261
|
isRegisteredActiveEngram: ActorMethod<[Principal], boolean>;
|
|
1315
1262
|
/**
|
|
1316
|
-
* /
|
|
1263
|
+
* / RENAMED from `engramsOperatedBy` in 0.16.0; the refusal is a value.
|
|
1317
1264
|
* /
|
|
1318
1265
|
* / `[]` here is a SUBSTANTIVE CLAIM ABOUT ANOTHER PRINCIPAL'S FLEET — "this agent works
|
|
1319
1266
|
* / nowhere" — handed to a caller who merely lacks a grant. Readable by an admin, an audit viewer,
|
|
@@ -1323,26 +1270,22 @@ export interface _SERVICE {
|
|
|
1323
1270
|
/**
|
|
1324
1271
|
* / Contradictory submissions, oldest-first. Empty is the normal case. Never trimmed.
|
|
1325
1272
|
* /
|
|
1326
|
-
* /
|
|
1327
|
-
* /
|
|
1328
|
-
* /
|
|
1329
|
-
* / policy is deliberately never-evict. An uncapped reply over a caller-growable list eventually
|
|
1273
|
+
* / PAGED, as every list is (since 2026-08-18). It returned the WHOLE list, and the list is one an
|
|
1274
|
+
* / engram can grow itself: `sysAnchorHead` appends a conflict on every contradictory submission and
|
|
1275
|
+
* / the policy is deliberately never-evict. An uncapped reply over a caller-growable list eventually
|
|
1330
1276
|
* / exceeds the response limit, and an oversized Candid reply does not truncate — it fails to
|
|
1331
1277
|
* / decode ENTIRELY, so the conflicts become unreadable. That is the exact opposite of what a
|
|
1332
1278
|
* / never-evicted evidence store is for: the record survives and nobody can read it.
|
|
1333
1279
|
* /
|
|
1334
1280
|
* / `total` is the full conflict count, so a caller holding one page still learns how many exist.
|
|
1335
1281
|
* /
|
|
1336
|
-
* /
|
|
1337
|
-
* / conflict list without limit
|
|
1338
|
-
* / registry's cycles
|
|
1339
|
-
* /
|
|
1340
|
-
* /
|
|
1341
|
-
* /
|
|
1342
|
-
* /
|
|
1343
|
-
* / at `AnchorConflicts.MAX_CONFLICTS_PER_ENGRAM` rows per engram, `sysAnchorHead` refuses further
|
|
1344
|
-
* / contradictions by name, and the refusals are counted in the certified leaf's
|
|
1345
|
-
* / `refusedConflicts`. So this list never exceeds that bound and the page clamp below is ample.⟩
|
|
1282
|
+
* / The write side is bounded too, without dropping anything. Unbounded, an engram could append to
|
|
1283
|
+
* / its own conflict list without limit — unbounded state on a shared canister paid for by the
|
|
1284
|
+
* / registry's cycles — and dropping rows would break an evidence store whose whole promise is that
|
|
1285
|
+
* / nothing is dropped. So nothing is deleted; `sysAnchorHead` refuses further contradictions by
|
|
1286
|
+
* / name once an engram has `AnchorConflicts.MAX_CONFLICTS_PER_ENGRAM` rows, and the refusals are
|
|
1287
|
+
* / counted in the certified leaf's `refusedConflicts`. This list therefore never exceeds that bound,
|
|
1288
|
+
* / and the page clamp is ample.
|
|
1346
1289
|
* /
|
|
1347
1290
|
* / PUBLIC: a conflict is the anchoring system reporting against ITSELF, and a self-report only
|
|
1348
1291
|
* / its author can read is worth nothing. Withholding it would let this registry publish anchors
|
|
@@ -1352,50 +1295,44 @@ export interface _SERVICE {
|
|
|
1352
1295
|
listAnchorConflicts: ActorMethod<[Principal, bigint, bigint], Result_20>;
|
|
1353
1296
|
/**
|
|
1354
1297
|
* / Witnessed heads for an engram, oldest-first. PUBLIC and ungated — an anchor a stranger cannot
|
|
1355
|
-
* / read is not an anchor
|
|
1298
|
+
* / read is not an anchor: anchors are recorded where counterparties can check them.
|
|
1356
1299
|
* /
|
|
1357
1300
|
* / Each entry carries `disputed`, derived at read time from the conflict log. Without it a
|
|
1358
1301
|
* / counterparty reading ONLY this query would take an already-contradicted head at face value —
|
|
1359
1302
|
* / on a same-total/different-head conflict the registry keeps both, the original here and the
|
|
1360
|
-
* / contradiction in
|
|
1303
|
+
* / contradiction in `listAnchorConflicts`. Requiring readers to fetch two queries and join them
|
|
1361
1304
|
* / correctly is a requirement most will not meet; carrying the flag inline removes the trap.
|
|
1362
|
-
* /
|
|
1363
|
-
* /
|
|
1364
|
-
* /
|
|
1365
|
-
* /
|
|
1366
|
-
* /
|
|
1367
|
-
* /
|
|
1368
|
-
* /
|
|
1369
|
-
* /
|
|
1370
|
-
* / engram's LATEST anchor. So the latest checkpoint IS checkable by a sceptical outsider:
|
|
1371
|
-
* / `getCertifiedAnchor` serves it with a certificate and a witness, checked against the network's
|
|
1372
|
-
* / root key without trusting the replica that answered. What stays true is narrower: THIS query,
|
|
1373
|
-
* / the full history oldest-first, is not certified, because only the latest anchor per engram is in
|
|
1374
|
-
* / the tree. For an earlier checkpoint a reader trusts the answering replica, or kept the
|
|
1375
|
-
* / certified latest anchor when it was the latest.
|
|
1305
|
+
* /
|
|
1306
|
+
* / ⚠ THE ANCHOR HISTORY IS NOT CERTIFIED; THE LATEST ANCHOR IS. The registry's one certified value
|
|
1307
|
+
* / is the root of a labelled tree, and the tree carries each engram's LATEST anchor, so the latest
|
|
1308
|
+
* / checkpoint is checkable by a sceptical outsider: `getCertifiedAnchor` serves it with a
|
|
1309
|
+
* / certificate and a witness, checked against the network's root key without trusting the replica
|
|
1310
|
+
* / that answered. THIS query, the full history oldest-first, is not certified, because only the
|
|
1311
|
+
* / latest anchor per engram is in the tree. For an earlier checkpoint a reader trusts the answering
|
|
1312
|
+
* / replica, or kept the certified latest anchor when it was the latest.
|
|
1376
1313
|
* /
|
|
1377
1314
|
* / PUBLIC: an anchor is evidence offered to a third party, so the third party has to be able to
|
|
1378
1315
|
* / read it. Gating this would leave the registry asserting that an engram's history is witnessed
|
|
1379
1316
|
* / while refusing to show the witness — which is the shape of claim nobody should accept.
|
|
1380
1317
|
* /
|
|
1381
|
-
* /
|
|
1382
|
-
* /
|
|
1383
|
-
* /
|
|
1384
|
-
* /
|
|
1385
|
-
* /
|
|
1386
|
-
* /
|
|
1387
|
-
* /
|
|
1388
|
-
* /
|
|
1389
|
-
* /
|
|
1390
|
-
* / recovered after the network erased it has more
|
|
1391
|
-
* / first record, k = after its k-th recover),
|
|
1392
|
-
* / aside, then the current era's. Nothing
|
|
1393
|
-
* / contradictions recorded during the
|
|
1318
|
+
* / A bare list, not a `Page`, decided 2026-10-02 and recorded here so the choice is visible: every
|
|
1319
|
+
* / other list on these canisters is a `Page`, and this one stays `[AnchorView]`. It is bounded by
|
|
1320
|
+
* / construction — at most `MAX_ANCHORS` (64) per engram, log-spaced with the genesis anchor pinned —
|
|
1321
|
+
* / and nothing is withheld from anyone (it is public), so a page's `total` would equal the length
|
|
1322
|
+
* / and its `withheld` would always be 0: two fields that could never say anything. A cap that is
|
|
1323
|
+
* / part of the anchoring design is not the unbounded growth paging exists for. WHAT WOULD MAKE THIS
|
|
1324
|
+
* / WRONG: the ring outgrowing one reply, or rows withheld per caller — then it pages, and that is a
|
|
1325
|
+
* / break.
|
|
1326
|
+
* /
|
|
1327
|
+
* / EVERY ERA, oldest first. An engram the registry recovered after the network erased it has more
|
|
1328
|
+
* / than one record: each anchor carries `era` (0 = its first record, k = after its k-th recover),
|
|
1329
|
+
* / the earlier eras' anchors as they stood when each was set aside, then the current era's. Nothing
|
|
1330
|
+
* / is withheld or deleted. `disputed` is read against the contradictions recorded during the
|
|
1331
|
+
* / anchor's own era.
|
|
1394
1332
|
*/
|
|
1395
1333
|
listAnchors: ActorMethod<[Principal], Array<AnchorView>>;
|
|
1396
1334
|
/**
|
|
1397
|
-
* /
|
|
1398
|
-
* / refusal is now a VALUE.
|
|
1335
|
+
* / RENAMED from `readAuditLog` in 0.16.0: a list method returns a page, and the refusal is a VALUE.
|
|
1399
1336
|
* /
|
|
1400
1337
|
* / It refused by `Debug.trap`, which was the right call when the alternative was a fabricated
|
|
1401
1338
|
* / answer — and the fabrication it replaced is worth restating, because it is the sharpest one
|
|
@@ -1409,25 +1346,22 @@ export interface _SERVICE {
|
|
|
1409
1346
|
* / read this, here is what you CAN read" has to parse a rejection string to do it. `#Err(#Refused)`
|
|
1410
1347
|
* / carries the same sentence as data. The message survives verbatim — it earned its wording.
|
|
1411
1348
|
* /
|
|
1412
|
-
* / The
|
|
1413
|
-
* /
|
|
1414
|
-
* /
|
|
1415
|
-
* /
|
|
1416
|
-
* /
|
|
1417
|
-
* /
|
|
1418
|
-
* /
|
|
1419
|
-
* /
|
|
1420
|
-
* /
|
|
1421
|
-
* / this read
|
|
1422
|
-
* / for strangers were ruled for the engram's record, and the status console decides a signed-in
|
|
1423
|
-
* / visitor's tier by whether this read refuses.
|
|
1349
|
+
* / The reply is the shared `Wire.RecordPage`, the shape every chain canister's record read serves,
|
|
1350
|
+
* / so one checker reads all of them. A viewer sees every entry, so `sealed` is always empty here;
|
|
1351
|
+
* / what the page adds is `ringFloor` (where the ring starts — a `start` below it begins at it) and
|
|
1352
|
+
* / `hashFirstFrom` (where this record switched to the hash-first rule: entries below it were hashed
|
|
1353
|
+
* / SHA-256(prev ‖ body)). `total` is the head counter, as everywhere else, not the size of the
|
|
1354
|
+
* / 1,000-entry window this read slices, which is not a number about the record. The old inline
|
|
1355
|
+
* / record's `earliestId` was redundant with the ring's own paging, and `size`/`headHash` are
|
|
1356
|
+
* / `getAuditHead`'s answer, published free to everyone. The gate is unchanged: hash-only rows for
|
|
1357
|
+
* / strangers are the engram's record's rule, and a client can tell a signed-in visitor's tier by
|
|
1358
|
+
* / whether this read refuses.
|
|
1424
1359
|
*/
|
|
1425
1360
|
listAuditEntries: ActorMethod<[bigint, bigint], Result_19>;
|
|
1426
1361
|
/**
|
|
1427
|
-
* /
|
|
1428
|
-
* /
|
|
1429
|
-
* /
|
|
1430
|
-
* / metrics on one canister and audit on another.
|
|
1362
|
+
* / RENAMED from `getMetricsViewers` in 0.16.0 — the viewer triple unifies on "audit viewer" across
|
|
1363
|
+
* / every canister (same concept, same name), because a roster that grants audit reads should not be
|
|
1364
|
+
* / named after metrics on one canister and audit on another.
|
|
1431
1365
|
* /
|
|
1432
1366
|
* / MEASURED FABRICATION, kept in the record: this arm answered `(vec {})` to an ANONYMOUS caller
|
|
1433
1367
|
* / on 2026-08-11 while viewers existed. An empty vec reads as "nobody holds read-only ops access"
|
|
@@ -1437,27 +1371,26 @@ export interface _SERVICE {
|
|
|
1437
1371
|
/**
|
|
1438
1372
|
* / PUBLIC: the release history, paged.
|
|
1439
1373
|
* /
|
|
1440
|
-
* /
|
|
1441
|
-
* / WHOLE changelog on every call with no way to say it had been truncated — and a list that
|
|
1442
|
-
* / say "there is more" looks complete at exactly the size where it stops being so.
|
|
1374
|
+
* / A `Page`, not a bare vec (since 0.16.0, a list method returns a page). The old shape returned
|
|
1375
|
+
* / the WHOLE changelog on every call with no way to say it had been truncated — and a list that
|
|
1376
|
+
* / cannot say "there is more" looks complete at exactly the size where it stops being so.
|
|
1443
1377
|
*/
|
|
1444
1378
|
listChangelogEntries: ActorMethod<[bigint, bigint], Page_4>;
|
|
1445
1379
|
/**
|
|
1446
|
-
* /
|
|
1447
|
-
* /
|
|
1448
|
-
* /
|
|
1449
|
-
* / chain, which exists to be walked by a stranger).
|
|
1380
|
+
* / The engrams opened through `engram`, each with its owner now and its cut-off time if any. GATED:
|
|
1381
|
+
* / readable by `engram`'s owner, an admin or an audit viewer. The link says who works for whom, so
|
|
1382
|
+
* / it is not public (unlike the predecessor chain, which exists to be walked by a stranger).
|
|
1450
1383
|
* /
|
|
1451
|
-
* / REFUSED LOUDLY, never `[]`, to anyone else (refusal over fabrication): an empty list handed to a
|
|
1452
|
-
* / merely lacks a grant would be a claim about another owner's engram. A QUERY, so the
|
|
1453
|
-
* / not in the denial log (`denied` says why a query cannot write).
|
|
1384
|
+
* / REFUSED LOUDLY, never `[]`, to anyone else (refusal over fabrication): an empty list handed to a
|
|
1385
|
+
* / caller who merely lacks a grant would be a claim about another owner's engram. A QUERY, so the
|
|
1386
|
+
* / refusal is not in the denial log (`denied` says why a query cannot write).
|
|
1454
1387
|
* /
|
|
1455
1388
|
* / Built by a pass over `parentOf` rather than from a second, reverse index: one stored fact and a
|
|
1456
1389
|
* / pass bounded by the number of opened engrams, instead of two facts to keep in step.
|
|
1457
1390
|
*/
|
|
1458
1391
|
listChildrenOf: ActorMethod<[Principal], Result_17>;
|
|
1459
1392
|
/**
|
|
1460
|
-
* /
|
|
1393
|
+
* / RENAMED from `readDenialLog` in 0.16.0; the refusal is a value.
|
|
1461
1394
|
* /
|
|
1462
1395
|
* / An empty denial log reads as NOBODY HAS EVER BEEN REFUSED HERE, which is the opposite of what
|
|
1463
1396
|
* / this log exists to record — so "empty" was never an acceptable answer to a caller who simply
|
|
@@ -1465,13 +1398,14 @@ export interface _SERVICE {
|
|
|
1465
1398
|
*/
|
|
1466
1399
|
listDenialEntries: ActorMethod<[bigint, bigint], Result_16>;
|
|
1467
1400
|
/**
|
|
1468
|
-
* /
|
|
1469
|
-
* /
|
|
1401
|
+
* / ONE ROW PER ENGAGEMENT, for the deployment's own count of use — DAYS, never instants, and NEVER
|
|
1402
|
+
* / the agent's root, enrolled key or invite.
|
|
1470
1403
|
* /
|
|
1471
1404
|
* / CALLERS: the admin, and the audit viewers — the reader the deployment runs for this purpose
|
|
1472
1405
|
* / holds a viewer grant and calls this once a day. Anyone else is REFUSED by name, with their
|
|
1473
1406
|
* / class (the anonymous principal, an engram, the template key, an engram's owner, a stranger) —
|
|
1474
|
-
* / never an empty page, which is what a lost history would also look like (refusal over
|
|
1407
|
+
* / never an empty page, which is what a lost history would also look like (refusal over
|
|
1408
|
+
* / fabrication).
|
|
1475
1409
|
* /
|
|
1476
1410
|
* / ARGUMENTS. `sinceDay`: any instant, floored to its UTC day; a row is served when the LATEST of
|
|
1477
1411
|
* / its start, its ending, its engram's abandonment and any reset since it started is on or after
|
|
@@ -1480,61 +1414,51 @@ export interface _SERVICE {
|
|
|
1480
1414
|
* / again from the last row's `seq` + 1. `limit`: rows wanted, at most 1,000; a page shorter than
|
|
1481
1415
|
* / the limit is the last. `companyList`: the deployment's own accounts (owner keys, agent roots,
|
|
1482
1416
|
* / engram ids), at most 1,000, folded into each row's yes/no `…OnList` answers and into
|
|
1483
|
-
* / `firstOutsideOnTree`; pass `[]` and every engagement
|
|
1417
|
+
* / `firstOutsideOnTree`; pass `[]` and every engagement counts as outside that list, the
|
|
1418
|
+
* / deployment's own included.
|
|
1484
1419
|
* /
|
|
1485
1420
|
* / The reply is a page whose `total` is every engagement ever recorded here. Each row's fields
|
|
1486
1421
|
* / are described at `Funnel.EngagementRow`; the walk and its cost at `Funnel.engagementRows`.
|
|
1487
1422
|
* /
|
|
1488
|
-
* /
|
|
1489
|
-
* /
|
|
1490
|
-
* /
|
|
1423
|
+
* / UPDATE, NOT QUERY, so a refused attempt is RECORDED: `denied()` is a state write, and a
|
|
1424
|
+
* / query cannot write (the reason `listEngrams` is an update). This is the most sensitive of the
|
|
1425
|
+
* / three reads — one row per engagement — so who was turned away is worth a record.
|
|
1491
1426
|
*/
|
|
1492
1427
|
listEngagementRows: ActorMethod<[bigint, bigint, bigint, Array<Principal>], Result_15>;
|
|
1493
1428
|
/**
|
|
1494
|
-
* /
|
|
1495
|
-
* /
|
|
1429
|
+
* / NO `authorized : ?Bool` FLAG — it went in 0.16.0 (one Result shape for every gated method), with
|
|
1430
|
+
* / everything built around it.
|
|
1496
1431
|
* /
|
|
1497
|
-
* / The flag was
|
|
1498
|
-
* /
|
|
1499
|
-
* /
|
|
1500
|
-
* /
|
|
1501
|
-
* /
|
|
1502
|
-
* / before believing a total.
|
|
1432
|
+
* / The flag was a compromise that rested on ONE premise: this method could not refuse. It is an
|
|
1433
|
+
* / UPDATE because `denied()` is a state write, and a trap would roll that write back — trading a
|
|
1434
|
+
* / false answer for a missing audit trail, which is strictly worse. So the refusal had to be
|
|
1435
|
+
* / smuggled out beside a fabricated `{ []; 0 }` payload, and readers had to be taught to check a
|
|
1436
|
+
* / sibling flag before believing a total.
|
|
1503
1437
|
* /
|
|
1504
1438
|
* / THE ENVELOPE REMOVES THE PREMISE. `#Err(#Refused)` is a VALUE, not a trap: the message
|
|
1505
1439
|
* / commits, the denial is recorded, and the caller gets a refusal they cannot mistake for data.
|
|
1506
|
-
* / There is no masked payload left to check a flag against
|
|
1507
|
-
* /
|
|
1508
|
-
* /
|
|
1509
|
-
* /
|
|
1510
|
-
* /
|
|
1511
|
-
* /
|
|
1512
|
-
* /
|
|
1513
|
-
* /
|
|
1514
|
-
* /
|
|
1515
|
-
* / only thing forcing an update was the masking problem. It was not: the update exists so the
|
|
1516
|
-
* / DENIAL IS RECORDED, and a query cannot write, so making this a query would silently retire
|
|
1517
|
-
* / the audit trail the original comment correctly called worth more than the false answer.
|
|
1518
|
-
* / Staying an update keeps both — the legible refusal AND the record of who was refused — which
|
|
1519
|
-
* / is strictly better than either option the old design had to choose between.
|
|
1520
|
-
* /
|
|
1521
|
-
* / ⟨update-for-read⟩ MARKER ADDED 2026-08-23, reasoning above UNCHANGED. This method's reason was already
|
|
1522
|
-
* / written and correct; what it lacked was the glyph a gate can see. Its case is the one the
|
|
1523
|
-
* / update-for-read rule's own text had to be corrected for — the forcing call is not a system API at all, it is
|
|
1524
|
-
* / `denied()`, a state write. (The deploying side's update-for-read check reads this marker.)
|
|
1440
|
+
* / There is no masked payload left to check a flag against, and none of the scaffolding around
|
|
1441
|
+
* / "this method cannot say no in a value" — a three-state ?true/?false/null protocol, and the rule
|
|
1442
|
+
* / that a reader collapsing null to false fabricates a refusal — is load-bearing any more.
|
|
1443
|
+
* /
|
|
1444
|
+
* / UPDATE, NOT QUERY, and not because of the masking problem: the update exists so the DENIAL IS
|
|
1445
|
+
* / RECORDED, and a query cannot write, so making this a query would silently retire the audit
|
|
1446
|
+
* / trail, which is worth more than the false answer. Staying an update keeps both — the legible
|
|
1447
|
+
* / refusal AND the record of who was refused. The forcing call is not a system API at all; it is
|
|
1448
|
+
* / `denied()`, a state write.
|
|
1525
1449
|
*/
|
|
1526
1450
|
listEngrams: ActorMethod<[bigint, bigint], Result_14>;
|
|
1527
1451
|
/**
|
|
1528
|
-
* /
|
|
1529
|
-
* /
|
|
1530
|
-
* /
|
|
1531
|
-
* /
|
|
1532
|
-
* / the failure mode `listAnchorConflicts`' declaration names.
|
|
1452
|
+
* / The caller's OWN dispute statements, oldest first, verbatim. Keyed by `msg.caller`, so it
|
|
1453
|
+
* / cannot be pointed at anyone else, and an empty list is a true answer about the caller ("you have
|
|
1454
|
+
* / appended none"), never a refusal in disguise. Without this read the statements would be a record
|
|
1455
|
+
* / nobody can read — the failure mode `listAnchorConflicts`' declaration names.
|
|
1533
1456
|
*/
|
|
1534
1457
|
listMyAgentDisputes: ActorMethod<[], Array<Dispute>>;
|
|
1535
1458
|
/**
|
|
1536
|
-
* / Every hash
|
|
1537
|
-
* / per-release stamps, so it is complete across the boundary where the list was
|
|
1459
|
+
* / Every hash this registry has published, current first. Union of the explicit list and the
|
|
1460
|
+
* / changelog's per-release stamps, so it is complete across the boundary where the list was
|
|
1461
|
+
* / introduced.
|
|
1538
1462
|
* /
|
|
1539
1463
|
* / PUBLIC: the same standing as `isOfficialEngramWasm` above — that one answers about a hash you
|
|
1540
1464
|
* / already hold, this one is how you get the set to compare against.
|
|
@@ -1544,13 +1468,13 @@ export interface _SERVICE {
|
|
|
1544
1468
|
* / The FULL predecessor lineage, newest-first: [immediate predecessor, its predecessor, …].
|
|
1545
1469
|
* / Empty for an engram that replaced nothing.
|
|
1546
1470
|
* /
|
|
1547
|
-
* / Why transitive (
|
|
1548
|
-
* /
|
|
1549
|
-
* /
|
|
1471
|
+
* / Why transitive ("free to leave, impossible to hide", decided 2026-08-02): abandonment is
|
|
1472
|
+
* / deliberately NOT rate-limited — friction punishes the owner who mis-provisions on day one, and
|
|
1473
|
+
* / it does not stop anyone determined. What protects the record is that walking away stays
|
|
1550
1474
|
* / VISIBLE. Single-hop visibility does not: A→B→C is three cheap steps, and a stranger checking C
|
|
1551
1475
|
* / would see only B and read it as a near-clean record. Reputation laundering with extra hops is
|
|
1552
|
-
* / still laundering, and it would be
|
|
1553
|
-
* / the cooldown.
|
|
1476
|
+
* / still laundering, and it would be this registry's own feature performing it. The chain is the
|
|
1477
|
+
* / answer, not the cooldown.
|
|
1554
1478
|
* /
|
|
1555
1479
|
* / TERMINATION: `seen` is not defensive dressing. predecessorOf is written once per engram at
|
|
1556
1480
|
* / creation and never rewritten, so a cycle should be impossible — but this is a QUERY over
|
|
@@ -1560,19 +1484,18 @@ export interface _SERVICE {
|
|
|
1560
1484
|
* / walk even if `seen` itself were somehow defeated.
|
|
1561
1485
|
* /
|
|
1562
1486
|
* / PUBLIC: this is the anti-laundering chain — it says an engram is a successor rather than a
|
|
1563
|
-
* / fresh start. Abandon-and-respawn is reputation laundering performed by
|
|
1564
|
-
* / a stranger can walk this, so the walk has to be answerable to a stranger.
|
|
1487
|
+
* / fresh start. Abandon-and-respawn is reputation laundering performed by this registry's own
|
|
1488
|
+
* / feature unless a stranger can walk this, so the walk has to be answerable to a stranger.
|
|
1565
1489
|
* /
|
|
1566
|
-
* /
|
|
1567
|
-
* /
|
|
1568
|
-
* /
|
|
1569
|
-
* /
|
|
1570
|
-
* /
|
|
1571
|
-
* / length cap above still hold.
|
|
1490
|
+
* / An abandoned engram stays in its owner's history, so an engram can name more than one
|
|
1491
|
+
* / predecessor (`ControlHandover.predecessorsFor`), and the lineage is walked a generation at a
|
|
1492
|
+
* / time: every engram this one named, then every engram those named, each listed once. A chain
|
|
1493
|
+
* / with one predecessor per engram reads as a simple chain. The walk is `ControlHandover.lineage`,
|
|
1494
|
+
* / where test/control-handover.test.mo runs it; the `seen` rule and the length cap above hold.
|
|
1572
1495
|
*/
|
|
1573
1496
|
listPredecessors: ActorMethod<[Principal], Array<Principal>>;
|
|
1574
1497
|
/**
|
|
1575
|
-
* /
|
|
1498
|
+
* / The refusal is a value (since 0.16.0).
|
|
1576
1499
|
* /
|
|
1577
1500
|
* / `total = 0` reads as "nobody has expressed a preference", and a successor registry seeded from
|
|
1578
1501
|
* / that zero applies the SHIPPED DEFAULT — silently reversing every explicit ManualOnly consent
|
|
@@ -1586,85 +1509,81 @@ export interface _SERVICE {
|
|
|
1586
1509
|
*/
|
|
1587
1510
|
mintReserveInvites: ActorMethod<[bigint], Result_12>;
|
|
1588
1511
|
/**
|
|
1589
|
-
* / The PROBED twin of `getCustodyMode`: same question, asked of the IC rather than of
|
|
1590
|
-
* / records — hence the `probe` verb rather than a second noun.
|
|
1591
|
-
* /
|
|
1592
|
-
* /
|
|
1593
|
-
* /
|
|
1594
|
-
* /
|
|
1595
|
-
* /
|
|
1596
|
-
* /
|
|
1597
|
-
* /
|
|
1598
|
-
* /
|
|
1599
|
-
* /
|
|
1600
|
-
* /
|
|
1601
|
-
* /
|
|
1602
|
-
* /
|
|
1603
|
-
* /
|
|
1604
|
-
* /
|
|
1605
|
-
* / The
|
|
1606
|
-
* /
|
|
1607
|
-
* /
|
|
1608
|
-
* /
|
|
1609
|
-
* /
|
|
1610
|
-
* /
|
|
1611
|
-
* /
|
|
1612
|
-
* /
|
|
1512
|
+
* / The PROBED twin of `getCustodyMode`: same question, asked of the IC rather than of the
|
|
1513
|
+
* / registry's records — hence the `probe` verb rather than a second noun.
|
|
1514
|
+
* /
|
|
1515
|
+
* / RENAMED from `getSovereigntyStatus` in 0.16.0 (same concept, same name across canisters). Both
|
|
1516
|
+
* / methods answer the same type, `Result<CustodyMode>`, so the old name introduced a
|
|
1517
|
+
* / SovereigntyStatus noun that no type in this interface has. A reader comparing the two names had
|
|
1518
|
+
* / to open both to learn they were one question; comparing the stems now shows it. What differs is
|
|
1519
|
+
* / HOW the answer is obtained (a live read of the controllers vs the transition records), which is
|
|
1520
|
+
* / exactly what a verb is for. The arity difference is real and stays: `getCustodyMode` answers
|
|
1521
|
+
* / about any canister, this one about the CALLER's own engram.
|
|
1522
|
+
* /
|
|
1523
|
+
* / #Managed when this registry is among the engram's controllers, #Sovereign when it is not. The
|
|
1524
|
+
* / controllers are read with the management canister's `canister_info` (`registryControls`), which
|
|
1525
|
+
* / the network answers to any canister. Not `canister_status`: the network answers that only to a
|
|
1526
|
+
* / controller, so it is rejected for exactly the engram a #Sovereign answer describes.
|
|
1527
|
+
* /
|
|
1528
|
+
* / The two cases the old `#Unknown` flattened are DIFFERENT facts and answer differently: "you have
|
|
1529
|
+
* / no engram here" is #NotFound, while "the network did not answer" is #Unavailable and means
|
|
1530
|
+
* / retry.
|
|
1531
|
+
* /
|
|
1532
|
+
* / The distinction matters more than usual because of what a wrong answer would say. A rejected
|
|
1533
|
+
* / read says nothing about the controllers, so it is NEVER reported as #Sovereign: that would tell
|
|
1534
|
+
* / an owner they had achieved sovereignty they may not have.
|
|
1535
|
+
* /
|
|
1536
|
+
* / UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
|
|
1537
|
+
* / `ic.canister_info`. That is also the whole point of the `probe` verb — the value is read
|
|
1613
1538
|
* / LIVE from the management canister rather than from a stored transition record, so a query
|
|
1614
1539
|
* / could not produce it at all, not merely more cheaply.
|
|
1615
1540
|
*/
|
|
1616
1541
|
probeCustodyMode: ActorMethod<[], Result_11>;
|
|
1617
1542
|
/**
|
|
1618
1543
|
* / What YOUR OWN engram's compute is, read by the registry — the one read that works while it is
|
|
1619
|
-
* / frozen.
|
|
1620
|
-
* /
|
|
1621
|
-
* /
|
|
1622
|
-
* /
|
|
1623
|
-
* /
|
|
1624
|
-
* /
|
|
1625
|
-
* /
|
|
1626
|
-
* /
|
|
1627
|
-
* /
|
|
1628
|
-
* /
|
|
1629
|
-
* /
|
|
1630
|
-
* /
|
|
1631
|
-
* /
|
|
1632
|
-
* / No rate limit (the do-less): each call costs the registry one management
|
|
1633
|
-
* / call — INFERRED a few million cycles, not measured. `eraseAboutNs` is "about" and never invented:
|
|
1634
|
-
* / null when the network reports no idle burn.
|
|
1544
|
+
* / frozen. The registry pays nothing for a stopped engram, so the owner has to be told, with
|
|
1545
|
+
* / signals that work while it is frozen.
|
|
1546
|
+
* /
|
|
1547
|
+
* / CALLER: the owner, through their app (every method names its caller). The registry is a
|
|
1548
|
+
* / controller, and the network answers a controller canister's status call for a frozen engram where
|
|
1549
|
+
* / it refuses the owner's own (IC0207; the network's source shows it). UPDATE, NOT QUERY (the
|
|
1550
|
+
* / `probe` verb, as `probeCustodyMode`): the system call that forces it is `canister_status` on the
|
|
1551
|
+
* / management canister, and a query cannot make an inter-canister call, so a query could not read
|
|
1552
|
+
* / the engram's network status at all — and that status is the only signal that still answers
|
|
1553
|
+
* / while the engram is frozen.
|
|
1554
|
+
* / No rate limit: each call costs the registry one management call — INFERRED a few million
|
|
1555
|
+
* / cycles, not measured. `eraseAboutNs` is "about" and never invented: null when the network
|
|
1556
|
+
* / reports no idle burn.
|
|
1635
1557
|
*/
|
|
1636
1558
|
probeMyEngramCompute: ActorMethod<[], Result_10>;
|
|
1637
1559
|
/**
|
|
1638
|
-
* / What an engram OPENED THROUGH ANOTHER is running on, read by the registry — for its key file and
|
|
1639
|
-
* / sign-in (the person), the read `probeMyEngramCompute` is for a first engram's owner.
|
|
1560
|
+
* / What an engram OPENED THROUGH ANOTHER is running on, read by the registry — for its key file and
|
|
1561
|
+
* / its sign-in (the person), the read `probeMyEngramCompute` is for a first engram's owner.
|
|
1640
1562
|
* /
|
|
1641
|
-
* / CALLER: the
|
|
1642
|
-
* /
|
|
1643
|
-
* /
|
|
1644
|
-
* /
|
|
1563
|
+
* / CALLER: the person's app, signed in as the person, for a child whose own `getOwnerSignIn` call is
|
|
1564
|
+
* / rejected (an erased child answers nothing) — and the owner kit, as the key file (every method
|
|
1565
|
+
* / names its caller). The registry keeps the person's sign-in for them (`childSignIn`), so the
|
|
1566
|
+
* / person may SEE, not ask and not pay: the ask (`recoverMyEngram`) and the payment (the biller's
|
|
1645
1567
|
* / top-up, admitted only from the key file) stay the key file's. Gated to the child's key file
|
|
1646
1568
|
* / (`canisterToOwner`) and its sign-in AS NOTED HERE (`childSignIn`); refused to everyone else — the
|
|
1647
1569
|
* / parent's owner included — with the SAME words whether or not `child` exists or is a child at all
|
|
1648
|
-
* / (`getEngramOpenedThrough`'s precedent: who works for whom is not disclosed by a refusal).
|
|
1649
|
-
* /
|
|
1650
|
-
* /
|
|
1651
|
-
* /
|
|
1652
|
-
* / `canister_status` on the management canister: a query cannot make an inter-canister call, so it
|
|
1653
|
-
* / could not read an erased child's network status at all.
|
|
1570
|
+
* / (`getEngramOpenedThrough`'s precedent: who works for whom is not disclosed by a refusal).
|
|
1571
|
+
* / UPDATE, NOT QUERY, for `probeMyEngramCompute`'s reason: the system call that forces it is
|
|
1572
|
+
* / `canister_status` on the management canister, and a query cannot make an inter-canister call, so
|
|
1573
|
+
* / it could not read an erased child's network status at all.
|
|
1654
1574
|
*/
|
|
1655
1575
|
probeOpenedEngramCompute: ActorMethod<[Principal], Result_10>;
|
|
1656
1576
|
/**
|
|
1657
|
-
* /
|
|
1577
|
+
* / `Ok` CARRIES THE PRINCIPAL DIRECTLY (since 0.16.0), not a one-field record wrapping it.
|
|
1658
1578
|
* /
|
|
1659
1579
|
* / `#Ok : { canisterId : Principal }` was a record with nothing to disambiguate: the success of a
|
|
1660
1580
|
* / spawn IS the canister it produced. The wrapper cost every caller a field access to reach the
|
|
1661
1581
|
* / only thing the call returns, and invited a second field later that would belong somewhere else.
|
|
1662
1582
|
* /
|
|
1663
|
-
* /
|
|
1664
|
-
* /
|
|
1665
|
-
* /
|
|
1666
|
-
* /
|
|
1667
|
-
* / ignores a record field the receiver does not declare.
|
|
1583
|
+
* / `opts.genesis` (an optional first file, written as the canister spawned) is retired: an engram
|
|
1584
|
+
* / is created with no content, the owner kit never calls this, and only test harnesses passed one.
|
|
1585
|
+
* / A caller still sending the field is unaffected — Candid ignores a record field the receiver does
|
|
1586
|
+
* / not declare.
|
|
1668
1587
|
*/
|
|
1669
1588
|
provisionEngram: ActorMethod<
|
|
1670
1589
|
[
|
|
@@ -1681,30 +1600,29 @@ export interface _SERVICE {
|
|
|
1681
1600
|
/**
|
|
1682
1601
|
* / RECOVER YOUR OWN ERASED ENGRAM — reinstall it on the SAME id, so its wallet and EVM address come back.
|
|
1683
1602
|
* /
|
|
1684
|
-
* / CALLER: the owner
|
|
1685
|
-
* /
|
|
1686
|
-
* /
|
|
1687
|
-
* /
|
|
1688
|
-
* / what does and does not come back.
|
|
1603
|
+
* / CALLER: the owner (a first engram), or an engram's key file through the owner kit's `--recover`
|
|
1604
|
+
* / (an engram an agent opened through another) — every method names its caller. No engram moves
|
|
1605
|
+
* / money on its own, and an erased engram is reinstalled on its id, children included;
|
|
1606
|
+
* / `src/registry/Recover.mo` says what a recover is and what does and does not come back.
|
|
1689
1607
|
* /
|
|
1690
1608
|
* / THE ORDER: the owner first adds compute to the empty engram through the biller's existing top-up
|
|
1691
|
-
* / (each step its own tap; nothing here moves money, lends or funds); then this call reads the
|
|
1692
|
-
* / status of the engram as its controller, refuses by name unless the engram is ERASED (no
|
|
1693
|
-
* / holds enough compute to install (`UpgradeFunding.noDipBar` — the line plus the install
|
|
1694
|
-
* / margin; the exact shortfall is named), writes a durable "recover in progress" mark
|
|
1695
|
-
* /
|
|
1696
|
-
* /
|
|
1697
|
-
* /
|
|
1698
|
-
* /
|
|
1699
|
-
* /
|
|
1700
|
-
* /
|
|
1701
|
-
* /
|
|
1702
|
-
* /
|
|
1703
|
-
* /
|
|
1704
|
-
* /
|
|
1705
|
-
* /
|
|
1706
|
-
* / Refused, before anything is written: not your engram (`#NotFound`); not active, or ABANDONED (
|
|
1707
|
-
* /
|
|
1609
|
+
* / (each step its own tap; nothing here moves money, lends or funds); then this call reads the
|
|
1610
|
+
* / network's status of the engram as its controller, refuses by name unless the engram is ERASED (no
|
|
1611
|
+
* / module) and holds enough compute to install (`UpgradeFunding.noDipBar` — the line plus the install
|
|
1612
|
+
* / hold plus a margin; the exact shortfall is named), writes a durable "recover in progress" mark
|
|
1613
|
+
* / and, with it, sets the old record's anchors aside as an earlier era (the certified leaf says so)
|
|
1614
|
+
* / and records `recoveredAtNs` — BEFORE the install, because the record ended at the erase — then
|
|
1615
|
+
* / installs the current template with `#install` ONLY (the network refuses it on a canister that
|
|
1616
|
+
* / holds a module), with the init record from this registry's own records (owner, registry, parent,
|
|
1617
|
+
* / the kept sign-in, `recoveredAtNs`), starts the engram if it was found stopped, and re-sends what a
|
|
1618
|
+
* / newborn is told: its biller, market and metrics reader, and its birth record. No first fee line
|
|
1619
|
+
* / is sent: the balance before the install is not a fee. The mark is removed once the biller is in
|
|
1620
|
+
* / place; until then a second call finishes the work and answers `#Ok` with `finished = true`. The
|
|
1621
|
+
* / compute probes' `recoverOpen` says a recover is open. An upgrade that finds a recover's install
|
|
1622
|
+
* / landed records it first.
|
|
1623
|
+
* /
|
|
1624
|
+
* / Refused, before anything is written: not your engram (`#NotFound`); not active, or ABANDONED (an
|
|
1625
|
+
* / abandoned engram is not recovered — withdraw your digital dollars before you abandon an engram);
|
|
1708
1626
|
* / sovereign; a change of owner unfinished; a restart open or
|
|
1709
1627
|
* / a restart/recover call running; an update installing; no template; the status unreadable; NOT ERASED
|
|
1710
1628
|
* / (`#Conflict` — "already recovered at T" when this registry recovered it, and no install); compute
|
|
@@ -1713,7 +1631,7 @@ export interface _SERVICE {
|
|
|
1713
1631
|
recoverMyEngram: ActorMethod<[], Result_9>;
|
|
1714
1632
|
removeAuditViewer: ActorMethod<[Principal], Result>;
|
|
1715
1633
|
/**
|
|
1716
|
-
* /
|
|
1634
|
+
* / `Ok` IS THE ANSWER — the `{ reserved : Bool }` wrapper is gone (since 0.16.0).
|
|
1717
1635
|
* /
|
|
1718
1636
|
* / It could only ever hold `true`: the false case was already an `#Err`. A boolean whose only
|
|
1719
1637
|
* / legal value is true is a field that teaches callers to branch on something that never varies,
|
|
@@ -1755,58 +1673,52 @@ export interface _SERVICE {
|
|
|
1755
1673
|
* / step, and running this method again picks up where it stopped (it reads the held state from the
|
|
1756
1674
|
* / engram itself). Do not publish a new template while a reset is held.
|
|
1757
1675
|
* /
|
|
1758
|
-
* /
|
|
1759
|
-
* /
|
|
1676
|
+
* / NEVER ON THE CANONICAL DEPLOYMENT, AND NEVER UNASKED ON A `#ManualOnly` ENGRAM — both are checks
|
|
1677
|
+
* / in code, not only words here. A reset reinstalls an engram's code at the wasm admin's request,
|
|
1678
|
+
* / not its owner's. A build that carries the canonical root refuses the reset before anything is
|
|
1679
|
+
* / read (`MemoryReset.canonicalBuild`), and an engram whose owner chose `#ManualOnly` is refused
|
|
1680
|
+
* / unless an earlier reset already holds it (`MemoryReset.MANUAL_ONLY_REFUSAL`), as `pushUpgrade`
|
|
1681
|
+
* / refuses it. On a staging network, as the wasm admin, with the engram's canister id in ENGRAM:
|
|
1760
1682
|
* / icp canister call registry-staging resetEngramMemory "(principal \"$ENGRAM\")" -e ic
|
|
1761
|
-
* / ⟨2026-11-15, beside "Never run on production engrams" above — from an adversarial review⟩ Both are CHECKS now, not
|
|
1762
|
-
* / comments. A build that carries the canonical root refuses the reset before anything is read
|
|
1763
|
-
* / (`MemoryReset.canonicalBuild`), and an engram whose owner chose `#ManualOnly` is refused unless an
|
|
1764
|
-
* / earlier reset already holds it (`MemoryReset.MANUAL_ONLY_REFUSAL`), as `pushUpgrade` refuses it.
|
|
1765
1683
|
*/
|
|
1766
1684
|
resetEngramMemory: ActorMethod<[Principal], Result>;
|
|
1767
1685
|
/**
|
|
1768
1686
|
* / Restart YOUR OWN stopped engram.
|
|
1769
1687
|
* /
|
|
1770
|
-
* / CALLER: the owner,
|
|
1771
|
-
* / own `convertEarningsToCycles` as the owner, which pays any loan back FIRST.
|
|
1688
|
+
* / CALLER: the owner, through their app (every method names its caller). Afterwards the app runs
|
|
1689
|
+
* / the engram's own `convertEarningsToCycles` as the owner, which pays any loan back FIRST.
|
|
1772
1690
|
* /
|
|
1773
|
-
* /
|
|
1774
|
-
* /
|
|
1775
|
-
* /
|
|
1776
|
-
* /
|
|
1777
|
-
* /
|
|
1778
|
-
* / security
|
|
1779
|
-
* /
|
|
1780
|
-
* /
|
|
1691
|
+
* / What it does, in this order: stops the engram; adds compute — the owner's own (already added
|
|
1692
|
+
* / through `stopMyEngramForRestart` and a top-up from their account), or a loan of what it still
|
|
1693
|
+
* / lacks to run at its OWN setting (at most 0.25T, only after the biller confirms the wallet holds
|
|
1694
|
+
* / enough to repay it); installs the waiting security release if the engram is behind one and the
|
|
1695
|
+
* / owner allows automatic updates (paid as a security update, so that no restart starts code with a
|
|
1696
|
+
* / known security defect for want of compute); puts the owner's freezing setting back; and only
|
|
1697
|
+
* / then starts it. It never lowers the setting on a running engram. A step that fails never leaves
|
|
1698
|
+
* / the engram stopped: the registry's sweep finishes it within minutes.
|
|
1781
1699
|
* /
|
|
1782
1700
|
* / Refused BEFORE anything is stopped, saying why: not your engram; sovereign; a change of owner
|
|
1783
|
-
* / unfinished;
|
|
1784
|
-
* /
|
|
1785
|
-
* /
|
|
1786
|
-
* /
|
|
1787
|
-
* /
|
|
1788
|
-
* /
|
|
1789
|
-
* /
|
|
1790
|
-
* /
|
|
1791
|
-
* /
|
|
1792
|
-
* /
|
|
1793
|
-
* / (`RestartLoan.lendGate`)
|
|
1794
|
-
* / spends the week, which is taken only in the step that
|
|
1795
|
-
* /
|
|
1796
|
-
* / other engram
|
|
1797
|
-
* /
|
|
1798
|
-
* / biller reads the engram's OWN wallet by its own id, and the engram's own Convert repays. New: a
|
|
1799
|
-
* / second call while one is still running for the same engram (`restartCallsRunning`), which is
|
|
1800
|
-
* / what now keeps two interleaved calls from both lending or both stopping and starting — the week
|
|
1801
|
-
* / used to double as that guard.
|
|
1802
|
-
* / ⟨2026-11-04, beside the lists above⟩ Also refused, first after the status
|
|
1803
|
-
* / read: an ERASED engram (its canister holds no program) — nothing is stopped or lent into it.
|
|
1701
|
+
* / unfinished; an ERASED engram (its canister holds no program; checked first after the status
|
|
1702
|
+
* / read, and nothing is stopped or lent into it); an update installing; a restart already running,
|
|
1703
|
+
* / or a second call while one is still running for the same engram (`restartCallsRunning`, which
|
|
1704
|
+
* / keeps two interleaved calls from both lending or both stopping and starting); code the registry
|
|
1705
|
+
* / never published; running (nothing to restart); needing more than one loan; a waiting security
|
|
1706
|
+
* / update that this restart could not cover (it would start old code); the fleet-wide ceiling; no
|
|
1707
|
+
* / biller, or a wallet too low to repay.
|
|
1708
|
+
* /
|
|
1709
|
+
* / THE WEEKLY LIMIT APPLIES ONLY WHEN THE REGISTRY LENDS. "Restarted in the last 7 days" and "a loan
|
|
1710
|
+
* / still owed" refuse ONLY a restart that would LEND — asked once the plan knows the loan, and again
|
|
1711
|
+
* / after every await before the loan is made (`RestartLoan.lendGate`). A restart on the owner's own
|
|
1712
|
+
* / compute is never refused by them and never spends the week, which is taken only in the step that
|
|
1713
|
+
* / records a loan. An engram opened through another engram is lent to under the same ceiling,
|
|
1714
|
+
* / wallet check and repay-first as any other: the biller reads the engram's OWN wallet by its own
|
|
1715
|
+
* / id, and the engram's own Convert repays.
|
|
1804
1716
|
*/
|
|
1805
1717
|
restartMyStoppedEngram: ActorMethod<[], Result_8>;
|
|
1806
1718
|
/**
|
|
1807
1719
|
* / Return to managed: user calls AFTER adding registry back as controller
|
|
1808
1720
|
* /
|
|
1809
|
-
* /
|
|
1721
|
+
* / Refused for an engram opened through another, which is never independent.
|
|
1810
1722
|
*/
|
|
1811
1723
|
returnToManaged: ActorMethod<[], Result>;
|
|
1812
1724
|
/**
|
|
@@ -1842,9 +1754,9 @@ export interface _SERVICE {
|
|
|
1842
1754
|
setEngramWasm: ActorMethod<[Uint8Array | number[], string], Result>;
|
|
1843
1755
|
/**
|
|
1844
1756
|
* / Declare the stored template's release class. Wasm-admin only, and deliberately a SEPARATE call
|
|
1845
|
-
* / from the upload: "this is a security release" is a promise to every owner
|
|
1846
|
-
* /
|
|
1847
|
-
* /
|
|
1757
|
+
* / from the upload: "this is a security release" is a promise to every owner, paying or not, so it
|
|
1758
|
+
* / should be its own decision with its own audit line — not a parameter someone passes by habit.
|
|
1759
|
+
* / Always re-declare AFTER uploading; an upload resets this to #Feature.
|
|
1848
1760
|
*/
|
|
1849
1761
|
setEngramWasmClass: ActorMethod<[ReleaseClass], Result>;
|
|
1850
1762
|
/**
|
|
@@ -1854,12 +1766,11 @@ export interface _SERVICE {
|
|
|
1854
1766
|
* / published, changing it would let the same surface that admits a wipe also revise the account
|
|
1855
1767
|
* / of it — which is exactly the power this note exists to deny.
|
|
1856
1768
|
* /
|
|
1857
|
-
* /
|
|
1858
|
-
* /
|
|
1859
|
-
* /
|
|
1860
|
-
* /
|
|
1861
|
-
* /
|
|
1862
|
-
* / therefore uncheckable. The audit label moves with the name (`setGenesisPredecessor.denied`).
|
|
1769
|
+
* / CALLER: this registry's admin, a person, once, after the predecessor chain's final head is
|
|
1770
|
+
* / captured. Not `sys`-prefixed (it was `sysSetGenesisPredecessor` until 2026-10-02): the `sys`
|
|
1771
|
+
* / prefix names the canister-to-canister tier, so an admin-called method inside it made "a `sys`
|
|
1772
|
+
* / method has no human caller" false and therefore uncheckable. The audit label follows the name
|
|
1773
|
+
* / (`setGenesisPredecessor.denied`).
|
|
1863
1774
|
*/
|
|
1864
1775
|
setGenesisPredecessor: ActorMethod<[Uint8Array | number[], bigint], Result>;
|
|
1865
1776
|
/**
|
|
@@ -1897,8 +1808,8 @@ export interface _SERVICE {
|
|
|
1897
1808
|
* / `claimSovereignty` sets this to `#ManualOnly` as a side effect, since a registry that is no
|
|
1898
1809
|
* / longer a controller could not honour anything else.
|
|
1899
1810
|
* /
|
|
1900
|
-
* /
|
|
1901
|
-
* /
|
|
1811
|
+
* / An engram opened through another is refused `#ManualOnly`: it takes this registry's updates
|
|
1812
|
+
* / automatically for life.
|
|
1902
1813
|
*/
|
|
1903
1814
|
setUpdatePreference: ActorMethod<[UpdatePreference], Result>;
|
|
1904
1815
|
/**
|
|
@@ -1916,62 +1827,59 @@ export interface _SERVICE {
|
|
|
1916
1827
|
/**
|
|
1917
1828
|
* / Stop YOUR OWN stopped-or-starving engram so you can add compute from your account and restart it.
|
|
1918
1829
|
* /
|
|
1919
|
-
* / CALLER: the owner,
|
|
1920
|
-
* /
|
|
1921
|
-
* /
|
|
1922
|
-
* /
|
|
1923
|
-
* /
|
|
1924
|
-
* /
|
|
1925
|
-
* /
|
|
1926
|
-
* /
|
|
1927
|
-
* /
|
|
1928
|
-
* / program): there is nothing to restart, and nothing is stopped.
|
|
1830
|
+
* / CALLER: the owner, through their app, when the engram has stopped and a security update is
|
|
1831
|
+
* / waiting (every method names its caller). It stops the engram so that compute the owner adds next
|
|
1832
|
+
* / cannot wake its old code; the owner then adds compute through the biller's own top-up and calls
|
|
1833
|
+
* / `restartMyStoppedEngram`, which installs the waiting update and starts it. If the owner walks
|
|
1834
|
+
* / away, the sweep finishes it after 30 minutes: install if covered, restore, start. Never left
|
|
1835
|
+
* / stopped. It lends nothing, so it takes no week; it refuses an engram that is not stuck, so a
|
|
1836
|
+
* / healthy engram is never taken offline (a build choice, not a requirement). It also refuses an
|
|
1837
|
+
* / ERASED engram (its canister holds no program): there is nothing to restart, and nothing is
|
|
1838
|
+
* / stopped.
|
|
1929
1839
|
*/
|
|
1930
1840
|
stopMyEngramForRestart: ActorMethod<[], Result_6>;
|
|
1931
1841
|
/**
|
|
1932
1842
|
* / An engram witnesses its own audit head. Callable ONLY by a registered engram — msg.caller is
|
|
1933
1843
|
* / the engram principal, so attribution needs no signature and cannot be forged by a third party.
|
|
1934
1844
|
* /
|
|
1935
|
-
* / The registry witnesses; it does not adjudicate.
|
|
1936
|
-
* /
|
|
1937
|
-
* /
|
|
1845
|
+
* / The registry witnesses; it does not adjudicate. Two shapes are permanently recorded as
|
|
1846
|
+
* / conflicts rather than rejected, because a rejection leaves no evidence and evidence is the
|
|
1847
|
+
* / entire product here:
|
|
1938
1848
|
* / - same total, different head → the log was rewritten under a fixed count
|
|
1939
1849
|
* / - total went backwards → an append-only count cannot decrease honestly
|
|
1940
|
-
* /
|
|
1941
|
-
* /
|
|
1850
|
+
* / One exception to "recorded rather than rejected" (conflicts are never deleted, submissions are
|
|
1851
|
+
* / capped, and the refusals are counted): an engram that already has
|
|
1942
1852
|
* / `AnchorConflicts.MAX_CONFLICTS_PER_ENGRAM` recorded contradictions gets `#Conflict` naming
|
|
1943
1853
|
* / this method, and the refusal is COUNTED in its certified leaf (`refusedConflicts`). The
|
|
1944
1854
|
* / evidence is not lost — the recorded ones stay forever and the count certifies that more came.
|
|
1945
|
-
* / ⟨0.16.0, canister-to-canister methods carry the sys prefix⟩
|
|
1946
|
-
* / RENAMED from `anchorHead` — a mutation wearing a noun, and a `sys` edge that
|
|
1947
|
-
* / did not say so. It is called canister-to-canister (an engram or the market pushing its head
|
|
1948
|
-
* / here), never by a person, and the `sys` prefix is what tells a reader scanning the surface
|
|
1949
|
-
* / which methods are machine-to-machine.
|
|
1950
1855
|
* /
|
|
1951
|
-
* /
|
|
1952
|
-
* /
|
|
1856
|
+
* / `sys`-prefixed because it is called canister-to-canister (an engram or the market pushing its
|
|
1857
|
+
* / head here), never by a person, and the `sys` prefix is what tells a reader scanning the surface
|
|
1858
|
+
* / which methods are machine-to-machine. It was `anchorHead` before 0.16.0 — a mutation wearing a
|
|
1859
|
+
* / noun, and a `sys` edge that did not say so. The market calls it under this name.
|
|
1953
1860
|
*/
|
|
1954
1861
|
sysAnchorHead: ActorMethod<[Uint8Array | number[], bigint], Result>;
|
|
1955
1862
|
/**
|
|
1956
1863
|
* / CALLER: an engram, from inside its owner's `convertEarningsToCycles`, once the conversion landed
|
|
1957
|
-
* / (
|
|
1958
|
-
* / (the network returns the rest) and records it. `#NotFound` when nothing is owed
|
|
1959
|
-
* / written off, or repaid): the engram then clears its own record.
|
|
1960
|
-
* /
|
|
1961
|
-
* / (the restart
|
|
1962
|
-
* /
|
|
1963
|
-
* /
|
|
1864
|
+
* / (every method names its caller). Attach up to what is owed: the registry accepts no more than the
|
|
1865
|
+
* / outstanding loan (the network returns the rest) and records it. `#NotFound` when nothing is owed
|
|
1866
|
+
* / (the loan was written off, or repaid): the engram then clears its own record.
|
|
1867
|
+
* / REPAY-ONLY. It puts no freezing setting back (the restart restores it before the start) and
|
|
1868
|
+
* / queues no security push (the restart installs it before the start; the wake watcher covers other
|
|
1869
|
+
* / wakes). Its name and reply are kept from when it did both, so the engram's hand client still
|
|
1870
|
+
* / matches.
|
|
1964
1871
|
*/
|
|
1965
1872
|
sysCloseRestart: ActorMethod<[], Result_5>;
|
|
1966
1873
|
/**
|
|
1967
|
-
* /
|
|
1968
|
-
* /
|
|
1969
|
-
* /
|
|
1970
|
-
* /
|
|
1971
|
-
* /
|
|
1972
|
-
* /
|
|
1973
|
-
* /
|
|
1974
|
-
* / marked (a report sent again), refused by
|
|
1874
|
+
* / A SOVEREIGN engram reports that it moved control of its code to `newOwner`, which ends the
|
|
1875
|
+
* / change of owner this registry marked when it moved its record (`ControlHandover.Pending`).
|
|
1876
|
+
* / Until this arrives the registry refuses the new owner's control-changing calls on the engram.
|
|
1877
|
+
* / The registry can read a sovereign engram's controllers (`registryControls`, by `canister_info`),
|
|
1878
|
+
* / but it does not read them on this path: it relies on the engram's report. Gated like
|
|
1879
|
+
* / `sysNotifyOwnershipTransfer` (the caller must BE the engram), and only for an engram recorded as
|
|
1880
|
+
* / sovereign: a managed engram's transfer ends inside `sysNotifyOwnershipTransfer`, where the
|
|
1881
|
+
* / registry moves control itself. `#Ok` when nothing is marked (a report sent again), refused by
|
|
1882
|
+
* / name when the mark is for another owner.
|
|
1975
1883
|
* /
|
|
1976
1884
|
* / TRUST: the same as `sysNotifyOwnershipTransfer` and `sysRevertOwnershipTransfer` — the
|
|
1977
1885
|
* / registry takes a sovereign engram's word, and whoever controls a sovereign engram's code can
|
|
@@ -1987,25 +1895,26 @@ export interface _SERVICE {
|
|
|
1987
1895
|
*/
|
|
1988
1896
|
sysMeterEngram: ActorMethod<[Principal], Result_4>;
|
|
1989
1897
|
/**
|
|
1990
|
-
* / CALLER: an engram opened through another, from inside its three sign-in writers —
|
|
1991
|
-
* / `declineSignIn` (the sign-in's own decline) and `acceptSignIn` — BEFORE it
|
|
1992
|
-
* /
|
|
1993
|
-
* /
|
|
1994
|
-
* /
|
|
1995
|
-
* /
|
|
1996
|
-
* / Refused, with nothing written: a caller this registry did not open through another engram (a
|
|
1997
|
-
* / engram has no sign-in; anything else is no engram here), and a sign-in the door would
|
|
1998
|
-
* / birth (`ChildDoor.signInRefusal` — the key file itself, the anonymous principal, a
|
|
1898
|
+
* / CALLER: an engram opened through another, from inside its three sign-in writers —
|
|
1899
|
+
* / `setOwnerSignIn`, `declineSignIn` (the sign-in's own decline) and `acceptSignIn` — BEFORE it
|
|
1900
|
+
* / writes its own seat (every method names its caller). The registry keeps the child's seated
|
|
1901
|
+
* / sign-in (`childSignIn` says why, and why the order is registry-first): `?p` notes `p` as the
|
|
1902
|
+
* / sign-in, `null` notes that none is seated. A record argument, so it can grow by opt fields (an
|
|
1903
|
+
* / argument tuple is frozen once released).
|
|
1904
|
+
* / Refused, with nothing written: a caller this registry did not open through another engram (a
|
|
1905
|
+
* / first engram has no sign-in; anything else is no engram here), and a sign-in the door would
|
|
1906
|
+
* / refuse at birth (`ChildDoor.signInRefusal` — the key file itself, the anonymous principal, a
|
|
1907
|
+
* / canister).
|
|
1999
1908
|
*/
|
|
2000
1909
|
sysNoteChildSignIn: ActorMethod<[{ signIn: [] | [Principal] }], Result>;
|
|
2001
1910
|
/**
|
|
2002
|
-
* /
|
|
1911
|
+
* / An engram tells this registry that its owner reset it.
|
|
2003
1912
|
* /
|
|
2004
1913
|
* / CALLER: a registered engram, about itself — `canisterToOwner` membership, checked first
|
|
2005
|
-
* / (
|
|
2006
|
-
* /
|
|
2007
|
-
* /
|
|
2008
|
-
* /
|
|
1914
|
+
* / (every `sys` method names and checks its caller). The engram sends it from its reset path. WHY
|
|
1915
|
+
* / IT EXISTS: a reset purges the engram's roster, and the endings it sends reach this registry only
|
|
1916
|
+
* / for agents still active, so a reset after the last agent left would reach this registry nowhere
|
|
1917
|
+
* / and the engram would read as kept.
|
|
2009
1918
|
* /
|
|
2010
1919
|
* / Records the DAY the registry heard it (`resetDaysOf`), once per day: a second notice the same
|
|
2011
1920
|
* / day answers `#Ok` and writes nothing. Past `Funnel.MAX_RESET_DAYS_PER_ENGRAM` days it is refused
|
|
@@ -2014,38 +1923,35 @@ export interface _SERVICE {
|
|
|
2014
1923
|
*/
|
|
2015
1924
|
sysNoteReset: ActorMethod<[], Result>;
|
|
2016
1925
|
/**
|
|
2017
|
-
* /
|
|
1926
|
+
* / The engram tells this registry that custody moved (since 0.16.0).
|
|
2018
1927
|
* /
|
|
2019
|
-
* / WHAT IT FIXES: `transferOwnership` lives on the ENGRAM and
|
|
1928
|
+
* / WHAT IT FIXES: `transferOwnership` lives on the ENGRAM, and without this method it told the
|
|
2020
1929
|
* / registry nothing. `verifyEngramActiveOwner` — the biller's money gate — therefore kept
|
|
2021
|
-
* / answering for the ORIGINAL owner, so a new owner could not fund the engram they now own.
|
|
2022
|
-
* /
|
|
2023
|
-
* /
|
|
2024
|
-
* /
|
|
2025
|
-
* /
|
|
2026
|
-
* /
|
|
2027
|
-
* /
|
|
2028
|
-
* /
|
|
2029
|
-
* / it, so no claim in the argument needs trusting — the identity is the authority.
|
|
2030
|
-
* /
|
|
2031
|
-
* / ⟨2026-09-28: the mirror is now `sysRecordAgentEdge`, and the difference below is gone — the
|
|
2032
|
-
* / silent `()` notify was deleted and its successor answers `Wire.Result` too, for this reason.⟩
|
|
2033
|
-
* / ONE DELIBERATE DIFFERENCE FROM THAT MIRROR: it returns `Wire.Result`, where the agent-edge
|
|
2034
|
-
* / notify returns `()` and silently ignores strangers. The engram must COMMIT ONLY ON `#Ok` (see
|
|
1930
|
+
* / answering for the ORIGINAL owner, so a new owner could not fund the engram they now own.
|
|
1931
|
+
* /
|
|
1932
|
+
* / THE TELLER PROBLEM IS SOLVED AS IN `sysRecordAgentEdge`, deliberately copied rather than
|
|
1933
|
+
* / invented: `msg.caller` is looked up in `canisterToOwner`. The caller IS the engram whose
|
|
1934
|
+
* / ownership changed, and this registry spawned it, so no claim in the argument needs trusting —
|
|
1935
|
+
* / the identity is the authority.
|
|
1936
|
+
* /
|
|
1937
|
+
* / IT ANSWERS `Wire.Result`, as `sysRecordAgentEdge` does. The engram must COMMIT ONLY ON `#Ok` (see
|
|
2035
1938
|
* / its `transferOwnership`), so a silent refusal here would be read as success there and put the
|
|
2036
1939
|
* / two canisters back into exactly the disagreement this seam exists to end. A refusal that cannot
|
|
2037
1940
|
* / be heard is worse than no refusal.
|
|
2038
1941
|
* /
|
|
2039
|
-
* /
|
|
2040
|
-
* /
|
|
2041
|
-
* /
|
|
2042
|
-
* /
|
|
2043
|
-
* /
|
|
2044
|
-
* /
|
|
1942
|
+
* / ONLY ONTO AN OFFER THE NEW OWNER ACCEPTED HERE, AS THEMSELVES (`OwnershipOffer.moveRefusal`;
|
|
1943
|
+
* / see `sysOfferOwnership` and `acceptEngramOffer`). A report without an acceptance touches nothing
|
|
1944
|
+
* / filed under `newOwner`. A retry needs none: its record moved under an acceptance already.
|
|
1945
|
+
* /
|
|
1946
|
+
* / COLLISION IS REFUSED, NOT ABSORBED. `engrams` is keyed BY OWNER, and three guards enforce
|
|
1947
|
+
* / one-engram-per-owner. Relaxing that rule was considered and declined: the spawn path's own
|
|
1948
|
+
* / comment warns that "a change to that rule must touch all three, and grepping the error TEXT
|
|
1949
|
+
* / finds only two of them", so the relaxation is the option most likely to leave a guard behind.
|
|
1950
|
+
* / The check below mirrors the spawn guard EXACTLY — active AND not abandoned — because an
|
|
1951
|
+
* / abandoned engram is not a live claim on its owner's slot.
|
|
2045
1952
|
* /
|
|
2046
|
-
* /
|
|
2047
|
-
* /
|
|
2048
|
-
* / the former owner stayed a controller and could still replace the code. Now:
|
|
1953
|
+
* / IT MOVES CONTROL OF THE CODE TOO, or tells the engram to, so that the former owner does not stay
|
|
1954
|
+
* / a controller who could still replace the code:
|
|
2049
1955
|
* / · MANAGED (the registry is a controller): the registry sets the controllers to itself and the
|
|
2050
1956
|
* / new owner and answers `#MovedByRegistry`. If that fails, the record is put back and the
|
|
2051
1957
|
* / answer is `#Err` — the engram then does not change owner.
|
|
@@ -2060,8 +1966,10 @@ export interface _SERVICE {
|
|
|
2060
1966
|
*/
|
|
2061
1967
|
sysNotifyOwnershipTransfer: ActorMethod<[Principal], Result_3>;
|
|
2062
1968
|
/**
|
|
2063
|
-
* /
|
|
2064
|
-
* /
|
|
1969
|
+
* / AN ENGRAM FILES ITS OWNER'S OFFER of a change of owner to `newOwner` (the engram's
|
|
1970
|
+
* / `transferOwnership`). The new owner must accept it (`acceptEngramOffer`) before anything moves:
|
|
1971
|
+
* / when the record moved on the engram's word alone, an engram's owner could hand an engram to a
|
|
1972
|
+
* / principal who had made no call.
|
|
2065
1973
|
* /
|
|
2066
1974
|
* / IT MOVES NOTHING. The record of who owns the engram, control of its code, the predecessor
|
|
2067
1975
|
* / links and everything filed under `newOwner`'s key are untouched; `newOwner` is not looked up at
|
|
@@ -2080,16 +1988,14 @@ export interface _SERVICE {
|
|
|
2080
1988
|
*/
|
|
2081
1989
|
sysOfferOwnership: ActorMethod<[Principal, bigint], Result>;
|
|
2082
1990
|
/**
|
|
2083
|
-
* / ⟨2026-10-01, the owner's ruling of that day: build this now, not at the first paid engagement⟩
|
|
2084
1991
|
* / THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
|
|
2085
1992
|
* / (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
|
|
2086
1993
|
* / owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
|
|
2087
1994
|
* /
|
|
2088
1995
|
* / CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
|
|
2089
|
-
* / `sysRecordAgentEdge` checks it (
|
|
2090
|
-
* /
|
|
2091
|
-
* /
|
|
2092
|
-
* / registry can know.
|
|
1996
|
+
* / `sysRecordAgentEdge` checks it (every `sys` method names and checks its caller). The engram's own
|
|
1997
|
+
* / rules (the owner's standing allowance for this agent, its frozen-payments state, its balance) are
|
|
1998
|
+
* / the engram's to check before it calls; this method checks what only the registry can know.
|
|
2093
1999
|
* /
|
|
2094
2000
|
* / NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
|
|
2095
2001
|
* / every refusal before the accept returns the attached cycles to the caller by construction —
|
|
@@ -2098,12 +2004,9 @@ export interface _SERVICE {
|
|
|
2098
2004
|
* / the reply says how much came back;
|
|
2099
2005
|
* / · the template will not install after one retry → the cycles are INSIDE the new canister and
|
|
2100
2006
|
* / no canister can withdraw another's cycles. The one honest exception to "returned on every
|
|
2101
|
-
* / failure": nothing is recorded, and the reply names the canister
|
|
2102
|
-
* /
|
|
2103
|
-
* /
|
|
2104
|
-
* / controls an opened engram⟩ The controller is THIS REGISTRY ALONE; the key is not one and can install
|
|
2105
|
-
* / nothing. The reply names the canister and says the cycles sit in it unrecorded, for whoever
|
|
2106
|
-
* / runs this deployment to decide on;
|
|
2007
|
+
* / failure": nothing is recorded, and the reply names the canister and says the cycles sit in
|
|
2008
|
+
* / it unrecorded, for whoever runs this deployment to decide on (its only controller is this
|
|
2009
|
+
* / registry; the key can install nothing);
|
|
2107
2010
|
* / · the key came to own an engram during the awaits → the new canister is named, nothing is
|
|
2108
2011
|
* / recorded (the same third guard `spawnEngramFor` carries).
|
|
2109
2012
|
* /
|
|
@@ -2111,12 +2014,11 @@ export interface _SERVICE {
|
|
|
2111
2014
|
* / with first engrams); it never writes a predecessor (a key with any record was refused); it never
|
|
2112
2015
|
* / consults the reserve gate (the parent owner's approval is this door's admission — the gate's
|
|
2113
2016
|
* / arming note stays on `provisionEngram`); it never tells the calling engram anything but this
|
|
2114
|
-
* / reply. No payment AMOUNT reaches it (money is the biller's, cycles are the registry's): it
|
|
2017
|
+
* / reply. No payment AMOUNT reaches it (money is the biller's, cycles are the registry's): it
|
|
2018
|
+
* / carries cycles and a key, nothing else.
|
|
2115
2019
|
* /
|
|
2116
|
-
* / THE RATE LIMIT
|
|
2117
|
-
* / first engrams
|
|
2118
|
-
* / `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
|
|
2119
|
-
* / hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
|
|
2020
|
+
* / THE RATE LIMIT. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24 hours)
|
|
2021
|
+
* / with first engrams. Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
|
|
2120
2022
|
* / `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
|
|
2121
2023
|
* / `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
|
|
2122
2024
|
* / on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
|
|
@@ -2132,8 +2034,7 @@ export interface _SERVICE {
|
|
|
2132
2034
|
* / WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
|
|
2133
2035
|
* / the post-await re-check and the record below.
|
|
2134
2036
|
* /
|
|
2135
|
-
* /
|
|
2136
|
-
* / you recommended"⟩ CONTROLLED BY THIS REGISTRY ALONE, AND BORN KNOWING ITS PARENT AND ITS SIGN-IN.
|
|
2037
|
+
* / CONTROLLED BY THIS REGISTRY ALONE, AND BORN KNOWING ITS PARENT AND ITS SIGN-IN.
|
|
2137
2038
|
* / The canister's controllers are `[this registry]` — the key is not a controller, so it can never
|
|
2138
2039
|
* / reinstall, delete or re-control the engram; only this registry installs code on it. Such an
|
|
2139
2040
|
* / engram is managed for life: `claimSovereignty`, `returnToManaged`, `abandonMyEngram`, a
|
|
@@ -2142,129 +2043,93 @@ export interface _SERVICE {
|
|
|
2142
2043
|
* / running the agent (`ChildDoor.signInRefusal` refuses the key itself, the anonymous principal and
|
|
2143
2044
|
* / a canister); it and the parent travel in the engram's init record, so the engram knows both
|
|
2144
2045
|
* / before it answers its first message. `null` = no sign-in: the engram keeps small limits for life.
|
|
2145
|
-
* /
|
|
2146
|
-
* /
|
|
2147
|
-
* /
|
|
2148
|
-
* /
|
|
2149
|
-
* /
|
|
2150
|
-
* /
|
|
2151
|
-
* /
|
|
2152
|
-
* /
|
|
2153
|
-
* /
|
|
2154
|
-
* / change still calls `sysSpawnChild`; this registry no longer serves it, so that call is REJECTED
|
|
2155
|
-
* / (IC0536, a reject the engram's `try` catches — a probe of the interface-evolution rule), the attached cycles come back
|
|
2156
|
-
* / as the call's refund, and nothing is opened. An older engram therefore never opens an engram with
|
|
2157
|
-
* / no sign-in by accident; it opens them again once it runs a template that calls this method.
|
|
2158
|
-
* / (Was: the one-argument call decoded `signIn` as `null` — INFERRED for moc 2.1.0, never witnessed.)
|
|
2046
|
+
* /
|
|
2047
|
+
* / ONE RECORD ARGUMENT. Later fields are opt fields of this record, never another argument: an
|
|
2048
|
+
* / argument TUPLE is frozen once released (evolution happens inside records), and the interface
|
|
2049
|
+
* / gate reads a grown tuple as ILLEGAL. This door was `sysSpawnChild(ownerKey : Principal)`, which
|
|
2050
|
+
* / is REMOVED. An engram built before the change still calls `sysSpawnChild`; this registry no
|
|
2051
|
+
* / longer serves it, so that call is REJECTED (IC0536, a reject the engram's `try` catches), the
|
|
2052
|
+
* / attached cycles come back as the call's refund, and nothing is opened. An older engram therefore
|
|
2053
|
+
* / never opens an engram with no sign-in by accident; it opens them again once it runs a template
|
|
2054
|
+
* / that calls this method.
|
|
2159
2055
|
*/
|
|
2160
2056
|
sysOpenChild: ActorMethod<[{ ownerKey: Principal; signIn: [] | [Principal] }], Result_2>;
|
|
2161
2057
|
/**
|
|
2162
|
-
* / ⟨2026-09-28, owner decision: build the full agent track-record design for the launch release⟩
|
|
2163
2058
|
* / An engram tells this registry that one of its agents started, or ended and WHY.
|
|
2164
2059
|
* /
|
|
2165
|
-
* /
|
|
2166
|
-
* / beside this (the owner's building-phase rule of 2026-09-27: no backward compatibility; the
|
|
2167
|
-
* / next release installs every engram fresh). Three things changed, each on purpose:
|
|
2060
|
+
* / Three properties, each on purpose:
|
|
2168
2061
|
* / 1. THE REASON IS REQUIRED. `#Ended` carries an `Engagements.EndReason` sent from the one
|
|
2169
2062
|
* / engram site that knows it. There is no reasonless ending and no "unknown" arm.
|
|
2170
|
-
* / 2. IT IS ACKNOWLEDGED.
|
|
2171
|
-
* /
|
|
2172
|
-
* /
|
|
2063
|
+
* / 2. IT IS ACKNOWLEDGED. It answers `Wire.Result`, and the engram logs any non-`#Ok` where its
|
|
2064
|
+
* / owner can see it. Its deleted predecessor, `sysNotifyOperatorEdge`, returned `()` and
|
|
2065
|
+
* / silently ignored a stranger, so the engram discarded the outcome and a lost ending was
|
|
2066
|
+
* / invisible on both sides.
|
|
2173
2067
|
* / 3. ONE RECORD ARGUMENT, not positional args — the same reshape `signX402Payment` took, so a
|
|
2174
2068
|
* / later field is a named addition rather than a tuple that silently shifts.
|
|
2175
2069
|
* /
|
|
2176
2070
|
* / AUTH: the caller MUST be an engram this registry spawned (`canisterToOwner` membership), so an
|
|
2177
|
-
* / engram can only assert edges about ITSELF — `msg.caller` IS the engram
|
|
2178
|
-
* /
|
|
2179
|
-
* /
|
|
2180
|
-
* /
|
|
2181
|
-
* /
|
|
2182
|
-
* /
|
|
2183
|
-
* /
|
|
2184
|
-
* /
|
|
2185
|
-
* /
|
|
2186
|
-
* /
|
|
2187
|
-
* /
|
|
2188
|
-
* /
|
|
2189
|
-
* /
|
|
2190
|
-
* /
|
|
2191
|
-
* /
|
|
2192
|
-
* /
|
|
2193
|
-
* /
|
|
2194
|
-
* /
|
|
2195
|
-
* /
|
|
2196
|
-
* /
|
|
2197
|
-
* /
|
|
2198
|
-
* /
|
|
2199
|
-
* /
|
|
2200
|
-
* /
|
|
2201
|
-
* /
|
|
2202
|
-
* /
|
|
2203
|
-
* /
|
|
2204
|
-
* /
|
|
2205
|
-
* /
|
|
2206
|
-
* / ⟨MOVED 2026-09-29, a review finding: the correction above stood in the middle of this
|
|
2207
|
-
* / paragraph, so the sentence it corrects came after it and read as the last word — in this file
|
|
2208
|
-
* / and in the published registry.did.⟩
|
|
2209
|
-
* / ⟨2026-09-29, a review finding⟩ An engagement is matched on the enrolled key AND the invite
|
|
2210
|
-
* / its statement names, not on the key alone: one statement opens at most one engagement, and a
|
|
2211
|
-
* / key the engram re-admits after a reset, under a fresh statement for a fresh invite, opens a new
|
|
2212
|
-
* / one (`Engagements.admit`).
|
|
2213
|
-
* / ⟨CORRECTED 2026-09-29, a review finding: "a repeated `#Ended` writes nothing, and both
|
|
2214
|
-
* / answer `#Ok`" is now narrower. An ending names the engagement it ends (the enrolled key and the
|
|
2215
|
-
* / invite) and the day the engram recorded it, because a lost ending is now RE-SENT by the
|
|
2216
|
-
* / engram's `resyncAgentEdges`. The same ending again answers `#Ok` and writes nothing; one
|
|
2217
|
-
* / giving another reason for an engagement already ended is refused `#Conflict`; one naming an
|
|
2218
|
-
* / engagement never recorded here is refused `#NotFound` (`Engagements.closeVerdict`).⟩
|
|
2071
|
+
* / engram can only assert edges about ITSELF — `msg.caller` IS the engram.
|
|
2072
|
+
* /
|
|
2073
|
+
* / THE SUBJECT IS THE AGENT'S ROOT (`ev.root`), not the key that operates on the engram: one
|
|
2074
|
+
* / lasting identity per agent, with one root key per agent and an enrolled key per client. So every
|
|
2075
|
+
* / structure written here is keyed by agent: one agent across twenty-five engrams is one record, one
|
|
2076
|
+
* / live-index row and one summary. The root is not taken on the engram's word: an engram's owner is
|
|
2077
|
+
* / a controller of its canister and can install code that reports any root, so a start carries the
|
|
2078
|
+
* / root's enrolment statement (`Engagements.EnrolmentProof`) and THIS method verifies it
|
|
2079
|
+
* / (`EdgeProof.rootOf`), and refuses past `Engagements.MAX_ENGAGEMENTS_PER_ENGRAM`. The enrolled key
|
|
2080
|
+
* / therefore reaches the registry, stored on the engagement record and never served. The ending's
|
|
2081
|
+
* / reason is the owner's assertion; the agent's remedy for a false one is its dispute.
|
|
2082
|
+
* /
|
|
2083
|
+
* / An engagement is matched on the enrolled key AND the invite its statement names, not on the key
|
|
2084
|
+
* / alone: one statement opens at most one engagement, and a key the engram re-admits after a reset,
|
|
2085
|
+
* / under a fresh statement for a fresh invite, opens a new one (`Engagements.admit`).
|
|
2086
|
+
* /
|
|
2087
|
+
* / IDEMPOTENT: a repeated `#Added` mints no duplicate and answers `#Ok`. An ending names the
|
|
2088
|
+
* / engagement it ends (the enrolled key and the invite) and the day the engram recorded it, because
|
|
2089
|
+
* / a lost ending is RE-SENT by the engram's `resyncAgentEdges`. The same ending again answers `#Ok`
|
|
2090
|
+
* / and writes nothing; one giving another reason for an engagement already ended is refused
|
|
2091
|
+
* / `#Conflict`; one naming an engagement never recorded here is refused `#NotFound`
|
|
2092
|
+
* / (`Engagements.closeVerdict`).
|
|
2093
|
+
* /
|
|
2094
|
+
* / It writes five things and nothing else: the live reverse index (`agentToEngrams`, which still
|
|
2095
|
+
* / forgets an agent at its last edge), the remembered engagement (`agentEngagements`, which never
|
|
2096
|
+
* / forgets), that agent's certified summary (`putStandingLeaf`), the cut-off of an engram opened
|
|
2097
|
+
* / through this one when a recorded ending ends its key's engagement (`cutOff`), and, for a start
|
|
2098
|
+
* / that opens an engagement, the next place in the recording order (`engagementOrder`) — in the same
|
|
2099
|
+
* / step as the record, so the order never names a record that is not there.
|
|
2219
2100
|
*/
|
|
2220
2101
|
sysRecordAgentEdge: ActorMethod<[{ root: Principal; event: EdgeEvent }], Result>;
|
|
2221
2102
|
/**
|
|
2222
|
-
* / CALLER: an engram, from inside its `sysReturnUpgradeAdvance` (
|
|
2223
|
-
* / given back of the compute a paid security update advanced it.
|
|
2224
|
-
* /
|
|
2225
|
-
* /
|
|
2226
|
-
* /
|
|
2227
|
-
* /
|
|
2228
|
-
* /
|
|
2229
|
-
* /
|
|
2230
|
-
* /
|
|
2231
|
-
* / advance
|
|
2232
|
-
* /
|
|
2233
|
-
* /
|
|
2234
|
-
* /
|
|
2235
|
-
* /
|
|
2236
|
-
* / `
|
|
2237
|
-
* /
|
|
2238
|
-
* /
|
|
2239
|
-
* / NEWEST first, not oldest first: the engram can
|
|
2240
|
-
* / give back only what it holds above its balance before the latest deposit, so the cycles are the
|
|
2241
|
-
* / newest advance's (RestartLoan.repayAdvances says why, and when that reading is wrong).
|
|
2242
|
-
* / ⟨CHANGED 2026-10-26, the owner's give-back ruling: "take back only what we added; anything left
|
|
2243
|
-
* / over goes to the 90-day write-off"⟩ The engram now names THE ADVANCE it is giving back
|
|
2244
|
-
* / (`advanceId`, which the registry handed it in `sysReturnUpgradeAdvance` — the one this install's
|
|
2245
|
-
* / deposit put on the ledger). The registry accepts AT MOST THAT ADVANCE'S AMOUNT, settles THAT
|
|
2246
|
-
* / entry alone (returned + written off = its amount, one `upgrade.advance.returned` line naming its
|
|
2247
|
-
* / release and id) and leaves every other advance of the engram on the ledger, for its own
|
|
2248
|
-
* / give-back or the 90-day write-off. The paragraphs above about "the sum", "settled OLDEST FIRST"
|
|
2249
|
-
* / and "NEWEST first" describe the shape this replaces. An id that is not on the ledger for this
|
|
2250
|
-
* / caller (already settled, written off after 90 days, or never its own) accepts nothing — the
|
|
2251
|
-
* / network returns the attached cycles to the engram — and answers `#NotFound`; when a recorded
|
|
2252
|
-
* / engram attached cycles, an `upgrade.advance.notOut` line in the registry's unchained refusal log
|
|
2253
|
-
* / says so (never the chained audit log: it moves nothing, and any engram can send it). Nothing is
|
|
2254
|
-
* / ever counted twice.
|
|
2103
|
+
* / CALLER: an engram, from inside its `sysReturnUpgradeAdvance` (every method names its caller).
|
|
2104
|
+
* / Attach what is being given back of the compute a paid security update advanced it.
|
|
2105
|
+
* /
|
|
2106
|
+
* / The registry takes back only what it added; anything left over goes to the write-off, never
|
|
2107
|
+
* / carried as a debt. The engram names THE ADVANCE it is giving back (`advanceId`, which the
|
|
2108
|
+
* / registry handed it in `sysReturnUpgradeAdvance` — the one this install's deposit put on the
|
|
2109
|
+
* / ledger). The registry accepts AT MOST THAT ADVANCE'S AMOUNT (the network returns the rest),
|
|
2110
|
+
* / settles THAT entry alone — returned + written off = its amount, the write-off being the exact
|
|
2111
|
+
* / figure advance − accepted (what the install used and what the engram had to keep), on one
|
|
2112
|
+
* / `upgrade.advance.returned` line naming its release and id and carrying advance, returned and
|
|
2113
|
+
* / writtenOff — and leaves every other advance of the engram on the ledger, for its own give-back
|
|
2114
|
+
* / or the 90-day write-off. An id that is not on the ledger for this caller (already settled,
|
|
2115
|
+
* / written off after 90 days, or never its own) accepts nothing — the network returns the attached
|
|
2116
|
+
* / cycles to the engram — and answers `#NotFound`; when a recorded engram attached cycles, an
|
|
2117
|
+
* / `upgrade.advance.notOut` line in the registry's unchained refusal log says so (never the chained
|
|
2118
|
+
* / audit log: it moves nothing, and any engram can send it). `advanceReturned` never counts a
|
|
2119
|
+
* / written-off cycle, and nothing is ever counted twice.
|
|
2255
2120
|
* / WHAT WOULD MAKE THIS WRONG: an engram naming an id other than the one it was handed — it can only
|
|
2256
2121
|
* / name one of its OWN advances (the caller must match), so the worst it can do is settle its own
|
|
2257
2122
|
* / other advance early with cycles that are still the registry's.
|
|
2258
2123
|
*/
|
|
2259
2124
|
sysRepayUpgradeAdvance: ActorMethod<[{ advanceId: bigint }], Result_1>;
|
|
2260
2125
|
/**
|
|
2261
|
-
* /
|
|
2262
|
-
* /
|
|
2263
|
-
* /
|
|
2264
|
-
* /
|
|
2265
|
-
* /
|
|
2266
|
-
* /
|
|
2267
|
-
* /
|
|
2126
|
+
* / A SOVEREIGN engram could not change its own controllers after this registry moved its record,
|
|
2127
|
+
* / and asks for the record back so the transfer does not complete. Gated like
|
|
2128
|
+
* / `sysNotifyOwnershipTransfer` (the caller must BE the engram), and only for an engram the
|
|
2129
|
+
* / registry records as sovereign — a managed engram's controllers are this registry's to move, and
|
|
2130
|
+
* / its record is put back inside `sysNotifyOwnershipTransfer` itself. Refuses, saying why, when the
|
|
2131
|
+
* / record cannot be put back (`ControlHandover.revertRefusal`); the engram then answers its owner
|
|
2132
|
+
* / with `ControlHandover.stuck`.
|
|
2268
2133
|
*/
|
|
2269
2134
|
sysRevertOwnershipTransfer: ActorMethod<[Principal], Result>;
|
|
2270
2135
|
/**
|
|
@@ -2272,36 +2137,29 @@ export interface _SERVICE {
|
|
|
2272
2137
|
* / an engram set to `#ManualOnly` is not moved by this method, which is what makes the preference
|
|
2273
2138
|
* / meaningful rather than advisory. The owner's own `upgradeMyEngram` is unaffected either way.
|
|
2274
2139
|
* /
|
|
2275
|
-
* /
|
|
2276
|
-
* /
|
|
2277
|
-
* /
|
|
2278
|
-
* /
|
|
2279
|
-
* /
|
|
2280
|
-
* /
|
|
2140
|
+
* / Same funding decision and dip as the owner's pull (`upgradeMyEngram`): paid only for a
|
|
2141
|
+
* / #Security update on a running engram. A push is the registry's own initiative, so where the
|
|
2142
|
+
* / engram cannot hold the install even with its setting lowered, the push is SKIPPED with
|
|
2143
|
+
* / `#Conflict` and not attempted — the owner can still pull it, and the pull is never refused.
|
|
2144
|
+
* / An ERASED engram (its canister holds no program) is not pushed: `#Conflict`, by name, before
|
|
2145
|
+
* / anything is added.
|
|
2281
2146
|
*/
|
|
2282
2147
|
upgradeEngram: ActorMethod<[Principal], Result>;
|
|
2283
2148
|
/**
|
|
2284
2149
|
* / Upgrade YOUR OWN engram to the registry's current template. Self-service — no admin, no
|
|
2285
2150
|
* / queue, no approval.
|
|
2286
2151
|
* /
|
|
2287
|
-
* /
|
|
2288
|
-
* /
|
|
2289
|
-
* /
|
|
2290
|
-
* /
|
|
2291
|
-
* /
|
|
2292
|
-
* /
|
|
2293
|
-
* /
|
|
2294
|
-
* /
|
|
2295
|
-
* /
|
|
2296
|
-
* /
|
|
2297
|
-
* / opened through a parent is
|
|
2298
|
-
* / engrams, but not including engrams running unofficial code"), and a #Feature update is never
|
|
2299
|
-
* / paid, rent or no rent ("where rent is paid, feature upgrades are paid by the engram").
|
|
2300
|
-
* / ⟨CORRECTED 2026-10-26, later — the owner's restart choice of that day: "pay whenever the engram is
|
|
2301
|
-
* / missing any security release, whatever the latest release is labelled"⟩ "a #Feature update is
|
|
2302
|
-
* / never paid" now excepts an engram still missing an earlier security release: its install of a
|
|
2303
|
-
* / #Feature template is paid as a security update, because the template carries that fix
|
|
2304
|
-
* / (UpgradeFunding.effectiveClass) — unless the template is itself behind a security release.
|
|
2152
|
+
* / THE INSTALL IS ALWAYS ATTEMPTED. Refusing an owner their own update for nonpayment is the ransom
|
|
2153
|
+
* / the continuity model forbids, so this method never refuses for compute or payment. What the
|
|
2154
|
+
* / registry PAYS for is narrower: a #Security update on a running engram, any size, so that cost
|
|
2155
|
+
* / never keeps a known security defect running. A #Feature update runs on the engram's own compute
|
|
2156
|
+
* / and is never paid, rent or no rent — except that an engram still missing an earlier security
|
|
2157
|
+
* / release is paid for its install of a #Feature template as a security update, because the
|
|
2158
|
+
* / template carries that fix (`UpgradeFunding.effectiveClass`), unless the template is itself
|
|
2159
|
+
* / behind a security release. Three standing exclusions are never paid for: an engram that has
|
|
2160
|
+
* / stopped (below its running line — it runs nothing, so its old code is not exposed while
|
|
2161
|
+
* / stopped), one running a module the registry never published, and a second deposit for the same
|
|
2162
|
+
* / release. An engram opened through a parent is paid for a security update like any other.
|
|
2305
2163
|
* / When it helps, the registry lowers the engram's freezing setting to one hour for the
|
|
2306
2164
|
* / install and puts the owner's value back after (the dip), so an install needs only ~0.32T above
|
|
2307
2165
|
* / an hour's burn rather than the hold above the whole 30-day line.
|
|
@@ -2310,15 +2168,16 @@ export interface _SERVICE {
|
|
|
2310
2168
|
* / (UpgradeFunding.pullFailure): `#Conflict` when the engram needs more compute (the owner's
|
|
2311
2169
|
* / action — add compute), `#Unavailable` when the registry could not pay this time (retryable).
|
|
2312
2170
|
* / A failure after a paid or unneeded deposit answers `#Unavailable` with the network's reply.
|
|
2313
|
-
* /
|
|
2314
|
-
* /
|
|
2171
|
+
* / On an ERASED engram (its canister holds no program) nothing is paid; the install is still
|
|
2172
|
+
* / attempted, the network refuses it, and the reply says "erased".
|
|
2315
2173
|
* /
|
|
2316
2174
|
* / An engram already on the current template is a silent no-op. A SOVEREIGN engram gets
|
|
2317
|
-
* / "registry is no longer a controller" — accurate, because it is no longer
|
|
2175
|
+
* / "registry is no longer a controller" — accurate, because it is no longer the registry's to
|
|
2176
|
+
* / install on.
|
|
2318
2177
|
* /
|
|
2319
|
-
* / ⚠ THERE IS NO REGISTRY-SIDE SIZE PRE-FLIGHT.
|
|
2320
|
-
* /
|
|
2321
|
-
* / get it.
|
|
2178
|
+
* / ⚠ THERE IS NO REGISTRY-SIDE SIZE PRE-FLIGHT. A size budget check, where a deployment has one,
|
|
2179
|
+
* / lives in its own upgrade tooling outside this canister, so a caller reaching this method
|
|
2180
|
+
* / directly does not get it.
|
|
2322
2181
|
*/
|
|
2323
2182
|
upgradeMyEngram: ActorMethod<[], Result>;
|
|
2324
2183
|
/**
|
|
@@ -2330,16 +2189,11 @@ export interface _SERVICE {
|
|
|
2330
2189
|
* / — so it discloses no mapping either way. That is the difference between this and the deleted
|
|
2331
2190
|
* / `getEngramByCanisterId`, which was gated precisely because it turned one id into the other.
|
|
2332
2191
|
* /
|
|
2333
|
-
* / ⚠ WHAT IT DOES NOT ATTEST. The answer is the owner AS THIS REGISTRY RECORDS IT. Custody
|
|
2334
|
-
* /
|
|
2335
|
-
* /
|
|
2336
|
-
* /
|
|
2337
|
-
* /
|
|
2338
|
-
* /
|
|
2339
|
-
* / ⟨Promoted from `//` to `///` 2026-08-21. Everything above was written as plain comments, so
|
|
2340
|
-
* / registry.did published the biller's money gate with NO explanation at all while 53 lines of
|
|
2341
|
-
* / it sat in the source. The correction history stays `//` on purpose — it is addressed to an
|
|
2342
|
-
* / editor, and only what a CALLER needs belongs in the interface.⟩
|
|
2192
|
+
* / ⚠ WHAT IT DOES NOT ATTEST. The answer is the owner AS THIS REGISTRY RECORDS IT. Custody moves
|
|
2193
|
+
* / on the engram via `transferOwnership`, and while `sysNotifyOwnershipTransfer` closes that gap, a
|
|
2194
|
+
* / caller for whom CURRENCY matters should compose with the engram's `listOwnershipTransfers` —
|
|
2195
|
+
* / current custody is the `to` of its latest entry. A query cannot make inter-canister calls, so
|
|
2196
|
+
* / this one cannot ask.
|
|
2343
2197
|
*/
|
|
2344
2198
|
verifyEngramActiveOwner: ActorMethod<[Principal, Principal], boolean>;
|
|
2345
2199
|
}
|