@engramx/idl 0.16.1-rc.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 CHANGED
@@ -1513,17 +1513,19 @@ type EngramEscrowRecovery =
1513
1513
  };
1514
1514
  type Engram =
1515
1515
  service {
1516
- /// ⟨0.16.0⟩ `about()` — the ONE public projection, replacing `status()` and absorbing `metrics()`.
1516
+ /// `about()` — the ONE public projection (since 0.16.0), replacing `status()` and absorbing
1517
+ /// `metrics()`.
1517
1518
  ///
1518
- /// Two public projections of one canister was the one-concept-two-names defect: both answered "what is this engram
1519
- /// like", disagreed about which counters they carried, and `status()` additionally masked two
1520
- /// fields behind an `authorized` flag whose own declaration admitted the problem — "a consumer
1521
- /// that must remember to check a sibling flag is one that will eventually forget."
1519
+ /// Two public projections of one canister was the one-concept-two-names defect: both answered
1520
+ /// "what is this engram like", disagreed about which counters they carried, and `status()`
1521
+ /// additionally masked two fields behind an `authorized` flag whose own declaration admitted the
1522
+ /// problem — "a consumer that must remember to check a sibling flag is one that will eventually
1523
+ /// forget."
1522
1524
  ///
1523
1525
  /// The fix is not a better flag. The gated fields MOVED (see `getOwnerConsole`), so there is no
1524
1526
  /// masked field to forget and no flag to check. Reaching the gated record is the authorization.
1525
1527
  ///
1526
- /// Ungated by design and marked for the public-reason gate's grep.
1528
+ /// Ungated by design.
1527
1529
  /// PUBLIC: existence, shape, posture and day-floored activity. No principal, no balance, no
1528
1530
  /// precise timestamp — nothing here identifies a person or reveals when they are at the keyboard.
1529
1531
  about: () -> (About) query;
@@ -1543,10 +1545,9 @@ type Engram =
1543
1545
  /// test/key-replacement.test.mo runs it; this body names no roster gate, because the caller holds
1544
1546
  /// no role here until the move.
1545
1547
  acceptAgentKeyNomination: (agentKey: principal) -> (Result_95);
1546
- /// ⟨2026-11-15, from an adversarial review, ruled the same day: THE NEW OWNER MUST ACCEPT, and on
1547
- /// acceptance what the former owner granted is ended, not carried over⟩ THE PRINCIPAL AN OFFER
1548
- /// NAMES TAKES THE ENGRAM, as themselves. This is the only call that hands an owned engram to
1549
- /// someone else.
1548
+ /// THE PRINCIPAL AN OFFER NAMES TAKES THE ENGRAM, as themselves. This is the only call that hands
1549
+ /// an owned engram to someone else, and on acceptance what the former owner granted is ended, not
1550
+ /// carried over.
1550
1551
  ///
1551
1552
  /// ORDER. On an engram a registry spawned, the caller first calls the registry's
1552
1553
  /// `acceptEngramOffer(<this engram>)`: the registry moves its record only for a principal who told
@@ -1555,14 +1556,10 @@ type Engram =
1555
1556
  /// code move exactly as a change of owner always did (`moveOwnership`; the answer's `handed` says
1556
1557
  /// who moved control), and ONLY THEN the owner changes, the custody row is written
1557
1558
  /// (`authorizedBy` is the former owner, who offered) and the offer is cleared. If control cannot
1558
- /// move, nothing changes here and the offer stays open, so the same call again finishes it.
1559
- /// ⟨2026-11-15, later, from a review, beside "the same call again finishes it" above⟩ That sentence
1560
- /// was not true when it was written: the registry removed its filed offer when it moved its
1561
- /// record, and its put-back did not bring the row back, so the same call was refused until the
1562
- /// owner offered again (MEASURED on PocketIC). The registry now removes the row only where a
1563
- /// change of owner finishes, so after a put-back both offers stand, the caller's acceptance at the
1564
- /// registry with them, and the same call again finishes it once the cause is fixed. Both offers
1565
- /// still end at their expiry (7 days from the offer); after that the owner offers again and the
1559
+ /// move, nothing changes here and the offer stays open: the registry removes its filed offer only
1560
+ /// where a change of owner finishes, so after a put-back both offers stand, the caller's acceptance
1561
+ /// at the registry with them, and the same call again finishes it once the cause is fixed. Both
1562
+ /// offers end at their expiry (7 days from the offer); after that the owner offers again and the
1566
1563
  /// named principal accepts again, at the registry and then here.
1567
1564
  ///
1568
1565
  /// WHAT ENDS, in the same message that changes the owner (`closed` counts them):
@@ -1572,12 +1569,12 @@ type Engram =
1572
1569
  /// former owner paired read a file the new owner wrote.
1573
1570
  /// · every GUARDIAN and every unredeemed agent or guardian INVITE. Reason: a guardian can
1574
1571
  /// freeze payments and pause writes. Measured: the former owner's guardian did both.
1575
- /// · ⟨2026-11-15, later, from a review⟩ every CHILD ALLOWANCE (`setChildAllowance`), with its
1576
- /// write counter moved on so an opening in flight gives nothing back. Reason: an allowance
1577
- /// spends this engram's compute (1.3T an opening) on the former owner's approval, and it is
1578
- /// kept by an agent's lasting identity, so it outlived the agent record. Measured: after a
1579
- /// hand-over, a key the NEW owner paired opened an engram on the former owner's allowance.
1580
- /// The record line counts them (`childAllowances=`); the reply's `closed` does not.
1572
+ /// · every CHILD ALLOWANCE (`setChildAllowance`), with its write counter moved on so an opening
1573
+ /// in flight gives nothing back. Reason: an allowance spends this engram's compute (1.3T an
1574
+ /// opening) on the former owner's approval, and it is kept by an agent's lasting identity, so
1575
+ /// it outlived the agent record. Measured: after a hand-over, a key the NEW owner paired opened
1576
+ /// an engram on the former owner's allowance. The record line counts them
1577
+ /// (`childAllowances=`); the reply's `closed` does not.
1581
1578
  /// · the SPENDING LIMITS: every per-key policy is removed, the general policy goes back to a
1582
1579
  /// new engram's (`OwnerHandover.STARTING_POLICY`), and the engram-wide daily ceiling goes
1583
1580
  /// back to `SpendCeiling.DEFAULT_ENGRAM_DAY`. Reason: a limit the former owner removed is a
@@ -1590,10 +1587,13 @@ type Engram =
1590
1587
  /// it could not be changed), every typed-data DESTINATION (an empty list refuses every
1591
1588
  /// signature that names a destination), the ALERT WEBHOOK (it posted this engram's activity
1592
1589
  /// to the former owner's address) and both PAID-MEMORY switches (off, as a new engram's).
1590
+ /// · the PROOF-OF-PERSONHOOD flag and its stored result (`endFormerOwnersGrants`), so
1591
+ /// `verifiedHuman` reads false until the new owner verifies as themselves. Reason: it attests
1592
+ /// the person who was the owner when it was made.
1593
1593
  ///
1594
1594
  /// WHAT IS KEPT, and why:
1595
1595
  /// · the connector TOKEN rows the former owner issued. They are kept as rows and NOT HONOURED:
1596
- /// since 2026-09-29 a token whose issuer is not the current owner is refused at the door
1596
+ /// a token whose issuer is not the current owner is refused at the door
1597
1597
  /// (`BearerTokens.standing`), and the roster shows the new owner each one as the former
1598
1598
  /// owner's. Revoking them here would only rewrite what those rows say happened.
1599
1599
  /// · the MEMORY FILES and their history, the RECORD and its counters, the custody chain: they
@@ -1610,11 +1610,6 @@ type Engram =
1610
1610
  /// money, theirs to close).
1611
1611
  /// · what the registry set once at birth (biller, market, metrics reader, consent origin): it
1612
1612
  /// was never the former owner's to set.
1613
- /// · NOT RULED, kept for now and named so nobody takes it for decided: the proof-of-personhood
1614
- /// flag and its stored result. It attests the person who was the owner when it was made.
1615
- /// ⟨2026-11-16, beside "NOT RULED"⟩ Ruled: it ENDS. The flag and its stored result are
1616
- /// cleared at an accepted hand-over (`endFormerOwnersGrants`), so `verifiedHuman` reads false
1617
- /// until the new owner verifies as themselves.
1618
1613
  ///
1619
1614
  /// Refused, with nothing changed: the anonymous caller; anyone the open offer does not name, and
1620
1615
  /// an expired offer (`OwnershipOffer.acceptRefusal`); an engram opened through another; a full
@@ -1625,63 +1620,57 @@ type Engram =
1625
1620
  /// that came with the ask becomes the engram's (sealed for them). Until this call they have no power
1626
1621
  /// at all. Callable only by that person while the ask waits; refused (as at birth) if they are now
1627
1622
  /// an agent or a guardian here.
1628
- /// Named caller: an owner console — "accept" on a waiting ask, signed in as the person asked.
1623
+ /// Named caller: an owner's app — "accept" on a waiting ask, signed in as the person asked.
1629
1624
  acceptSignIn: () -> (Result_2);
1630
- /// Consensus transform for the alert webhook outcall: collapse the response to status-only so
1631
- /// replicas agree regardless of response headers/body (we only care that the POST landed 2xx).
1632
- ///
1633
- /// ⟨CORRECTED 2026-10-21⟩ No longer a consensus transform: the alert outcall is non-replicated
1634
- /// (`is_replicated = ?false` in `scanAndPost`), so ONE node sends the POST and runs this on its
1635
- /// own response — there are no replicas to agree, and "on every replica" below now means "on that
1636
- /// node". It stays so the response is collapsed to status-only before the engram reads it. The
1637
- /// PUBLIC reasoning below is unchanged: the outcall protocol still calls it with no caller identity.
1638
- /// `worldIdTransform` is still a true consensus transform (World ID stays replicated).
1639
- ///
1640
- /// PUBLIC: not a choice. The management canister invokes a transform on every replica as part of
1641
- /// the HTTP-outcall protocol, and that invocation carries no caller identity to gate on — a gate
1642
- /// here would refuse the only caller there is and break every alert this canister sends. Safe
1643
- /// because it is total and stateless: it reads its argument and returns, touching nothing.
1625
+ /// Transform for the alert webhook outcall: it collapses the response to status-only before the
1626
+ /// engram reads it (the engram only cares that the POST landed 2xx). It is not a consensus
1627
+ /// transform: the alert outcall is non-replicated (`is_replicated = ?false` in `scanAndPost`), so
1628
+ /// ONE node sends the POST and runs this on its own response. `worldIdTransform` is a true consensus
1629
+ /// transform (World ID stays replicated).
1630
+ ///
1631
+ /// PUBLIC: not a choice. The management canister invokes a transform as part of the HTTP-outcall
1632
+ /// protocol, and that invocation carries no caller identity to gate on — a gate here would refuse
1633
+ /// the only caller there is and break every alert this canister sends. Safe because it is total and
1634
+ /// stateless: it reads its argument and returns, touching nothing.
1644
1635
  actionAlertTransform: (args:
1645
1636
  record {
1646
1637
  context: blob;
1647
1638
  response: HttpRequestResult;
1648
1639
  }) -> (HttpRequestResult) query;
1649
- /// Owner-managed destination allowlist. Additions LOOSEN and wait 24h; removals TIGHTEN
1650
- /// and apply instantly — the asymmetry the signing design ratified on 2026-08-04 (tightening applies
1651
- /// at once, loosening waits), applied to the one mutable policy surface.
1652
- ///
1653
- /// ⟨2026-10-14, the owner's destination-list ruling⟩ ONE LIST PER REGISTERED ACTION. `addEvmWithdrawDestination`,
1654
- /// `removeEvmWithdrawDestination` and `listEvmWithdrawDestinations` — one list for every action —
1655
- /// are REMOVED; these three take the action's `typeId`. Same rules, per action: the owner only; an
1656
- /// addition activates after 24 hours and is refused while payments are frozen; a removal is instant
1657
- /// and works while frozen; a value is 1–128 characters (an address, or a venue value such as an
1658
- /// account name). The action must be registered: a destination list belongs to an action, and a
1659
- /// list for no action would be a value nothing checks. The caller is the owner's app.
1640
+ /// Owner-managed destination allowlist. Additions LOOSEN and wait 24h; removals TIGHTEN and apply
1641
+ /// instantly — the signing design's asymmetry (tightening applies at once, loosening waits),
1642
+ /// applied to the one mutable policy surface.
1643
+ ///
1644
+ /// ONE LIST PER REGISTERED ACTION: these three methods take the action's `typeId` (a single list
1645
+ /// for every action, `addEvmWithdrawDestination` and its pair, is gone). Same rules, per action: the
1646
+ /// owner only; an addition activates after 24 hours and is refused while payments are frozen; a
1647
+ /// removal is instant and works while frozen; a value is 1–128 characters (an address, or a venue
1648
+ /// value such as an account name). The action must be registered: a destination list belongs to an
1649
+ /// action, and a list for no action would be a value nothing checks. The caller is the owner's app.
1660
1650
  addEip712Destination: (typeId: blob, value: text) -> (Result_11);
1661
1651
  /// Register a typed-data shape as signable. Owner-only, freeze-gated (a registration is a grant
1662
1652
  /// of FUTURE authority — a frozen engram must not be able to widen what it can sign), and the
1663
1653
  /// shape is IMMUTABLE: any change mints a new typeId.
1664
1654
  ///
1665
- /// ⟨2026-10-14, the owner's registration-bar and signing-floor rulings⟩ ONE BAR FOR EVERY
1666
- /// REGISTRATION — the class the owner names is stored as a label and decides nothing. Every
1667
- /// registration: records the irrevocability acknowledgement (`ackIrrevocable = true`); has no opaque
1668
- /// field (`bytes`, `bytes1..32`); names at least one destination field OR carries a must-equal rule;
1669
- /// passes the watchers — an owner alert webhook set, enabled AND with its money class on, and an
1670
- /// `#Active` guardian holding `canFreezePayments`; and waits `Eip712Policy.COOLOFF_NS` (72 hours). It
1671
- /// may carry per-field rules (`fieldRules`: "at most N" read as a plain decimal with D places, "must
1672
- /// equal X"), which are part of the registered shape — inside the typeId, stored in
1673
- /// `eip712FieldRules`, enforced in `eip712SignFor` before the cap reservation. Before this, a
1674
- /// withdrawal registered as `#standard` needed no webhook, no guardian and no destination field,
1675
- /// waited one hour, and signed to any address. Intrinsic checks still come first and the watchers
1676
- /// last (the 2026-08-06 re-ordering).
1677
- ///
1678
- /// ⟨2026-11-02, the child build's withdrawal-pinning step⟩ In an engram opened through another, after the spec's own
1679
- /// checks: the venue actions that move money or control to another account are refused by name
1680
- /// (`HyperliquidTransaction:` `UsdSend`, `SpotSend`, `SendAsset`, `SendToEvmWithData`,
1681
- /// `ConvertToMultiSigUser`, `ApproveBuilderFee`, `TokenDelegate` — `#Refused`), and
1682
- /// `HyperliquidTransaction:Withdraw` registers only with a must-equal rule on `destination` naming this
1683
- /// engram's own pay address (`#Refused` otherwise; `#Conflict` while the pay address has not been
1684
- /// derived — call `getEvmAddress` first). A first engram is unchanged.
1655
+ /// ONE BAR FOR EVERY REGISTRATION — the class the owner names is stored as a label and decides
1656
+ /// nothing. Every registration: records the irrevocability acknowledgement (`ackIrrevocable =
1657
+ /// true`); has no opaque field (`bytes`, `bytes1..32`); names at least one destination field OR
1658
+ /// carries a must-equal rule; passes the watchers — an owner alert webhook set, enabled AND with its
1659
+ /// money class on, and an `#Active` guardian holding `canFreezePayments`; and waits
1660
+ /// `Eip712Policy.COOLOFF_NS` (72 hours). It may carry per-field rules (`fieldRules`: "at most N"
1661
+ /// read as a plain decimal with D places, "must equal X"), which are part of the registered shape —
1662
+ /// inside the typeId, stored in `eip712FieldRules`, enforced in `eip712SignFor` before the cap
1663
+ /// reservation. (Under the earlier per-class bars, a withdrawal registered as `#standard` needed no
1664
+ /// webhook, no guardian and no destination field, waited one hour, and signed to any address.)
1665
+ /// Intrinsic checks come first and the watchers last.
1666
+ ///
1667
+ /// In an engram opened through another, after the spec's own checks: the venue actions that move
1668
+ /// money or control to another account are refused by name (`HyperliquidTransaction:` `UsdSend`,
1669
+ /// `SpotSend`, `SendAsset`, `SendToEvmWithData`, `ConvertToMultiSigUser`, `ApproveBuilderFee`,
1670
+ /// `TokenDelegate` — `#Refused`), and `HyperliquidTransaction:Withdraw` registers only with a
1671
+ /// must-equal rule on `destination` naming this engram's own pay address (`#Refused` otherwise;
1672
+ /// `#Conflict` while the pay address has not been derived — call `getEvmAddress` first). A first
1673
+ /// engram is unchanged.
1685
1674
  addEip712Type: (spec:
1686
1675
  record {
1687
1676
  ackIrrevocable: bool;
@@ -1707,25 +1696,24 @@ type Engram =
1707
1696
  primaryType: text;
1708
1697
  verifyingContract: text;
1709
1698
  }) -> (Result_92);
1710
- /// ⟨0.16.0, refusals are values, never traps⟩ THE ROLE-CONFLICT ARM, and why three refusals here are
1711
- /// not the same refusal.
1699
+ /// THE ROLE-CONFLICT ARM (refusals are values, never traps), and why three refusals here are not
1700
+ /// the same refusal.
1712
1701
  ///
1713
1702
  /// This method had five distinct ways to say no through one `text`, and a caller could only tell
1714
- /// them apart by matching prose. They are now three different arms because they call for three
1703
+ /// them apart by matching prose. They are three different arms because they call for three
1715
1704
  /// different responses: `#Invalid` means fix the argument and retry, `#Refused` means you are not
1716
1705
  /// the owner and retrying changes nothing, and `#Conflict` means the request was well-formed and
1717
1706
  /// permitted but this engram's state says no — the principal already holds an incompatible role,
1718
1707
  /// or the roster is full. Only the last is worth an agent's time to resolve.
1719
1708
  addGuardian: (guardianPrincipal: principal, name: text, permissions:
1720
1709
  GuardianPermissions) -> (Result_2);
1721
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ OWNER-ONLY: put a note on any entry of this
1722
- /// engram's record — words, nothing else. Appends a chained `record.note` entry
1723
- /// (`about=<id> note=<words>`) and keeps the note for `listRecordNotes`; answers the new entry's
1724
- /// id. The entry noted may be any entry ever appended (`about` below the head), including one the
1725
- /// ring no longer holds in full. An agent, a guardian, a stranger and the anonymous caller are
1726
- /// refused by `requireOwner`'s own words. Empty words, words over `RecordWords.WORDS_MAX` or
1727
- /// holding a line break are `#Invalid`; an id past the head is `#NotFound`; nothing is recorded
1728
- /// on any refusal.
1710
+ /// OWNER-ONLY: put a note on any entry of this engram's record — words, nothing else. Appends a
1711
+ /// chained `record.note` entry (`about=<id> note=<words>`) and keeps the note for
1712
+ /// `listRecordNotes`; answers the new entry's id. The entry noted may be any entry ever appended
1713
+ /// (`about` below the head), including one the ring no longer holds in full. An agent, a guardian, a
1714
+ /// stranger and the anonymous caller are refused by `requireOwner`'s own words. Empty words, words
1715
+ /// over `RecordWords.WORDS_MAX` or holding a line break are `#Invalid`; an id past the head is
1716
+ /// `#NotFound`; nothing is recorded on any refusal.
1729
1717
  addRecordNote: (about: nat, note: text) -> (Result_15);
1730
1718
  /// List a seller: from 24 hours after this call, x402 may pay `payTo` up to `perDayCapE6` a UTC day
1731
1719
  /// (minor units of a six-decimal stablecoin — 1_000_000 is $1.00) without an approval, and a payment
@@ -1737,8 +1725,8 @@ type Engram =
1737
1725
  /// Named callers: an owner console's seller list for an engram (signed in as its sign-in, for one
1738
1726
  /// opened through another), and the owner kit.
1739
1727
  addSeller: (payTo: text, perDayCapE6: nat, isPayout: bool) -> (Result_11);
1740
- /// AN AGENT CONVERTS THE ENGRAM'S BALANCE INTO COMPUTE, under the runway rule ⟨2026-11-04, the owner's
1741
- /// agent-conversion rulings of 2026-11-01; `AgentConvert.mo` holds the rule and says why each number⟩.
1728
+ /// AN AGENT CONVERTS THE ENGRAM'S BALANCE INTO COMPUTE, under the runway rule (`AgentConvert.mo`
1729
+ /// holds the rule and says why each number).
1742
1730
  ///
1743
1731
  /// CALLER: a paired agent whose STORED grant holds the scope "wallet.convert" (`AgentConvert.SCOPE`),
1744
1732
  /// which only the owner adds (`createAgentInvite` / `setAgentPermissions`); off by default, and no HTTP
@@ -1748,32 +1736,32 @@ type Engram =
1748
1736
  /// THE RULE: converts only while this engram has under 30 days of compute left by its own reading; at
1749
1737
  /// least 0.50 and at most 2.00 (or the owner's own per-call cap if lower); at most one conversion under
1750
1738
  /// the rule in any rolling 24 hours (`agentConvertAtNs`, which holds with the engram-wide ceiling
1751
- /// removed); counted against that ceiling when one is set; refused under ANY payment freeze (ruled), and
1752
- /// while another of the engram's own calls is out (its balance reads low then). `amountE6 = null` converts
1739
+ /// removed); counted against that ceiling when one is set; refused under ANY payment freeze, and while
1740
+ /// another of the engram's own calls is out (its balance reads low then). `amountE6 = null` converts
1753
1741
  /// as much as allowed: the smaller of the cap and what the wallet holds less the ledger fee — the wallet
1754
1742
  /// is READ before anything moves, and a wallet that cannot fund 0.50 is refused by name.
1755
1743
  ///
1756
1744
  /// STOPPED MID-WAY: if the agent is removed, leaves, loses the grant, payments are frozen or the engram is
1757
- /// reset while it waits on the ledger or the biller's deposit address, nothing moves; after the money
1758
- /// reached the deposit, it is sent back to the wallet less one ledger fee (or held at the biller for the
1759
- /// owner's next Convert). THE RESIDUAL, stated: a removal landing DURING the biller's own conversion call
1760
- /// cannot stop that call — it finishes, and the reply (`finishedBeforeRemovalSeen`) and the record row say
1761
- /// so. One inter-canister call, bounded by one cap.
1745
+ /// reset while it waits on the ledger, on the biller's answer to whether it would take the top-up or on
1746
+ /// the biller's deposit address, nothing moves; after the money reached the deposit, it is sent back to
1747
+ /// the wallet less one ledger fee (or held at the biller for the owner's next Convert). THE RESIDUAL,
1748
+ /// stated: a removal landing DURING the biller's own conversion call cannot stop that call — it
1749
+ /// finishes, and the reply (`finishedBeforeRemovalSeen`) and the record row say so. One inter-canister
1750
+ /// call, bounded by one cap.
1762
1751
  agentConvertBalance: (token: text, amountE6: opt nat) -> (Result_90);
1763
1752
  /// Returns the write RECEIPT, not just the version.
1764
1753
  ///
1765
- /// The receipt was always computed and then thrown away: MemoryRouter hands back
1766
- /// {seq; version; contentRoot; head}, the audit detail stringifies `seq=`/`head=` into prose, and
1767
- /// the caller got a bare Nat. So a writer could be told their write landed but not be given the
1768
- /// evidence it landed — they had to read the audit log back and parse a string to learn the head
1769
- /// their own write produced. `head` is the chain head AFTER this write; it transitively commits
1770
- /// to contentRoot, which is why the root is not repeated here (the same ruling that dropped
1771
- /// per-entry contentRoot from the audit entries).
1772
- ///
1773
- /// This is the half of a consumer request that costs nothing: the commitment ledger was still
1774
- /// "trust whoever runs the service" one hop from the proof — a third party can now be handed the receipt
1775
- /// directly by whoever wrote the content. A return-TYPE change cannot be absorbed by the client
1776
- /// subset rule, so it can only ride an interface break; this release is one.
1754
+ /// The receipt was once computed and then thrown away: the audit detail stringified `seq=`/`head=`
1755
+ /// into prose, and the caller got a bare Nat. So a writer could be told their write landed but not
1756
+ /// be given the evidence it landed — they had to read the audit log back and parse a string to
1757
+ /// learn the head their own write produced. The receipt (`WriteReceipt`) carries the memory-file
1758
+ /// event — `version`, `seq`, `head` (the file's chain head AFTER this write), `prev`, `atNs`,
1759
+ /// `contentRoot`, `size` — and where its record entry landed (`recordId`, `recordPrev`). With these
1760
+ /// and the bytes it sent, the writer rebuilds its own evidence: the event hash (= `head`), then,
1761
+ /// with its entry, the entry hash, then the walk to the certified head. So a third party can be
1762
+ /// handed the receipt directly by whoever wrote the content, instead of trusting whoever runs the
1763
+ /// service one hop from the proof. (A return-TYPE change cannot be absorbed by the client-subset
1764
+ /// rule, so it rode an interface break: 0.16.0.)
1777
1765
  appendMemory: (path: text, content: blob, source: opt MemorySource) ->
1778
1766
  (Result);
1779
1767
  /// Append plaintext with a newline when the live file already has content. The separator and
@@ -1818,9 +1806,9 @@ type Engram =
1818
1806
  /// the hour, and the retry CONSUMES the approval (`#Used`); a second attempt needs a second
1819
1807
  /// approval. Past the hour it becomes `#Expired` on first touch. Neither state is recoverable by
1820
1808
  /// approving again — the owner approves a NEW request.
1821
- /// ⟨2026-09-29, a review finding⟩ One exception, made by the engram and not by the owner: when
1822
- /// the retry's signer FAILS, nothing was signed, so the approval goes back from `#Used` to
1823
- /// `#Approved` with its original expiry and an `approval.released` entry says so.
1809
+ /// One exception, made by the engram and not by the owner: when the retry's signer FAILS, nothing
1810
+ /// was signed, so the approval goes back from `#Used` to `#Approved` with its original expiry and
1811
+ /// an `approval.released` entry says so.
1824
1812
  ///
1825
1813
  /// ⚠ IT IS BOUND TO THE EXACT OPERATION THAT WAS REQUESTED, not to the agent. An approval
1826
1814
  /// carries the operation, the amount and the binding it was raised for, and consuming it checks
@@ -1865,16 +1853,15 @@ type Engram =
1865
1853
  /// that is never finalized is not a backup; `backupFinalize` refuses one with zero chunks or zero
1866
1854
  /// total size rather than recording an empty success.
1867
1855
  ///
1868
- /// ⚠ THE `sha256` IS YOUR DECLARATION, NOT THIS CANISTER'S FINDING. It is taken here, before any
1869
- /// bytes arrive, stored with the metadata and carried through finalize UNCHANGED — verified at
1870
- /// the site 2026-08-21: `Backup.finalizeBackup` checks existence, creator, state and non-emptiness
1871
- /// and does NOT recompute or compare a digest. So it is a commitment a restorer can check the
1872
- /// bytes against LATER, and it is not evidence the bytes match. Treating it as a canister-verified
1873
- /// hash is the misreading to avoid — and it is an easy one to reach, because the REGISTRY's
1874
- /// chunked upload (`engramWasmInit`/`PushChunk`/`Finalize`) has the same shape and DOES verify:
1875
- /// it hashes the assembled bytes and refuses on mismatch. Same protocol, opposite semantics.
1876
- /// ⟨2026-11-19, beside the paragraph above⟩ The argument is named `declaredSha256` now (it was `sha256`), so the
1877
- /// name says what this paragraph says. A name only: Candid passes arguments by position, so no caller changes.
1856
+ /// ⚠ `declaredSha256` IS YOUR DECLARATION, NOT THIS CANISTER'S FINDING, as its name says. It is
1857
+ /// taken here, before any bytes arrive, stored with the metadata and carried through finalize
1858
+ /// UNCHANGED — verified at the site 2026-08-21: `Backup.finalizeBackup` checks existence, creator,
1859
+ /// state and non-emptiness and does NOT recompute or compare a digest. So it is a commitment a
1860
+ /// restorer can check the bytes against LATER, and it is not evidence the bytes match. Treating it
1861
+ /// as a canister-verified hash is the misreading to avoid — and it is an easy one to reach, because
1862
+ /// the REGISTRY's chunked upload (`engramWasmInit`/`PushChunk`/`Finalize`) has the same shape and
1863
+ /// DOES verify: it hashes the assembled bytes and refuses on mismatch. Same protocol, opposite
1864
+ /// semantics.
1878
1865
  ///
1879
1866
  /// **TWO DIFFERENT PERMISSIONS GUARD THE TWO HALVES.** Writing (init, push, finalize, abort) is
1880
1867
  /// owner-or-agent and an AGENT additionally needs `canAppendMemory`; reading
@@ -1895,10 +1882,10 @@ type Engram =
1895
1882
  /// The OWNER cancels an agent's pending key nomination; the agent keeps its current key. Refused
1896
1883
  /// by name when the agent is unknown or has nothing pending — never a silent success.
1897
1884
  cancelAgentKeyNomination: (agentKey: principal) -> (Result_2);
1898
- /// ⟨2026-11-15, the ruling that the new owner must accept⟩ THE OWNER WITHDRAWS THE OPEN OFFER.
1899
- /// Owner-only. `#NotFound` when none is open. Nothing else changes, and nothing is sent: the
1900
- /// registry's copy of the offer cannot move anything without `acceptOwnership` succeeding here,
1901
- /// which now refuses, and it ends at its own expiry.
1885
+ /// THE OWNER WITHDRAWS THE OPEN OFFER. Owner-only. `#NotFound` when none is open. Nothing else
1886
+ /// changes, and nothing is sent: the registry's copy of the offer cannot move anything without
1887
+ /// `acceptOwnership` succeeding here, which refuses once the offer is withdrawn, and it ends at its
1888
+ /// own expiry.
1902
1889
  cancelOwnershipOffer: () -> (Result_2);
1903
1890
  /// Close a session the caller paid for: settle what was consumed, refund the remainder.
1904
1891
  ///
@@ -1906,41 +1893,36 @@ type Engram =
1906
1893
  /// and `forceCloseSession` were on the MARKET, which is withheld, and whose escrow subaccount is
1907
1894
  /// under a different principal entirely, so its close could never have reached these funds.
1908
1895
  closeSession: (sessionId: text) -> (Result_2);
1909
- /// Convert the engram's OWN earned ckUSDC/ckUSDT into its OWN cycles, via the biller — the
1910
- /// engram-self top-up path. Owner-only; per-call cap + cooldown (irreversible); NOT freeze-gated
1911
- /// (infrastructure funding). Flow: read the engram's deposit address on the biller, move the
1896
+ /// Convert the engram's OWN ckUSDC/ckUSDT into its OWN cycles, via the biller — the engram-self
1897
+ /// top-up path. Owner-only; per-call cap + cooldown (irreversible); NOT freeze-gated
1898
+ /// (infrastructure funding). Flow: ask the biller whether it would take the top-up
1899
+ /// (`topUpEligibility`; a refusal is returned before any money moves, and a biller that does not
1900
+ /// serve the method is not a refusal), read the engram's deposit address on the biller, move the
1912
1901
  /// engram's tokens there, then have the biller convert — the biller self-authorizes because the
1913
- /// caller (this engram) is a registered active engram (registry isRegisteredActiveEngram seam).
1914
- /// (The owner-funded path lives entirely in the frontend: owner → biller deposit → topUp.)
1915
- /// ⟨0.16.0, named wire types — `token : Text` KEPT, deliberately, and this note exists so the sweep that finds
1916
- /// it does not re-litigate it.⟩
1917
- ///
1918
- /// `ownerWithdraw` and the market's `recoverEscrow` both took `Wire.TokenAmount` because they
1919
- /// accept ICP (e8s) BESIDE the stablecoins (e6) — mixed decimals behind one number is a real
1920
- /// hundred-fold error. This method accepts ckUSDC and ckUSDT only. Both are e6, so there is no
1921
- /// unit to get wrong, and the 0.16.0 interface plan rules the pair as `(token, amountE6)`.
1922
- ///
1923
- /// `Wire.TokenAmount` would be actively WORSE here: its `#Icp` arm is a token this path cannot
1924
- /// convert, so the type would make an unacceptable value REPRESENTABLE and hand back a runtime
1925
- /// rejection anyway — losing the one property the variant is for while gaining a wider type.
1926
- ///
1927
- /// ⟨2026-10-02⟩ The second parameter is NAMED `amountE6` now, as the interface plan's ruling above has the
1928
- /// pair — e6 base units of the token named first. A name only: Candid passes arguments by
1929
- /// position, so nothing on the wire moved.
1930
- ///
1931
- /// ⟨2026-11-04, the agent-conversion build — the owner's agent-conversion rulings⟩ The body moved whole into
1932
- /// `runConversion`, which an agent's `agentConvertBalance` shares; this method keeps its name, its
1933
- /// signature and its bare `cyclesAdded` reply. Under those rulings it converts the engram's BALANCE (what the
1934
- /// owner put in and what it earned are not told apart); the name is the wire's and stays. A FIRST
1935
- /// engram's owner Convert is unchanged: not counted, not freeze-gated, not runway-bound, not pre-read,
1936
- /// 10.00 / 5 min. In an engram OPENED THROUGH ANOTHER the key file's Convert runs the agent rule too
1937
- /// (as the owner agreed: under 30 days, 0.50–2.00, once in 24 hours shared with the agents, the
1938
- /// wallet read first), keeping its own freeze gate (by the owner's ruling, a guardian's freeze only).
1939
- /// ⟨2026-11-04, review fix⟩ SHARED with an agent's conversion: the in-flight latch only (one deposit
1940
- /// account, one pending marker — one conversion at a time, whoever asked), so while an agent's conversion
1941
- /// is between its deposit and its landing this door answers "another conversion is still in flight". NOT
1942
- /// shared: the 5-minute cooldown (an agent's landing does not move it) and the latch during an agent's
1943
- /// wallet read (nothing is held while it reads).
1902
+ /// caller (this engram) is a registered active engram (registry isRegisteredActiveEngram seam). A
1903
+ /// retry that finishes a deposit already at the biller does not ask. (The owner-funded path does
1904
+ /// not use this method: owner → biller deposit → topUp.)
1905
+ ///
1906
+ /// It converts the engram's BALANCE: what the owner put in and what it earned are not told apart,
1907
+ /// and "earnings" in the name is the wire's and stays. The body is `runConversion`, which an agent's
1908
+ /// `agentConvertBalance` shares; this method keeps its bare `cyclesAdded` reply. A FIRST engram's
1909
+ /// owner Convert: not counted, not freeze-gated, not runway-bound, not pre-read, 10.00 / 5 min. In
1910
+ /// an engram OPENED THROUGH ANOTHER the key file's Convert runs the agent rule too (under 30 days,
1911
+ /// 0.50–2.00, once in 24 hours shared with the agents, the wallet read first), keeping its own
1912
+ /// freeze gate (a guardian's freeze only). SHARED with an agent's conversion: the in-flight latch
1913
+ /// only (one deposit account, one pending marker — one conversion at a time, whoever asked), so
1914
+ /// while an agent's conversion is between its deposit and its landing this door answers "another
1915
+ /// conversion is still in flight". NOT shared: the 5-minute cooldown (an agent's landing does not
1916
+ /// move it) and the latch during an agent's wallet read (nothing is held while it reads).
1917
+ ///
1918
+ /// `token : Text` and `amountE6` (e6 base units of the token named first), deliberately, not
1919
+ /// `Wire.TokenAmount`. `ownerWithdraw` and the market's `recoverEscrow` take `Wire.TokenAmount`
1920
+ /// because they accept ICP (e8s) BESIDE the stablecoins (e6) — mixed decimals behind one number is
1921
+ /// a real hundred-fold error. This method accepts ckUSDC and ckUSDT only. Both are e6, so there is
1922
+ /// no unit to get wrong. `Wire.TokenAmount` would be actively WORSE here: its `#Icp` arm is a token
1923
+ /// this path cannot convert, so the type would make an unacceptable value REPRESENTABLE and hand
1924
+ /// back a runtime rejection anyway — losing the one property the variant is for while gaining a
1925
+ /// wider type.
1944
1926
  convertEarningsToCycles: (token: text, amountE6: nat) -> (Result_15);
1945
1927
  /// Owner-only: mint a single-use invite code an agent redeems with `pairAgent`.
1946
1928
  ///
@@ -1960,15 +1942,14 @@ type Engram =
1960
1942
  /// A principal that is already a GUARDIAN cannot become an agent — a guardian is an
1961
1943
  /// independent check on agents, so one wallet must not hold both.
1962
1944
  ///
1963
- /// ⟨2026-10-29, the owner's ruling⟩ `name` MAY BE EMPTY (or only whitespace): the agent is then
1964
- /// named after its key when it pairs — "agent-" and the key's first five characters, e.g.
1965
- /// "agent-hsffu" (`People.nameAtPairing` says why five, and the first). ⟨2026-10-29, later, beside "its key"⟩ Its
1966
- /// PERMANENT key (the root it enrolled with), not the key that pairs, so the name stays right across
1967
- /// a key replacement and matches the app's "Copy permanent key". A name the owner gives
1968
- /// always wins. Before this an empty name was refused, so an app that wanted no name had to invent
1969
- /// one ("agent"), and two agents read alike.
1970
- /// ⟨2026-10-29, a review finding⟩ A name the owner gives meets the rule `renameAgent` applies: a line break
1971
- /// or another control character is `#Invalid` (`People.nameRefusal`), as a rename to it would be.
1945
+ /// `name` MAY BE EMPTY (or only whitespace): the agent is then named after its PERMANENT key when it
1946
+ /// pairs — "agent-" and the key's first five characters, e.g. "agent-hsffu" (`People.nameAtPairing`
1947
+ /// says why five, and the first). The permanent key is the root it enrolled with, not the key that
1948
+ /// pairs, so the name stays right across a key replacement and matches the permanent key an app
1949
+ /// shows. A name the owner gives always wins. (An empty name was once refused, so an app that wanted
1950
+ /// no name had to invent one, "agent", and two agents read alike.)
1951
+ /// A name the owner gives meets the rule `renameAgent` applies: a line break or another control
1952
+ /// character is `#Invalid` (`People.nameRefusal`), as a rename to it would be.
1972
1953
  createAgentInvite: (name: text, permissions: AgentPermissions) ->
1973
1954
  (Result_58);
1974
1955
  /// Owner-only: mint an invite for a GUARDIAN — an independent check on agents, not a
@@ -1994,9 +1975,9 @@ type Engram =
1994
1975
  /// a check must be independent of the thing it checks.
1995
1976
  createGuardianInvite: (name: text, permissions: GuardianPermissions) ->
1996
1977
  (Result_58);
1997
- /// The sign-in GIVES ITSELF UP, or the person the owner asked again says no. ⟨the owner's ruling that
1998
- /// they may say no, but the child can ask again — from the child build's design check: whoever the kit
1999
- /// names cannot otherwise refuse a seat they never agreed to⟩
1978
+ /// The sign-in GIVES ITSELF UP, or the person the owner asked again says no. They may say no, and
1979
+ /// the owner may ask again: whoever the kit names could otherwise not refuse a seat they never
1980
+ /// agreed to.
2000
1981
  /// · as the sign-in: the slot empties, the sealed copy of the owner's key is deleted (nobody may
2001
1982
  /// hold a copy for a seat that is gone), and the caller is recorded as the one who declined, with
2002
1983
  /// the time. The engram keeps its small limits; the owner may ask this person again in 7 days.
@@ -2006,7 +1987,7 @@ type Engram =
2006
1987
  /// the decline's time moves to now (the next ask waits another 7 days).
2007
1988
  /// The key file is refused: it cannot empty the slot (a thief would, to strand the honest owner's
2008
1989
  /// approvals). A first engram has nothing to decline.
2009
- /// Named caller: an owner console — the sign-in's "decline", and the person asked's "decline" on a
1990
+ /// Named caller: an owner's app — the sign-in's "decline", and the person asked's "decline" on a
2010
1991
  /// waiting ask.
2011
1992
  declineSignIn: () -> (Result_2);
2012
1993
  /// OWNER-ONLY deletion of a stored backup.
@@ -2020,11 +2001,11 @@ type Engram =
2020
2001
  /// `backupAbort` is the agent's way out of a failed UPLOAD; it discards something never
2021
2002
  /// finalized. This removes a finished backup, which is a different act on a different object.
2022
2003
  deleteBackup: (backupId: text) -> (Result_2);
2023
- /// ⟨0.16.0, the interface plan⟩ RETURNS A REAL RECEIPT, not `R<()>`. The receipt was already
2024
- /// being computed and written into the audit line — `receiptSuffix(r)` — and then discarded, so
2025
- /// a caller could not cite the seq its own delete produced and had to go looking for it in a log
2026
- /// it may not be allowed to read. A delete is an EVENT on the chain; an event that will not tell
2027
- /// you where it landed is evidence nobody can point at. Same projection as writeMemory.
2004
+ /// RETURNS A REAL RECEIPT, not `R<()>` (since 0.16.0). The receipt was already being computed and
2005
+ /// written into the audit line — `receiptSuffix(r)` — and then discarded, so a caller could not cite
2006
+ /// the seq its own delete produced and had to go looking for it in a log it may not be allowed to
2007
+ /// read. A delete is an EVENT on the chain; an event that will not tell you where it landed is
2008
+ /// evidence nobody can point at. Same projection as writeMemory.
2028
2009
  deleteMemoryFile: (path: text) -> (Result);
2029
2010
  /// Owner-only: deny one pending over-limit request, with a `reason` the agent can read.
2030
2011
  ///
@@ -2036,13 +2017,12 @@ type Engram =
2036
2017
  /// `#NotFound` for an unknown id and `#Conflict` when the request is no longer pending, and it
2037
2018
  /// does not change the policy — the next request over the same limit will be raised again.
2038
2019
  denyRequest: (requestId: text, reason: text) -> (Result_2);
2039
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ A NEW GUARDIAN POWER, words only: an ACTIVE
2040
- /// guardian disputes an agent's write. It never moves money, stops anything or changes a grant.
2041
- /// Appends a chained `record.dispute` entry (`about=<id> reason=<words>`) and keeps the dispute
2042
- /// for `listGuardianDisputes`; answers the new entry's id. NOT ALERTED, deliberately: a
2043
- /// `guardian.*` operation would fall in the alerts' #guardian class, and which entries reach a
2044
- /// phone is a later alerts change's to decide (`ActionAlerts.classify` answers null for
2045
- /// `record.*`). The owner sees it on the record's Disputes tab.
2020
+ /// A GUARDIAN POWER, words only: an ACTIVE guardian disputes an agent's write. It never moves money,
2021
+ /// stops anything or changes a grant. Appends a chained `record.dispute` entry (`about=<id>
2022
+ /// reason=<words>`) and keeps the dispute for `listGuardianDisputes`; answers the new entry's id.
2023
+ /// NOT ALERTED, deliberately: a `guardian.*` operation would fall in the alerts' #guardian class,
2024
+ /// and which entries reach a phone is a later alerts change's to decide (`ActionAlerts.classify`
2025
+ /// answers null for `record.*`). The owner sees it in `listGuardianDisputes`.
2046
2026
  ///
2047
2027
  /// WHO: every active guardian — no grant bit (`RecordWords` header says why). The OWNER is refused
2048
2028
  /// by name (`RecordWords.OWNER_DISPUTES_ELSEWHERE` — the owner's dispute is
@@ -2066,58 +2046,54 @@ type Engram =
2066
2046
  /// failed its integrity check must not attest anything it cannot vouch for.
2067
2047
  exportMemoryRange: (fromSeq: nat, toSeq: nat, authorFilter:
2068
2048
  opt principal) -> (Result_88);
2069
- /// ⟨0.16.0, same concept, same name — renamed from `guardianFreezePayments`⟩ The prefix LIED about who may call it.
2070
- /// The gate is `requireOwnerOrGuardian`, and an owner freezing their own payments is the ordinary
2071
- /// case — the guardian is the exceptional one. A name that says otherwise sends an owner looking
2072
- /// for a method that does not exist. `unfreezePayments`, its owner-only inverse, never carried the
2073
- /// prefix, so the pair read as unrelated.
2049
+ /// The payments brake, for the owner or an active guardian (`requireOwnerOrGuardian`). It was
2050
+ /// `guardianFreezePayments` before 0.16.0, and the prefix LIED about who may call it: an owner
2051
+ /// freezing their own payments is the ordinary case — the guardian is the exceptional one. A name
2052
+ /// that says otherwise sends an owner looking for a method that does not exist. `unfreezePayments`,
2053
+ /// its owner-only inverse, never carried the prefix, so the pair read as unrelated.
2074
2054
  ///
2075
- /// WHAT THE FREEZE ACTUALLY COVERS ⟨enumerated 2026-08-21 from the eight `requirePaymentsNotFrozen`
2076
- /// call sites, because it was written down nowhere and had to be re-derived to be trusted⟩:
2055
+ /// WHAT THE FREEZE COVERS (enumerated from the `requirePaymentsNotFrozen` call sites, because it
2056
+ /// was written down nowhere and had to be re-derived to be trusted):
2077
2057
  ///
2078
2058
  /// · EVERY SIGNING PATH, which is the point of the brake. `signX402Payment` and
2079
2059
  /// `sysSignX402Payment` through `x402SignFor`; `signEip712` and `sysSignEip712` through
2080
- /// `eip712SignFor`; `signEngramRegistration` directly. ⟨The two helpers are why a grep of an
2081
- /// individual method's body finds nothing — the check is one level down.⟩
2082
- /// · `addEip712Type` and `addEvmWithdrawDestination` — pre-staging for a later payout is the
2083
- /// thing a brake most needs to stop, so the destination list is frozen along with the signing.
2084
- /// ⟨2026-10-14, the owner's destination-list ruling⟩ `addEvmWithdrawDestination` is removed; its place is
2085
- /// `addEip712Destination` (one list per registered action), freeze-gated the same way.
2060
+ /// `eip712SignFor`; `signEngramRegistration` directly. The two helpers are why a grep of an
2061
+ /// individual method's body finds nothing — the check is one level down.
2062
+ /// · `addEip712Type` and `addEip712Destination` (one destination list per registered action) —
2063
+ /// pre-staging for a later payout is the thing a brake most needs to stop, so the destination
2064
+ /// lists are frozen along with the signing.
2086
2065
  /// · `sessionReadMemory` and `sessionAppendMemory` — the paid-memory rail, money coming IN.
2066
+ /// · An AGENT's conversion (`agentConvertBalance`), by any freeze — the owner's own included —
2067
+ /// before it starts and again after each await.
2087
2068
  ///
2088
2069
  /// AND WHAT IT DELIBERATELY DOES NOT, stated so the absence is not read as an oversight:
2089
2070
  ///
2090
- /// · `convertEarningsToCycles` — the owner's OWN earnings becoming their OWN engram's fuel. A
2091
- /// frozen engram still burns cycles, so freezing this would let a brake starve the thing it
2092
- /// is protecting. Owner-only, capped per call, and it moves nothing outward.
2093
- /// ⟨2026-11-04, the agent-conversion build — as the owner agreed⟩ An AGENT's conversion
2094
- /// (`agentConvertBalance`) IS frozen, by any freeze — the owner's own included — before it starts and
2095
- /// again after each await. The owner's own Convert in a first engram stays as above; in an engram
2096
- /// opened through another it stops under a guardian's freeze only (the owner's ruling of 2026-11-02).
2071
+ /// · the owner's own `convertEarningsToCycles` in a first engram — the engram's OWN balance
2072
+ /// becoming its OWN fuel. A frozen engram still burns cycles, so freezing this would let a
2073
+ /// brake starve the thing it is protecting. Owner-only, capped per call, and it moves nothing
2074
+ /// outward. In an engram opened through another it stops under a guardian's freeze only.
2097
2075
  /// · `approveRequest` — an approval is not a spend. The spend it authorises goes through
2098
2076
  /// `x402SignFor`, which IS frozen, so an approval granted during a freeze simply waits.
2099
2077
  /// · `transferOwnership` — ownership is not a payment, and a guardian's PAYMENTS brake is not
2100
2078
  /// a veto on who owns the engram.
2101
2079
  ///
2102
- /// ⚠ The three exclusions are a reading of intent, not a ruling: no declaration stated the scope
2103
- /// before this one. If any of them is wrong, this comment is where the argument should happen.
2080
+ /// ⚠ The three exclusions are a reading of intent: no declaration stated the scope before this
2081
+ /// one. If any of them is wrong, this comment is where the argument should happen.
2104
2082
  freezePayments: () -> (Result_2);
2105
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ `freezePayments` with a reason the strip and the
2106
- /// guardian page show ("Sam froze payments: 'a payment I didn't expect'"). A NEW method, not an
2107
- /// argument on `freezePayments`: a shipped argument tuple is frozen. Same callers, same grant, same
2108
- /// brake: the owner, or an active guardian holding `canFreezePayments`; an agent, a stranger, a
2109
- /// pending guardian and the anonymous caller are refused by `requireOwnerOrGuardian`'s own words.
2110
- /// An empty reason is no reason; a reason too long or holding a line break is `#Invalid` and the
2111
- /// brake is NOT pulled — the caller pulls it with `freezePayments`, or shortens the words.
2083
+ /// `freezePayments` with a reason an app can show ("Sam froze payments: 'a payment I didn't
2084
+ /// expect'"). A NEW method, not an argument on `freezePayments`: a shipped argument tuple is frozen.
2085
+ /// Same callers, same grant, same brake: the owner, or an active guardian holding
2086
+ /// `canFreezePayments`; an agent, a stranger, a pending guardian and the anonymous caller are
2087
+ /// refused by `requireOwnerOrGuardian`'s own words. An empty reason is no reason; a reason too long
2088
+ /// or holding a line break is `#Invalid` and the brake is NOT pulled — the caller pulls it with
2089
+ /// `freezePayments`, or shortens the words.
2112
2090
  freezePaymentsWithReason: (reason: text) -> (Result_2);
2113
2091
  /// Delivery status + config readback. Owner-only (the URL is a secret).
2114
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2115
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2092
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2093
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2116
2094
  getActionAlertStatus: () -> (Result_77) query;
2117
2095
  /// The agent-conversion rule's numbers.
2118
- /// PUBLIC: the class of `getTopUpLimits` — a policy, nobody's data. ⟨2026-11-04, the market-route
2119
- /// build: the marker's colon was missing, so the deployment's PUBLIC-rationale gate read the method as
2120
- /// unmarked; the reason itself is unchanged.⟩
2096
+ /// PUBLIC: the class of `getTopUpLimits` — a policy, nobody's data.
2121
2097
  /// The cap an agent meets is `min(maxPerCallE6, getTopUpLimits().maxCkusdcE6s)`.
2122
2098
  getAgentConvertRule: () -> (AgentConvertRule) query;
2123
2099
  /// Agents need to know what they may revise, so they can read it too. Whole-value config, same
@@ -2138,8 +2114,8 @@ type Engram =
2138
2114
  /// order. Anyone else is refused by name (`#Refused getAgentSeatWeeks: …`), never answered with an
2139
2115
  /// empty page. Paged; `total` is every engagement ever paired here (a reset keeps the rows).
2140
2116
  /// Two rows can name one root: an agent paired again after it left is a second engagement.
2141
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2142
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2117
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2118
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2143
2119
  getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_86) query;
2144
2120
  /// Owner: everything written into this engram by someone other than the owner since the last
2145
2121
  /// markAgentWritesReviewed() — agent appends/revisions AND paid-session appends (see
@@ -2148,9 +2124,8 @@ type Engram =
2148
2124
  /// them — the UI must page (markAgentWritesReviewed(?lastShownId)) and must NOT present 200
2149
2125
  /// as a total. `earliest` discloses ring eviction — if cursor < earliest, entries between them
2150
2126
  /// aged out of the ring (the CHAIN still proves total count; this view can't show their bodies).
2151
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2152
- /// an engram opened through another, as the owner (`AccessControl.requireOwnerOrSignIn`); a first
2153
- /// engram is unchanged.
2127
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2128
+ /// (`AccessControl.requireOwnerOrSignIn`); on a first engram only the owner reads it.
2154
2129
  getAgentWriteReview: () -> (Result_85) query;
2155
2130
  /// Why anchoring is or is not advancing. PUBLIC: ungated on purpose — detecting a stalled
2156
2131
  /// engram is the point, a gated read would fail-to-empty and hand a third party fabricated zeros,
@@ -2159,21 +2134,19 @@ type Engram =
2159
2134
  getAnchorPushStatus: () -> (AnchorPushStatus) query;
2160
2135
  /// The plain chain head — size and hash, world-readable, no certificate.
2161
2136
  ///
2162
- /// ⟨0.16.0, kept as a new method in the interface plan⟩ It was specced and never built. `Wire.AuditHead`'s own
2163
- /// declaration says why it matters: heads exist TO BE COMPARED (the disclosure law: who may read
2164
- /// what), a head nobody can read witnesses nothing, and the registry and biller already served
2165
- /// exactly this shape — so the engram, "the canister that IS the evidence product", was the one chain
2166
- /// a verifier could not ask for a head without also asking for a certificate it may not want.
2137
+ /// Added in 0.16.0. `Wire.AuditHead`'s own declaration says why it matters: heads exist TO BE
2138
+ /// COMPARED, a head nobody can read witnesses nothing, and the registry and biller already served
2139
+ /// exactly this shape — so the engram, "the canister that IS the evidence product", was the one
2140
+ /// chain a verifier could not ask for a head without also asking for a certificate it may not want.
2167
2141
  ///
2168
2142
  /// PUBLIC: bare, and it cannot refuse — a chain head discloses nothing about content or callers,
2169
- /// and gating it would make the comparison it exists for depend on permission. `getCertifiedAuditHead`
2170
- /// below serves the same head WITH the subnet certificate for a caller that needs to verify it
2171
- /// was signed rather than asserted.
2143
+ /// and gating it would make the comparison it exists for depend on permission.
2144
+ /// `getCertifiedAuditHead` serves the same head WITH the subnet certificate for a caller that needs
2145
+ /// to verify it was signed rather than asserted.
2172
2146
  getAuditHead: () -> (AuditHead) query;
2173
2147
  getBackupMetadata: (backupId: text) -> (Result_84) query;
2174
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes: a backup-retention getter⟩ How many backups of
2175
- /// `dbType` each creator keeps, and whether that is the default — the read `setBackupRetention`
2176
- /// lacked, so "Keeps your newest 3" showed only on the phone that last set it.
2148
+ /// How many backups of `dbType` each creator keeps, and whether that is the default. Without it the
2149
+ /// setting showed only on the device that last set it.
2177
2150
  ///
2178
2151
  /// WHO: the OWNER, and an active AGENT holding `canAppendMemory` — the permission that lets it
2179
2152
  /// upload backups, which are exactly the backups this number bounds (`#perm(#append_memory)`).
@@ -2189,31 +2162,29 @@ type Engram =
2189
2162
  /// never become rent. The registry publishes the same fact as `getRentBiller`; publishing it here
2190
2163
  /// too is what lets the two be COMPARED, which is the only way to catch a mismatch.
2191
2164
  getBillerId: () -> (opt principal) query;
2192
- /// This engram's BIRTH CHAIN, root first: its own record last, its parent's before it, and so on
2193
- /// ⟨2026-10-26, the owner's lineage ruling that the registry certifies each birth record's fingerprint⟩.
2165
+ /// This engram's BIRTH CHAIN, root first: its own record last, its parent's before it, and so on.
2166
+ /// The registry certifies each birth record's fingerprint.
2194
2167
  ///
2195
2168
  /// OWNER ONLY. The owner decides whom to show it to — the chain names the engrams this one descends
2196
2169
  /// from, which is the owner's to disclose, not the registry's. The certified half is at the registry
2197
2170
  /// (`getCertifiedBirth`, public, revealing only whether a fingerprint is present); the client's
2198
2171
  /// `verifyBirthChain` checks both. Refused to anyone else by the combinator (`#ownerOnly`).
2199
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2200
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2172
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2173
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2201
2174
  getBirthChain: () -> (Result_82) query;
2202
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ Each brake: on or off, and while
2203
- /// on, who pulled it LAST (their key and whether as owner or guardian), since when, and the reason
2204
- /// they gave — the same person and time as the newest brake entry on the record
2205
- /// (`RecordWords.BrakePull`). For the owner's status strip and the guardian page. The OWNER and
2175
+ /// Each brake: on or off, and while on, who pulled it LAST (their key and whether as owner or
2176
+ /// guardian), since when, and the reason they gave — the same person and time as the newest brake
2177
+ /// entry on the record (`RecordWords.BrakePull`). For an owner's or a guardian's app. The OWNER and
2206
2178
  /// ACTIVE GUARDIANS may read it; an agent, a stranger, a pending guardian and the anonymous caller
2207
2179
  /// are refused (`#ownerOrGuardian` — an agent learns a brake is on from the refusal of what it tried,
2208
2180
  /// and needs no more). `pull` is null for a brake that is off, and for one carried on across the
2209
2181
  /// upgrade that added this read (who pulled it was not recorded then) — never a guessed pull.
2210
2182
  getBrakes: () -> (Result_81) query;
2211
- /// ⟨0.16.0, one implementation per behaviour, the interface files as the source — the interface
2212
- /// plan's entry⟩ `Wire.CertifiedAuditHead`, not an anonymous record. The registry, market and biller
2213
- /// already served the shared type; the engram — the canister that IS the evidence product — was the
2214
- /// one chain still answering in a shape of its own, missing `witness` entirely. One certified-head
2215
- /// shape on every chain is the point: a verifier that can read three of them and not the fourth has
2216
- /// to special-case the one that matters most.
2183
+ /// `Wire.CertifiedAuditHead` (since 0.16.0), not an anonymous record. The registry, market and
2184
+ /// biller already served the shared type; the engram — the canister that IS the evidence product —
2185
+ /// was the one chain still answering in a shape of its own, missing `witness` entirely. One
2186
+ /// certified-head shape on every chain is the point: a verifier that can read three of them and not
2187
+ /// the fourth has to special-case the one that matters most.
2217
2188
  ///
2218
2189
  /// `witness = null` is the honest answer here and is NOT the same as an empty proof. This engram
2219
2190
  /// certifies its head via `CertifiedData` but keeps no witness tree, so there is no reveal to
@@ -2227,42 +2198,40 @@ type Engram =
2227
2198
  /// Readable by the owner and by that agent's own key — refused loudly to anyone else, never a zero
2228
2199
  /// (a zero would be a claim about another owner's grant).
2229
2200
  ///
2230
- /// ⟨2026-10-01, a review finding⟩ A QUERY, so the refusal is deliberately NOT written to the denial log: a
2231
- /// query's state writes are discarded when it returns, and the `denied` call first written here
2232
- /// recorded nothing while reading as if it did. The refusal is loud in the reply instead. WHAT
2233
- /// WOULD MAKE THIS WRONG: a reason to record who asked — then this becomes an update that says so.
2201
+ /// A QUERY, so the refusal is deliberately NOT written to the denial log: a query's state writes are
2202
+ /// discarded when it returns, so a `denied` call here would record nothing while reading as if it
2203
+ /// did. The refusal is loud in the reply instead. WHAT WOULD MAKE THIS WRONG: a reason to record who
2204
+ /// asked — then this becomes an update that says so.
2234
2205
  getChildAllowance: (agentPrincipal: principal) -> (Result_80) query;
2235
2206
  /// Owner-only, Billing-class: what opening an engram costs this engram, the balance below which an
2236
- /// agent's request is refused, the balance now, and every agent's allowance. The console's cost
2237
- /// sentence reads it. Cycles are owner-class information, as on the owner's console read.
2238
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2239
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2207
+ /// agent's request is refused, the balance now, and every agent's allowance. An app's cost sentence
2208
+ /// reads it. Cycles are owner-class information, as on `getOwnerConsole`.
2209
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2210
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2240
2211
  getChildOpening: () -> (Result_79) query;
2241
2212
  /// Derive the key that opens the sealed copy, encrypted under the caller's transport public key —
2242
2213
  /// for the SIGN-IN alone (the combinator's `#ownerSignIn`; the key file is refused by name: only the
2243
2214
  /// sign-in opens the backup, and the key file holds the plaintext anyway). The derivation input is the
2244
2215
  /// sign-in's own principal, the same identity the kit sealed the copy to, so a former sign-in's key
2245
2216
  /// never opens a copy re-sealed for its successor. Refused in a first engram, with no sign-in, and
2246
- /// with no copy, all before the call. The opening is recorded (`keyBackup.opened`), so the owner's
2247
- /// alert fires: the one act a thief holding the sign-in cannot hide. Not blocked by a freeze: a
2248
- /// freeze must never lock the owner out of its own key.
2249
- /// ⟨CORRECTED 2026-11-03, the review of the child build's sealed-key-copy step, beside the sentence
2250
- /// above⟩ "cannot hide" overstates it: in an engram opened through another the sign-in sets the alert
2251
- /// address, so a thief holding the sign-in can re-point it first. Each opening is recorded in the
2252
- /// engram's record (which the key file reads) and alerted to whatever address the sign-in has set.
2253
- ///
2254
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2217
+ /// with no copy, all before the call. Each opening is recorded in the engram's record
2218
+ /// (`keyBackup.opened`, which the key file reads) and alerted to whatever address the sign-in has
2219
+ /// set — in an engram opened through another the sign-in sets the alert address, so a thief holding
2220
+ /// the sign-in can re-point it first. Not blocked by a freeze: a freeze must never lock the owner
2221
+ /// out of its own key.
2222
+ ///
2223
+ /// UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2255
2224
  /// `VetKeys.ManagementCanister.vetKdDeriveKey`. A query cannot await.
2256
- /// Named callers: an owner console signed in as the sign-in (the browser's recovery), and the owner
2225
+ /// Named callers: an owner's app signed in as the sign-in (the browser's recovery), and the owner
2257
2226
  /// kit's `--recover-key` signed by a key-file sign-in.
2258
2227
  getEncryptedKeyBackupKey: (transportPublicKey: blob) -> (Result_76);
2259
2228
  /// Derive the shared memory-encryption key, encrypted under the caller's transport
2260
2229
  /// public key. Gated to owner + read-agents (the same principals allowed to read
2261
2230
  /// memory). The client decrypts it locally with its transport secret key.
2262
- /// ⟨0.16.0⟩ THE FOLD: `epoch` is now an optional argument here, and the separate
2263
- /// `getEncryptedMemoryKeyForEpoch` is gone. Two methods differing only by whether one parameter
2264
- /// is present is what an optional argument is for, and the split forced a client to decide which
2265
- /// to call before it knew whether it needed rotation.
2231
+ /// `epoch` is an optional argument (since 0.16.0; there is no separate
2232
+ /// `getEncryptedMemoryKeyForEpoch`). Two methods differing only by whether one parameter is present
2233
+ /// is what an optional argument is for, and the split forced a client to decide which to call
2234
+ /// before it knew whether it needed rotation.
2266
2235
  ///
2267
2236
  /// `null` means CURRENT — not epoch 0. Those coincide today (nothing increments the epoch yet)
2268
2237
  /// and will not after the first rotation, which is exactly when a caller that meant "the key that
@@ -2272,79 +2241,57 @@ type Engram =
2272
2241
  /// Refusing a FUTURE epoch is not a bounds check, it is the rotation invariant: pre-deriving a
2273
2242
  /// key for an epoch nobody has reached would make rotating to it meaningless.
2274
2243
  ///
2275
- /// Also converted off the lowercase `#ok/#err` dialect (results spelled Ok/Err) — that spelling arrived from ic402
2276
- /// and had no business on a vetKD path, which touches nothing of ic402's.
2244
+ /// Results are spelled Ok/Err: the lowercase `#ok/#err` dialect came from ic402 and has no business
2245
+ /// on a vetKD path, which touches nothing of ic402's.
2277
2246
  ///
2278
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2247
+ /// UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2279
2248
  /// `VetKeys.ManagementCanister.vetKdDeriveKey`. A query cannot await, so the round trip is the
2280
- /// cost. Stated here because the update-for-read rule requires the reason be readable from the interface rather than
2281
- /// inferred by opening the body — which is exactly what had to happen to write this line.
2249
+ /// cost. Stated here because an update used as a read must say why in its interface, rather than
2250
+ /// leave the reader to open the body.
2282
2251
  getEncryptedMemoryKey: (epoch: opt nat, transportPublicKey: blob) ->
2283
2252
  (Result_76);
2284
- /// ⟨0.16.0, owner ruling 2026-08-20⟩ `x402Support` REPORTS THE RAIL, not a constant.
2253
+ /// `x402Support` REPORTS THE RAIL, not a constant (since 0.16.0).
2285
2254
  ///
2286
2255
  /// The card's config hardcodes `x402Support = true`, answering a buyer's question with a fact
2287
- /// about the software rather than about THIS engram. The 0.16.0 split moved the 402 challenge machinery to the
2256
+ /// about the software rather than about THIS engram. The 402 challenge machinery lives in the
2288
2257
  /// market; the one x402-payable rail the engram kept is `sessionReadMemory`, gated by
2289
- /// `paidMemoryReadEnabled`, which DEFAULTS TO FALSE. So a discovering agent was told this engram
2290
- /// takes x402 payments while every paid read on a default engram is refused with "the owner has
2291
- /// not opened the monetized read rail". Ruled (a) over keeping `true` to mean "can PARTICIPATE in
2292
- /// x402, including as a payer" — defensible, but not what a service card says to a buyer.
2258
+ /// `paidMemoryReadEnabled`, which DEFAULTS TO FALSE. So a discovering agent would be told this
2259
+ /// engram takes x402 payments while every paid read on a default engram is refused with "the owner
2260
+ /// has not opened the monetized read rail". `true` meaning "can PARTICIPATE in x402, including as a
2261
+ /// payer" is defensible, but it is not what a service card says to a buyer.
2293
2262
  ///
2294
2263
  /// Overridden HERE rather than at the config because the card is built once as a `public let`
2295
2264
  /// while the flag is runtime state, and `getCard()` belongs to the VENDORED ic402 module, which
2296
- /// is not ours to edit.
2265
+ /// is not this repository's to edit.
2297
2266
  ///
2298
2267
  /// ⚠ `signEngramRegistration` also reads `getCard()` and is deliberately NOT changed. It signs an
2299
2268
  /// ERC-8004 registration for on-chain publication — a point-in-time attestation nobody can
2300
2269
  /// re-sign every time an owner opens or closes the rail. Whether a signed record should carry
2301
- /// mutable operational state at all is a different decision, it is signing-adjacent, and the
2302
- /// ruling did not reach it. Filed, not folded in.
2270
+ /// mutable operational state at all is a separate, signing-adjacent decision, still open.
2303
2271
  ///
2304
2272
  /// PUBLIC: an agent card is a DISCOVERY document — its entire function is to tell a party that
2305
2273
  /// has never met this engram what it is and how to transact with it. A card behind a gate cannot
2306
2274
  /// be discovered, and the ERC-8004 ecosystem it participates in assumes an open read.
2307
2275
  getEngramCard: () -> (AgentCard) query;
2308
- /// Re-pointed at `EvmIdentity` (the step that moved commerce to the market): custody derivation no
2309
- /// longer routes through the ic402 Gateway, which is leaving for the market canister. Behaviour is
2310
- /// unchanged for a caller — same address, same tECDSA key — but the engram no longer needs a
2311
- /// marketplace to know its own address, which is the whole point of the split.
2312
- ///
2313
- /// ⟨2026-08-21⟩ DO NOT FOLD THIS WITH `getEvmSignerAddress`. The 0.16.0 interface plan carried the fold
2314
- /// as an open item, conditional on "if the derivation is identical". It is not, and the condition
2315
- /// is decidable here rather than by reading either comment:
2316
- ///
2317
- /// this method EvmIdentity.deriveAddress -> derivation_path = []
2318
- /// the signer eip712PublicKey -> derivation_path = ["eip712"]
2319
- ///
2320
- /// ⟨CORRECTED 2026-09-22 — the two paths above are what the code passed until the key-path rule of 2026-09-22 (a path is typed once);
2321
- /// the table is kept because the ARGUMENT it makes is unchanged and is the reason the fold is
2322
- /// still refused.⟩ The signer now reads `KeyPaths.EIP712` = `["engramx","eip712","secp256k1","v1"]`
2323
- /// and this method still derives at the empty path, because `pay` is the one row the genesis could
2324
- /// not move — ic402 2.15.0 parameterises `EvmSigner` but not `Gateway.deriveEvmRecipient`,
2325
- /// `EvmSender` or `Identity`, and moving the signer without them would split receiving from
2326
- /// spending. The paths are still DIFFERENT, which is the whole of the argument below, and they get
2327
- /// further apart at the genesis rather than closer.
2328
- ///
2329
- /// ⟨SHIPPED 2026-09-22, ic402 2.16.0 — the table is now BOTH rows labelled, and the argument is
2330
- /// unchanged, which is the point of keeping every version of it here:
2276
+ /// The engram's own EVM addresses (`Types.EvmAddresses`): the payment address (`pay`) and the
2277
+ /// address that signs the engram's own registrations (`engramRegistration`). Derived through
2278
+ /// `EvmIdentity`, not through the ic402 Gateway, so the engram needs no marketplace to know its own
2279
+ /// address.
2280
+ ///
2281
+ /// DO NOT FOLD THIS WITH `getEvmSignerAddress`. The derivations differ:
2331
2282
  ///
2332
2283
  /// this method EvmIdentity.deriveAddress -> KeyPaths.PAY = ["engramx","pay","secp256k1","v1"]
2333
2284
  /// the signer eip712PublicKey -> KeyPaths.EIP712 = ["engramx","eip712","secp256k1","v1"]
2334
2285
  ///
2335
- /// Two paths, one master key, therefore two addresses — exactly as when one of them was `[]`.
2336
- /// The fold stays refused for the reason below, not because one side happened to be a default.
2337
- /// What changed upstream is that `Gateway`, `EvmSender` and `Identity` all take a path now, so
2338
- /// the payment identity could move as ONE thing: this derivation, the gateway's inbound
2339
- /// recipient and outbound sender, and `Payments.evmSigner`. The genesis install derives them.⟩
2340
- ///
2341
2286
  /// Same master key and curve, different paths, therefore different public keys and DIFFERENT
2342
2287
  /// ADDRESSES — that is what a derivation path is for. The difference is also deliberate and
2343
2288
  /// security-bearing, not incidental: the signer key is declared "outbound-only, N=1, never the
2344
2289
  /// payment path — this key must never be able to move ic402 pool funds", so merging the two
2345
2290
  /// would hand the signing surface the payment key. `getEvmSignerAddress` carries the warning
2346
2291
  /// from its side ("the payment key's address is NOT this one, by design"); this is the other
2347
- /// side, because a fold is proposed by whoever reads either declaration first.
2292
+ /// side, because a fold is proposed by whoever reads either declaration first. The payment
2293
+ /// identity moves as ONE thing: this derivation, the gateway's inbound recipient and outbound
2294
+ /// sender, and `Payments.evmSigner` all take the `PAY` path.
2348
2295
  ///
2349
2296
  /// The gates differ too, which a fold would also have to collapse: this method is UNGATED (any
2350
2297
  /// caller may cause the derivation) and `getEvmSignerAddress` is owner-only.
@@ -2354,23 +2301,16 @@ type Engram =
2354
2301
  /// is exactly who needs it. The write it causes is bounded to one derivation and one
2355
2302
  /// set-once custody stamp per engram lifetime, which is what keeps "any caller may cause it"
2356
2303
  /// safe rather than merely permitted.
2357
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2304
+ /// UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2358
2305
  /// `EvmIdentity.deriveAddress`, which reaches the management canister's `ecdsa_public_key`. A
2359
2306
  /// query cannot await it.
2360
2307
  ///
2361
- /// ⟨Marker added 2026-08-23; the interface plan's entry already marked it a read served as an update
2362
- /// (ecdsa_public_key) and the site did not carry the mark. Same `public func` form as its two neighbours above.⟩
2363
- ///
2364
- /// ⟨2026-09-28⟩ THE REPLY IS A RECORD, `Types.EvmAddresses` — the payment address (`pay`, what this
2365
- /// method returned alone until then) and the address that signs the engram's own registrations
2366
- /// (`engramRegistration`). The owner decided that date to publish the registration address as a new
2367
- /// field on an existing address reply, not as a new method; nothing served it before, so an
2368
- /// agent could not read the address whose nonce `signEngramRegistration` needs and whose ETH
2369
- /// pays its gas. The registration address is read FROM THE SIGNER ITSELF
2370
- /// (`engramRegSigner.getEvmAddress`), not re-derived beside it, so the published address is by
2371
- /// construction the one the signatures come from. It is cached inside that signer object; the
2372
- /// cache is not stable, so the first call after an upgrade re-derives it once — the same one
2373
- /// public-key read, bounded, that the payment branch does on a null cache.
2308
+ /// The registration address is a field of this reply rather than a new method, so an agent can
2309
+ /// read the address whose nonce `signEngramRegistration` needs and whose ETH pays its gas. It is
2310
+ /// read FROM THE SIGNER ITSELF (`engramRegSigner.getEvmAddress`), not re-derived beside it, so the
2311
+ /// published address is by construction the one the signatures come from. It is cached inside that
2312
+ /// signer object; the cache is not stable, so the first call after an upgrade re-derives it once —
2313
+ /// the same one public-key read, bounded, that the payment branch does on a null cache.
2374
2314
  ///
2375
2315
  /// It refuses rather than half-answers: if either address cannot be derived the reply is
2376
2316
  /// `#Err`, never a record carrying an empty string (ic402's `getEvmAddress` answers `""` on a
@@ -2383,16 +2323,15 @@ type Engram =
2383
2323
  /// not a capability, and knowing it confers nothing. `null` means the owner registered none,
2384
2324
  /// which a payer needs to be able to tell from an address they failed to read.
2385
2325
  getEvmOwnerAddress: () -> (opt text) query;
2386
- /// The dedicated-key design ships with this: the address of the DEDICATED signing key. Without it the owner funds the
2387
- /// wrong address — the payment key's address is NOT this one, by design.
2388
- ///
2389
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: `eip712PublicKey()` awaits
2390
- /// the management canister's `ecdsa_public_key`. A query cannot await, so the round-trip is the
2391
- /// cost — stated here because the update-for-read rule requires the reason be readable from the interface rather than
2392
- /// inferred by opening the body.
2393
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2394
- /// an engram opened through another, as the owner (`AccessControl.requireOwnerOrSignIn`); a first
2395
- /// engram is unchanged.
2326
+ /// The address of the DEDICATED typed-data signing key. Without it the owner funds the wrong
2327
+ /// address — the payment key's address is NOT this one, by design.
2328
+ ///
2329
+ /// UPDATE, NOT QUERY, and this is the system call that forces it: `eip712PublicKey()` awaits the
2330
+ /// management canister's `ecdsa_public_key`. A query cannot await, so the round-trip is the cost —
2331
+ /// stated here because an update used as a read must say why in its interface, rather than leave
2332
+ /// the reader to open the body.
2333
+ /// Also callable by the seated sign-in of an engram opened through another, acting as the owner
2334
+ /// (`AccessControl.requireOwnerOrSignIn`); on a first engram only the owner.
2396
2335
  getEvmSignerAddress: () -> (Result_58);
2397
2336
  /// PUBLIC: where this chain begins, for the stranger deciding whether to trust it.
2398
2337
  ///
@@ -2406,7 +2345,7 @@ type Engram =
2406
2345
  /// The sealed copy itself — opaque bytes only the sign-in can open. Readable by the sign-in (it
2407
2346
  /// opens them with the key `getEncryptedKeyBackupKey` derives for it) and by the key file, which
2408
2347
  /// holds the plaintext already and so learns nothing — it reads them to compare with the copy the kit
2409
- /// made (the child build's design check: a copy someone else stored first reads as "not this key", not as
2348
+ /// made (a copy someone else stored first reads as "not this key", not as
2410
2349
  /// "sealed"). Refused in a first engram, and `#NotFound` when no copy is held. The copy that waits
2411
2350
  /// with an ask is never served here: it is inert until accepted.
2412
2351
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
@@ -2424,17 +2363,17 @@ type Engram =
2424
2363
  getKeyBackupStatus: () -> (Result_75) query;
2425
2364
  /// BLS verification key under which the owner kit seals the backup (`IbeCiphertext.encrypt` to the
2426
2365
  /// sign-in's principal) and the opener verifies the derived key. Served on-canister so the kit never
2427
- /// has to know which master key this network uses (the child build's design: a wrong guess would seal a copy
2428
- /// nobody can open). Static per (context, key id, canister) — cacheable.
2366
+ /// has to know which master key this network uses (a wrong guess would seal a copy nobody can open).
2367
+ /// Static per (context, key id, canister) — cacheable.
2429
2368
  ///
2430
2369
  /// PUBLIC: intentionally unauthenticated — a vetKD public key reveals nothing secret and cannot
2431
- /// decrypt anything — the sensitive derivation is getEncryptedKeyBackupKey below, which IS gated
2432
- /// (the sign-in alone) and returns key material encrypted to the caller's transport key. The same
2370
+ /// decrypt anything — the sensitive derivation is getEncryptedKeyBackupKey, which IS gated (the
2371
+ /// sign-in alone) and returns key material encrypted to the caller's transport key. The same
2433
2372
  /// reasoning as getMemoryKeyVerificationKey, for the backup's own context.
2434
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2373
+ /// UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2435
2374
  /// `VetKeys.ManagementCanister.vetKdPublicKey`. A query cannot await.
2436
- /// Named callers: the owner kit, when it seals the copy at birth or for an ask; an owner console,
2437
- /// to verify the derived key during recovery.
2375
+ /// Named callers: the owner kit, when it seals the copy at birth or for an ask; an owner's app, to
2376
+ /// verify the derived key during recovery.
2438
2377
  getKeyBackupVerificationKey: () -> (blob);
2439
2378
  /// The market this engram will accept signing requests from — `null` until the registry pushes
2440
2379
  /// one at spawn, which is why `requireMarket` refuses fleet-wide today.
@@ -2474,17 +2413,13 @@ type Engram =
2474
2413
  /// client to verify the derived key. Static per (context, key_id) — cacheable.
2475
2414
  ///
2476
2415
  /// PUBLIC: intentionally unauthenticated — a vetKD public key reveals nothing secret and
2477
- /// cannot decrypt anything — the sensitive derivation is getEncryptedMemoryKey
2478
- /// below, which IS gated (read_memory) and returns key material encrypted to the
2479
- /// caller's transport key. Do not add an auth guard here (breaks client caching).
2480
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2416
+ /// cannot decrypt anything — the sensitive derivation is getEncryptedMemoryKey, which IS gated
2417
+ /// (read_memory) and returns key material encrypted to the caller's transport key. Do not add an
2418
+ /// auth guard here (breaks client caching).
2419
+ /// UPDATE, NOT QUERY, and this is the system call that forces it: the body awaits
2481
2420
  /// `VetKeys.ManagementCanister.vetKdPublicKey`. A query cannot await, so the round trip is the
2482
- /// cost of getting a key nobody has to trust us for — which is the point of publishing it.
2483
- ///
2484
- /// ⟨Marker added 2026-08-23; the interface plan's entry already marked it a read served as an update
2485
- /// (vetKD pubkey call) and the site did not carry it. Declared `public func` rather than `public shared`,
2486
- /// which is why the naming rule in the update-for-read gate did not see it — the plan's list of reads served as
2487
- /// updates did.⟩
2421
+ /// cost of getting a key nobody has to trust this canister for — which is the point of publishing
2422
+ /// it.
2488
2423
  getMemoryKeyVerificationKey: () -> (blob);
2489
2424
  /// Memory maintenance liveness. PUBLIC: ungated on purpose, like the anchor-push status — a stalled
2490
2425
  /// sweep or a failed storage check is exactly what a third party must be able to observe, and
@@ -2492,17 +2427,14 @@ type Engram =
2492
2427
  /// Counts and flags only — the paths involved are in the chained audit entries, where the
2493
2428
  /// access rules that govern them already apply.
2494
2429
  getMemoryMaintainStatus: () -> (MemoryMaintainStatus) query;
2495
- /// The DECLARED policy. Read it together with getMemoryRetentionGuards — on its own it is not
2496
- /// what governs eviction.
2497
- /// ⟨0.16.0⟩ ONE PROJECTION, absorbing what were two methods — and the fold is a correctness fix,
2498
- /// not tidying.
2499
- ///
2500
- /// Declared policy and the guards holding it back were separate reads, and a console rendering
2501
- /// only the first told an owner their policy was in force while a guard still held it. The old
2502
- /// `.did` warned in prose that the two had to be read TOGETHER; a comment is not a mechanism, and
2503
- /// the guard arms on the FIRST policy an owner ever sets — so the surface misled every owner who
2504
- /// ever touched retention, from first use. Making it one record makes reading half of it
2505
- /// impossible: the trap becomes structure.
2430
+ /// The DECLARED policy and the guards holding it back, in ONE PROJECTION (since 0.16.0, absorbing
2431
+ /// what were two methods) — and the fold is a correctness fix, not tidying.
2432
+ ///
2433
+ /// Declared policy and the guards were separate reads, and an app rendering only the first told an
2434
+ /// owner their policy was in force while a guard still held it. The old `.did` warned in prose that
2435
+ /// the two had to be read TOGETHER; a comment is not a mechanism, and the guard arms on the FIRST
2436
+ /// policy an owner ever sets — so the surface misled every owner who ever touched retention, from
2437
+ /// first use. Making it one record makes reading half of it impossible: the trap becomes structure.
2506
2438
  ///
2507
2439
  /// Refusal reasons of both merge: an empty policy reads as "nothing is capped, every version kept
2508
2440
  /// forever" — a claim about what this engram will DESTROY — and an empty guard list reads as
@@ -2521,15 +2453,14 @@ type Engram =
2521
2453
  /// a fact about the caller, told to the caller. There is nothing to leak by omission — which is
2522
2454
  /// the test the #NotFound arm sets.
2523
2455
  getMyGuardianStatus: () -> (Result_19) query;
2524
- /// ⟨0.16.0, NEW⟩ The gated half of the status() split.
2456
+ /// The gated half of the old `status()` (split in 0.16.0; `about()` is the public half).
2525
2457
  ///
2526
2458
  /// Every field is bare — no masking, no `authorized` discriminator — because reaching this record
2527
2459
  /// AT ALL is the authorization. An unauthorized caller gets `#Err(#Refused …)` and no record.
2528
2460
  ///
2529
- /// `cyclesBalance` is a bare `Nat`, and that retires an argument this repo carried for weeks. It
2530
- /// was `nat`, then widened to `opt nat` so a refusal could be `null`, which broke every published
2531
- /// client (rule 4) and bought a masked answer nobody had asked for — the 0.16.0 interface plan could not
2532
- /// even find a consumer that read the masked `0`. Behind a gate there is nobody to mask it from.
2461
+ /// `cyclesBalance` is a bare `Nat`. Widening it to `opt nat` so a refusal could be `null` broke
2462
+ /// every published client and bought a masked answer nobody had asked for (no consumer read the
2463
+ /// masked `0`). Behind a gate there is nobody to mask it from.
2533
2464
  getOwnerConsole: () -> (Result_72) query;
2534
2465
  /// The engram's sign-in, as `Types.OwnerSignInView` describes it: whether this engram was opened
2535
2466
  /// through another, who its sign-in is, whether the caller is it, and any decline or waiting ask.
@@ -2540,9 +2471,9 @@ type Engram =
2540
2471
  /// Named callers: an owner console showing an engram opened through another (who signs in, and a
2541
2472
  /// waiting ask with Accept and Decline), and the owner kit after it opens one.
2542
2473
  getOwnerSignIn: () -> (Result_71) query;
2543
- /// ⟨2026-11-15⟩ The open offer, to the two parties to it: the owner and the principal it names.
2544
- /// `null` when none is open or it has expired. Anyone else is refused: an offer names a principal
2545
- /// who has not agreed to anything yet, so it is not public the way the custody chain is.
2474
+ /// The open offer, to the two parties to it: the owner and the principal it names. `null` when
2475
+ /// none is open or it has expired. Anyone else is refused: an offer names a principal who has not
2476
+ /// agreed to anything yet, so it is not public the way the custody chain is.
2546
2477
  getOwnershipOffer: () -> (Result_70) query;
2547
2478
  /// Read the four profile fields in one bounded batch. Raw per-field results preserve SDK
2548
2479
  /// decryption and first-failure ordering; only an explicit NotFound means an unset field.
@@ -2553,8 +2484,8 @@ type Engram =
2553
2484
  ///
2554
2485
  /// A NAMED RECORD, not a Page: the setter replaces this list wholesale, so there is no window to
2555
2486
  /// page over and no `total` that could differ from `items.size()`. Forcing the Page shape here
2556
- /// would be uniformity for its own sake — the 0.16.0 interface plan ratified the whole-value-config
2557
- /// carve-out precisely so the one page shape does not become a rule applied past its meaning.
2487
+ /// would be uniformity for its own sake — whole-value configuration is exempt from the page shape
2488
+ /// precisely so that the one page shape does not become a rule applied past its meaning.
2558
2489
  ///
2559
2490
  /// The trap's `whyNotEmpty` clause is preserved as the `#Refused` reason: `[]` would read as "no
2560
2491
  /// path on this engram is protected", and an agent consults this list precisely to avoid
@@ -2566,11 +2497,11 @@ type Engram =
2566
2497
  /// counts now, and whether the history is full (then "not paid before" may be one it forgot). Read
2567
2498
  /// beside the request, because the stored request is never reshaped. For the key file and the sign-in
2568
2499
  /// (the owner in a first engram); refused loudly to anyone else. A malformed address is `#Invalid`.
2569
- /// ⟨2026-11-02, the child build's withdrawal-pinning step⟩ Also how many times x402 has paid it and the largest of
2570
- /// those payments (`timesPaid`, `largestPaidE6`, six-decimal minor units), so a card can say "paid 3
2571
- /// times, largest $12"; the history forgets the address paid longest ago when full.
2572
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ And when it was LAST paid (`lastPaidAtNs`; null when never).
2573
- /// Named callers: an owner console's approval card for a payment request.
2500
+ /// Also how many times x402 has paid it, the largest of those payments (`timesPaid`,
2501
+ /// `largestPaidE6`, six-decimal minor units) and when it was LAST paid (`lastPaidAtNs`; null when
2502
+ /// never), so a card can say "paid 3 times, largest $12"; the history forgets the address paid
2503
+ /// longest ago when full.
2504
+ /// Named callers: an owner's app, on its approval card for a payment request.
2574
2505
  getRecipientHistory: (payTo: text) -> (Result_67) query;
2575
2506
  /// Whether the metrics reader's read is answered — `true` from birth.
2576
2507
  ///
@@ -2579,13 +2510,12 @@ type Engram =
2579
2510
  getSeatWeeksReadEnabled: () -> (bool) query;
2580
2511
  /// Owner-only, Billing-class: the signing floor, the balance, one signature's price, and how many
2581
2512
  /// payment signatures the balance carries above the floor before `signX402Payment` is refused by
2582
- /// name. The same numbers the check uses, so Billing can say only what the engram enforces.
2583
- /// ⟨2026-11-01, the read-the-setting-first ruling⟩ Refused by name (`#Unavailable`) while this engram
2584
- /// has not read its own freezing setting: there is no floor to serve then, and a 30-day figure would
2585
- /// be a made-up one (the refusal-over-fabrication rule) — the signers refuse in that state too, so
2586
- /// the refusal is the truth on Billing.
2587
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2588
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2513
+ /// name. The same numbers the check uses, so an app can say only what the engram enforces.
2514
+ /// Refused by name (`#Unavailable`) while this engram has not read its own freezing setting: there
2515
+ /// is no floor to serve then, and a 30-day figure would be a made-up one (refusal over
2516
+ /// fabrication) — the signers refuse in that state too, so the refusal is the truth.
2517
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2518
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2589
2519
  getSigningFloor: () -> (Result_66) query;
2590
2520
  /// The registry that spawned this engram, if it recorded one.
2591
2521
  ///
@@ -2595,20 +2525,18 @@ type Engram =
2595
2525
  /// provenance. `null` says this engram makes no such claim, which is equally worth serving.
2596
2526
  getSpawnedBy: () -> (opt principal) query;
2597
2527
  /// Read the engram-wide daily ceiling and what has been spent against it today, across every
2598
- /// caller. ⟨2026-09-28, the owner's decision to add the ceiling⟩
2599
- /// ⟨CORRECTED 2026-09-29, a review finding: "spent" means signed in x402 payments; typed-data
2600
- /// and the engram's registration signatures are not counted here — see `setSpendCeiling`.⟩
2601
- /// ⟨CORRECTED 2026-11-04, the agent-conversion build, beside the note above⟩ …and, since 2026-11, an
2602
- /// agent's conversion of the engram's balance into compute (`agentConvertBalance`, in a first engram too);
2603
- /// in an engram opened through another the key file's Convert as well (since 2026-11-02). Both are reserved
2604
- /// before their first await and given back when nothing left the wallet.
2528
+ /// caller. "Spent" means signed in x402 payments, plus an agent's conversion of the engram's balance
2529
+ /// into compute (`agentConvertBalance`, in a first engram too) and, in an engram opened through
2530
+ /// another, the key file's Convert; both conversions are reserved before their first await and given
2531
+ /// back when nothing left the wallet. Typed-data and the engram's registration signatures are not
2532
+ /// counted here — see `setSpendCeiling`.
2605
2533
  ///
2606
2534
  /// OWNER-ONLY, for the reason `getSpendPolicy` is: the limits are the owner's custody
2607
2535
  /// configuration, and the engram-wide total would also tell one agent how much the others spent.
2608
2536
  /// A refusal names this method (`Gated.gatedResult`) rather than answering null/0 — a ceiling of
2609
2537
  /// "none" and a spend of 0 are both real answers, so a fabricated one would be read as fact.
2610
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2611
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2538
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2539
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2612
2540
  getSpendCeiling: () -> (Result_65) query;
2613
2541
  /// Read the caps in force for a caller.
2614
2542
  ///
@@ -2618,122 +2546,100 @@ type Engram =
2618
2546
  /// configuration, and publishing them would tell any caller exactly how large a signing request
2619
2547
  /// can be before it needs an approval nobody is watching for.
2620
2548
  ///
2621
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2622
- /// an engram opened through another, as the owner, through the combinator's `#ownerOrSignIn` (a first
2623
- /// engram is unchanged: the owner only). The inline owner comparison that stood here is gone with it —
2624
- /// one fewer unnamed caller guard. Its refusal sentence is kept as the reason it never fails soft:
2625
- /// "Spending caps are the owner's custody configuration. Refusing rather than answering with
2626
- /// defaults — a default-looking answer would understate the real limits to anyone probing them." The
2627
- /// refusal itself is now the combinator's (`#Refused getSpendPolicy: …`, `requireOwner`'s words), and
2628
- /// an engram with no owner yet is refused the same way rather than answered `#Conflict`.
2549
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner,
2550
+ /// through the combinator's `#ownerOrSignIn` (on a first engram, the owner only). The refusal is
2551
+ /// the combinator's (`#Refused getSpendPolicy: …`, `requireOwner`'s words), and an engram with no
2552
+ /// owner yet is refused the same way rather than answered `#Conflict`. It never fails soft:
2553
+ /// spending caps are the owner's custody configuration, and a default-looking answer would
2554
+ /// understate the real limits to anyone probing them.
2629
2555
  getSpendPolicy: (caller: opt principal) -> (Result_64) query;
2630
2556
  getStorageStats: () -> (Result_63) query;
2631
2557
  /// Timer arm-state. PUBLIC and deliberately so: these timers are self-arming to save cycles,
2632
2558
  /// and an optimisation nobody can verify is an optimisation nobody should trust. Cheap to read,
2633
- /// leaks nothing (booleans about our own scheduling).
2634
- ///
2635
- /// IDLE STEADY STATE (no webhook, no x402 sessions, no service jobs):
2636
- /// alertTimerArmed=false sessionExpiryArmed=false jobExpiryArmed=false jobExpiryFastMode=false
2637
- /// ⟨2026-11-19, beside the line above⟩ `jobExpiryArmed` and `jobExpiryFastMode` are no longer served:
2638
- /// the ServiceRegistry whose job sweep they described went at the 0.16.0 fresh install (Payments.mo
2639
- /// `StableState`). The paragraphs below that discuss them are history.
2559
+ /// leaks nothing (booleans about this engram's own scheduling).
2640
2560
  ///
2641
- /// ⚠ CORRECTED 2026-08-19. This said `jobExpiryArmed=TRUE` and that it "stays true by design —
2642
- /// ic402 keeps an hourly idle POLL because createJobFromReceipt is synchronous and cannot disarm a
2643
- /// timer itself". Both halves are stale, and an ops reader comparing a live engram against this
2644
- /// paragraph would have seen `false` and gone looking for a fault that is not there.
2561
+ /// IDLE STEADY STATE (no alert delivery owed, no x402 sessions):
2562
+ /// alertTimerArmed=false sessionExpiryArmed=false
2645
2563
  ///
2646
- /// The engram sets `setExpiryIdlePollSeconds(0)` in its actor body, and ic402's ServiceRegistry
2647
- /// CANCELS the timer outright at 0 rather than re-arming it — so the hourly tick this paragraph
2648
- /// promised has not existed since that line landed. Independently, job creation moved to the
2649
- /// market with the rest of commerce: the engram now serves no job method at all, so nothing can arm
2650
- /// the timer in the first place. `jobExpiryArmed` reads false on an idle engram, and false is CORRECT.
2564
+ /// `alertTimerArmed` is TRUE ONLY WHILE A DELIVERY IS OWED OR RETRYING (the alert drain is a
2565
+ /// one-shot armed per owed delivery); alerts configured on a quiet engram read false, and that is
2566
+ /// correct. It reads the arm's DUE TIME, not only its id (`ActionAlerts.armLive`): a job that traps
2567
+ /// before its first await rolls back its own `alertTimerId := null`, so a bare id would read armed
2568
+ /// forever. ONE BOUNDED UNTRUTH: for ARM_STALE_NS (120 s) after the due time of such a trapped job,
2569
+ /// the flag reads true although no timer exists.
2651
2570
  ///
2652
2571
  /// EXPECTED FALSE POSITIVE: for up to one interval after any install or upgrade,
2653
2572
  /// sessionExpiryArmed reads true with zero sessions. ic402's startTimers arms unconditionally
2654
2573
  /// because a persistent actor re-runs its init body BEFORE postupgrade restores stable sessions,
2655
2574
  /// so a predicate-gated arm would skip exactly the canisters that have live ones. The first tick
2656
- /// disarms it. Still true minutes after an upgrade is a real bug — report it upstream.
2657
- /// ⟨2026-10-07, beside the paragraph above⟩ The session sweep's interval is 300 seconds now (the
2658
- /// owner's decision of that day; set in the actor body), so "one interval" is up to five minutes,
2659
- /// and true five minutes after an upgrade is still expected. True ten minutes after, with no session
2660
- /// open, is the bug.
2575
+ /// disarms it. The session sweep's interval is 300 seconds (set in the actor body), so true five
2576
+ /// minutes after an upgrade is still expected; true ten minutes after, with no session open, is a
2577
+ /// real bug — report it upstream.
2578
+ ///
2579
+ /// BOTH FLAGS READ FALSE WHILE THE TIMERS ARE PAUSED (near its freezing line the engram pauses its
2580
+ /// own timers). The pause cancels ic402's sweep, but ic402 keeps the stale id, so its own "armed"
2581
+ /// read would answer true for a timer that no longer exists — a fabricated answer.
2582
+ ///
2661
2583
  /// NOT the whole timer story. The hourly CYCLE timer — which also carries audit anchoring — is
2662
2584
  /// deliberately absent: it is a `transient let` armed unconditionally at init, so an "armed"
2663
- /// boolean for it would read true forever and tell you nothing, exactly the false-positive the
2664
- /// paragraph above describes for sessionExpiryArmed. Use getAnchorPushStatus() instead: last-tick
2665
- /// TIMESTAMPS are evidence where an arm flag is only an intention.
2666
- ///
2667
- /// PUBLIC: the same standing as the two liveness reads above. Booleans and timestamps about this
2668
- /// canister's own timers — nothing about content, callers or money — and a liveness signal only
2669
- /// its owner can read cannot tell a third party that the engram is still running.
2670
- /// ⟨2026-10-28, the owner's automatic-pause ruling⟩ The three ic402 flags read FALSE WHILE THE TIMERS ARE PAUSED.
2671
- /// The pause's id sweep cancels ic402's sweeps, but ic402 keeps their stale ids, so its own
2672
- /// "armed" reads would answer true for a timer that no longer exists (a fabricated answer,
2673
- /// the refusal-over-fabrication rule). `alertTimerArmed` needs no guard: the sweep nulls `alertTimerId` itself.
2674
- /// ⟨2026-10-29, the owner's on-demand alerts ruling, beside the line above⟩ …the sweep zeroes the arm, and an arm
2675
- /// past its due time reads stale. `alertTimerArmed` is TRUE ONLY WHILE A DELIVERY IS OWED OR RETRYING
2676
- /// (the alert drain is a one-shot armed per owed delivery); alerts configured on a quiet engram read
2677
- /// false, and that is correct — the IDLE STEADY STATE line above now holds with a webhook set too.
2678
- /// It reads the arm's DUE TIME, not only its id (`ActionAlerts.armLive`): a job that traps before its
2679
- /// first await rolls back its own `alertTimerId := null`, so a bare id would read armed forever.
2680
- /// ONE BOUNDED UNTRUTH (named by the alert design's adversarial review): for ARM_STALE_NS (120 s)
2681
- /// after the due time of such a trapped job, the flag reads true although no timer exists.
2585
+ /// boolean for it would read true forever and tell you nothing, exactly the false-positive
2586
+ /// described above for sessionExpiryArmed. Use getAnchorPushStatus() instead: last-tick
2587
+ /// TIMESTAMPS are evidence where an arm flag is only an intention. The record's other fields (the
2588
+ /// hourly check-in's breaker counts, ic402's maintenance timer) are described at
2589
+ /// `Types.TimerHealth`.
2590
+ ///
2591
+ /// PUBLIC: the same standing as the other liveness reads (`getAnchorPushStatus`). Booleans and
2592
+ /// timestamps about this canister's own timers — nothing about content, callers or money — and a
2593
+ /// liveness signal only its owner can read cannot tell a third party that the engram is still
2594
+ /// running.
2682
2595
  getTimerHealth: () -> (TimerHealth) query;
2683
2596
  /// PUBLIC: a cap identifies no user, and a caller deserves to know the rule before it stops them.
2684
2597
  ///
2685
- /// ⟨0.16.0, a public method states why it is public⟩ Was owner-gated behind a trap. The disclosure law asks
2686
- /// what the value reveals, and the answer here is nothing about anybody — it is a policy ceiling, not a balance
2687
- /// or a history. Publishing it removes the trap AND the envelope: an ungated read has no refusal to carry, so
2688
- /// wrapping it in `Result` would be ceremony that implies a gate exists.
2598
+ /// It was owner-gated behind a trap before 0.16.0. What a disclosure has to ask is what the value
2599
+ /// reveals, and the answer here is nothing about anybody — it is a policy ceiling, not a balance or
2600
+ /// a history. Publishing it removes the trap AND the envelope: an ungated read has no refusal to
2601
+ /// carry, so wrapping it in `Result` would be ceremony that implies a gate exists.
2689
2602
  ///
2690
2603
  /// Predictability is itself the honesty posture: a limit that only reveals itself by refusing a
2691
- /// top-up teaches the caller by failure. `/// PUBLIC:` is the marker the public-reason gate greps for.
2604
+ /// top-up teaches the caller by failure.
2692
2605
  getTopUpLimits: () ->
2693
2606
  (record {
2694
2607
  cooldownSeconds: nat;
2695
2608
  maxCkusdcE6s: nat;
2696
2609
  }) query;
2697
- /// ⟨0.16.0⟩ `walletBalance()` DELETED — a ONE-LETTER trap beside `walletBalances()`, and a strict
2698
- /// projection of it: it returned `ExperimentalCycles.balance()`, which is `WalletBalances.cycles`.
2699
- ///
2700
- /// Two methods whose names differ by a single character, with the same gate and one a subset of
2701
- /// the other, is a call site waiting to be written wrong — and wrong in the direction that
2702
- /// silently reads cycles when it meant to read money. Doc callers (CLI-REFERENCE, Docs.vue) sweep
2703
- /// to the survivor.
2704
- /// RENAMED from `walletBalances` (a `get*` for a single value).
2610
+ /// RENAMED from `walletBalances` (a `get*` for a single value). Its one-letter sibling
2611
+ /// `walletBalance()` was DELETED in 0.16.0: it returned `ExperimentalCycles.balance()`, which is
2612
+ /// `WalletBalances.cycles`. Two methods whose names differ by a single character, with the same
2613
+ /// gate and one a subset of the other, is a call site waiting to be written wrong — and wrong in
2614
+ /// the direction that silently reads cycles when it meant to read money. (`getWalletCycles` is the
2615
+ /// cycles-only read, named for its unit.)
2705
2616
  ///
2706
- /// Stays an UPDATE, marked as a read served as an update: it awaits three ICRC-1 ledgers. The name
2707
- /// cannot say that, so the declaration does — a caller budgeting round-trips needs to know this is
2708
- /// not a query.
2617
+ /// UPDATE, NOT QUERY: it awaits three ICRC-1 ledgers. The name cannot say that, so the declaration
2618
+ /// does — a caller budgeting round-trips needs to know this is not a query.
2709
2619
  ///
2710
2620
  /// The ledger failure is `#Unavailable`, not `#Invalid`: a dependency refused or timed out, the
2711
2621
  /// request was fine, and retry is the correct response. That is the one arm in the whole set that
2712
2622
  /// means "try again", and it is the reason `Error` is a closed variant rather than a sentence.
2713
- ///
2714
- /// ⟨update-for-read⟩ MARKER ADDED 2026-08-23, reasoning above UNCHANGED — this block already said "Stays an
2715
- /// UPDATE, marked as a read served as an update: it awaits three ICRC-1 ledgers". It was marked in
2716
- /// prose and invisible to any gate; the glyph is what the update-for-read gate matches.
2717
2623
  getWalletBalances: () -> (Result_62);
2718
2624
  /// Cycles-only getter used by EngramClient.walletBalance and its stdio MCP/OpenClaw callers.
2719
2625
  /// The earlier walletBalance/walletBalances one-letter pair remains retired: this name states
2720
2626
  /// the unit, while getWalletBalances retains the distinct full token-wallet operation.
2721
2627
  /// A token-ledger outage cannot prevent this local fuel read; it uses the same operation as
2722
2628
  /// remote engram_wallet_balance and never sends an outgoing call.
2723
- /// ⟨update-for-read⟩ UPDATE despite having no await: preserve the existing wallet facade's per-agent quota
2724
- /// charge and lastSeenNs update, including when wallet permission is subsequently refused.
2725
- /// A query would discard those writes and silently loosen the agent's existing rate limit.
2629
+ /// UPDATE, NOT QUERY, despite having no await: it keeps the wallet facade's per-agent quota charge and
2630
+ /// lastSeenNs update, including when wallet permission is subsequently refused. A query would
2631
+ /// discard those writes and silently loosen the agent's existing rate limit.
2726
2632
  getWalletCycles: () -> (Result_15);
2727
2633
  /// Refusal reason preserved, and it is the clearest case of why a masked read is worse than no
2728
2634
  /// read: three empty strings with `configured = false` is a VALID-LOOKING answer meaning "this
2729
2635
  /// engram has no World ID configuration" — handed to a caller who merely lacks a grant. The
2730
2636
  /// fabrication is indistinguishable from the truth by construction.
2731
2637
  getWorldIdConfig: () -> (Result_61) query;
2732
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY: this awaits THREE system calls — `raw_rand()` for the nonce,
2638
+ /// UPDATE, NOT QUERY: this awaits THREE system calls — `raw_rand()` for the nonce,
2733
2639
  /// `Call.signWithEcdsa` for the signature, and `worldIdRpPublicKey()` for the derived key. A
2734
2640
  /// query can do none of them.
2735
2641
  ///
2736
- /// Owner-only: produce a World ID 4.0 relying-party context for the frontend's IDKit request.
2642
+ /// Owner-only: produce a World ID 4.0 relying-party context for the client's IDKit request.
2737
2643
  /// Valid iff the derived signer address (getWorldIdRpSignerAddress) is registered for this rp_id in
2738
2644
  /// the World Developer Portal. Short-lived (300s TTL, idkit-server's default) and single-purpose —
2739
2645
  /// it authorizes opening one verification request, nothing else.
@@ -2743,16 +2649,17 @@ type Engram =
2743
2649
  /// Portal — the engram never holds or exports a private key (only threshold shares exist, on the
2744
2650
  /// subnet). Distinct from the payment/EVM address by construction.
2745
2651
  ///
2746
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, for TWO reasons and the second is the one a reader would miss. It
2747
- /// awaits `worldIdRpPublicKey()` (management `ecdsa_public_key`), and it calls `denied()` on
2748
- /// refusal — a state write, which a query cannot perform. So even if the key were cached this
2749
- /// could not become a query without silently retiring its denial record (the refusal-over-fabrication class).
2750
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2751
- /// an engram opened through another, as the owner (`AccessControl.requireOwnerOrSignIn`); a first
2752
- /// engram is unchanged.
2652
+ /// UPDATE, NOT QUERY, for TWO reasons and the second is the one a reader would miss. It awaits
2653
+ /// `worldIdRpPublicKey()` (management `ecdsa_public_key`), and it calls `denied()` on refusal — a
2654
+ /// state write, which a query cannot perform. So even if the key were cached this could not become
2655
+ /// a query without silently retiring its denial record (the refusal-over-fabrication class).
2656
+ /// Also callable by the seated sign-in of an engram opened through another, acting as the owner
2657
+ /// (`AccessControl.requireOwnerOrSignIn`); on a first engram only the owner.
2753
2658
  getWorldIdRpSignerAddress: () -> (Result_58);
2754
2659
  /// The verified IDKitResult, verbatim, as World's /api/v4/verify accepted it — the re-checkable
2755
- /// artifact behind verifiedHuman. Role-gated because it carries the NULLIFIER.
2660
+ /// artifact behind verifiedHuman. OWNER ONLY, because it carries the NULLIFIER: the owner's
2661
+ /// unique-human pseudonym. An agent never needs it, and a guardian is a check on agents, not a party
2662
+ /// to it.
2756
2663
  /// `Result<opt Text>` — and the double wrapper is the entire point, not redundancy.
2757
2664
  ///
2758
2665
  /// `#Ok(null)` means HONEST ABSENCE: no verification is on record, and you were entitled to ask.
@@ -2760,25 +2667,15 @@ type Engram =
2760
2667
  /// one `null`, so a caller lacking a grant was told an unverified human stands behind this engram
2761
2668
  /// — a false claim about a person, produced by an authorization failure.
2762
2669
  ///
2763
- /// The artifact stays role-gated because it carries the NULLIFIER. The public, anonymous answer to
2764
- /// "is a human behind this engram" is `about().verifiedHuman`, which is a boolean and leaks
2765
- /// nothing.
2766
- ///
2767
- /// ⟨CORRECTED 2026-08-21 — this said `metrics().verifiedHuman`, and `metrics()` no longer exists:
2768
- /// The same-concept-same-name law folded it and `status()` into `about()`, which carries the field. The sentence is a
2769
- /// `///`, so the dead name was PUBLISHED in engram.did and pointed every client at a method the
2770
- /// canister does not serve. The tombstones below and at `about()` are historical and correct as
2771
- /// written; this one was present tense, which is the difference that matters.⟩
2772
- ///
2773
- /// ⟨2026-11-19, beside "stays role-gated" above⟩ Owner only now (it was any role: owner, agent or guardian). The
2774
- /// nullifier is the owner's unique-human pseudonym; an agent never needed it, and a guardian is a check on agents,
2775
- /// not a party to it. Everyone else reads `about().verifiedHuman`.
2670
+ /// The public, anonymous answer to "is a human behind this engram" is `about().verifiedHuman`,
2671
+ /// which is a boolean and leaks nothing.
2776
2672
  getWorldIdVerification: () -> (Result_59) query;
2777
- /// ⟨0.16.0, refusals are values, never traps⟩ THE EMERGENCY FAMILY. Every refusal below is `#Refused`
2778
- /// or `#NotFound`, and the absence of a `#Conflict` here is the point: these are the calls someone
2779
- /// makes while something is going wrong, and the only two answers that help are "you may not do this"
2780
- /// and "there is nothing by that name". A missing PERMISSION is `#Refused` rather than `#Conflict` — the
2781
- /// guardian's standing is what fell short, and no change to engram state would let them through.
2673
+ /// THE EMERGENCY FAMILY (refusals are values, never traps). Every refusal below is `#Refused` or
2674
+ /// `#NotFound`, and the absence of a `#Conflict` here is the point: these are the calls someone
2675
+ /// makes while something is going wrong, and the only two answers that help are "you may not do
2676
+ /// this" and "there is nothing by that name". A missing PERMISSION is `#Refused` rather than
2677
+ /// `#Conflict` — the guardian's standing is what fell short, and no change to engram state would
2678
+ /// let them through.
2782
2679
  guardianRevokeAgent: (agentPrincipal: principal) -> (Result_2);
2783
2680
  /// The HTTP surface: canister-info JSON, OAuth discovery documents, and the MCP route's query
2784
2681
  /// half. See the `http_request_update` twin below for what upgrades and why.
@@ -2797,10 +2694,6 @@ type Engram =
2797
2694
  /// into what reads as a wrong URL — half a fix being worse than none, as the /oauth/authorize
2798
2695
  /// arm inside records.
2799
2696
  http_request_update: (request: HttpRequest) -> (HttpResponse);
2800
- /// ⟨0.16.0⟩ `isPaidMemoryReadEnabled()` DELETED — folded to `about().paidMemoryReadEnabled`
2801
- /// (one idiom for a boolean feature — a setter plus the flag on its family's projection).
2802
- /// Its callers are a buyer's pre-check and the market canister, both ANONYMOUS, so the public
2803
- /// projection is exactly where it belongs.
2804
2697
  /// PUBLIC: a wallet calls this BEFORE its user has any standing on this engram — that is what the
2805
2698
  /// call is for — so gating it would make the message unreadable at exactly the moment it is
2806
2699
  /// needed, and a signature given without it is a signature given blind.
@@ -2832,13 +2725,9 @@ type Engram =
2832
2725
  /// Owner-only: only the engram owner can authorize a Connector install.
2833
2726
  issueAuthCode: (redirectUri: text, scope: text, codeChallenge: text,
2834
2727
  clientId: opt text) -> (Result_58);
2835
- /// ⟨0.16.0⟩ `getCycleSnapshotSource` DELETED — folded into `CycleSnapshot.source`, one label per
2836
- /// ROW. A single label for a whole ring misattributes every row recorded under the other source,
2837
- /// and the source flips by design (self-call first, balance on fallback). Its documentation of
2838
- /// what the two values mean lives on the type.
2839
2728
  /// Hourly (timestamp, totalMemoryReads, totalMemoryWrites) snapshots, ~30 days.
2840
- /// Same guard + fail-to-empty shape as getCycleHistory. Diff consecutive rows for a
2841
- /// per-engram activity time-series (retention instrumentation).
2729
+ /// Same guard as `listCycleSnapshots` (any role). Diff consecutive rows for a per-engram activity
2730
+ /// time-series (retention instrumentation).
2842
2731
  /// RENAMED from `getActivityHistory` (a `get*` returns one value, a `list*` a page); named fields replace a
2843
2732
  /// bare 3-tuple whose two Nats were positionally indistinguishable.
2844
2733
  ///
@@ -2854,13 +2743,12 @@ type Engram =
2854
2743
  /// Callers: an owner console's agent list (paired agents and sign-ins on one page, with the
2855
2744
  /// admission count), read by the owner or a seated sign-in.
2856
2745
  listAgentRoster: (start: nat, limit: nat) -> (Result_56) query;
2857
- /// ⟨2026-10-21, the owner approved every item of the mobile design's eleventh round of changes, this
2858
- /// one included⟩ OWNER-ONLY: what each agent has spent today, beside the daily limit in force for it, so the
2859
- /// agent rows can say "$0.50 of $5.00 today" where they said a count of payments. Read from the
2860
- /// state the payment path already keeps — `outboundSpendToday`, through `SpendCeiling.callerSpentOn`
2861
- /// (the reader `x402SignFor` uses) — and the limits from `gate.getPolicy(<the agent's key>)`, the
2862
- /// policy `x402SignFor` checks, on the UTC day it checks (`SpendCeiling.dayIndex`). Amounts are the
2863
- /// token's minor units, as the record's `amount=` writes them. No new state.
2746
+ /// OWNER-ONLY: what each agent has spent today, beside the daily limit in force for it, so an app's
2747
+ /// agent rows can say "$0.50 of $5.00 today". Read from the state the payment path already keeps —
2748
+ /// `outboundSpendToday`, through `SpendCeiling.callerSpentOn` (the reader `x402SignFor` uses) — and
2749
+ /// the limits from `gate.getPolicy(<the agent's key>)`, the policy `x402SignFor` checks, on the UTC
2750
+ /// day it checks (`SpendCeiling.dayIndex`). Amounts are the token's minor units, as the record's
2751
+ /// `amount=` writes them. No new state.
2864
2752
  ///
2865
2753
  /// OWNER-ONLY for `getSpendCeiling`'s reason: one agent's spending is the owner's custody
2866
2754
  /// information, and would tell another agent how much it spent. Everyone else — an agent, a
@@ -2870,15 +2758,15 @@ type Engram =
2870
2758
  /// because the payment path keeps no figure then (`SpendCeiling.AgentSpendRow` says why).
2871
2759
  /// WHAT WOULD MAKE THIS WRONG: `x402SignFor` keeping the per-caller total by something other than
2872
2760
  /// the calling key, or under another day boundary.
2873
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2874
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2761
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2762
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2875
2763
  listAgentSpendToday: (start: nat, limit: nat) -> (Result_55) query;
2876
- /// ⟨0.16.0⟩ THE PAGE EXEMPLAR. Trap → `#Refused`, bare array → `Result<Page<T>>` (refusals are values; a
2877
- /// list answers the one page shape).
2764
+ /// THE PAGE EXEMPLAR (since 0.16.0). A trap became `#Refused`, and a bare array became
2765
+ /// `Result<Page<T>>`: refusals are values, and a list answers the one page shape.
2878
2766
  ///
2879
2767
  /// The refusal prose that used to be `gatedTrap`'s `whyNotEmpty` argument is not lost — it is why
2880
- /// this method could never fail soft, and it now travels ON THE WIRE inside `#Refused` where a
2881
- /// caller can actually read it, instead of inside a trap message only a log sees.
2768
+ /// this method could never fail soft, and it travels ON THE WIRE inside `#Refused` where a caller
2769
+ /// can actually read it, instead of inside a trap message only a log sees.
2882
2770
  ///
2883
2771
  /// `total` is the ROSTER SIZE, not `items.size()`. That distinction is the whole reason this
2884
2772
  /// shape exists here: `MAX_AGENTS` clamps the returned rows, and the old code returned the
@@ -2888,8 +2776,8 @@ type Engram =
2888
2776
  ///
2889
2777
  /// `withheld` is 0: this roster is owner-only in whole, so there is no partial-visibility case.
2890
2778
  /// A method that filters rows by caller sets it — the row-level honesty rule.
2891
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2892
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2779
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2780
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2893
2781
  listAgents: (start: nat, limit: nat) -> (Result_54) query;
2894
2782
  /// The GUARDIAN-audience projection of the agent roster — three fields, not the full record.
2895
2783
  ///
@@ -2905,9 +2793,9 @@ type Engram =
2905
2793
  listAgentsForGuardian: (start: nat, limit: nat) -> (Result_53) query;
2906
2794
  /// Owner-only: rows carry caller, amount, operation and free-text rationale. The SDK omits it.
2907
2795
  ///
2908
- /// The optional leading filter SURVIVES the page-shape reshape — ratified in the 0.16.0 interface plan (a
2909
- /// list may take an optional leading filter) rather than assumed, because Billing.vue calls the filtered
2910
- /// form live and pushing the filter client-side would make the console fetch a queue to discard most of it.
2796
+ /// The optional leading filter stays (a list may take an optional leading filter): an app calls
2797
+ /// the filtered form, and pushing the filter client-side would make it fetch a queue to discard
2798
+ /// most of it.
2911
2799
  ///
2912
2800
  /// `total` counts the FILTERED set, not the whole queue: with a filter applied, "how many match"
2913
2801
  /// is the number a pager needs, and reporting the unfiltered count would make every filtered view
@@ -2916,101 +2804,81 @@ type Engram =
2916
2804
  /// Refusal reason preserved: `[]` reads as "nothing is awaiting the owner's decision".
2917
2805
  listApprovalRequests: (statusFilter: opt ApprovalStatus, start: nat,
2918
2806
  limit: nat) -> (Result_39) query;
2919
- /// ⟨0.16.0⟩ `total` IS THE HEAD COUNTER, and on this method that is the entire point.
2807
+ /// `total` IS THE HEAD COUNTER, and on this method that is the entire point.
2920
2808
  ///
2921
2809
  /// The audit log is a bounded RING: it trims its tail, so "rows you can read" and "entries that
2922
- /// have ever existed" are different numbers. The old bare array published only the first, which
2810
+ /// have ever existed" are different numbers. A bare array would publish only the first, which
2923
2811
  /// made a trimmed log indistinguishable from a complete one — and this is the evidence surface,
2924
2812
  /// where that difference IS the product. `totalAppended()` is monotonic across trims and is the
2925
2813
  /// same number `getCertifiedAuditHead` publishes, so a caller comparing page against head gets
2926
2814
  /// agreement by construction rather than by luck.
2927
2815
  ///
2928
- /// Refusal reason preserved: for an unauthenticated integrity check the caller wants
2929
- /// `getCertifiedAuditHead()`, which is public and subnet-certified. The BODIES are role-gated.
2930
- ///
2931
- /// ⟨2026-09-29, the owner's ruling that an agent reads only the entries it caused⟩ AN AGENT READS
2932
- /// ONLY THE ENTRIES IT CAUSED; the owner and guardians read everything (`RecordView`). So `limit` is
2933
- /// a SPAN — how many record ids to examine from `start` — and an agent's page holds the entries in
2934
- /// that span whose caller is its own key, with `withheld` counting the rest: `items.size() +
2935
- /// withheld` is the span examined. For the owner and a guardian `withheld` is 0 and the page is the
2936
- /// span. WHAT WOULD MAKE THIS WRONG: a reader who must see the whole record without being the owner
2937
- /// or a guardian — the public certified head is the answer for integrity, and nothing else is.
2938
- ///
2939
- /// ⟨2026-10-15, the owner's chained-record ruling of 2026-10-14⟩ PUBLIC NOW, AND THE COUNT BECAME ROWS. The
2940
- /// reply is a `Wire.RecordPage`: every entry in the span the reader may not see in full comes back
2941
- /// as a hash-only row in `sealed` (id, SHA-256 of its body, entry hash) instead of being counted in
2942
- /// `withheld`, so `items.size() + sealed.size()` is the span examined. Each entry is hashed first,
2943
- /// then chained (`AuditLog`), so those rows are enough to walk from any entry to the certified
2944
- /// head — which is what lets a stranger check one entry without the owner. A caller with no role,
2945
- /// the anonymous caller included, is a stranger (`RecordView.readerFrom`) and gets only sealed
2946
- /// rows; the owner and guardians still see every entry, an agent its own. Nothing here refuses,
2947
- /// so the read's former refusal ("Anonymous caller not allowed") is gone from it.
2816
+ /// PUBLIC, and nothing here refuses: the reply is a `Wire.RecordPage`. AN AGENT READS ONLY THE
2817
+ /// ENTRIES IT CAUSED; the owner and guardians read everything (`RecordView`); a caller with no
2818
+ /// role, the anonymous caller included, is a stranger (`RecordView.readerFrom`) and gets only
2819
+ /// sealed rows. `limit` is a SPAN — how many record ids to examine from `start` — and every entry
2820
+ /// in the span the reader may not see in full comes back as a hash-only row in `sealed` (id,
2821
+ /// SHA-256 of its body, entry hash), so `items.size() + sealed.size()` is the span examined. Each
2822
+ /// entry is hashed first, then chained (`AuditLog`), so those rows are enough to walk from any
2823
+ /// entry to the certified head — which is what lets a stranger check one entry without the owner.
2824
+ /// For an unauthenticated integrity check, `getCertifiedAuditHead()` is public and subnet-certified.
2948
2825
  /// `ringFloor` says where the ring starts — a `start` below it begins at it — and `hashFirstFrom`
2949
2826
  /// where this record switched to the hash-first rule. A sealed row costs one SHA-256 of its body
2950
2827
  /// at read time; nothing new is stored. WHAT WOULD MAKE THIS WRONG: a sealed row carrying any part
2951
- /// of a body, or a stranger reaching `items` (test/record-view.test.mo pins both).
2828
+ /// of a body, or a stranger reaching `items` (test/record-view.test.mo pins both); or a reader who
2829
+ /// must see the whole record without being the owner or a guardian — the public certified head is
2830
+ /// the answer for integrity, and nothing else is.
2952
2831
  listAuditEntries: (start: nat, limit: nat) -> (Result_52) query;
2953
- /// ⟨0.16.0, refusals are values; the one page shape — ruled in the 0.16.0 interface plan⟩ THE
2954
- /// TWO-MECHANISM EXCEPTION DISSOLVES.
2832
+ /// ONE SHAPE FOR EVERY CALLER (since 0.16.0: refusals are values, and a list answers the one page
2833
+ /// shape).
2955
2834
  ///
2956
2835
  /// This method used to answer THREE ways to one question: a list, an `#Err` text, and a trap,
2957
2836
  /// picked by which kind of caller asked. That split existed only because the return type could
2958
2837
  /// not carry a refusal — with `Result<Page<T>>` it can, so every caller gets one shape and the
2959
2838
  /// arm says which no it is. A paired agent lacking `canReadBackup` is `#Refused`; so is
2960
- /// everyone else who may not ask. The trap is gone: `Debug.trap` is for invariant violations,
2961
- /// never authorization (refusals are values, never traps), and a refusal a caller cannot catch is not
2962
- /// a better refusal.
2963
- ///
2964
- /// ⚠ THE RATIFIED LOCKSTEP EXCEPTION THIS CARRIED IS SUPERSEDED, not quietly dropped.
2965
- /// The recorded lockstep exception for `listBackups` existed because published
2966
- /// @engramx/client 0.15.0 declares `IDL.Vec(BackupMetadata)` here and cannot decode a variant at
2967
- /// all — it throws — and @engramx/openclaw's dedup probe catches that throw and degrades to
2968
- /// "skipped", so every database silently stops being backed up while the CLI reports success.
2969
- /// That analysis was correct and is still correct. What changed is its PREMISE: the redesign plan measured
2970
- /// the installed base at zero external users (prod = two engrams, both ours; npm published
2971
- /// 2026-08-14), so the population the ceremony protected does not exist. The SDK is republished
2972
- /// at 0.16.0 in this same campaign. If an outside caller ever appears before that ships,
2973
- /// this reasoning is void and the lockstep is owed again.
2974
- ///
2975
- /// `dbTypeFilter` DIES on the wire (the 0.16.0 interface plan). The capability does not: `EngramClient.listBackups`
2976
- /// keeps its optional filter and applies it to the page, so no caller loses the ability to ask
2977
- /// "backups of this database" — it stops being a thing the canister has to page around.
2839
+ /// everyone else who may not ask. There is no trap: `Debug.trap` is for invariant violations,
2840
+ /// never authorization, and a refusal a caller cannot catch is not a better refusal.
2841
+ ///
2842
+ /// The reshape breaks clients built for 0.15.0: @engramx/client 0.15.0 declares
2843
+ /// `IDL.Vec(BackupMetadata)` here and cannot decode a variant at all — it throws — and
2844
+ /// @engramx/openclaw's dedup probe catches that throw and degrades to "skipped", so every database
2845
+ /// silently stops being backed up while the CLI reports success. That was accepted because the
2846
+ /// installed base of 0.15.0 had no outside users when 0.16.0 shipped, and the SDK was republished
2847
+ /// with it; a client from either side of 0.16.0 does not interoperate with the other.
2848
+ ///
2849
+ /// There is no `dbTypeFilter` on the wire. The capability remains: `EngramClient.listBackups` keeps
2850
+ /// its optional filter and applies it to the page, so no caller loses the ability to ask "backups
2851
+ /// of this database" — it stops being a thing the canister has to page around.
2978
2852
  listBackups: (start: nat, limit: nat) -> (Result_51) query;
2979
- /// List all bearer tokens — Active, Revoked, and Expired. Owner uses this in
2980
- /// the dashboard to show installed Connectors (claude.ai, Claude Desktop, etc.).
2853
+ /// List all bearer tokens — Active, Revoked, and Expired. An owner's app uses this to show the
2854
+ /// installed connectors (claude.ai, Claude Desktop, etc.).
2981
2855
  /// Refusal reason preserved from the trap: `[]` reads as "no connector is installed on this
2982
2856
  /// engram" — a claim about what can REACH it. An owner auditing access cannot tell that from
2983
2857
  /// "you may not see the list", and the two are opposite facts.
2984
2858
  ///
2985
2859
  /// `bearerTokenStore.list()` already resolves each token's status at read time (a token that
2986
2860
  /// merely stopped being used is reported `#Expired`, not a stale `#Active`), so the page carries
2987
- /// the same honesty the store gained on 2026-08-17.
2988
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2989
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2861
+ /// the store's honesty.
2862
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
2863
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
2990
2864
  listBearerTokens: (start: nat, limit: nat) -> (Result_50) query;
2991
2865
  /// The condense checkpoints in the retained log at or above `startSeq`, oldest first.
2992
2866
  ///
2993
- /// ⟨0.16.0, NEW⟩ The other half of the split above. A checkpoint is the only surviving record of a
2994
- /// stretch of chain that no longer exists, so this is the list that accounts for the distance
2995
- /// between `firstAvailableSeq` and the entries an owner remembers writing — without it, a
2996
- /// condensed prefix is a gap the owner has to take on trust.
2867
+ /// The other half of `listMemoryExportReceipts`'s split (since 0.16.0). A checkpoint is the only
2868
+ /// surviving record of a stretch of chain that no longer exists, so this is the list that accounts
2869
+ /// for the distance between `firstAvailableSeq` and the entries an owner remembers writing —
2870
+ /// without it, a condensed prefix is a gap the owner has to take on trust.
2997
2871
  ///
2998
2872
  /// Owner-only like every other archive surface, and for the same structural reason: these rows
2999
2873
  /// carry the chain positions and roots of entries whose paths were inside the hash preimage.
3000
2874
  listCondenseCheckpoints: (startSeq: nat, limit: nat) -> (Result_49) query;
3001
- /// ⟨0.16.0⟩ `metrics()` DELETED — absorbed by `about()`.
3002
- ///
3003
- /// Two public projections of one canister (one concept, one name): `metrics()` and `status()` both answered "what
3004
- /// is this engram like" and disagreed on which counters they carried, so a consumer had to fetch
3005
- /// both and know which one owned each field. Every field here survives on `about()`, day-flooring
3006
- /// included.
3007
2875
  listCycleSnapshots: (start: nat, limit: nat) -> (Result_48) query;
3008
2876
  /// Same `withheld` treatment as listMemoryFiles — the tombstone listing filtered reserved paths
3009
2877
  /// for non-owners just as silently, and a caller could not tell a filtered tombstone list from a
3010
2878
  /// complete one. Counted before slicing, so policy-hidden rows never blur into paging.
3011
2879
  listDeletedMemoryFiles: (start: nat, limit: nat) -> (Result_47) query;
3012
- /// Stays on the engram under the 0.16.0 split (commerce to the market, signing here): withdrawal
3013
- /// custody does not leave.
2880
+ /// On the engram, not the market (commerce is the market's, signing is here): withdrawal custody
2881
+ /// does not leave.
3014
2882
  ///
3015
2883
  /// NAMED item, not a `(Text, Int)` tuple. The Int is an activation time, and a bare Int beside a
3016
2884
  /// bare Text told a reader nothing about which was which — the same defect fixed on the purge log.
@@ -3019,28 +2887,27 @@ type Engram =
3019
2887
  /// engram may withdraw nowhere", OR — worse — as "no allowlist is in force", which is the
3020
2888
  /// opposite security posture. It also erases any pending 24h activation from view.
3021
2889
  ///
3022
- /// ⟨2026-10-14, the destination-list ruling⟩ One action's list: `typeId` names the action, and an unregistered one is
3023
- /// `#NotFound` rather than an empty page (an empty page means "this action may sign to nothing").
3024
- /// The item's field is `value`, not `address`: a list may hold a venue value that is no address.
3025
- /// Readable by the owner, an active agent or an active guardian, as the old list was.
2890
+ /// One action's list: `typeId` names the action, and an unregistered one is `#NotFound` rather than
2891
+ /// an empty page (an empty page means "this action may sign to nothing"). The item's field is
2892
+ /// `value`, not `address`: a list may hold a venue value that is no address. Readable by the owner,
2893
+ /// an active agent or an active guardian.
3026
2894
  listEip712Destinations: (typeId: blob, start: nat, limit: nat) ->
3027
2895
  (Result_46) query;
3028
2896
  /// The registered shapes — encodeTypeString is the display artifact, verbatim.
3029
- /// Stays on the engram under the 0.16.0 split (commerce to the market, signing here): EIP-712 signing is
2897
+ /// On the engram, not the market (commerce is the market's, signing is here): EIP-712 signing is
3030
2898
  /// custody, and custody does not leave.
3031
2899
  ///
3032
2900
  /// Refusal reason preserved: `[]` reads as "this engram can sign nothing" — a claim about SIGNING
3033
2901
  /// AUTHORITY, which is not a thing to hand an unauthorized reader. The public trail of every
3034
2902
  /// registration remains the audit chain under getCertifiedAuditHead.
3035
2903
  ///
3036
- /// ⟨2026-10-14, the owner's registration-bar ruling⟩ Each row carries its per-field rules (`fieldRules`), joined in
3037
- /// from `eip712FieldRules` — they are part of what the type authorises, so a reader of the list must
3038
- /// not have to make a second call to learn them. The row type is `Eip712TypeView`.
2904
+ /// Each row carries its per-field rules (`fieldRules`), joined in from `eip712FieldRules` — they
2905
+ /// are part of what the type authorises, so a reader of the list must not have to make a second
2906
+ /// call to learn them. The row type is `Eip712TypeView`.
3039
2907
  listEip712Types: (start: nat, limit: nat) -> (Result_45) query;
3040
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ Guardians' disputes, oldest
3041
- /// first. Same visibility as `listRepudiations` and `listRecordNotes`: the owner and ACTIVE guardians
3042
- /// read the rows; an agent gets an empty page whose `withheld` counts them (the 2026-09-29 ruling
3043
- /// that an agent reads only the entries it caused holds — a dispute is the guardian's entry, not the
2908
+ /// Guardians' disputes, oldest first. Same visibility as `listRepudiations` and `listRecordNotes`:
2909
+ /// the owner and ACTIVE guardians read the rows; an agent gets an empty page whose `withheld` counts
2910
+ /// them (an agent reads only the entries it caused, and a dispute is the guardian's entry, not the
3044
2911
  /// agent's); a stranger, a pending guardian and the anonymous caller are refused.
3045
2912
  listGuardianDisputes: (start: nat, limit: nat) -> (Result_44) query;
3046
2913
  /// Accessible by owner and guardians.
@@ -3052,23 +2919,21 @@ type Engram =
3052
2919
  listGuardians: (start: nat, limit: nat) -> (Result_43) query;
3053
2920
  /// The export receipts in the retained log at or above `startSeq`, oldest first.
3054
2921
  ///
3055
- /// ⟨0.16.0, the one page shape⟩ ONE LIST, ONE QUESTION. This method used to return receipts AND checkpoints
2922
+ /// ONE LIST, ONE QUESTION (since 0.16.0). This method used to return receipts AND checkpoints
3056
2923
  /// together behind a backward `before`/`max` cursor. They answer different questions — what may be
3057
2924
  /// condensed, and what already was — so a caller wanting one paid to decode the other, and the
3058
2925
  /// merged shape had to carry two arrays, a truncation flag and an opaque cursor to stay honest
3059
2926
  /// about a walk that served both. `listCondenseCheckpoints` is the other half.
3060
2927
  ///
3061
- /// The cursor dies with it (the 0.16.0 plan unifies the paging idioms): paging is by ABSOLUTE SEQ
3062
- /// now, forward, so a caller resumes at `scannedThroughSeq + 1` and is finished when that passes
3063
- /// `page.total`. `scanTruncated` is gone because it has nothing left to say — "I stopped at entry N"
3064
- /// is the same claim it made, and says it as a position rather than a flag a reader has to pair with
3065
- /// a second field.
2928
+ /// The cursor went with it (one paging idiom): paging is by ABSOLUTE SEQ, forward, so a caller
2929
+ /// resumes at `scannedThroughSeq + 1` and is finished when that passes `page.total`. There is no
2930
+ /// `scanTruncated` flag because it would have nothing left to say — "I stopped at entry N" is
2931
+ /// said as a position rather than a flag a reader has to pair with a second field.
3066
2932
  ///
3067
2933
  /// Read `MemoryRouter.ReceiptPage` before reading `page.total` as a receipt count. It is not one;
3068
2934
  /// it is the chain's length, and the declaration says why.
3069
2935
  listMemoryExportReceipts: (startSeq: nat, limit: nat) -> (Result_42) query;
3070
- /// ⟨0.16.0⟩ THE `withheld` EXEMPLAR — the 0.16.0 interface law on refusals names this exact method as
3071
- /// the defect it fixes.
2936
+ /// THE `withheld` EXEMPLAR (since 0.16.0): this method is the defect the field was added to fix.
3072
2937
  ///
3073
2938
  /// A non-owner's answer silently dropped every `config/` and `secrets/` row. Not "refused the
3074
2939
  /// call" and not "returned a marker" — the rows simply were not there, with nothing in band
@@ -3076,7 +2941,7 @@ type Engram =
3076
2941
  /// could see it. Meanwhile `readMemory` returned an explicit refusal for the very same paths.
3077
2942
  /// Same policy, same caller, two answers, and the quiet one was the lie.
3078
2943
  ///
3079
- /// `withheld` is now the count of rows policy removed. It leaks no names — which is the point:
2944
+ /// `withheld` is the count of rows policy removed. It leaks no names — which is the point:
3080
2945
  /// the caller learns THAT something is hidden without learning WHAT, so an agent can tell a
3081
2946
  /// short listing from a complete one and stop inferring the engram is emptier than it is.
3082
2947
  ///
@@ -3084,49 +2949,41 @@ type Engram =
3084
2949
  /// by POLICY, never rows merely off the end of this page — those are `total`'s job. Conflating
3085
2950
  /// the two would rebuild the ambiguity in a new place.
3086
2951
  ///
3087
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes: an author on every file row⟩ Each row also
3088
- /// carries `lastModifiedBy` (`Types.MemoryFileRow`): the key that wrote the file's current
3089
- /// version, so a phone's file list can say "changed 2 h ago by Recorder" without a read per
2952
+ /// Each row also carries `lastModifiedBy` (`Types.MemoryFileRow`): the key that wrote the file's
2953
+ /// current version, so a phone's file list can say "changed 2 h ago by Recorder" without a read per
3090
2954
  /// file. It is what `readMemory` already serves to the same callers under the same gate, so it
3091
- /// tells no caller anything it could not read. Born `opt` (a field added to a response record is `opt`). Looked up only for
3092
- /// the rows of THIS page (`MemoryRouter.info`), after the slice, so the cost is one lookup per
3093
- /// row served, never one per file stored. A WIDENED REPLY: a reader that decodes the row by
3094
- /// position rather than by field name breaks — none in this repository does.
2955
+ /// tells no caller anything it could not read. Born `opt` (a field added to a response record is
2956
+ /// `opt`). Looked up only for the rows of THIS page (`MemoryRouter.info`), after the slice, so the
2957
+ /// cost is one lookup per row served, never one per file stored. A WIDENED REPLY: a reader that
2958
+ /// decodes the row by position rather than by field name breaks — none in this repository does.
3095
2959
  listMemoryFiles: (start: nat, limit: nat) -> (Result_41) query;
3096
2960
  /// One page of the memory log, seq-ordered, optionally narrowed to one author.
3097
2961
  ///
3098
- /// THE WINDOW IS THE CURSOR, and the page now states it. The window is
2962
+ /// THE WINDOW IS THE CURSOR, and the page states it. The window is
3099
2963
  /// `items.size() + withheld` entries starting at `max(startSeq, firstAvailableSeq)`; advance by
3100
2964
  /// that, never by "last entry returned + 1", which stalls forever on the first empty page. Stop
3101
2965
  /// when the window passes `total`.
3102
2966
  ///
3103
- /// ⟨0.16.0, the one page shape — A CONFLICT WITH THE INTERFACE PLAN, RECORDED⟩ The plan's entry for
3104
- /// this method says `→R<P<MemoryLogEvent>>` and "authorFilter dropped (kills the filtered-window
3105
- /// cursor stall)". The stall is real and the diagnosis is right; amputating the filter is not the
3106
- /// only cure, and it is the expensive one — `Archive.vue` ships a working author-filter UI, and "what
3107
- /// did this agent write" is a question an owner asks of an evidence log. The filter STAYS. What kills
3108
- /// the stall instead is `withheld`: it carries the count this filter removed from the window, so a
3109
- /// short or empty filtered page is no longer ambiguous between "nobody wrote here" and "the window
3110
- /// was small", and the correct cursor advance is computable from the page itself. `pageCap` therefore dies
3111
- /// with nothing lost — it existed only to disclose a window that `items.size() + withheld` now
3112
- /// states directly.
2967
+ /// THE AUTHOR FILTER STAYS, and `withheld` is what makes it safe. A filtered window used to stall a
2968
+ /// cursor: a short or empty filtered page was ambiguous between "nobody wrote here" and "the window
2969
+ /// was small". Dropping the filter would cure that at a price — "what did this agent write" is a
2970
+ /// question an owner asks of an evidence log. Instead `withheld` carries the count this filter
2971
+ /// removed from the window, so the page is no longer ambiguous and the correct cursor advance is
2972
+ /// computable from the page itself; no separate cap field is needed to disclose the window.
3113
2973
  ///
3114
2974
  /// `firstAvailableSeq` and `head` sit BESIDE the page rather than in it. They are facts about the
3115
2975
  /// chain, not this slice: the condense floor tells a caller reading an archived range where the
3116
2976
  /// log now begins instead of letting them read it as empty, and the head is what a third party
3117
2977
  /// checks the page against. Flattening to a bare `Page` to satisfy the shape would buy uniformity
3118
- /// with the disclosures that make the page verifiable — the hidden-bound defect the interface plan
3119
- /// itself names on previewCondense's entry.
3120
- /// ⟨2026-11-19⟩ The count argument is `limit`, as on every other list (it was `max` here and on
3121
- /// `listMemoryExportReceipts`, `listCondenseCheckpoints` and `getMemoryHistory`). A name only: Candid passes
3122
- /// arguments by position, so no caller changes.
2978
+ /// with the disclosures that make the page verifiable — the hidden-bound defect.
2979
+ ///
2980
+ /// The count argument is `limit`, as on every other list.
3123
2981
  listMemoryLog: (startSeq: nat, limit: nat, authorFilter: opt principal) ->
3124
2982
  (Result_40) query;
3125
- /// The caller's OWN spend-approval requests. ⟨0.16.0, refusals are values; the one page shape — fixed 2026-08-18⟩
2983
+ /// The caller's OWN spend-approval requests. Refusals are values and the reply is the one page
2984
+ /// shape (since 0.16.0), which closed two defects:
3126
2985
  ///
3127
- /// Two defects in seven lines, and the first is the one this release exists to remove:
3128
- ///
3129
- /// · `if (Principal.isAnonymous(msg.caller)) return []` is a FABRICATED EMPTY. An anonymous
2986
+ /// · `if (Principal.isAnonymous(msg.caller)) return []` was a FABRICATED EMPTY. An anonymous
3130
2987
  /// caller was told "you have no approval requests", which is a claim about their queue rather
3131
2988
  /// than about their identity, and is indistinguishable from the honest answer. It refuses now.
3132
2989
  /// · The reply was uncapped over `pendingApprovals`, which NEVER SHRINKS — the hourly expiry
@@ -3136,174 +2993,136 @@ type Engram =
3136
2993
  ///
3137
2994
  /// The caller-scoping is not `withheld`: rows belonging to someone else were never this caller's
3138
2995
  /// to see, so `total` over their own rows is the honest count and nothing is hidden FROM them.
3139
- /// (The unbounded MAP is filed separately — pruning an approval record destroys evidence of what
3140
- /// was asked, which is a retention ruling rather than a shape fix.)
2996
+ /// (The MAP itself stays unbounded: pruning an approval record destroys evidence of what was
2997
+ /// asked, which is a retention question rather than a shape fix, and it is still open.)
3141
2998
  listMyApprovalRequests: (start: nat, limit: nat) -> (Result_39) query;
3142
2999
  /// The payer's own sessions, live ones first. PAYER-SCOPED: a caller sees only their own, which
3143
3000
  /// is why this needs no role — a session id is not a secret from the person who paid for it.
3144
3001
  ///
3145
- /// ⟨2026-10-02, paged⟩ Takes `(start, limit)` like every other list here, capped at
3146
- /// `MAX_SESSIONS_PAGE` rows per call; `total` is how many of the caller's sessions still exist.
3147
- /// It took no arguments, and a cursor added after the freeze is an argument-list change every
3148
- /// client would break on — the market paged its own pending withdrawals before its cut for the
3149
- /// same reason. The order is the order sessions were opened.
3002
+ /// Takes `(start, limit)` like every other list here, capped at `MAX_SESSIONS_PAGE` rows per call;
3003
+ /// `total` is how many of the caller's sessions still exist. Paged from the start because a cursor
3004
+ /// added after release is an argument-list change every client would break on. The order is the
3005
+ /// order sessions were opened.
3150
3006
  listMySessions: (start: nat, limit: nat) -> (Result_38) query;
3151
- ///
3152
- /// ⟨0.16.0, the one page shape⟩ Paged and enveloped like every other `list*`, and the envelope here is uniformity
3153
- /// rather than gating: this method cannot refuse anybody, so `#Err` is unreachable on it. That is
3154
- /// deliberate — the off-chain verifier that reads this chain reads several other lists beside it,
3155
- /// and one shape for all of them is worth more than saving a variant tag on the one that is
3156
- /// public. `total` is the FULL chain length, so a verifier holding a short page can tell it has
3157
- /// not seen the whole custody history — the distinction a bare array could not express.
3007
+ /// Paged and enveloped like every other `list*` (the one page shape), and the envelope here is
3008
+ /// uniformity rather than gating: this method cannot refuse anybody, so `#Err` is unreachable on it.
3009
+ /// That is deliberate — a verifier that reads this chain reads several other lists beside it, and
3010
+ /// one shape for all of them is worth more than saving a variant tag on the one that is public.
3011
+ /// `total` is the FULL chain length, so a verifier holding a short page can tell it has not seen the
3012
+ /// whole custody history — the distinction a bare array could not express.
3158
3013
  ///
3159
3014
  /// PUBLIC: custody history is the answer to "is this engram what it claims to be", and it is
3160
3015
  /// asked by strangers. `verifyEngramActiveOwner` on the registry answers only about the owner
3161
3016
  /// IT recorded, so this chain is what a caller composes with when currency matters — which it
3162
3017
  /// cannot do if it needs a role here.
3163
3018
  listOwnershipTransfers: (start: nat, limit: nat) -> (Result_37) query;
3164
- /// ⟨2026-09-29, a question from the build review⟩ OWNER-ONLY: how many payment
3165
- /// signatures each agent has obtained today, and the daily limit (200, `PaymentSignCap`). The
3166
- /// owner's console stated the rule and showed no number, because nothing served one; a number it
3167
- /// made up would be a fabricated zero. Anyone else is refused by name (`#Refused
3019
+ /// OWNER-ONLY: how many payment signatures each agent has obtained today, and the daily limit (200,
3020
+ /// `PaymentSignCap`). Served because an app that states the rule has no number to show without it,
3021
+ /// and a number it made up would be a fabricated zero. Anyone else is refused by name (`#Refused
3168
3022
  /// listPaymentSignatureCounts: …`), never answered with zeros. Paged like `listAgents`, in the same
3169
3023
  /// order, one row per agent in the roster; each count is the agent's, taken by its root as the
3170
3024
  /// signer takes it, so every key the agent holds here shows the same number. The owner is not
3171
- /// counted and has no row; the marketplace's count is not an agent's and is not here. WHAT WOULD
3172
- /// MAKE THIS WRONG: a count kept by something other than the agent's root (`PaymentSignCap.rowFor`
3173
- /// says so beside it).
3174
- ///
3175
- /// ⟨2026-09-30, following the owner's acceptance that day of the marketplace's one shared count⟩ "is
3176
- /// not here" no longer holds: the marketplace's one shared count today is in the reply's
3025
+ /// counted and has no row. The marketplace's one shared count today is in the reply's
3177
3026
  /// `marketplace` field, with the limit this engram enforces for it — beside the agents, never a row
3178
- /// among them (`PaymentSignCap.marketplaceRow`). Null when no marketplace is set.
3179
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
3180
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
3027
+ /// among them (`PaymentSignCap.marketplaceRow`); null when no marketplace is set. WHAT WOULD MAKE
3028
+ /// THIS WRONG: a count kept by something other than the agent's root (`PaymentSignCap.rowFor` says
3029
+ /// so beside it).
3030
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
3031
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
3181
3032
  listPaymentSignatureCounts: (start: nat, limit: nat) -> (Result_36) query;
3182
- /// Agent records removed by a reset. Each row is a NAMED record with the fields `principal`,
3183
- /// `name`, `registeredAt` and `purgedAt` — read them BY NAME, never by position.
3184
- /// ⟨2026-09-29, the vocabulary ruling: pairing is the one verb that admits an agent⟩ The field
3185
- /// this prose calls `registeredAt` is now `pairedAt`, on the served row and on the agent record
3186
- /// it is copied from. What is said below about the two timestamps holds for `pairedAt`.
3033
+ /// Agent records removed by a reset (or by an accepted change of owner, `acceptOwnership`). Each row
3034
+ /// is a NAMED record — `principal`, `name`, `pairedAt` and `purgedAt`, and also the agent's `root`,
3035
+ /// the `invite` its enrolment named, and `ended` (why and on what day its engagement ended: its own
3036
+ /// earlier ending, or the reset — the facts `resyncAgentEdges` re-sends). Read them BY NAME, never by
3037
+ /// position. The stored rows are served as they are.
3187
3038
  ///
3188
3039
  /// The names are the whole point, not decoration. Both timestamps are a bare Int, so they were
3189
- /// positionally indistinguishable at the client: a decoder that swapped registeredAt and
3190
- /// purgedAt would type-check everywhere and show up only as nonsense in a UI. This prose used to
3191
- /// describe the row as a positional 4-tuple and readers duly destructured it as one — the same
3192
- /// bug, twice, in two different repos (corrected 2026-08-16). `agentPurgeLog` really is a
3193
- /// 4-tuple in stable state; the SERVED shape is not, and that seam is where the mistake starts.
3194
- ///
3195
- /// resetEngram HARD-DELETES agent records so a purged principal can be invited back
3196
- /// (owner ruling 2026-08-15). That makes the reset a genuine clear rather than a permanent burn —
3197
- /// but it also means the `agents` map is no longer evidence that a principal ever held access,
3198
- /// and the audit chain cannot stand in: it is a bounded ring that trims its oldest entries, so
3199
- /// agent.pair rows are evicted over the life the rent model assumes. This is that
3200
- /// evidence, and it is why the tombstone is written rather than the roster simply dropped.
3201
- ///
3202
- /// Owner-gated and TRAPS on refusal: an empty list must mean "no reset has removed an agent",
3203
- /// never "you may not ask".
3204
- /// ⟨CORRECTED 2026-10-02: it no longer traps. It is gated through `gatedResult`, so a refusal
3205
- /// comes back as an `Err` VALUE that names this method — still never as an empty page, which is
3206
- /// the property the sentence above was protecting.⟩
3040
+ /// positionally indistinguishable at the client: a decoder that swapped `pairedAt` and `purgedAt`
3041
+ /// would type-check everywhere and show up only as nonsense in a UI. This prose once described the
3042
+ /// row as a positional 4-tuple and readers duly destructured it as one — the same bug, twice.
3043
+ /// `agentPurgeLog` really is a 4-tuple in stable state; the SERVED shape is not, and that seam is
3044
+ /// where the mistake starts.
3045
+ ///
3046
+ /// resetEngram HARD-DELETES agent records so a purged principal can be invited back. That makes
3047
+ /// the reset a genuine clear rather than a permanent burn — but it also means the `agents` map is
3048
+ /// no longer evidence that a principal ever held access, and the audit chain cannot stand in: it
3049
+ /// is a bounded ring that trims its oldest entries, so agent.pair rows are evicted over an engram's
3050
+ /// life. This is that evidence, and it is why the tombstone is written rather than the roster
3051
+ /// simply dropped.
3052
+ ///
3053
+ /// Owner-gated, and a refusal comes back as an `Err` VALUE that names this method (`gatedResult`),
3054
+ /// never as an empty page: an empty list must mean "no reset has removed an agent", never "you may
3055
+ /// not ask". On an evidence trail those are not close.
3056
+ ///
3207
3057
  /// RENAMED from `getOperatorPurgeLog` (a `get*` returns one value, a `list*` returns a Page —
3208
3058
  /// the old name promised a scalar and delivered an array).
3209
3059
  ///
3210
- /// Refusal reason preserved: an empty list must mean "no reset has removed an agent", never
3211
- /// "you may not ask". On an evidence trail those are not close.
3212
- ///
3213
- /// Named record, not a 4-tuple. Both Ints are timestamps and were positionally indistinguishable
3214
- /// at the client — swapping registeredAt and purgedAt would have type-checked everywhere and been
3215
- /// visible only as nonsense in a UI.
3216
- ///
3217
- /// ⟨2026-09-29, the finding that an ending the registry missed is kept and re-sent⟩ Each row now also
3218
- /// carries the agent's `root`, the `invite` its enrolment named, and `ended` — why and on what day
3219
- /// its engagement ended (its own earlier ending, or the reset) — the facts `resyncAgentEdges`
3220
- /// re-sends. The stored rows are served as they are.
3221
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
3222
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
3060
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
3061
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
3223
3062
  listPurgedAgents: (start: nat, limit: nat) -> (Result_35) query;
3224
- /// ⟨0.16.0⟩ ONE ACCESSOR, folding `readReadLog` and `getDenialLog` — and the fold only became
3225
- /// safe because of a change made earlier in this same leg.
3226
- ///
3227
- /// They were two methods over the SAME log behind the SAME gate. `getDenialLog`'s own declaration
3228
- /// explained why the split existed: nothing published this log's head, so a client could only
3229
- /// reach the OLDEST retained entries, and a "recent refusals" band built on `readReadLog` would
3230
- /// have rendered the oldest slice of a 10,000-entry ring under those words. That rationale died
3231
- /// when the Page conversion started publishing `total = totalAppended()` — the head is now a fact
3232
- /// a caller can read, so paging backward from it is ordinary arithmetic.
3233
- ///
3234
- /// The 0.16.0 interface plan proposed deleting `readReadLog` outright as a "duplicate accessor". Checked at the
3235
- /// site, that premise was false: `getDenialLog` filtered `not e.success`, so deleting the other
3236
- /// would have removed the only way to read SUCCESSFUL entries — and this ring is overwhelmingly
3237
- /// successful MCP reads. Folded instead, which keeps both capabilities and still ends the pair.
3063
+ /// ONE ACCESSOR over the read log (since 0.16.0, folding `readReadLog` and `getDenialLog`): every
3064
+ /// row, or only successes, or only refusals and failures (`successFilter`).
3065
+ ///
3066
+ /// They were two methods over the SAME log behind the SAME gate. The split existed because nothing
3067
+ /// published this log's head, so a client could only reach the OLDEST retained entries, and a
3068
+ /// "recent refusals" band built on `readReadLog` would have rendered the oldest slice of a
3069
+ /// 10,000-entry ring under those words. The page publishes `total = totalAppended()`, so the head
3070
+ /// is a fact a caller can read, and paging backward from it is ordinary arithmetic. Deleting
3071
+ /// `readReadLog` as a duplicate would have removed the only way to read SUCCESSFUL entries —
3072
+ /// `getDenialLog` filtered `not e.success`, and this ring is overwhelmingly successful MCP reads —
3073
+ /// so the two were folded, which keeps both capabilities. Named `listReadLog`, not
3074
+ /// `listDenialEntries`: a method serving every row must not be named for one half of them.
3238
3075
  ///
3239
3076
  /// ⚠ `limit` IS A SPAN, NOT A ROW COUNT, and the same in both modes: it is how many log ids to
3240
3077
  /// EXAMINE starting at `start`. Unfiltered, items == the entries in that span. Filtered, items is
3241
3078
  /// however many of them matched — fewer, and that is not truncation. This is the one honest
3242
3079
  /// reading, because the alternative (keep scanning until `limit` rows match) hides how far it
3243
- /// looked, which is precisely what `getDenialLog` had to disclose with `scannedFrom`/`more`.
3244
- /// A caller knows exactly which ids were examined: `[start, start + limit)`.
3245
- ///
3246
- /// `earliest` is gone as a field and lost nothing: entries carry their own `id`, so a caller
3247
- /// paging from 0 reads the oldest retained id off the first item. That is the page shape's stated design —
3248
- /// items self-identify — rather than a second number to keep in sync.
3080
+ /// looked. A caller knows exactly which ids were examined: `[start, start + limit)`.
3249
3081
  ///
3250
- /// `withheld` is 0 even when filtering. The filter is CALLER-REQUESTED; `withheld` means rows
3251
- /// POLICY removed. Overloading it would rebuild the ambiguity this campaign exists to remove.
3082
+ /// `withheld` counts BOTH policy-removed and filter-removed rows, so a caller recovers the examined
3083
+ /// span as `items.size() + withheld` — the number a UI needs to say what it actually looked at
3084
+ /// rather than implying it looked at everything. `withheld = 0` beside a filter would be the
3085
+ /// FABRICATED-COMPLETE PAGE, and this is the worst method to have it on: `successFilter = ?false` is
3086
+ /// how a denial band asks "who was refused here", and a short page claiming nothing was withheld
3087
+ /// would say the engram examined this window and found no refusals, when it examined `span` rows of
3088
+ /// which most were successes.
3252
3089
  ///
3253
- /// ⚠ **CORRECTED 2026-08-21, BESIDE the paragraph above because it is what the caller contract
3254
- /// USED to be: THAT RULE WAS REVERSED ON 2026-08-18 AND THIS COMMENT DID NOT FOLLOW.** The body
3255
- /// below computes `withheld = examined.size() - kept.size()`, and its own dated note explains
3256
- /// why: `withheld = 0` beside a filter is the FABRICATED-COMPLETE PAGE, and this is the worst
3257
- /// method in the file to have it on — `successFilter = ?false` is how the denial band asks "who
3258
- /// was refused here", and a short page claiming nothing was withheld says the engram examined
3259
- /// this window and found no refusals, when it examined `span` rows of which most were successes.
3090
+ /// An agent reads only the entries it caused, here as on the chained record — the same `RecordView`
3091
+ /// filter, and `withheld` counts what it removed together with what `successFilter` removed. WHAT
3092
+ /// WOULD MAKE THIS WRONG: see `listAuditEntries`.
3260
3093
  ///
3261
- /// So `withheld` now means BOTH policy-removed and filter-removed rows, and a caller can recover
3262
- /// the examined span as `items.size() + withheld` — which is the successor to the retired
3263
- /// `scannedFrom`/`head` window, and the number a UI needs to say what it actually looked at
3264
- /// rather than implying it looked at everything.
3265
- ///
3266
- /// This mattered beyond the file: doc comments are emitted into `engram.did`, so every SDK and
3267
- /// hand-written client has been reading the pre-fix rule off the interface for three days.
3268
- ///
3269
- /// Named `listReadLog`, not the interface plan's `listDenialEntries`: that name assumed only the denial
3270
- /// half survived. A method serving every row must not be named for one of them.
3094
+ /// There is no `earliest` field, and nothing is lost: entries carry their own `id`, so a caller
3095
+ /// paging from 0 reads the oldest retained id off the first item. Items self-identify, rather than
3096
+ /// a second number to keep in sync.
3271
3097
  ///
3272
3098
  /// Refusal reason preserved from both: this log has NO public counterpart — no certified head to
3273
3099
  /// fall back to — so an empty answer would falsely assert nobody has read this record, and an
3274
3100
  /// empty denial band would assert nobody has ever been refused here.
3275
3101
  ///
3276
- /// WHAT "success = false" MEANS, PRECISELY, kept from getDenialLog because it is easy to misread:
3277
- /// REFUSED-OR-FAILED, not authorization-denied alone. `denied()` writes authz refusals here, and
3278
- /// so do settle failures, webhook auto-disables, expiry sweeps and MCP rate limits. Do not narrow
3279
- /// this to a name it does not carry.
3280
- ///
3281
- /// ⟨2026-09-29, the owner's ruling that an agent reads only the entries it caused⟩ An agent reads only the
3282
- /// entries it caused, here as on the chained record — the same `RecordView` filter, and `withheld` counts what
3283
- /// it removed together with what `successFilter` removed. WHAT WOULD MAKE THIS WRONG: see `listAuditEntries`.
3102
+ /// WHAT "success = false" MEANS, PRECISELY, because it is easy to misread: REFUSED-OR-FAILED, not
3103
+ /// authorization-denied alone. `denied()` writes authz refusals here, and so do settle failures,
3104
+ /// webhook auto-disables, expiry sweeps and MCP rate limits. Do not narrow this to a name it does
3105
+ /// not carry.
3284
3106
  listReadLog: (successFilter: opt bool, start: nat, limit: nat) ->
3285
3107
  (Result_34) query;
3286
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ The owner's notes, oldest first.
3287
- /// Same visibility as `listRepudiations`, for the same reason: the owner and ACTIVE guardians read
3288
- /// the rows; an agent reads only the entries it caused (the owner's ruling of 2026-09-29), and every
3108
+ /// The owner's notes, oldest first. Same visibility as `listRepudiations`, for the same reason: the
3109
+ /// owner and ACTIVE guardians read the rows; an agent reads only the entries it caused, and every
3289
3110
  /// note is the owner's, so an agent gets an empty page whose `withheld` counts the notes in its
3290
- /// window — never "there are none". A stranger, a pending guardian and the anonymous caller are refused.
3111
+ /// window — never "there are none". A stranger, a pending guardian and the anonymous caller are
3112
+ /// refused.
3291
3113
  listRecordNotes: (start: nat, limit: nat) -> (Result_33) query;
3292
- /// Same visibility as listAuditEntries: the owner, this engram's agents, and ACTIVE guardians
3293
- /// see disputes. An unauthorized read REFUSES — it does not return an empty list, because an
3294
- /// empty list reads as "no disputes have been filed", which is a claim, not an absence of one.
3295
- /// RENAMED from `getRepudiations` (a `get*` returns one value, a `list*` a page). Refusal reason preserved:
3296
- /// an empty list would read as "no disputes have been filed" — and a dispute record that can be mistaken for an
3297
- /// absence of disputes is worse than no record at all. Not public by design.
3298
- ///
3299
- /// ⟨CORRECTED 2026-09-29, the owner's ruling that an agent reads only the entries it caused⟩ "Same
3300
- /// visibility as listAuditEntries" still holds, and so the first sentence no longer does: an agent
3301
- /// reads only the record entries it caused, and every dispute here is the owner's own
3302
- /// `memory.repudiate` entry. So the owner and guardians get the rows; an agent gets an empty page
3303
- /// whose `withheld` counts the rows in its window — which says disputes exist without showing them,
3304
- /// never "none have been filed". WHAT WOULD MAKE THIS WRONG: a ruling that an agent may see the
3305
- /// disputes of its own writes; this would then have to look up each disputed version's writer, which
3306
- /// it does not do today.
3114
+ /// The owner and ACTIVE guardians see the disputes. An agent gets an empty page whose `withheld`
3115
+ /// counts the rows in its window — which says disputes exist without showing them, never "none have
3116
+ /// been filed": the visibility is `listAuditEntries`', where an agent reads only the record entries
3117
+ /// it caused, and every dispute here is the owner's own `memory.repudiate` entry. WHAT WOULD MAKE
3118
+ /// THIS WRONG: an agent allowed to see the disputes of its own writes; this would then have to look
3119
+ /// up each disputed version's writer, which it does not do today.
3120
+ ///
3121
+ /// An unauthorized read REFUSES — it does not return an empty list, because an empty list reads as
3122
+ /// "no disputes have been filed", which is a claim, not an absence of one, and a dispute record that
3123
+ /// can be mistaken for an absence of disputes is worse than no record at all. Not public by design.
3124
+ ///
3125
+ /// RENAMED from `getRepudiations` (a `get*` returns one value, a `list*` a page).
3307
3126
  listRepudiations: (start: nat, limit: nat) -> (Result_32) query;
3308
3127
  /// The seller list, a page at a time, as `Types.SellerView` (a raise whose wait is over shown applied;
3309
3128
  /// `liveNow` — false for every row while an engram opened through another has no sign-in seated; what
@@ -3312,44 +3131,44 @@ type Engram =
3312
3131
  /// which would read as "no sellers". A QUERY: the refusal is in the reply, not the denial log.
3313
3132
  /// Named callers: an owner console's seller list.
3314
3133
  listSellers: (start: nat, limit: nat) -> (Result_31) query;
3315
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ OWNER-ONLY: the sign-ins, each
3316
- /// with the name its app registered. The same tokens, in the same order and paged the same way, as
3317
- /// `listBearerTokens`, each beside `clientName` — the RFC 7591 `client_name` the app registered when
3318
- /// the token was issued (`People.SignIn` says when it is null, and that it is the app's own claim). A phone
3319
- /// owner read "localhost" for every app signed in through a local bridge and could not tell two
3320
- /// apps apart. A NEW method rather than a field on `BearerToken`: that record is stored (M0170)
3321
- /// and `listBearerTokens`' reply is shipped (never widened). An agent, a guardian, a stranger and
3322
- /// the anonymous caller are refused, by `listBearerTokens`' own gate and for its reason.
3323
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
3324
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
3134
+ /// OWNER-ONLY: the sign-ins, each with the name its app registered. The same tokens, in the same
3135
+ /// order and paged the same way, as `listBearerTokens`, each beside `clientName` — the RFC 7591
3136
+ /// `client_name` the app registered when the token was issued (`People.SignIn` says when it is null,
3137
+ /// and that it is the app's own claim). A phone owner read "localhost" for every app signed in
3138
+ /// through a local bridge and could not tell two apps apart. A NEW method rather than a field on
3139
+ /// `BearerToken`: that record is stored (M0170) and `listBearerTokens`' reply is shipped (never
3140
+ /// widened). An agent, a guardian, a stranger and the anonymous caller are refused, by
3141
+ /// `listBearerTokens`' own gate and for its reason.
3142
+ /// Also readable by the seated sign-in of an engram opened through another, acting as the owner
3143
+ /// (`#ownerOrSignIn`); on a first engram only the owner reads it.
3325
3144
  listSignIns: (start: nat, limit: nat) -> (Result_30) query;
3326
3145
  /// Owner: advance the review cursor — "I have seen everything up to and including uptoAuditId"
3327
3146
  /// (null = everything at the current head). Bounded so the attestation can never cover entries
3328
- /// the console did not render; clamped monotonic (the cursor never moves backward) and to the
3147
+ /// the app did not render; clamped monotonic (the cursor never moves backward) and to the
3329
3148
  /// current head (never attests the future). Logged, so the review itself is part of the record.
3330
3149
  ///
3331
3150
  /// Deliberately filter-agnostic: the cursor is a plain audit id in the CHAINED log's one id space
3332
3151
  /// (every family qualifiesForReview admits is written to auditLogger, so they share that space),
3333
3152
  /// and this never inspects an operation or a role. Widening what the review shows therefore
3334
- /// changes only which ids the console can pass here — it cannot desynchronise the cursor.
3153
+ /// changes only which ids the app can pass here — it cannot desynchronise the cursor.
3335
3154
  markAgentWritesReviewed: (uptoAuditId: opt nat) -> (Result_15);
3336
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ AN AGENT READS ITS OWN GRANT —
3337
- /// to the calling key only (`People.AgentGrant`): what it may read, where it may write, its rate, and
3338
- /// the payment limits enforced against that key. It reveals nothing a refusal does not already say,
3339
- /// and lets an agent correct itself before it writes rather than after the owner explains a refusal by
3340
- /// hand. `getSpendPolicy` and `listAgents` stay owner-only; this answers one row, the caller's.
3155
+ /// AN AGENT READS ITS OWN GRANT — to the calling key only (`People.AgentGrant`): what it may read,
3156
+ /// where it may write, its rate, and the payment limits enforced against that key. It reveals
3157
+ /// nothing a refusal does not already say, and lets an agent correct itself before it writes rather
3158
+ /// than after the owner explains a refusal by hand. `getSpendPolicy` and `listAgents` stay
3159
+ /// owner-only; this answers one row, the caller's.
3341
3160
  ///
3342
3161
  /// WHO: an ACTIVE agent (`Gated.authorize(#agentOrOwner)`). Refused, each by its own text: the
3343
3162
  /// owner by name (`People.OWNER_HAS_NO_GRANT`), a revoked or resigned agent ("Agent is revoked" /
3344
3163
  /// "Agent has resigned" — an ended agent may do nothing, and its old grant would read as powers),
3345
3164
  /// a guardian and a stranger ("Not authorized"), the anonymous caller. A query: it writes nothing.
3346
3165
  ///
3347
- /// ⟨2026-10-29, the owner's ruling that an agent's grant read tells the truth about paying⟩ It also says
3348
- /// whether the payments brake is on and what the key could pay now (`paymentsFrozen`, `paymentsNow`), read from
3349
- /// the values `x402SignFor` checks — the brake, the key's policy and stored total, the engram-wide ceiling and
3350
- /// total — so the caps alone no longer read as money an agent can spend. `People.SpendState` names each one.
3351
- /// ⟨2026-10-29, a review finding⟩ And which whole-key refusal stops every payment now, if one does
3352
- /// (`paymentsStoppedBy`: the brake, the signing floor, the daily count of payment signatures).
3166
+ /// It also tells the truth about paying: whether the payments brake is on and what the key could
3167
+ /// pay now (`paymentsFrozen`, `paymentsNow`), read from the values `x402SignFor` checks — the brake,
3168
+ /// the key's policy and stored total, the engram-wide ceiling and total — so the caps alone do not
3169
+ /// read as money an agent can spend. `People.SpendState` names each one. And which whole-key refusal
3170
+ /// stops every payment now, if one does (`paymentsStoppedBy`: the brake, the signing floor, the daily
3171
+ /// count of payment signatures).
3353
3172
  myGrant: () -> (Result_29) query;
3354
3173
  /// The AGENT's current key nominates the key that will replace it. Nothing moves yet: the new
3355
3174
  /// key must accept, by its own call, within 24 hours (`acceptAgentKeyNomination`). One pending
@@ -3368,43 +3187,34 @@ type Engram =
3368
3187
  /// ORDER, with no await before the allowance is taken: the caller is an active agent; there is a
3369
3188
  /// registry; payments are not frozen (opening sends this engram's cycles out of it, and a freeze is
3370
3189
  /// the brake a guardian holds over resources leaving); the balance carries the attachment above this
3371
- /// engram's own reserve; then one opening is TAKEN from the agent's allowance in this message, and only
3372
- /// then is the registry called. If the registry refuses or cannot be reached, the opening is GIVEN
3373
- /// BACK (one added to the current count) and the cycles the call did not use come back by the
3374
- /// network's refund. Every outcome is written to the record under `agent.openChild` in the message
3190
+ /// engram's own reserve; then one opening is TAKEN from the agent's allowance in this message, and
3191
+ /// only then is the registry called. The opening is GIVEN BACK only when the WHOLE attachment came
3192
+ /// back as the call's refund (the registry refused, or could not be reached, and accepted none of
3193
+ /// it) and the owner has not set this agent's count since the take (`ChildAllowance.settle`). A
3194
+ /// refusal after the registry accepted the cycles (the template would not install, or the key came
3195
+ /// to own an engram meanwhile) leaves the 1.3 T in a canister the agent's key owns, so that opening
3196
+ /// is spent and the reply says so: giving it back would let an allowance of 1 drain this engram
3197
+ /// 1.3 T per call. Every outcome is written to the record under `agent.openChild` in the message
3375
3198
  /// that hears the registry's answer, before the reply — in the alerts' money class.
3376
3199
  ///
3377
- /// ⟨CORRECTED 2026-10-01, two review findings — the sentence "If the registry refuses or cannot be
3378
- /// reached, the opening is GIVEN BACK" above is what was first built.⟩ The opening is given back only
3379
- /// when the WHOLE attachment came back as the call's refund (the registry accepted none of it) and
3380
- /// the owner has not set this agent's count since the take (`ChildAllowance.settle`). A refusal after
3381
- /// the registry accepted the cycles (the template would not install, or the key came to own an
3382
- /// engram meanwhile) leaves the 1.3 T in a canister the agent's key controls; giving the opening back
3383
- /// then let an allowance of 1 drain this engram 1.3 T per call. Now that opening is spent and the
3384
- /// reply says so.
3385
- ///
3386
3200
  /// WHAT WOULD MAKE THIS WRONG: an await added between `ChildAllowance.take` and the registry call; the
3387
3201
  /// registry's `CHILD_MIN_ATTACHED_CYCLES` moving without `CHILD_ATTACH_CYCLES`.
3388
3202
  ///
3389
- /// ⟨2026-11-02, the owner's ruling to take the recommended answers (the child build's sign-in step)⟩ THE
3390
- /// SIGN-IN. `signIn` names the opened engram's sign-in — the person running the agent, on a second
3391
- /// credential; null opens it with none, and it then keeps small limits for life. It goes to the
3392
- /// registry's door and from there into the opened engram's init record, so that engram never runs a
3393
- /// message without it. Refused here first, with no await and before the allowance is taken, by the
3394
- /// door's own three rules (`OwnerSignIn.candidateRefusal`): the agent's lasting key itself, the
3395
- /// anonymous principal, a canister — so the agent sees the refusal before any cycles move. The
3396
- /// record entry says `signIn=set` or `signIn=none`, never the principal.
3397
- /// ⟨2026-11-02, the review of the child build's sign-in step, beside the above⟩ And a fourth, the
3398
- /// door's own: the key this call is signed by — the agent's session key — is refused as the sign-in too
3399
- /// (`OwnerSignIn.agentKeyRefusal`), at the same place.
3400
- ///
3401
- /// ⟨2026-11-02, the child build's sign-in step — RENAMED from `openChildEngram`, beside the paragraphs
3402
- /// above, which describe the same door⟩ It was `openChildEngram()`, with no argument. A second
3403
- /// positional argument would grow its argument tuple, and a shipped tuple is frozen (evolution
3404
- /// happens inside records), so the door takes ONE record whose later fields are optional, under a
3405
- /// new name — the shape the registry's own door took the same day (`sysSpawnChild` →
3406
- /// `sysOpenChild`). An rc.21 kit calling the old name is rejected
3407
- /// (IC0536) with nothing spent; it can never open an engram without a sign-in by accident.
3203
+ /// THE SIGN-IN. `signIn` names the opened engram's sign-in — the person running the agent, on a
3204
+ /// second credential; null opens it with none, and it then keeps small limits for life. It goes to
3205
+ /// the registry's door and from there into the opened engram's init record, so that engram never
3206
+ /// runs a message without it. Refused here first, with no await and before the allowance is taken,
3207
+ /// so the agent sees the refusal before any cycles move: by the door's own three rules
3208
+ /// (`OwnerSignIn.candidateRefusal`) — the agent's lasting key itself, the anonymous principal, a
3209
+ /// canister — and the key this call is signed by, the agent's session key
3210
+ /// (`OwnerSignIn.agentKeyRefusal`). The record entry says `signIn=set` or `signIn=none`, never the
3211
+ /// principal.
3212
+ ///
3213
+ /// ONE RECORD ARGUMENT. It was `openChildEngram()`, with no argument. A second positional argument
3214
+ /// would grow its argument tuple, and a shipped tuple is frozen (evolution happens inside records),
3215
+ /// so the door takes ONE record whose later fields are optional, under a new name — the shape the
3216
+ /// registry's own door took (`sysSpawnChild` → `sysOpenChild`). An older kit calling the old name is
3217
+ /// rejected (IC0536) with nothing spent; it can never open an engram without a sign-in by accident.
3408
3218
  /// Named caller: the owner kit's `open-engram` command, signed by the agent's session key.
3409
3219
  openChild: (req: record {signIn: opt principal;}) -> (Result_28);
3410
3220
  openSession: (config: SessionConfig, sig: PaymentSignature) -> (Result_27);
@@ -3415,28 +3225,6 @@ type Engram =
3415
3225
  /// Guardian freeze only blocks agent/public operations.
3416
3226
  ownerWithdraw: (amount: TokenAmount, ownerAuth: opt ActionAuth) ->
3417
3227
  (Result_15);
3418
- /// ⟨0.16.0⟩ `payRentFromEarnings` DELETED — ruled TWICE (commerce moved to the market; rent is the
3419
- /// biller's), and it was the single clearest case in this repository of the engram reaching into a
3420
- /// deployment's billing canister.
3421
- ///
3422
- /// It hand-declared four biller methods inline, read `getFeeSchedule`, computed
3423
- /// `priceE6 = rentUsdE6PerEngramYear * months / 12`, and deposited `priceE6 + 3 * CKUSDC_FEE`
3424
- /// under a comment explaining that three is "the three token fees the cashier's rail spends" —
3425
- /// a PUBLIC canister hardcoding how many ledger fees a PRIVATE one consumes internally. Any
3426
- /// change to the biller's rail silently mispriced this call.
3427
- ///
3428
- /// It also carried the only RE-ENTRANT cross-canister chain in the system: engram →
3429
- /// cashier.payRentWithStablecoin → (registry, ledger, CMC …) → back into the SAME engram's
3430
- /// sysRecordFeeEvent while the originating message was still suspended, both writing the same audit
3431
- /// ring, with no lock.
3432
- ///
3433
- /// Rent is the biller's entirely. Owners pay through the biller's rails; the engram keeps
3434
- /// append-only receipts and no fee math.
3435
- /// ⟨0.16.0, refusals are values — ruled in the 0.16.0 interface plan⟩ THE ONE-SHOT ARM. Re-redemption is
3436
- /// `#Err(#Conflict)`, named in the interface plan's entry for this method, and it is the arm the
3437
- /// whole guard exists to express: this principal HAS held agent access, and no code will give it
3438
- /// back. A caller reading `#Conflict` knows to pair a fresh key; a caller reading `#Refused` would
3439
- /// keep presenting the same identity, which is exactly the loop the one-shot rule was written to stop.
3440
3228
  /// Redeem an invite code minted by `createAgentInvite`. The CALLER becomes the agent, so
3441
3229
  /// redeem from the wallet that will do the work.
3442
3230
  ///
@@ -3446,39 +3234,43 @@ type Engram =
3446
3234
  /// agent's permissions the owner uses `setAgentPermissions`; this method is only ever the
3447
3235
  /// first admission of a principal.
3448
3236
  ///
3237
+ /// THE ONE-SHOT ARM. Re-redemption is `#Err(#Conflict)`, and it is the arm the whole guard exists
3238
+ /// to express: this principal HAS held agent access, and no code will give it back. A caller
3239
+ /// reading `#Conflict` knows to pair a fresh key; a caller reading `#Refused` would keep presenting
3240
+ /// the same identity, which is exactly the loop the one-shot rule was written to stop.
3241
+ ///
3449
3242
  /// A GUARDIAN cannot redeem one either. A guardian is an independent check on agents, so one
3450
3243
  /// wallet must not hold both roles — use a separate wallet.
3451
3244
  ///
3452
3245
  /// Anonymous callers are refused, and every refusal above is recorded in the denial log.
3453
3246
  ///
3454
- /// ⟨RESHAPED 2026-09-28, owner decision: one lasting identity per agent — one root key per agent,
3455
- /// with an enrolled key per client⟩ The argument is one record: the invite `code` and an
3456
- /// `enrolment` statement signed by the agent's ROOT key naming this engram, the calling key and
3457
- /// this code (`Enrolment.verify`). The root is stored on the record and is what the registry keeps
3458
- /// the track record under. REQUIRED, not optional: every engram launches on this code (the
3459
- /// building-phase rule, 2026-09-27), so there is no key without a root and no second path for one.
3460
- /// Two more refusals, each leaving the invite unconsumed: a statement that does not verify, and a
3461
- /// root that already holds an ACTIVE key here (`Enrolment.activeKeyOf` — one active key per agent
3462
- /// per engram). The one-shot rule and the five-active cap are unchanged and still read the KEY.
3463
- /// ⟨CORRECTED 2026-09-29, the cycle-drain hole measured that day⟩ "each leaving the invite
3464
- /// unconsumed" holds only until the invite's fifth failed statement check: every failed check
3465
- /// counts against the invite whoever sends it, the fifth voids it (the refusal says so, and the
3466
- /// record gets `agent.invite.void`), and after that every attempt with it is refused
3467
- /// `#Conflict` before any check is made (`InviteFailures`).
3468
- ///
3469
- /// ⟨RESHAPED 2026-09-29, a review finding⟩ The reply is `Types.Pairing`: the agent
3470
- /// record AND `trackRecord`, which says plainly when the registry refused or failed to record the
3471
- /// engagement on the agent's track record, and what to do. Before, the reply was `#Ok` with the
3472
- /// record alone even when the registry had refused the start, so the agent was never told.
3247
+ /// ONE LASTING IDENTITY PER AGENT — one root key per agent, with an enrolled key per client. The
3248
+ /// argument is one record: the invite `code` and an `enrolment` statement signed by the agent's
3249
+ /// ROOT key naming this engram, the calling key and this code (`Enrolment.verify`). The root is
3250
+ /// stored on the record and is what the registry keeps the track record under. REQUIRED, not
3251
+ /// optional, so there is no key without a root and no second path for one. Two more refusals: a
3252
+ /// statement that does not verify, and a root that already holds an ACTIVE key here
3253
+ /// (`Enrolment.activeKeyOf` — one active key per agent per engram). Each leaves the invite
3254
+ /// unconsumed until the invite's fifth failed statement check: every failed check counts against
3255
+ /// the invite whoever sends it, the fifth voids it (the refusal says so, and the record gets
3256
+ /// `agent.invite.void`), and after that every attempt with it is refused `#Conflict` before any
3257
+ /// check is made (`InviteFailures`) — a check costs this engram cycles, and without the cap anyone
3258
+ /// holding the code could keep it costing. The one-shot rule and the five-active cap still read
3259
+ /// the KEY.
3260
+ ///
3261
+ /// The reply is `Types.Pairing`: the agent record AND `trackRecord`, which says plainly when the
3262
+ /// registry refused or failed to record the engagement on the agent's track record, and what to
3263
+ /// do. A bare `#Ok` with the record alone would leave the agent untold when the registry had
3264
+ /// refused the start.
3473
3265
  pairAgent: (arg: record {
3474
3266
  code: text;
3475
3267
  enrolment: Enrolment;
3476
3268
  }) -> (Result_26);
3477
- /// ⟨0.16.0, same concept, same name — renamed from `guardianPauseWrites`⟩ Same correction as freezePayments above:
3478
- /// owner-or-guardian, and `resumeWrites` never carried the prefix either.
3269
+ /// The writes brake. It was `guardianPauseWrites` before 0.16.0; the prefix went for the reason
3270
+ /// `freezePayments` gives: owner-or-guardian, and `resumeWrites` never carried the prefix either.
3479
3271
  pauseWrites: () -> (Result_2);
3480
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ `pauseWrites` with a reason; everything said of
3481
- /// `freezePaymentsWithReason` holds, with `canPauseWrites` as the guardian's grant.
3272
+ /// `pauseWrites` with a reason; everything said of `freezePaymentsWithReason` holds, with
3273
+ /// `canPauseWrites` as the guardian's grant.
3482
3274
  pauseWritesWithReason: (reason: text) -> (Result_2);
3483
3275
  /// Plan the same visible session page, filtering, order and slice used by session helpers.
3484
3276
  /// The SDK executes the returned individual/cache or batch reads with its own decryption key;
@@ -3512,29 +3304,23 @@ type Engram =
3512
3304
  /// minimum and per-call cost BEFORE signing anything, and gating the quote behind a role would
3513
3305
  /// mean the only way to learn this engram's price is to already be permitted to pay it.
3514
3306
  ///
3515
- /// ⟨CORRECTED 2026-08-24 — this said "⟨update-for-read⟩ UPDATE, NOT QUERY" and cited a market ruling that
3516
- /// the 2026-08-24 quote-convention ruling had already closed.⟩ QUERY, per the ruled quote convention: FAST READS. Both
3517
- /// `quotePayment` and `previewOpenSession` become queries, and the update-for-read rule's open-ruling exception
3518
- /// retires with them — so the argument written here for keeping it an update was arguing the
3519
- /// losing side of a decision already made, and was added the same day by not reading forward
3520
- /// to the ruling. `gate.offerSession` is pure — it validates the intent and returns it — so
3521
- /// nothing forced the update in the first place.
3522
- ///
3523
- /// ONE-REPLICA CAVEAT, stated here because the ruling requires it at both sites: a query is one
3524
- /// replica's word and is NOT a settleable challenge. Nothing quoted here can be redeemed. The
3525
- /// commitment happens in `openSession`, which IS a certified update call, and a buyer who needs
3526
- /// the price attested rather than quoted takes it from that reply.
3527
- ///
3528
- /// ⟨RESTORED 2026-08-24, the owner's ruling to build the paid-session seam⟩ Named to match the
3529
- /// market's, because it is the same act against a different seller and a reader comparing the two
3530
- /// should not have to learn two verbs for it.
3531
- ///
3532
- /// ⟨2026-10-02⟩ Answers the house `Types.SessionIntent` — ic402's intent with `expiry` spelled
3533
- /// `expiryNs`. Same value, same meaning; only the name carries the unit now.
3307
+ /// QUERY, like the market's quotes: quotes are fast reads. `gate.offerSession` is pure — it
3308
+ /// validates the intent and returns it — so nothing forces an update.
3309
+ ///
3310
+ /// ONE-REPLICA CAVEAT, stated at both quote sites: a query is one replica's word and is NOT a
3311
+ /// settleable challenge. Nothing quoted here can be redeemed. The commitment happens in
3312
+ /// `openSession`, which IS a certified update call, and a buyer who needs the price attested
3313
+ /// rather than quoted takes it from that reply.
3314
+ ///
3315
+ /// Named to match the market's, because it is the same act against a different seller and a reader
3316
+ /// comparing the two should not have to learn two verbs for it.
3317
+ ///
3318
+ /// Answers the engram's own `Types.SessionIntent` — ic402's intent with `expiry` spelled
3319
+ /// `expiryNs`. Same value, same meaning; only the name carries the unit.
3534
3320
  previewOpenSession: () -> (SessionIntent) query;
3535
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes: a trim preview⟩ What a PROPOSED history policy
3536
- /// would remove from the store as it stands — "about N old copies in F files would be removed" —
3537
- /// asked BEFORE the owner saves it. A query: nothing is saved, armed or evicted.
3321
+ /// What a PROPOSED history policy would remove from the store as it stands — "about N old copies in
3322
+ /// F files would be removed" — asked BEFORE the owner saves it. A query: nothing is saved, armed or
3323
+ /// evicted.
3538
3324
  ///
3539
3325
  /// WHO: the OWNER only (`#ownerOnly`). An agent, a guardian, a stranger and the anonymous caller
3540
3326
  /// are each refused with `requireOwner`'s words; the setter it previews is owner-only too.
@@ -3549,8 +3335,8 @@ type Engram =
3549
3335
  /// takes effect change it.
3550
3336
  /// HONEST WHEN CUT SHORT: `complete = false` when the planning budget
3551
3337
  /// (`MemoryRouter.PREVIEW_MAX_DROPS`) ran out — the totals are then a floor, and say so.
3552
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
3553
- /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
3338
+ /// Also callable by the seated sign-in of an engram opened through another, acting as the owner
3339
+ /// (`#ownerOrSignIn`); on a first engram only the owner.
3554
3340
  previewRetention: (entries: vec record {
3555
3341
  text;
3556
3342
  RetentionClassSpec;
@@ -3573,7 +3359,7 @@ type Engram =
3573
3359
  /// Read many paths in one call. Per-path Results are KEPT — partial success is the point, and
3574
3360
  /// one unreadable path must not fail the other nine.
3575
3361
  ///
3576
- /// ⟨0.16.0⟩ The OUTER envelope is new, and it fixes two ways this used to answer dishonestly:
3362
+ /// The OUTER envelope (since 0.16.0) fixes two ways this used to answer dishonestly:
3577
3363
  ///
3578
3364
  /// · Over the path cap it returned `[("", #Err(#Invalid …))]` — ONE row, for a path the caller
3579
3365
  /// never asked about. A consumer looping rows saw a result for the empty path and no result
@@ -3586,9 +3372,6 @@ type Engram =
3586
3372
  /// path, each with its own Result — a refused RESERVED path sits beside a readable one, which is
3587
3373
  /// a genuine per-path fact.
3588
3374
  readMemoryBatch: (paths: vec text) -> (Result_22) query;
3589
- /// ⟨0.16.0⟩ `getMemoryRetentionGuards` DELETED — folded into `getMemoryRetentionPolicy` above.
3590
- /// It was the second array-returning `get*` (a `get*` returns one value), and separating it from the
3591
- /// policy it modifies was the defect described there. Its own docs are preserved at the fold site.
3592
3375
  /// One page of a file's content — the paged read the whole-file surfaces point at.
3593
3376
  ///
3594
3377
  /// `version = null` reads the live file; a version reads that version as it was recorded.
@@ -3597,80 +3380,55 @@ type Engram =
3597
3380
  /// reintroduced. Loop while `more` is true, advancing by the bytes actually returned.
3598
3381
  readMemoryBytes: (path: text, offset: nat, len: nat, version: opt nat) ->
3599
3382
  (Result_21) query;
3600
- /// The escrow exit for a session whose settle cannot pay.
3383
+ /// The escrow exit for a session whose refund could not be paid.
3601
3384
  ///
3602
3385
  /// PAYER-ONLY, enforced inside the gateway, and deliberately not owner-triggered: the payer's own
3603
3386
  /// deposit is the only thing here, so making them wait for anyone else would be a worse rail than
3604
3387
  /// the one this replaces. (The market's twin is admin-triggered because a marketplace session has
3605
3388
  /// a counterparty; a memory session does not.)
3606
3389
  ///
3607
- /// WHY IT IS NEEDED AT ALL: `closeSessionInternal` settles only when
3608
- /// `deposited >= consumed + fee`, and vouchers may consume up to the full deposit — so a payer
3609
- /// who spends their whole budget makes their own session unsettleable, with no adversary
3610
- /// involved. Before this, the refusal text told them to call `recoverEscrow`, which existed on no
3611
- /// canister they could reach. The spend ceiling caps consumable spend so ordinary use cannot reach that state;
3612
- /// this is the way back for a session that already has.
3613
- ///
3614
- /// ⟨CORRECTION 2026-09-30, beside the paragraph above and the first line⟩ No longer true. ic402
3615
- /// 2.17.0's `closeSessionInternal` settles `min(consumed, deposited − fee)` and skips a refund of
3616
- /// zero, so a session spent to its whole budget still closes, and under the one-fee reserve a clean
3617
- /// close leaves the escrow holding nothing or less than one fee, which no transfer can move. The
3618
- /// way back is for a REFUND LEG THAT FAILED (a transient ledger error): the settle went through,
3619
- /// ic402 marks the session closed, and the remainder stays in escrow until the payer calls this.
3620
- /// A failed settle is not this method's case: ic402 puts that session back to open, where this
3621
- /// method refuses, and the close is retried instead. WHAT WOULD MAKE THIS WRONG: an ic402 whose
3622
- /// close stops capping the settle, or a live ckUSDC fee above `Env.CKUSDC_FEE`.
3623
- ///
3624
- /// ckUSDC only — an engram session's intent names `Env.CKUSDC_LEDGER` and nothing else, so there
3625
- /// is no token to choose and no wrong one to pass.
3626
- ///
3627
- /// ⟨2026-10-02, decided — the twin divergence is deliberate⟩ The market's `recoverEscrow` takes
3628
- /// `Wire.TokenAmount`; this one takes a bare `nat`, and the two stay different on purpose. The
3629
- /// market escrows more than one token, so the amount has to say which; this engram's sessions
3630
- /// escrow ckUSDC only, and a `TokenAmount` here would make an `#Icp` amount representable and then
3631
- /// refuse it at runtime — the argument `convertEarningsToCycles` makes. What changed is the NAME:
3632
- /// `amountE6`, ckUSDC base units. Candid passes arguments by position, so nothing on the wire moved.
3633
- ///
3634
- /// ⚠ `#Conflict` HERE ALSO COVERS "NOT THE SESSION'S PAYER". ⟨2026-10-02, audited at this site⟩
3635
- /// The payer check is ic402's (`recoverEscrow` authorizes `caller == session.payer`), and the
3636
- /// library answers every refusal down one text channel, so "Not authorized: only session payer can
3637
- /// recover escrow" arrives as `#Conflict`, beside the state refusals (an open session, nothing to
3638
- /// recover, no such session). Read the MESSAGE, not the arm. This is the 0.16.0 contract as
3639
- /// ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut dependency
3640
- /// work. (The payments-frozen refusal in the body is this engram's own, and is state.)
3641
- ///
3642
- /// ⟨2026-10-05, ic402 2.17.3 — beside the list above⟩ A fourth state refusal: a session that reads
3643
- /// `closing` or `expired`, whose close has not finished. Escrow comes back only from a session that
3644
- /// reads `closed`, and the refusal moves nothing. A close that stopped part-way (its refund call
3645
- /// rejected, or a trap) leaves the session reading `closing`, and no method on this engram moves it.
3646
- ///
3647
- /// ⟨2026-10-05, later — ic402 2.17.4, beside the line above, whose first case 2.17.4 removed⟩ A
3648
- /// refund call the ledger REJECTS no longer leaves the session reading `closing`: the close ends it
3649
- /// `closed`, as it does a refund the ledger refuses, and this method returns what is left in its
3650
- /// escrow for 24 hours from that close. Ask for at most the escrow's ledger balance less one fee;
3651
- /// the transfer pays its own fee from the escrow. A session still reads `closing` only when its
3652
- /// close trapped after one of its awaits, or an earlier version left it there, and of that one the
3653
- /// line above still holds.
3654
- ///
3655
- /// ⟨2026-10-07, the owner's decision of that day⟩ WHAT IT ANSWERS: what came back. `amountE6` is
3656
- /// the ckUSDC base units transferred to the payer's own account (the amount asked, capped at the
3657
- /// session's unconsumed deposit; the transfer's fee comes out of the escrow on top), and
3658
- /// `blockIndex` is the ledger block of that transfer. Until this date it answered a bare `nat` that
3659
- /// was the block index alone, which read as the amount. If the session's record is removed before
3660
- /// the amount can be read back — a session closed in the same moment as the recovery and cleaned up
3661
- /// during its transfer — it answers `#Other` naming the block, never a guessed amount.
3662
- ///
3663
- /// ⟨2026-11-18, ic402 2.22.0, beside the two paragraphs above⟩ A recovery is also capped at what the
3664
- /// session's close recorded as still owed to the payer, less one ledger fee, and lowers that record by
3665
- /// what it paid. So asking for everything returns what the escrow can pay, and `amountE6` says how
3666
- /// much. A session with no such record (its close refunded in full, or it was recovered already) is
3667
- /// refused: "Nothing is owed on this session…". One recovery of a session runs at a time.
3668
- ///
3669
- /// ⟨2026-11-19, ic402 2.23.0, beside the paragraphs above⟩ `amountE6` is now the library's own figure for
3670
- /// what it paid, from its receipt. The `#Other` answer for a record removed during the transfer no longer
3671
- /// occurs.
3390
+ /// WHEN IT IS NEEDED: for a REFUND LEG THAT FAILED — a transient ledger error, or a refund the
3391
+ /// ledger refused or rejected. The settle went through, ic402 marks the session `closed`, and the
3392
+ /// remainder stays in escrow; this method returns it for 24 hours from that close. A session spent
3393
+ /// to its whole budget still closes cleanly — ic402 settles `min(consumed, deposited − fee)` and
3394
+ /// skips a refund of zero — and under the one-fee reserve a clean close leaves the escrow holding
3395
+ /// nothing or less than one fee, which no transfer can move. A failed settle is not this method's
3396
+ /// case: ic402 puts that session back to open, where this method refuses, and the close is retried
3397
+ /// instead. Escrow comes back only from a session that reads `closed`; one that reads `closing` or
3398
+ /// `expired` (its close has not finished) is refused and nothing moves. A session still reads
3399
+ /// `closing` only when its close trapped after one of its awaits, and no method on this engram moves
3400
+ /// it. WHAT WOULD MAKE THIS WRONG: an ic402 whose close stops capping the settle, or a live ckUSDC
3401
+ /// fee above `Env.CKUSDC_FEE`.
3402
+ ///
3403
+ /// HOW MUCH: ask for at most the escrow's ledger balance less one fee; the transfer pays its own
3404
+ /// fee from the escrow. A recovery is capped at the session's unconsumed deposit and at what the
3405
+ /// session's close recorded as still owed to the payer, less one ledger fee, and lowers that record
3406
+ /// by what it paid — so asking for everything returns what the escrow can pay. A session with no
3407
+ /// such record (its close refunded in full, or it was recovered already) is refused: "Nothing is
3408
+ /// owed on this session…". One recovery of a session runs at a time.
3409
+ ///
3410
+ /// WHAT IT ANSWERS: what came back. `amountE6` is the library's own figure, from its receipt, for
3411
+ /// the ckUSDC base units transferred to the payer's own account, and `blockIndex` is the ledger
3412
+ /// block of that transfer. (A bare block index, which an earlier version answered, read as the
3413
+ /// amount.)
3414
+ ///
3415
+ /// ckUSDC only — an engram session's intent names `Env.CKUSDC_LEDGER` and nothing else, so there is
3416
+ /// no token to choose and no wrong one to pass. So the amount is a bare `nat` (`amountE6`, ckUSDC
3417
+ /// base units), unlike the market's `recoverEscrow`, which takes `Wire.TokenAmount`, on purpose: the
3418
+ /// market escrows more than one token, so the amount has to say which; a `TokenAmount` here would
3419
+ /// make an `#Icp` amount representable and then refuse it at runtime — the argument
3420
+ /// `convertEarningsToCycles` makes.
3421
+ ///
3422
+ /// ⚠ `#Conflict` HERE ALSO COVERS "NOT THE SESSION'S PAYER". The payer check is ic402's
3423
+ /// (`recoverEscrow` authorizes `caller == session.payer`), and the library answers every refusal
3424
+ /// down one text channel, so "Not authorized: only session payer can recover escrow" arrives as
3425
+ /// `#Conflict`, beside the state refusals (a session that is not `closed`, nothing owed or nothing
3426
+ /// to recover, no such session). Read the MESSAGE, not the arm; one arm per kind of refusal needs
3427
+ /// the library to carry them. (The payments-frozen refusal in the body is this engram's own, and
3428
+ /// is state.)
3672
3429
  recoverEscrow: (sessionId: text, amountE6: nat) -> (Result_20);
3673
- /// ⟨0.16.0, refusals are values, never traps⟩ A REDEMPTION PATH, where the arm choice is a disclosure decision.
3430
+ /// A REDEMPTION PATH (refusals are values, never traps), where the arm choice is a disclosure
3431
+ /// decision.
3674
3432
  ///
3675
3433
  /// Four of these refusals are about the CODE and one is about the caller. The code arms restate
3676
3434
  /// exactly what the text already said — an unknown code is `#NotFound`, a used or expired one is
@@ -3679,10 +3437,10 @@ type Engram =
3679
3437
  /// capacity) rather than `#Unavailable`: nothing failed, and the caller's own recent behaviour is
3680
3438
  /// what closed the door, so "try again" is true only after the stated wait.
3681
3439
  ///
3682
- /// ⟨2026-10-02⟩ Answers the `GuardianRecord` it created — `#Pending` until the owner approves —
3683
- /// rather than `()`. The new guardian learns, in the same reply, the name and permissions the
3684
- /// owner's invite gave them and that they cannot act until approved; before, that took a second
3685
- /// read they had no reason to know to make.
3440
+ /// Answers the `GuardianRecord` it created — `#Pending` until the owner approves — rather than
3441
+ /// `()`. The new guardian learns, in the same reply, the name and permissions the owner's invite
3442
+ /// gave them and that they cannot act until approved; otherwise that would take a second read they
3443
+ /// had no reason to know to make.
3686
3444
  registerGuardian: (code: text) -> (Result_19);
3687
3445
  /// Remove a per-caller override so that caller reverts to — and keeps TRACKING — the global caps.
3688
3446
  ///
@@ -3690,21 +3448,19 @@ type Engram =
3690
3448
  /// override is to overwrite it with a frozen copy of the global policy, which then stops
3691
3449
  /// following later changes. That makes every override permanent in effect.
3692
3450
  removeCallerSpendPolicy: (caller: principal) -> (Result_2);
3693
- /// ⟨2026-10-14, the destination-list ruling⟩ Remove a destination from one action's list. Instant,
3694
- /// and NOT freeze-gated: removal TIGHTENS, and a frozen engram must still be able to shrink what it
3695
- /// could sign to.
3451
+ /// Remove a destination from one action's list. Instant, and NOT freeze-gated: removal TIGHTENS,
3452
+ /// and a frozen engram must still be able to shrink what it could sign to.
3696
3453
  removeEip712Destination: (typeId: blob, value: text) -> (Result_2);
3697
- /// De-register a type that has NEVER SIGNED. Exists because of a hazard the first external
3698
- /// validation found within hours (consumer report, 2026-08-06): a bare-name #standard registration —
3699
- /// cheap, no watcher preconditions — permanently blocked the guarded namespaced registration
3700
- /// via the collision rule, with no way out. An owner typo could brick a venue integration for
3701
- /// the engram's lifetime. Never-signed is the whole gate: a type that signed even once is part
3702
- /// of what the audit chain's eip712.sign entries mean, and stays resolvable forever — this
3703
- /// removes only authority that was never exercised, which is removing nothing but the mistake.
3704
- /// NOT freeze-gated, same reasoning as removeEvmWithdrawDestination: this is TIGHTENING, and a
3705
- /// frozen engram must still be able to shrink what it could sign.
3706
- /// ⟨2026-10-14⟩ `removeEvmWithdrawDestination` is now `removeEip712Destination` (the destination-list ruling); same
3707
- /// reasoning. Removing a type now also drops its rules and its own destination list.
3454
+ /// De-register a type that has NEVER SIGNED. It exists because of a hazard an early external
3455
+ /// validation found within hours (2026-08-06): a bare-name #standard registration — cheap, no
3456
+ /// watcher preconditions — permanently blocked the guarded namespaced registration via the
3457
+ /// collision rule, with no way out. An owner typo could brick a venue integration for the
3458
+ /// engram's lifetime. Never-signed is the whole gate: a type that signed even once is part of what
3459
+ /// the audit chain's eip712.sign entries mean, and stays resolvable forever — this removes only
3460
+ /// authority that was never exercised, which is removing nothing but the mistake.
3461
+ /// NOT freeze-gated, same reasoning as `removeEip712Destination`: this is TIGHTENING, and a frozen
3462
+ /// engram must still be able to shrink what it could sign. Removing a type also drops its rules and
3463
+ /// its own destination list.
3708
3464
  removeEip712Type: (typeId: blob) -> (Result_2);
3709
3465
  /// Owner-only: remove a guardian from the roster.
3710
3466
  ///
@@ -3722,8 +3478,8 @@ type Engram =
3722
3478
  /// Named callers: an owner console's seller list, and the owner kit (the key file's way to stop a
3723
3479
  /// seller).
3724
3480
  removeSeller: (payTo: text) -> (Result_2);
3725
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ OWNER-ONLY: give an agent a new name. A name was
3726
- /// fixed at the invite, and two agents both called "agent" is how the 2026-10-20 session started.
3481
+ /// OWNER-ONLY: give an agent a new name. A name is otherwise fixed at the invite, so two agents both
3482
+ /// called "agent" could not be told apart.
3727
3483
  /// Only the VALUE of the stored `AgentRecord.name` changes — no new state, no reshaped record —
3728
3484
  /// and the change is on the record as `agent.rename` (`principal=<key> name=<new name>`, the name
3729
3485
  /// last). An ended agent may be renamed too (`People.renameTarget` says why).
@@ -3749,32 +3505,30 @@ type Engram =
3749
3505
  /// · memory DELETES are soft, so version history is retained and paths stay enumerable via
3750
3506
  /// `listDeletedMemoryFiles`;
3751
3507
  /// · `agentPurgeLog`, which is the durable record of who was severed;
3752
- /// · ⟨2026-09-29⟩ today's spending totals — each caller's and the engram-wide one — and the
3753
- /// owner's engram-wide ceiling. A reset severs access; it never gives back a day's allowance
3754
- /// already spent, so a key re-admitted after a reset keeps what it spent today (the totals are
3755
- /// kept per calling key).
3756
- /// · ⟨2026-10-02⟩ the seat weeks of every engagement (`agentSeatWeeks`), with the signature count
3757
- /// they sit beside, and the owner's switch over the metrics reader's read and the reader it
3758
- /// names — a reset severs access, it does not change who may read what was kept.
3759
- /// · ⟨2026-11-02, the child build — decided "unless you object", recorded at its withdrawal-pinning
3760
- /// step⟩ the seller list and the paid history (`listSellers`, `getRecipientHistory`), as the typed-data
3761
- /// destinations are kept: a reset severs access, it does not forget which counterparties the
3762
- /// owner approved or which addresses this engram has paid.
3763
- ///
3764
- /// ⟨2026-10-02⟩ It tells the spawning registry that it happened (`sysNoteReset`), on every reset.
3508
+ /// · today's spending totals — each caller's and the engram-wide one — and the owner's
3509
+ /// engram-wide ceiling. A reset severs access; it never gives back a day's allowance already
3510
+ /// spent, so a key re-admitted after a reset keeps what it spent today (the totals are kept per
3511
+ /// calling key).
3512
+ /// · the seat weeks of every engagement (`agentSeatWeeks`), with the signature count they sit
3513
+ /// beside, and the owner's switch over the metrics reader's read and the reader it names — a
3514
+ /// reset severs access, it does not change who may read what was kept.
3515
+ /// · the seller list and the paid history (`listSellers`, `getRecipientHistory`), as the
3516
+ /// typed-data destinations are kept: a reset severs access, it does not forget which
3517
+ /// counterparties the owner approved or which addresses this engram has paid.
3518
+ ///
3519
+ /// It tells the spawning registry that it happened (`sysNoteReset`), on every reset.
3765
3520
  ///
3766
3521
  /// It is recorded as ONE chained `engram.reset` entry that also names the flag transitions.
3767
3522
  ///
3768
3523
  /// ⚠ AND THE LIMIT OF THAT RECORD, because a caller relying on it should know: the audit chain is
3769
- /// NOT unbounded. It caps at MAX_ENTRIES and trims its oldest tenth on overflow, so on any engram
3770
- /// long-lived enough for the rent model to apply, the reset entry is not guaranteed to still be
3771
- /// there. `agentPurgeLog` is the evidence that does not age out — which is why it exists.
3524
+ /// NOT unbounded. It caps at MAX_ENTRIES and trims its oldest tenth on overflow, so on any
3525
+ /// long-lived engram the reset entry is not guaranteed to still be there. `agentPurgeLog` is the
3526
+ /// evidence that does not age out — which is why it exists.
3772
3527
  resetEngram: () -> (Result_18);
3773
- /// ⟨2026-09-28, owner decision: an agent can resign from an engram, and the resignation is
3774
- /// recorded⟩ The AGENT ends its own engagement with this engram.
3528
+ /// The AGENT ends its own engagement with this engram, and the resignation is recorded.
3775
3529
  ///
3776
- /// WHY IT EXISTS: before this, every ending was something done TO an agent — revoked by the
3777
- /// owner, by a guardian, by the kill switch, or by a reset — so an agent that wanted to leave
3530
+ /// WHY IT EXISTS: every other ending is something done TO an agent — revoked by the owner, by a
3531
+ /// guardian, by the kill switch, or by a reset — so without this an agent that wanted to leave
3778
3532
  /// cleanly had to wait to be fired, and its track record across engrams could not tell a clean exit
3779
3533
  /// from a firing. This is the one ending the agent itself chooses, and the registry records it
3780
3534
  /// under its own reason (`#Resigned`), never folded into a revocation.
@@ -3793,28 +3547,23 @@ type Engram =
3793
3547
  /// guardian holding `canPauseWrites` can stop writes without the owner and cannot restart them,
3794
3548
  /// and the owner can always restart them. A tripwire rather than a lock.
3795
3549
  resumeWrites: () -> (Result_2);
3796
- /// Self-heal: re-send every ACTIVE agent's start to the spawning registry (idempotent — the
3797
- /// registry mints no duplicate for an open engagement), for when a notice was missed. Owner-only.
3798
- /// Returns how many the registry ACKNOWLEDGED. ⟨2026-09-28: it used to count sends that did not
3799
- /// throw, against a method that could not say no; it now counts `#Ok` answers.⟩ It re-sends
3800
- /// starts only: an ending carries a reason this roster does not keep per principal.
3801
- ///
3802
- /// ⟨CORRECTED 2026-09-29, a review finding — the owner's ruling⟩ It now re-sends ENDINGS as
3803
- /// well as starts, endings first (`AgentEdges.resyncPlan` says why): every ended record on the
3804
- /// roster and every agent a reset removed keeps its ending's reason and day
3805
- /// (`Types.AgentEnding`), so an ending the registry never received — the one loss that used to
3806
- /// show an engram's engagement as live on the agent's record forever and block the agent's later starts here —
3807
- /// is recorded by one call of this. The registry answers an ending it already holds `#Ok`.
3808
- /// RESHAPED REPLY: `Types.ResyncReport` in place of a bare count — the endings and starts the
3809
- /// registry acknowledged, and every notice it did not, with its own words, so the owner can tell
3810
- /// an expected answer (an ending for a start that was never recorded says so) from a real one.
3811
- /// The calls leave in batches of `RESYNC_BATCH`, each batch in order and wholly answered before the
3812
- /// next leaves, so the order above holds at the registry.
3813
- /// ⟨2026-09-29⟩ WHAT A RESYNC CANNOT DO: record an engagement whose start the registry never
3814
- /// recorded and which has since ENDED. A start is re-sent only for an agent still active here, so
3815
- /// all that is left to send is the ending, and the registry has nothing to end. The report lists
3816
- /// each such engagement under `cannotBeRecorded` (key, root, invite, and how and when it ended),
3817
- /// apart from `notRecorded`, so the owner sees them rather than silence.
3550
+ /// Self-heal: re-send to the spawning registry every recorded ending and every ACTIVE agent's start,
3551
+ /// for when a notice was missed. Owner-only. Endings first (`AgentEdges.resyncPlan` says why): every
3552
+ /// ended record on the roster and every agent a reset removed keeps its ending's reason and day
3553
+ /// (`Types.AgentEnding`), so an ending the registry never received — the one loss that would show an
3554
+ /// engram's engagement as live on the agent's record forever and block the agent's later starts
3555
+ /// here — is recorded by one call of this. Idempotent: the registry mints no duplicate for an open
3556
+ /// engagement, and answers an ending it already holds `#Ok`.
3557
+ /// THE REPLY is `Types.ResyncReport`: the endings and starts the registry ACKNOWLEDGED (counted by
3558
+ /// its `#Ok` answers, not by sends that did not throw), and every notice it did not, with its own
3559
+ /// words, so the owner can tell an expected answer (an ending for a start that was never recorded
3560
+ /// says so) from a real one. The calls leave in batches of `RESYNC_BATCH`, each batch in order and
3561
+ /// wholly answered before the next leaves, so the order above holds at the registry.
3562
+ /// WHAT A RESYNC CANNOT DO: record an engagement whose start the registry never recorded and which
3563
+ /// has since ENDED. A start is re-sent only for an agent still active here, so all that is left to
3564
+ /// send is the ending, and the registry has nothing to end. The report lists each such engagement
3565
+ /// under `cannotBeRecorded` (key, root, invite, and how and when it ended), apart from
3566
+ /// `notRecorded`, so the owner sees them rather than silence.
3818
3567
  resyncAgentEdges: () -> (Result_17);
3819
3568
  /// Return to managed custody: the engram adds the registry back as a controller ALONGSIDE the
3820
3569
  /// owner — it does not remove the owner. The inverse of `claimSovereignty`, and the reason
@@ -3822,22 +3571,24 @@ type Engram =
3822
3571
  returnToManaged: () -> (Result_2);
3823
3572
  /// Replace the whole content of an EXISTING file.
3824
3573
  ///
3825
- /// This is the one thing agents could never do before: every agent write was an append,
3826
- /// so a file could only ever grow. The ruling that opened it is narrow, and every part of the
3827
- /// narrowness is enforced below — an agent may replace content only on a path the owner has
3574
+ /// This is the one thing agents could never do in the legacy store: every agent write was an
3575
+ /// append, so a file could only ever grow. The permission that opens it is narrow, and every part
3576
+ /// of the narrowness is enforced below — an agent may replace content only on a path the owner has
3828
3577
  /// granted, only where retention is not #vault, and only where the file already exists. Vault
3829
3578
  /// paths stay append-only forever, which is the claim the product makes about them.
3830
3579
  ///
3831
3580
  /// Replacing is safe here in a way it was not in the legacy store: the prior version is not
3832
3581
  /// overwritten, it is superseded. It stays readable, its hash stays committed, and the agent
3833
3582
  /// floor keeps its bytes for the window a counterparty needs to extract them.
3834
- /// ⟨0.16.0, refusals are values, never traps⟩ FIVE AGENT REFUSALS, ALL `#Refused`, AND THE UNIFORMITY IS THE FINDING.
3583
+ ///
3584
+ /// FIVE AGENT REFUSALS, ALL `#Refused` (refusals are values, never traps), AND THE UNIFORMITY IS
3585
+ /// THE POINT.
3835
3586
  ///
3836
3587
  /// Reserved path, protected path, missing permission, ungranted revise path, `#vault` class — a
3837
- /// caller could previously tell these apart only by reading five different sentences, and every
3838
- /// one of them ends the same way: this agent may not make this write, and no retry by this
3839
- /// agent changes that. The prose already said "Not operator-retryable" four times over,
3840
- /// because a text field was the only place to put it. It is an arm now.
3588
+ /// caller could once tell these apart only by reading five different sentences, and every one of
3589
+ /// them ends the same way: this agent may not make this write, and no retry by this agent changes
3590
+ /// that. The prose already said "Not operator-retryable" four times over, because a text field was
3591
+ /// the only place to put it. It is an arm now.
3841
3592
  ///
3842
3593
  /// The one that could tempt a different arm is `#vault`, which looks like a state fact. It is
3843
3594
  /// not: the class is an AUTHORIZATION statement about who may replace content there, and it
@@ -3879,10 +3630,6 @@ type Engram =
3879
3630
  ///
3880
3631
  /// Tokens are re-issuable: revoking them is not permanent the way revoking an agent is.
3881
3632
  revokeAllBearerTokens: () -> (Result_15);
3882
- /// ⟨0.16.0⟩ `removeAllGuardians` DELETED — test-only (every method has a named caller; none is test-only),
3883
- /// and verified NOT part of KILL-SWITCH's mass-revoke set. The destructive phase-07 suite iterates
3884
- /// `removeGuardian` instead, so nothing loses a capability: what dies is a bulk spelling no runbook ever
3885
- /// invoked.
3886
3633
  /// Owner-only panic button: void every unredeemed invite. Returns how many were voided.
3887
3634
  ///
3888
3635
  /// Separate from `revokeAllAgents`: this stops invites that have NOT been redeemed yet and
@@ -3895,24 +3642,18 @@ type Engram =
3895
3642
  /// Revoke a bearer token by its public tokenId. Idempotent.
3896
3643
  /// Subsequent /mcp requests using this token will be rejected.
3897
3644
  revokeBearerToken: (tokenId: text) -> (Result_2);
3898
- /// ⟨0.16.0, the interface plan⟩ RETURNS A REAL RECEIPT, not `R<()>` — same reason as the delete
3899
- /// above, and sharper here: a rollback WRITES A NEW VERSION, so the caller's next question is
3900
- /// always "which version am I on now". `r.version` was already read for the audit line.
3645
+ /// RETURNS A REAL RECEIPT, not `R<()>` (since 0.16.0) — same reason as the delete above, and
3646
+ /// sharper here: a rollback WRITES A NEW VERSION, so the caller's next question is always "which
3647
+ /// version am I on now". `r.version` was already read for the audit line.
3901
3648
  rollbackMemory: (path: text, toVersion: nat) -> (Result);
3902
- /// SELF-SERVICE, and that is the surprising part: the AGENT calls this, not the owner. An
3903
- /// agent rotates its own CallerKey binding without needing the owner to act.
3904
- ///
3905
- /// ⚠ IT ROTATES THE KEY, NOT THE PRINCIPAL. Only `publicKeyHash` changes; the agent record
3906
- /// stays keyed on the same principal, keeps its permissions, and keeps its place against the
3907
- /// one-shot registration rule. So this is the answer to "my key is compromised", and it is NOT a
3908
- /// way to move an agent seat to a different wallet — that is a new invite, and only if the
3909
- /// old principal was never revoked.
3910
- /// ⟨CORRECTED 2026-09-29, the owner's ruling of that date⟩ Two sentences
3911
- /// above are no longer true. An agent's record CAN now move to a different key, in one step and
3912
- /// with no new invite: `nominateAgentKey` from the current key, then `acceptAgentKeyNomination`
3913
- /// from the new one. And a compromised key is answered by that move — this method only changes a
3914
- /// recorded hash, and the compromised principal keeps calling as the agent. This method still
3915
- /// does what it says; the move is the one that changes which key the engram answers.
3649
+ /// SELF-SERVICE, and that is the surprising part: the AGENT calls this, not the owner. It changes
3650
+ /// the agent's recorded CallerKey binding (`publicKeyHash`) without needing the owner to act.
3651
+ ///
3652
+ /// ⚠ IT CHANGES A RECORDED HASH, NOT THE KEY THE ENGRAM ANSWERS. The agent record stays keyed on
3653
+ /// the same principal, keeps its permissions, and keeps its place against the one-shot registration
3654
+ /// rule, and that principal keeps calling as the agent. So it is NOT the answer to "my key is
3655
+ /// compromised": that is moving the record to a different key, in one step and with no new invite —
3656
+ /// `nominateAgentKey` from the current key, then `acceptAgentKeyNomination` from the new one.
3916
3657
  ///
3917
3658
  /// `#Conflict` rather than `#Refused` for a `#Revoked` or `#Resigned` record: the caller IS the
3918
3659
  /// agent on that record, so its standing is not the problem — the record's state is. An
@@ -3925,26 +3666,25 @@ type Engram =
3925
3666
  /// writes-pause and encrypted-memory refusal as appendMemoryText; returns the write receipt and the
3926
3667
  /// exact bytes sent. Callers: the npm library's ProfileManager saves and SessionManager.writeSummary
3927
3668
  /// (each through EngramClient), and through them the local MCP server's profile and session tools.
3928
- /// ⟨2026-11-08, the owner: "merging the four methods to one i would agree with"⟩ Was four methods
3929
- /// (savePreference, saveInsight, saveDecision, writeSessionSummary), added 2026-11-06 and never
3930
- /// released; one door keeps three fewer methods that every client must support for as long as
3931
- /// they are served.
3669
+ /// One door, not four: savePreference, saveInsight, saveDecision and writeSessionSummary were merged
3670
+ /// into it before any release, so every client supports three fewer methods for as long as they are
3671
+ /// served.
3932
3672
  saveMemoryEntry: (entry: MemoryEntry) -> (Result_16);
3933
3673
  /// Send money from this engram's wallet to the engram it was opened through — "up", and only up:
3934
3674
  /// the destination is always the parent engram's own default account, never an address the caller
3935
- /// names. ANY amount (the owner's send-up ruling); the answer is the ledger's block index.
3675
+ /// names. ANY amount; the answer is the ledger's block index.
3936
3676
  ///
3937
- /// WHO: the owner's key file or the sign-in, in an engram opened through another (the build's
3938
- /// resolution: both may send — the key file's honest sweep needs it, and the sign-in may sweep
3939
- /// too); refused to anyone else. In a first engram there is nothing above it, and it refuses with
3940
- /// `#Conflict`. NOT freeze-gated: up is not out, so a payments freeze does not stop it.
3677
+ /// WHO: the owner's key file or the sign-in, in an engram opened through another (both may send —
3678
+ /// the key file's honest sweep needs it, and the sign-in may sweep too); refused to anyone else. In
3679
+ /// a first engram there is nothing above it, and it refuses with `#Conflict`. NOT freeze-gated: up
3680
+ /// is not out, so a payments freeze does not stop it.
3941
3681
  ///
3942
3682
  /// ORDER: the caller, then the parent from this engram's own birth record (`openedFrom`, no await),
3943
3683
  /// then ONE call to the registry — refused unless the registry shows the parent registered, active
3944
3684
  /// and not abandoned (`#Refused`; the registry unreachable is `#Unavailable`; nothing sent either
3945
3685
  /// way) — then ONE ledger transfer, the same per-token ledger as `ownerWithdraw`. Both calls are
3946
- /// counted (the timer-pause rule of 2026-10-28), so near its freezing line this engram may be unable to send the registry
3947
- /// call at all; it then answers `#Unavailable` and nothing moves.
3686
+ /// counted (`TimerPause`'s rule for outgoing calls), so near its freezing line this engram may be
3687
+ /// unable to send the registry call at all; it then answers `#Unavailable` and nothing moves.
3948
3688
  ///
3949
3689
  /// NO RE-CHECK between the two calls, deliberately: the parent can be abandoned in between, and the
3950
3690
  /// money then sits in an existing canister whose owner can still withdraw it. Guarding that window
@@ -3954,14 +3694,11 @@ type Engram =
3954
3694
  /// signature counts count signatures; nothing reads a ledger balance, and this method calls none of
3955
3695
  /// those writers (test/child-sign-in-wiring.test.ts rule 13). Written to the record as
3956
3696
  /// `wallet.sendToParent` (money class), with the amount, the token, the parent and the block.
3957
- /// Named callers: the owner kit, signed by the key file; an owner console, signed in as the sign-in.
3697
+ /// Named callers: the owner kit, signed by the key file; an owner's app, signed in as the sign-in.
3958
3698
  sendToParent: (amount: TokenAmount) -> (Result_15);
3959
3699
  /// Append to a memory file against a PAID x402 session voucher — the write half of the paid rail,
3960
- /// authorized by the voucher rather than by a role.
3961
- /// ⟨2026-09-30, ic402 2.17.0⟩ Authorized by the payer's own call with the voucher: only the
3962
- /// principal that opened the session, calling as that key, can spend it (see `sessionReadMemory`).
3963
- /// ⟨CORRECTED 2026-09-30, the owner's fresh-key ruling⟩ Authorized by the session KEY's own
3964
- /// call: the fresh key the payer named at open. The write is attributed to the payer, who paid;
3700
+ /// authorized by the voucher rather than by a role: by the session KEY's own call, the fresh key the
3701
+ /// payer named at open (see `sessionReadMemory`). The write is attributed to the payer, who paid;
3965
3702
  /// the record row also names the key that made it.
3966
3703
  ///
3967
3704
  /// ⚠ AS WITH `sessionReadMemory`, EVERY REFUSAL FIRES BEFORE THE VOUCHER IS CONSUMED — nothing is
@@ -3969,17 +3706,12 @@ type Engram =
3969
3706
  /// when the engram is client-side encrypted: a paid session appending plaintext to an encrypted
3970
3707
  /// store would CORRUPT it, so that refusal is protecting the owner's data rather than gating
3971
3708
  /// access. Append through the EngramX client/SDK instead.
3972
- /// ⟨2026-08-24, the 0.16.0 pre-cut audit⟩ RETURNS THE SAME RECEIPT THE FREE WRITER DOES.
3973
- /// It answered `Wire.Result<Nat>`: the version, and nothing else. The free `writeMemory` returns
3974
- /// `{ version; seq; head }`, so a PAYING writer got strictly LESS evidence than a caller who paid
3975
- /// nothing — on the one rail a stranger can buy, where the receipt is the whole product. The head
3976
- /// is what makes an append verifiable by someone who was not there; a bare version number is not
3977
- /// checkable against anything.
3978
- ///
3979
- /// It cost nothing to fix: `r` was already in scope and already being read — the old body did
3980
- /// `let v = r.version` and passed `r` to `receiptSuffix(r)` for the audit line, then discarded
3981
- /// everything but the version on the way out. Free until the cut, breaking forever after, which
3982
- /// is why it lands now rather than after the test migration (as ruled 2026-08-24).
3709
+ ///
3710
+ /// RETURNS THE SAME RECEIPT THE FREE WRITER DOES (since 0.16.0). It answered `Wire.Result<Nat>`:
3711
+ /// the version, and nothing else, so a PAYING writer got strictly LESS evidence than a caller who
3712
+ /// paid nothing — on the one rail a stranger can buy, where the receipt is the whole product. The
3713
+ /// head is what makes an append verifiable by someone who was not there; a bare version number is
3714
+ /// not checkable against anything.
3983
3715
  sessionAppendMemory: (voucher: Voucher, path: text, content: blob) ->
3984
3716
  (Result);
3985
3717
  /// The whole engram in one call — newest-first, byte-capped — for an AI host to inject at session
@@ -4002,17 +3734,15 @@ type Engram =
4002
3734
  /// read, not an error.
4003
3735
  sessionReadContext: (clientLabel: text) -> (Result_14);
4004
3736
  /// Read one memory file against a PAID x402 session voucher. No role, no invite — the voucher is
4005
- /// the authorization, which is what makes this the engram's one rail a stranger can pay to use.
4006
- ///
4007
- /// ⟨2026-09-30, ic402 2.17.0⟩ WHO MAY SPEND A SESSION: only its payer, calling as the same raw
4008
- /// Ed25519 key that opened it. The voucher still carries the amount and the sequence; the
4009
- /// authorization is now the call itself, and the canister no longer checks a voucher signature.
4010
- /// A stranger can still pay to use this rail — by opening a session of their own.
4011
- /// ⟨CORRECTED 2026-09-30, the owner's fresh-key ruling⟩ Not the payer: the session's own key
4012
- /// — the fresh Ed25519 key the payer named at open — calling as itself. The payer, who opened
4013
- /// the session and closes it, is refused here like anyone else who is not that key.
4014
- /// ⟨CORRECTED 2026-09-30, review⟩ …unless the payer named their own identity key at open, which
4015
- /// nothing refuses: then the payer IS that key and spends.
3737
+ /// the authorization, which is what makes this the engram's one rail a stranger can pay to use (by
3738
+ /// opening a session of their own).
3739
+ ///
3740
+ /// WHO MAY SPEND A SESSION: the session's own key — the fresh Ed25519 key the payer named at open —
3741
+ /// calling as itself (ic402 2.17.0 and later). The voucher carries the amount and the sequence; the
3742
+ /// authorization is the call itself, and the canister checks no voucher signature. The payer, who
3743
+ /// opened the session and closes it, is refused here like anyone else who is not that key — unless
3744
+ /// the payer named their own identity key at open, which nothing refuses: then the payer IS that
3745
+ /// key and spends.
4016
3746
  ///
4017
3747
  /// ⚠ EVERY REFUSAL BELOW HAPPENS BEFORE THE VOUCHER IS CONSUMED, so **no funds move on any of
4018
3748
  /// them**. That is the property a payer most needs and the one a signature cannot express: a
@@ -4032,9 +3762,9 @@ type Engram =
4032
3762
  /// · Payments are frozen on this engram.
4033
3763
  sessionReadMemory: (voucher: Voucher, path: text) -> (Result_13);
4034
3764
  /// Configure action alerts: an https webhook that receives new chained-audit entries matching the
4035
- /// enabled event classes (money / approvals / guardian / agentWrites), batched, at most one
4036
- /// POST per minute. ⟨2026-10-29⟩ Delivered within seconds of the action (a 5 s batch window), and
4037
- /// nothing runs while nothing is owed. Owner-only. Payloads carry audit METADATA (operation, caller, role, bounded
3765
+ /// enabled event classes (money / approvals / guardian / agentWrites), batched: delivered within
3766
+ /// seconds of the action (a 5 s batch window), at most one POST per minute, and nothing runs while
3767
+ /// nothing is owed. Owner-only. Payloads carry audit METADATA (operation, caller, role, bounded
4038
3768
  /// details) — never memory file contents. Setting a URL (re)arms delivery FROM NOW: the cursor
4039
3769
  /// jumps to the current end of the log so history is not replayed. Passing url = null disables.
4040
3770
  /// The URL itself is never written to the audit log (webhook URLs often embed secret tokens).
@@ -4043,7 +3773,7 @@ type Engram =
4043
3773
  /// may do without ending their access — `revokeAgent` is terminal for that principal, this is
4044
3774
  /// not.
4045
3775
  ///
4046
- /// ⚠ ONE GRANT IS REFUSED OUTRIGHT: memory-read to the EngramX PLATFORM principal while this
3776
+ /// ⚠ ONE GRANT IS REFUSED OUTRIGHT: memory-read to the SPAWNING REGISTRY's principal while this
4047
3777
  /// engram is Private (encrypted), because that principal could then derive the decryption key and
4048
3778
  /// Private mode would be a claim rather than a property. It is the mirror of the guard on
4049
3779
  /// `setEncryptionEnabled`, which refuses to ENABLE Private while that grant already exists —
@@ -4063,8 +3793,7 @@ type Engram =
4063
3793
  /// for that. What a bare prefix would do — "MEMORY.md" also matching "MEMORY.md.bak" — is the
4064
3794
  /// kind of accident a permission surface must not have.
4065
3795
  setAgentRevisablePaths: (paths: vec text) -> (Result_2);
4066
- /// ⟨0.16.0 — the interface plan's entry⟩ Returns the APPLIED config, which is how this closes the
4067
- /// setter-without-a-getter gap without adding a method: the write is the read.
3796
+ /// Returns the APPLIED config (since 0.16.0).
4068
3797
  ///
4069
3798
  /// `prunedBackups` is the part that matters. Enforcing a retention cap DELETES finalized backups
4070
3799
  /// beyond it, and this method used to answer `#Ok(())` over that — the module's own comment
@@ -4072,11 +3801,10 @@ type Engram =
4072
3801
  /// by a `Debug.print` nobody reads. An owner lowering the cap is destroying their own backups;
4073
3802
  /// they are told how many, in the reply and in the audit line.
4074
3803
  ///
4075
- /// ⟨2026-10-21, the owner's answers on backups in the mobile-first app design⟩ The number now bounds EACH creator's
4076
- /// backups of the kind (`Backup.enforceRetention`): an agent's finalize prunes only that agent's
4077
- /// own, and this setter applies the number to every creator's set, so `prunedBackups` counts
4078
- /// across all of them. "The write is the read" above went stale for a second phone, which never
4079
- /// made the write: `getBackupRetention` is the read.
3804
+ /// The number bounds EACH creator's backups of the kind (`Backup.enforceRetention`): an agent's
3805
+ /// finalize prunes only that agent's own, and this setter applies the number to every creator's
3806
+ /// set, so `prunedBackups` counts across all of them. The read is `getBackupRetention`: a second
3807
+ /// device never made the write, so the write cannot be its read.
4080
3808
  setBackupRetention: (dbType: text, maxBackups: nat) -> (Result_12);
4081
3809
  /// Override the caps for ONE caller — an agent this owner trusts more, or less, than the rest.
4082
3810
  setCallerSpendPolicy: (caller: principal, policy: SpendingPolicy) ->
@@ -4092,8 +3820,6 @@ type Engram =
4092
3820
  /// alerts' money class (`ActionAlerts.classify`), so an owner or guardian with an alert channel
4093
3821
  /// hears of it.
4094
3822
  setChildAllowance: (agentPrincipal: principal, allowed: nat) -> (Result_2);
4095
- /// ⟨0.16.0⟩ `getEncryptedMemoryKeyForEpoch` DELETED — folded into `getEncryptedMemoryKey`'s epoch
4096
- /// argument — see that method for the fold and the `null`-means-CURRENT rule.
4097
3823
  /// Owner-only: turn client-side memory encryption (Private mode) on or off for FUTURE writes.
4098
3824
  ///
4099
3825
  /// ⚠ IT DOES NOT TOUCH EXISTING FILES, and this is the fact that decides whether calling it alone
@@ -4102,9 +3828,9 @@ type Engram =
4102
3828
  /// · turning it ON leaves everything already stored as PLAINTEXT at rest, and
4103
3829
  /// · turning it OFF leaves everything already stored as CIPHERTEXT, which the hosted connector
4104
3830
  /// cannot read.
4105
- /// Either direction leaves a MIXED store that the flag alone misdescribes. The owner console
4106
- /// pairs this call with a migration (`useMemoryEncryption`'s `migrate` / `migrateToPlaintext`)
4107
- /// for exactly that reason; a caller reaching this method directly gets the flag and nothing else.
3831
+ /// Either direction leaves a MIXED store that the flag alone misdescribes. An owner's app should
3832
+ /// pair this call with a migration of the stored files for exactly that reason; a caller reaching
3833
+ /// this method directly gets the flag and nothing else.
4108
3834
  ///
4109
3835
  /// ⚠ ENABLING IS REFUSED while the spawning registry's principal holds memory-read access as an
4110
3836
  /// agent — it could derive the decryption key, which would make Private mode a claim rather
@@ -4134,20 +3860,20 @@ type Engram =
4134
3860
  /// Per-prefix retention policy. The longest rule that covers a path wins; anything uncovered
4135
3861
  /// keeps everything.
4136
3862
  ///
4137
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ "Covers" is the folder matcher
4138
- /// (`AgentPaths.covers`, through `RetentionPolicy.resolve`): a rule ending in "/" governs
4139
- /// everything beneath it, any other rule exactly one path. It was bare text prefix until that day.
3863
+ /// "Covers" is the folder matcher (`AgentPaths.covers`, through `RetentionPolicy.resolve`): a rule
3864
+ /// ending in "/" governs everything beneath it, any other rule exactly one path. (It was a bare
3865
+ /// text prefix before 2026-10-21.)
4140
3866
  ///
4141
- /// A CHANGE does not take effect immediately, in EITHER direction: every prefix whose EFFECTIVE
4142
- /// class moves is guarded for the same window as the agent floor, so history cannot be
3867
+ /// A CHANGE does not take effect on EVICTION immediately, in EITHER direction: every prefix whose
3868
+ /// EFFECTIVE class moves is guarded for the same window as the agent floor, so history cannot be
4143
3869
  /// thinned in the same sweep as the decision to thin it. Loosening waits too — distinguishing
4144
3870
  /// "tightened" from "loosened" precisely would mean comparing two cap lattices, so armGuards
4145
3871
  /// (RetentionPolicy.mo) guards any change it sees. That is the conservative reading, and its
4146
3872
  /// only cost is a delay on keeping MORE, which destroys nothing.
4147
- /// ⟨CORRECTED 2026-11-07⟩ That delay applies to EVICTION only (`resolveRetentionForEviction`),
4148
- /// not to the class used for revision. `reviseMemory` reads `retentionClassOf` →
4149
- /// `RetentionPolicy.resolve` without a guard: a newly written `#vault` forbids agent revision
4150
- /// immediately, including during the 14-day eviction guard. The owner's revision is unchanged.
3873
+ /// That delay applies to eviction only (`resolveRetentionForEviction`), not to the class used for
3874
+ /// revision: `reviseMemory` reads `retentionClassOf` → `RetentionPolicy.resolve` without a guard,
3875
+ /// so a newly written `#vault` forbids agent revision immediately, including during the 14-day
3876
+ /// eviction guard. The owner's revision is unchanged.
4151
3877
  setMemoryRetentionPolicy: (entries:
4152
3878
  vec record {
4153
3879
  text;
@@ -4181,17 +3907,17 @@ type Engram =
4181
3907
  /// the larger permission ride in on the smaller one. Two flags is the shape that lets an owner
4182
3908
  /// say yes to one and no to the other, which is the common case.
4183
3909
  setPaidMemoryWriteEnabled: (enabled: bool) -> (Result_2);
4184
- /// ⟨0.16.0, refusals are values, never traps⟩ Every validation refusal here is `#Invalid` and the cap
4185
- /// is `#Conflict`, and the split is worth stating once for the whole whole-value-config family below:
3910
+ /// Refusals are values, never traps. Every validation refusal here is `#Invalid` and the cap is
3911
+ /// `#Conflict`, and the split is worth stating once for the whole whole-value-config family below:
4186
3912
  /// a malformed path is the CALLER'S to fix and retrying with a corrected list works, while "max 20"
4187
3913
  /// is a property of this engram that no argument gets around. A caller that cannot tell those apart
4188
3914
  /// either edits forever or gives up on a request that was one character from valid.
4189
3915
  setProtectedPaths: (paths: vec text) -> (Result_2);
4190
3916
  /// OWNER-ONLY: switch the metrics reader's read of the seat weeks off (`false`) or back on (`true`).
4191
- /// On from birth, by the owner's ruling of 2026-10-02. Off, `sysGetAgentSeatWeeks` refuses the
4192
- /// reader by name, naming this switch; the rows are still kept and the owner still reads them. Each
4193
- /// call is a chained record entry (`metrics.setSeatWeeksReadEnabled`, the new and the old value), so
4194
- /// when the read was on or off is part of the record. Anyone else is refused by name.
3917
+ /// On from birth. Off, `sysGetAgentSeatWeeks` refuses the reader by name, naming this switch; the
3918
+ /// rows are still kept and the owner still reads them. Each call is a chained record entry
3919
+ /// (`metrics.setSeatWeeksReadEnabled`, the new and the old value), so when the read was on or off is
3920
+ /// part of the record. Anyone else is refused by name.
4195
3921
  setSeatWeeksReadEnabled: (enabled: bool) -> (Result_2);
4196
3922
  /// Change a listed seller's daily cap. A LOWER (or equal) cap applies at once and cancels a raise that
4197
3923
  /// was waiting; a HIGHER cap waits 24 hours, as a new seller does (the cap in force until then is the
@@ -4200,38 +3926,34 @@ type Engram =
4200
3926
  /// are frozen; a lowering is not. Unknown address `#NotFound`; a cap of 0 `#Invalid` (remove instead).
4201
3927
  /// Named callers: an owner console's seller list, as `addSeller`.
4202
3928
  setSellerCap: (payTo: text, perDayCapE6: nat) -> (Result_11);
4203
- /// Set the most this engram may spend per day ACROSS EVERY CALLER — five agents, the owner and the
4204
- /// marketplace together. `null` removes the ceiling. ⟨2026-09-28⟩
4205
- /// ⟨CORRECTED 2026-09-29, a review finding: "spend" was too wide. The ceiling covers the x402
4206
- /// payments this engram signs (`signX402Payment` and the marketplace's `sysSignX402Payment`) and
4207
- /// nothing else: it is the most this engram may sign in x402 payments per day. Two other signing
4208
- /// paths are NOT counted against it — typed-data signatures (`signEip712` / `sysSignEip712`),
4209
- /// bounded instead by each registered type's daily count and destination list; and agent-
4210
- /// registration transactions (`signEngramRegistration`), bounded by three per caller per day and
4211
- /// the 500-gwei gas ceiling. Whether the ceiling should cover them is a separate owner question.⟩
4212
- /// ⟨2026-10-14, the owner's typed-data signing rulings⟩ Typed-data signatures are now bounded by each
3929
+ /// Set the most this engram may sign in x402 payments per day ACROSS EVERY CALLER — five agents,
3930
+ /// the owner and the marketplace together. `null` removes the ceiling. A new engram starts at
3931
+ /// `SpendCeiling.DEFAULT_ENGRAM_DAY` ($10.00 a day).
3932
+ ///
3933
+ /// WHAT COUNTS against it: the x402 payments this engram signs (`signX402Payment` and the
3934
+ /// marketplace's `sysSignX402Payment`), an agent's conversion of the engram's balance
3935
+ /// (`agentConvertBalance`), and the key file's Convert in an engram opened through another
3936
+ /// (`getSpendCeiling`'s note). Removing the ceiling does NOT free agent conversions: they keep their
3937
+ /// own bound, one in any 24 hours (`agentConvertAtNs`). Two other signing paths are NOT counted
3938
+ /// against it — typed-data signatures (`signEip712` / `sysSignEip712`), bounded instead by each
4213
3939
  /// registered type's daily count, its per-field rules ("at most N", "must equal X") and ITS OWN
4214
- /// destination list, and the signing floor (`SigningFloor`) guards them as it guards x402 payments.
4215
- /// They are still not counted against this ceiling.
3940
+ /// destination list, with the signing floor (`SigningFloor`) guarding them as it guards x402
3941
+ /// payments; and agent-registration transactions (`signEngramRegistration`), bounded by three per
3942
+ /// caller per day and the 500-gwei gas ceiling. Whether the ceiling should cover them is an open
3943
+ /// question.
4216
3944
  ///
4217
- /// WHY: the owner decided on 2026-09-28 to add one daily spending ceiling across all callers on an
4218
- /// engram and keep the limit of five agents. Every other spending limit is per caller, so without
4219
- /// this the engram's daily exposure was the SUM of up to seven allowances ($35.00 at the defaults)
4220
- /// and nobody could see it. The amount is in the same minor units the per-caller caps compare
4221
- /// (USDC's six decimals: 5_000_000 = $5.00), and like them it does not distinguish tokens.
3945
+ /// WHY: every other spending limit is per caller, so without this the engram's daily exposure was
3946
+ /// the SUM of up to seven allowances ($35.00 at the defaults) and nobody could see it; the limit of
3947
+ /// five agents stays. The amount is in the same minor units the per-caller caps compare (USDC's six
3948
+ /// decimals: 5_000_000 = $5.00), and like them it does not distinguish tokens.
4222
3949
  ///
4223
3950
  /// A payment that would take today's engram-wide total past this number is not signed: the caller
4224
3951
  /// gives a reason and it becomes a row in the approval queue, exactly as over a per-caller cap.
4225
- /// `0` is allowed and means every payment needs the owner's approval.
4226
- /// ⟨CORRECTED 2026-09-29, a review finding: not every payment — a payment of amount 0 crosses no
4227
- /// limit, so it is signed under a ceiling of 0 too. Whether amount-0 payments should be refused is
4228
- /// an open owner question.⟩ ⟨CORRECTED 2026-09-29, later — the owner ruled:
4229
- /// a payment of amount 0 is now refused by name before any limit is read (`X402Input.refusal`), so
4230
- /// under a ceiling of 0 every payment that can be signed at all does need the owner's approval.
4231
- /// And a new engram no longer starts with no ceiling: it starts at `SpendCeiling.DEFAULT_ENGRAM_DAY`
4232
- /// ($10.00 a day, as the owner ruled).⟩ Takes effect on the next payment, counted against what was
4233
- /// ALREADY spent today (the total is kept whether or not a ceiling is set), so setting a ceiling at
4234
- /// noon does not grant a fresh day.
3952
+ /// Under a ceiling of `0` every payment that can be signed at all needs the owner's approval (a
3953
+ /// payment of amount 0 crosses no limit, so it is refused by name before any limit is read,
3954
+ /// `X402Input.refusal`). Takes effect on the next payment, counted against what was ALREADY spent
3955
+ /// today (the total is kept whether or not a ceiling is set), so setting a ceiling at noon does not
3956
+ /// grant a fresh day.
4235
3957
  ///
4236
3958
  /// Unlike `setSpendPolicy`, this does NOT auto-approve pending requests it now covers — a request
4237
3959
  /// held by the ceiling waits for `approveRequest`, or the caller retries against the new ceiling.
@@ -4241,10 +3963,6 @@ type Engram =
4241
3963
  /// The record entry `spend.setCeiling` carries the new AND the previous value, so a widening is
4242
3964
  /// distinguishable from a tightening afterwards — the reason `spend.setPolicy` records its limits.
4243
3965
  /// Not blocked by a payments freeze, like `setSpendPolicy`: setting a limit moves no money.
4244
- /// ⟨2026-11-04, the agent-conversion build⟩ What counts against the ceiling: x402 payments, an agent's
4245
- /// conversion of the engram's balance, and the key file's Convert in an engram opened through another
4246
- /// (`getSpendCeiling`'s note). Removing the ceiling does NOT free agent conversions: they keep their own
4247
- /// bound, one in any 24 hours (`agentConvertAtNs`).
4248
3966
  setSpendCeiling: (maxPerDay: opt nat) -> (Result_2);
4249
3967
  /// Set this engram's spending caps.
4250
3968
  ///
@@ -4259,22 +3977,23 @@ type Engram =
4259
3977
  /// Owner-only: set YOUR OWN safety rails on the funding path — a per-top-up ckUSDC ceiling and a
4260
3978
  /// minimum gap between top-ups. Read them back with `getTopUpLimits`.
4261
3979
  ///
4262
- /// ⚠ THESE ARE THE OWNER'S LIMITS, NOT THE PLATFORM'S. "Limits" reads like something imposed;
4263
- /// nothing outside this engram sets them, and an owner may raise them at will. They exist so a
4264
- /// compromised agent key or a runaway agent cannot drain a wallet in one call or in a fast loop,
4265
- /// which is a bound on YOUR OWN blast radius rather than on what you are permitted to spend.
3980
+ /// ⚠ THESE ARE THE OWNER'S OWN LIMITS. "Limits" reads like something imposed; nothing outside
3981
+ /// this engram sets them, and an owner may raise them at will. They exist so a compromised agent
3982
+ /// key or a runaway agent cannot drain a wallet in one call or in a fast loop, which is a bound on
3983
+ /// YOUR OWN blast radius rather than on what you are permitted to spend.
4266
3984
  ///
4267
3985
  /// The cooldown defaults to five minutes. `cooldownSeconds = 0` removes the gap entirely, which
4268
3986
  /// is a real choice and not an error.
4269
- /// ⟨2026-08-24, the 0.16.0 pre-cut audit⟩ ONE RECORD, NOT TWO ADJACENT NATS. This took
4270
- /// `(newMaxCkusdcE6s : Nat, cooldownSeconds : Nat)` — the documented swap class, and a live one:
4271
- /// the suite calls `setTopUpLimits(10_000_000n, 300n)`, and a caller who transposes those gets a
4272
- /// 300-e6 cap with a 116-DAY cooldown. Candid matches positionally and both are `nat`, so the
4273
- /// wire accepts it, the types accept it, and the engram is quietly unable to top itself up.
4274
- ///
4275
- /// The field names are NOT a new vocabulary — they are `getTopUpLimits`'s, which already answers
4276
- /// `{ cooldownSeconds; maxCkusdcE6s }`. Setter and getter now share one shape, so read-modify-
4277
- /// write is expressible and neither side can drift from the other without the compiler saying so.
3987
+ ///
3988
+ /// ONE RECORD, NOT TWO ADJACENT NATS (since 0.16.0). This took `(newMaxCkusdcE6s : Nat,
3989
+ /// cooldownSeconds : Nat)` — the argument-swap class, and a live one: a test called it as
3990
+ /// `setTopUpLimits(10_000_000n, 300n)`, and a caller who transposed those got a 300-e6 cap with a
3991
+ /// 116-DAY cooldown. Candid matches positionally and both are `nat`, so the wire accepted it, the
3992
+ /// types accepted it, and the engram was quietly unable to top itself up.
3993
+ ///
3994
+ /// The field names are NOT a new vocabulary — they are `getTopUpLimits`'s, which answers
3995
+ /// `{ cooldownSeconds; maxCkusdcE6s }`. Setter and getter share one shape, so read-modify-write is
3996
+ /// expressible and neither side can drift from the other without the compiler saying so.
4278
3997
  setTopUpLimits: (limits:
4279
3998
  record {
4280
3999
  cooldownSeconds: nat;
@@ -4289,58 +4008,47 @@ type Engram =
4289
4008
  /// VERBATIM (compact JSON, as JSON.stringify emits) to World's /api/v4/verify/{rp_id} over an HTTPS
4290
4009
  /// outcall (never trust the client). The v4 endpoint verifies both 4.0 proofs and legacy 3.0 proofs,
4291
4010
  /// so the OrbLegacy migration path and the 4.0 endgame ride the same method. Owner-only. `nullifier`
4292
- /// is the claimed unique-human pseudonym; it must appear verbatim inside resultJson, binding what we
4293
- /// store to the payload the verifier actually accepted. Only proof_of_human credentials are accepted
4011
+ /// is the claimed unique-human pseudonym; it must appear verbatim inside resultJson, binding what is
4012
+ /// stored to the payload the verifier actually accepted. Only proof_of_human credentials are accepted
4294
4013
  /// (selfie is farmable, passport/mnc are document identity — a different tier). Sets worldIdVerified
4295
4014
  /// and stores the result ONLY on a real verification success — never self-asserted.
4296
4015
  setWorldIdProof: (resultJson: text, nullifier: text) -> (Result_2);
4297
- /// Sign a registered type. ONE call, owner-only, freeze-gated — the delay lives on registration
4298
- /// (the typed-data design of 2026-08-04), never here: an emergency withdrawal must not need two owner round-trips.
4299
- ///
4300
- /// ⟨0.16.0⟩ PERSISTS beside the market's `sysSignEip712` (ruled in the 0.16.0 interface plan). The owner does
4301
- /// not lose the ability to sign because a marketplace gained it, and the two share every control
4302
- /// below the caller gate.
4303
- ///
4304
- /// ⟨2026-11-02, the owner's ruling to take the recommended answers (the sign-in "approves trading keys")
4305
- /// — the child build's withdrawal-pinning step⟩ In an engram opened through another, a type named
4306
- /// `HyperliquidTransaction:ApproveAgent` (`Eip712Policy.childSignInOnlyToSign`) is signed by the
4307
- /// sign-in alone: the key file is refused it by name, and the sign-in may sign it (as the owner, on
4308
- /// the record). Every other type is the key file's to sign, as before. An access check beside the
4309
- /// owner gate, keyed by the registered NAME, before any of `eip712SignFor`'s eight checks; a first
4310
- /// engram is untouched (its owner is its own sign-in).
4016
+ /// Sign a registered type. ONE call, owner-only, freeze-gated — the delay lives on registration,
4017
+ /// never here: an emergency withdrawal must not need two owner round-trips.
4018
+ ///
4019
+ /// It sits beside the market's `sysSignEip712`: the owner does not lose the ability to sign because
4020
+ /// a marketplace gained it, and the two share every control below the caller gate.
4021
+ ///
4022
+ /// In an engram opened through another, a type named `HyperliquidTransaction:ApproveAgent`
4023
+ /// (`Eip712Policy.childSignInOnlyToSign`) is signed by the sign-in alone — the sign-in approves
4024
+ /// trading keys: the key file is refused it by name, and the sign-in may sign it (as the owner, on
4025
+ /// the record). Every other type is the key file's to sign. An access check beside the owner gate,
4026
+ /// keyed by the registered NAME, before any of `eip712SignFor`'s eight checks; a first engram is
4027
+ /// untouched (its owner is its own sign-in).
4311
4028
  signEip712: (typeId: blob, values: vec record {
4312
4029
  text;
4313
4030
  Eip712Value;
4314
4031
  }) -> (Result_5);
4315
4032
  /// Sign the engram's own ERC-8004 registration tx for client-side broadcast: the engram signs, the client
4316
- /// broadcasts and keeps the resulting registration id.
4317
- ///
4318
- /// Agent-accessible. The comment here claimed "saves ~55-85M cycles vs registerAgent" until
4319
- /// 2026-08-17; `registerAgent` — the engram method that broadcast the registration itself — left
4320
- /// the candid surface in commit d25b53b, so the comparison had outlived its other term. The
4321
- /// saving was real and is now simply the shape of this method: no RPC outcall, no receipt poll.
4322
- /// ⟨2026-08-24, the 0.16.0 pre-cut audit⟩ ONE REQUEST RECORD, not three adjacent nats.
4323
- ///
4324
- /// ⟨The owner's ruling to keep it⟩ This method KEEPS. The 0.16.0 interface plan dispositions it `die`
4325
- /// ("test-only; folds into signEip712 + registered type") and records the owner's answer: RULED 2026-08-20 —
4326
- /// KEEP, ERC-8004 stays. Both halves of the `die` rationale fail at the site: it is not
4327
- /// test-only (a downstream web client's billing page calls it), and it is not a shipped customer
4328
- /// capability either — that panel sits behind `evmBilling: { mode: 'off' }` in both the flag
4329
- /// defaults and the shipped config, and its own dialog says the signature is dormant and not
4330
- /// broadcastable. It is a real surface in a disabled state, which is neither thing the plan's
4331
- /// row claimed.
4332
- ///
4333
- /// THE SWAP CLASS, and here it is three-deep: `nonce`, `maxFeePerGas` and `maxPriorityFeePerGas`
4334
- /// were adjacent and all `Nat`. Transposing the two gas fields type-checks, decodes, and signs a
4335
- /// transaction whose priority fee exceeds its max fee — invalid on chain, and the 500-gwei
4336
- /// ceiling below cannot see it because both values are individually under the cap. Named fields
4337
- /// remove the class.
4338
- ///
4339
- /// ⟨2026-09-28⟩ LIMITED PER CALLER PER DAY. The owner decided to cap this signature rather than
4340
- /// delete it: each caller (the owner, or an active agent) may obtain
4341
- /// `EngramRegCap.MAX_PER_CALLER_PER_DAY` registration signatures per UTC day; the next is refused
4342
- /// with `#Conflict` naming this method. A signature that fails does not count. The `nonce` must
4343
- /// be the REGISTRATION address's nonce — `getEvmAddress().engramRegistration` — below 2^64 − 1.
4033
+ /// broadcasts and keeps the resulting registration id. No RPC outcall and no receipt poll on the
4034
+ /// engram; the method that broadcast the registration from the engram (`registerAgent`) left the
4035
+ /// interface.
4036
+ ///
4037
+ /// Agent-accessible. KEPT, not folded into `signEip712` plus a registered type (decided 2026-08-20:
4038
+ /// ERC-8004 stays). It is not test-only — a web client calls it, from a panel that ships disabled,
4039
+ /// whose own dialog says the signature is dormant and not broadcastable. It is a real surface in a
4040
+ /// disabled state.
4041
+ ///
4042
+ /// ONE REQUEST RECORD, not three adjacent nats (since 0.16.0) — THE SWAP CLASS, three-deep: `nonce`,
4043
+ /// `maxFeePerGas` and `maxPriorityFeePerGas` were adjacent and all `Nat`. Transposing the two gas
4044
+ /// fields type-checks, decodes, and signs a transaction whose priority fee exceeds its max fee —
4045
+ /// invalid on chain, and the 500-gwei ceiling below cannot see it because both values are
4046
+ /// individually under the cap. Named fields remove the class.
4047
+ ///
4048
+ /// LIMITED PER CALLER PER DAY, rather than deleted: each caller (the owner, or an active agent) may
4049
+ /// obtain `EngramRegCap.MAX_PER_CALLER_PER_DAY` registration signatures per UTC day; the next is
4050
+ /// refused with `#Conflict` naming this method. A signature that fails does not count. The `nonce`
4051
+ /// must be the REGISTRATION address's nonce — `getEvmAddress().engramRegistration` — below 2^64 − 1.
4344
4052
  signEngramRegistration: (req:
4345
4053
  record {
4346
4054
  maxFeePerGas: nat;
@@ -4351,27 +4059,23 @@ type Engram =
4351
4059
  /// Client probes the URL, extracts chain/token/recipient/amount from the 402, and calls this.
4352
4060
  /// Canister signs → returns header → client retries with header.
4353
4061
  ///
4354
- /// ⟨0.16.0⟩ PERSISTS beside the market's `sysSignX402Payment` (ruled in the 0.16.0 interface plan). An agent
4355
- /// with an x402 rail does not lose it because a marketplace gained one, and both run the same body.
4356
- /// ⟨2026-08-24, the 0.16.0 pre-cut audit⟩ ONE REQUEST RECORD, not eight positional arguments.
4357
- ///
4358
- /// THE HAZARD IS FUNDS MISDIRECTION, and it is the sharpest case in this batch. `tokenAddress`
4359
- /// and `recipient` were ADJACENT and both `Text`. Candid matches positionally, so transposing
4360
- /// them type-checks, decodes, and signs a payment whose payee is the TOKEN CONTRACT rather than
4361
- /// the intended one — an irreversible outbound signature spending the engram's own key, with
4362
- /// nothing between the mistake and the money. `tokenName`/`tokenVersion` are a second adjacent
4363
- /// Text pair; that one only corrupts the EIP-712 domain, so it fails loudly instead.
4062
+ /// It sits beside the market's `sysSignX402Payment`: an agent with an x402 rail does not lose it
4063
+ /// because a marketplace gained one, and both run the same body.
4364
4064
  ///
4365
- /// Named fields remove the class outright: a transposition is now a decode error at the edge.
4065
+ /// ONE REQUEST RECORD, not eight positional arguments (since 0.16.0). THE HAZARD IS FUNDS
4066
+ /// MISDIRECTION: `tokenAddress` and `recipient` were ADJACENT and both `Text`. Candid matches
4067
+ /// positionally, so transposing them type-checks, decodes, and signs a payment whose payee is the
4068
+ /// TOKEN CONTRACT rather than the intended one — an irreversible outbound signature spending the
4069
+ /// engram's own key, with nothing between the mistake and the money. `tokenName`/`tokenVersion` are
4070
+ /// a second adjacent Text pair; that one only corrupts the EIP-712 domain, so it fails loudly
4071
+ /// instead.
4366
4072
  ///
4367
- /// The body is UNCHANGED. Each parameter was referenced exactly once below, so the record is
4368
- /// destructured on entry rather than threaded through — the diff is the signature and this line,
4369
- /// which is what makes a reshape of a money path reviewable.
4073
+ /// Named fields remove the class outright: a transposition is a decode error at the edge.
4370
4074
  signX402Payment: (req: X402SignRequest) -> (Result_4);
4371
- /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ A GUARDIAN STEPS DOWN: the caller ends their own
4372
- /// guardianship of this engram. It removes a power from the one who holds it and grants none.
4373
- /// Before, only the owner could remove a guardian, so one who wanted out could only stop watching
4374
- /// without anyone knowing — worse than an honest exit on the record.
4075
+ /// A GUARDIAN STEPS DOWN: the caller ends their own guardianship of this engram. It removes a power
4076
+ /// from the one who holds it and grants none. Without it only the owner could remove a guardian, so
4077
+ /// one who wanted out could only stop watching without anyone knowing — worse than an honest exit on
4078
+ /// the record.
4375
4079
  ///
4376
4080
  /// WHO: anyone holding a guardian record here, `#Pending` or `#Active`; never refused for the
4377
4081
  /// record's state. The owner is refused by name (`People.OWNER_IS_NO_GUARDIAN`: their way is
@@ -4399,46 +4103,43 @@ type Engram =
4399
4103
  storeKeyBackup: (ciphertext: blob) -> (Result_2);
4400
4104
  /// OWNER force-close, for a session the payer abandoned.
4401
4105
  ///
4402
- /// ⟨ruled 2026-08-26: owner-gated, NO guardian.⟩ It moves someone else's money, and only ever
4403
- /// BACK TO THEM — the destination is the session's own payer and is not caller-influenced, so the
4404
- /// guardian ceremony that guards destination changes buys nothing here and would strand payers on
4405
- /// engrams that have no guardian.
4106
+ /// Owner-gated, with NO guardian: it moves someone else's money, and only ever BACK TO THEM — the
4107
+ /// destination is the session's own payer and is not caller-influenced, so the guardian ceremony
4108
+ /// that guards destination changes buys nothing here and would strand payers on engrams that have
4109
+ /// no guardian.
4406
4110
  ///
4407
4111
  /// Calls the gateway's NO-AUTH variant deliberately. `gate.closeSession` is payer-only, which is
4408
4112
  /// why the market's admin-gated `forceCloseSession` could never work: it authorised an admin and
4409
4113
  /// then delegated to a method that rejects everyone but the payer.
4410
4114
  ///
4411
- /// ⟨NOTE 2026-10-02 — NOT RENAMED, deliberately, and this is the one `sys` method that still has a
4412
- /// human caller.⟩ The sys-tier retier (ruled 2026-08-24, executed 2026-10-02 on the registry and
4413
- /// the market) named FOUR admin-called methods; this one became owner-gated two days after that
4414
- /// list was made, so the ruling never named it. Its caller is the OWNER, a person, which is the
4415
- /// exact thing the retier removes from the `sys` tier — so "a `sys` method has no human caller"
4416
- /// stays false here until it is renamed too. Left for the owner: the rename is free until the cut
4417
- /// and a break after it, and it also moves `packages/client/README.md` and
4418
- /// `docs/AGENT-ONBOARDING.md`, which name it.
4115
+ /// ⚠ THE ONE `sys` METHOD WITH A HUMAN CALLER. Its caller is the OWNER, a person, so "a `sys`
4116
+ /// method has no human caller" is false here: it became owner-gated after the admin-called methods
4117
+ /// were moved out of the `sys` tier, and was not renamed with them. Renaming it is an interface
4118
+ /// break, and it would also move `packages/client/README.md` and `docs/AGENT-ONBOARDING.md`, which
4119
+ /// name it.
4419
4120
  sysForceCloseSession: (sessionId: text) -> (Result_2);
4420
4121
  /// The metrics reader the registry designated reads every engagement's seat weeks, in one call.
4421
4122
  ///
4422
4123
  /// CALLER: the metrics reader the spawning registry named on this engram (`metricsReaderId`), and
4423
4124
  /// nobody else — not the owner (who reads `getAgentSeatWeeks`), an agent, a guardian, the registry,
4424
- /// the biller or the market (the surface-budget rule of 2026-08-16: a `sys` method names its caller). Answered only while the
4425
- /// owner leaves it on (`seatWeeksReadEnabled`, on from birth by the owner's ruling of 2026-10-02).
4125
+ /// the biller or the market (a `sys` method names its caller). Answered only while the owner leaves
4126
+ /// it on (`seatWeeksReadEnabled`, on from birth).
4426
4127
  ///
4427
4128
  /// WHAT LEAVES: per engagement, the pairing day, the first and last payment-signature days, the
4428
4129
  /// 64-week map and the count — NO root, NO invite, NO amount, recipient or nonce. The reader matches
4429
4130
  /// rows to the registry's engagements by day, so no agent's identity leaves this engram here.
4430
4131
  ///
4431
- /// ⟨update-for-read⟩ UPDATE, NOT QUERY, so a refusal leaves its `sysGetAgentSeatWeeks.denied` row naming the
4432
- /// caller's class, and an answered read leaves a `sysGetAgentSeatWeeks` row in the read log — the
4433
- /// owner can see every time the reader read. A refusal is `#Refused` naming this method and the
4434
- /// class (`SeatWeeks.readRefusal`), never an empty list: an empty list is a real answer ("no agent
4435
- /// has paired here"), and a fabricated one would be counted as one.
4132
+ /// UPDATE, NOT QUERY, so a refusal leaves its `sysGetAgentSeatWeeks.denied` row naming the caller's
4133
+ /// class, and an answered read leaves a `sysGetAgentSeatWeeks` row in the read log — the owner can
4134
+ /// see every time the reader read. A refusal is `#Refused` naming this method and the class
4135
+ /// (`SeatWeeks.readRefusal`), never an empty list: an empty list is a real answer ("no agent has
4136
+ /// paired here"), and a fabricated one would be counted as one.
4436
4137
  sysGetAgentSeatWeeks: () -> (Result_9);
4437
4138
  /// The metrics reader the registry designated reads this engram's paid-rail health, in one call:
4438
4139
  /// the balance and the line it must stay above, the memory that line is computed from, the sessions
4439
4140
  /// by state, the escrow open sessions hold, the vouchers spent and the refused ones
4440
- /// (`RailHealth.RailHealth` says what each is, and what is never in it). ⟨2026-10-08, ic402 2.18.0⟩
4441
- /// And `refundOwed`: the closed sessions whose refund failed and whose payer has not yet recovered
4141
+ /// (`RailHealth.RailHealth` says what each is, and what is never in it). And `refundOwed` (ic402
4142
+ /// 2.18.0 and later): the closed sessions whose refund failed and whose payer has not yet recovered
4442
4143
  /// it — counted from the close, never read from the ledger; `opt` from birth, and null (an engram
4443
4144
  /// that does not count) is never 0.
4444
4145
  ///
@@ -4447,50 +4148,48 @@ type Engram =
4447
4148
  /// owner leaves that reader's read on (`seatWeeksReadEnabled`): the SAME gate and the SAME switch
4448
4149
  /// as `sysGetAgentSeatWeeks`, because it is the same reader and the owner has one switch over it.
4449
4150
  ///
4450
- /// A QUERY, AND A DEPARTURE FROM THE SYS METHODS BESIDE IT, ON PURPOSE ⟨2026-10-02⟩. It is read
4451
- /// every hour, and as an update it would leave a row in this engram's read log every hour — about
4452
- /// 720 a month in a record whose rows are what its owner reads. What a query cannot do is write the
4453
- /// denial row of a refusal (a query's writes are discarded) — the trade `getOwnerConsole` makes. A
4454
- /// refusal is still `#Err(#Refused …)` naming this method and the caller's class
4455
- /// (`RailHealth.readRefusal`), never a zero balance: a made-up zero would read as an engram about
4456
- /// to freeze. Called by another canister, a query runs replicated and this engram pays for it —
4457
- /// a few million cycles an hour, the cost of being watched.
4151
+ /// A QUERY, AND A DEPARTURE FROM THE OTHER `sys` READS, ON PURPOSE. It is read every hour, and as an
4152
+ /// update it would leave a row in this engram's read log every hour — about 720 a month in a record
4153
+ /// whose rows are what its owner reads. What a query cannot do is write the denial row of a refusal
4154
+ /// (a query's writes are discarded) — the trade `getOwnerConsole` makes. A refusal is still
4155
+ /// `#Err(#Refused …)` naming this method and the caller's class (`RailHealth.readRefusal`), never a
4156
+ /// zero balance: a made-up zero would read as an engram about to freeze. Called by another canister,
4157
+ /// a query runs replicated and this engram pays for it — a few million cycles an hour, the cost of
4158
+ /// being watched.
4458
4159
  sysGetRailHealth: () -> (Result_8) query;
4459
- /// The biller reads how many signatures this engram has produced, per caller and in total.
4460
- /// ⟨2026-09-28⟩ The owner's decision of that date: a running counter on the engram, exported to
4461
- /// the biller — and to nobody else (`AccessControl.requireCashierForSignatureCounts`).
4462
- ///
4463
- /// ONE NEW METHOD ON THE ENGRAM, not a field on the registry's `sysMeterEngram` reply. An earlier study
4464
- /// ruled out widening that reply to protect deployed clients, and that reason is gone (nothing is
4465
- /// launched; the next release reinstalls every canister). The deciding fact is a different one,
4466
- /// read at the site: `sysMeterEngram` is the REGISTRY's method and answers from the management
4467
- /// canister's `canister_status` — the registry holds no signature count. Carrying the count in its
4468
- /// reply would add a registry-to-engram call inside the meter and a second trust hop between the
4469
- /// counter and the biller. The biller is already the canister this engram recognises (`cashierId`) and
4470
- /// already calls it directly (`sysRecordFeeEvent`), so it reads the count at the source.
4160
+ /// The biller reads how many signatures this engram has produced, per caller and in total: a
4161
+ /// running counter on the engram, exported to the biller — and to nobody else
4162
+ /// (`AccessControl.requireCashierForSignatureCounts`).
4163
+ ///
4164
+ /// ONE METHOD ON THE ENGRAM, not a field on the registry's `sysMeterEngram` reply. `sysMeterEngram`
4165
+ /// is the REGISTRY's method and answers from the management canister's `canister_status` — the
4166
+ /// registry holds no signature count. Carrying the count in its reply would add a registry-to-engram
4167
+ /// call inside the meter and a second trust hop between the counter and the biller. The biller is
4168
+ /// already the canister this engram recognises (`getBillerId`) and already calls it directly
4169
+ /// (`sysRecordFeeEvent`), so it reads the count at the source.
4471
4170
  ///
4472
4171
  /// UPDATE, NOT QUERY, so that a refusal leaves its `sysGetSignatureCounts.denied` row: a refused
4473
4172
  /// query cannot write one (see `Gated.mo`'s header). A refusal is `#Refused` naming this method,
4474
4173
  /// never an empty list or a zero — a zero is a real answer, and a fabricated one would be billed.
4475
4174
  ///
4476
- /// ⟨2026-09-29⟩ Each row names the key, the agent it was enrolled under (none for the owner and
4477
- /// the marketplace) and the role, so one agent's keys can be added up. And a limit for whoever
4478
- /// bills from this: the number comes from a canister its owner controls and can reinstall, so bill
4479
- /// only engrams the registry confirms run published code, and read a lower count than last time as
4480
- /// a reinstall — the reasoning is at `signaturesByCaller`.
4175
+ /// Each row names the key, the agent it was enrolled under (none for the owner and the
4176
+ /// marketplace) and the role, so one agent's keys can be added up. And a limit for whoever bills
4177
+ /// from this: the number comes from a canister its owner controls and can reinstall, so bill only
4178
+ /// engrams the registry confirms run published code, and read a lower count than last time as a
4179
+ /// reinstall — the reasoning is at `signaturesByCaller`.
4481
4180
  sysGetSignatureCounts: () -> (Result_7);
4482
4181
  /// Note a restart the registry just made: what this engram owes for it, the floor a repayment may
4483
4182
  /// not go under, and until when to keep its timers quiet.
4484
4183
  ///
4485
4184
  /// CALLER: the registry that spawned this engram, from inside its owner's `restartMyStoppedEngram`,
4486
- /// and nobody else (the surface-budget rule: a `sys` method names its caller) — the same authority as `sysSetBillerId`. The owner's next conversion
4487
- /// that lands pays the loan back first. The loan is capped at `RestartRepay.LOAN_MAX_CYCLES` and
4488
- /// the quiet window at 30 minutes, whatever the registry says.
4489
- /// ⟨2026-11-15, from an adversarial review, beside "and nobody else" above⟩ AND ONLY WHILE THAT
4490
- /// CALLER IS ONE OF THIS ENGRAM'S CONTROLLERS, asked of the network in this call (`controllerRefusal`): nobody else
4491
- /// can have started it. A note changes no loan while one is unpaid, takes one new loan and opens one
4492
- /// quiet window in any 24 hours (`RestartRepay.noteRestart`); a new loan inside the 24 hours is
4493
- /// refused `#Conflict` with the time to retry after, and the registry's own retry delivers it then.
4185
+ /// and nobody else (a `sys` method names its caller) — the same authority as `sysSetBillerId` — AND
4186
+ /// ONLY WHILE THAT CALLER IS ONE OF THIS ENGRAM'S CONTROLLERS, asked of the network in this call
4187
+ /// (`controllerRefusal`): nobody else can have started it. The owner's next conversion that lands
4188
+ /// pays the loan back first. The loan is capped at `RestartRepay.LOAN_MAX_CYCLES` and the quiet
4189
+ /// window at 30 minutes, whatever the registry says. A note changes no loan while one is unpaid,
4190
+ /// takes one new loan and opens one quiet window in any 24 hours (`RestartRepay.noteRestart`); a new
4191
+ /// loan inside the 24 hours is refused `#Conflict` with the time to retry after, and the registry's
4192
+ /// own retry delivers it then.
4494
4193
  /// REPLIES: `#Refused` (not the registry, or not a controller), `#Conflict` (a loan was taken less
4495
4194
  /// than 24 hours ago), `#Ok`.
4496
4195
  sysNoteRestart: (r:
@@ -4499,35 +4198,33 @@ type Engram =
4499
4198
  loan: nat;
4500
4199
  quietUntilNs: int;
4501
4200
  }) -> (Result_2);
4502
- /// Rent lifecycle notice — how the OWNER (not the agent) learns their subscription lapsed. The rent-handoff
4503
- /// work shipped the handoff but every alarm it added talks to the operating service's watchdog; the
4504
- /// doc named the debt plainly: "an owner learns of their own lapse only by looking." This closes
4505
- /// it through the channel the owner already has: the entry lands in the audit log under `rent.*`,
4506
- /// ActionAlerts classifies that as #money (default ON), and the drain delivers it to the owner's
4507
- /// webhook. No new channel, no new config — an owner who armed alerts gets told.
4508
- ///
4509
- /// Gated exactly like sysRecordFeeEvent (spawnedBy or cashierId): the sweep is the only thing that
4510
- /// OBSERVES the transition, so it is the only thing that can report it. The state whitelist is
4511
- /// closed — this is a lifecycle feed, not a free-text push surface into the owner's audit chain.
4201
+ /// Rent lifecycle notice — how the OWNER (not the agent) learns their subscription lapsed. Without
4202
+ /// it an owner would learn of their own lapse only by looking: the biller's own alarms talk to the
4203
+ /// deployment's watchdog, not to the owner. This uses the channel the owner already has: the entry
4204
+ /// lands in the audit log under `rent.*`, ActionAlerts classifies that as #money (default ON), and
4205
+ /// the drain delivers it to the owner's webhook. No new channel, no new config — an owner who armed
4206
+ /// alerts gets told.
4207
+ ///
4208
+ /// Gated exactly like sysRecordFeeEvent (the spawning registry or the configured biller): the
4209
+ /// biller's sweep is the only thing that OBSERVES the transition, so it is the only thing that can
4210
+ /// report it. The state whitelist is closed — this is a lifecycle feed, not a free-text push surface
4211
+ /// into the owner's audit chain.
4512
4212
  sysNotifyRentLifecycle: (state: text, detail: text) -> (Result_2);
4513
- /// ⟨0.16.0⟩ `getWalletActivation()` DELETED — folded to `about().walletActivatedAtNs`, with its
4514
- /// custody-posture rationale carried onto the field. "Can this thing hold money" is a question a
4515
- /// counterparty is entitled to ask before dealing with an engram, which is why it stays public.
4516
- /// ⟨0.16.0, sys tier⟩ THE MARKET TELLING CUSTODY, which is the half of the wallet-activation
4213
+ /// THE MARKET TELLING CUSTODY (a `sys`-tier call), which is the half of the wallet-activation
4517
4214
  /// story the engram cannot see for itself.
4518
4215
  ///
4519
- /// The 0.16.0 split moved the storefront to the market, so listing an endpoint — a seller offering to be paid —
4520
- /// happens on a canister this one does not observe. `walletActivatedAt` exists to raise a custody
4521
- /// decision (a wallet-bearing engram is sovereign-by-default and its owner has a claimSovereignty
4522
- /// still to complete), and a seller who has never derived an EVM address would have gone
4523
- /// unstamped forever. That is the under-reporting direction, which is the harmful one: a missing
4524
- /// flag retires a decision that is still pending.
4216
+ /// The storefront is on the market (since 0.16.0), so listing an endpoint — a seller offering to be
4217
+ /// paid — happens on a canister this one does not observe. `walletActivatedAt` exists to raise a
4218
+ /// custody decision (a wallet-bearing engram is sovereign-by-default and its owner has a
4219
+ /// claimSovereignty still to complete), and a seller who has never derived an EVM address would
4220
+ /// have gone unstamped forever. That is the under-reporting direction, which is the harmful one: a
4221
+ /// missing flag retires a decision that is still pending.
4525
4222
  ///
4526
- /// ONE METHOD, NOT A FAMILY (every method has a tier and a named caller). The other surface the old comment
4527
- /// named — opening a payment session — is NOT here and is not an omission: measured at the market 2026-08-20,
4528
- /// `openSession`'s caller is a BUYER, and a buying engram signs with a key it derived through `getEvmAddress`,
4529
- /// which stamps. It is already marked before it can pay. Adding a case for it would be surface
4530
- /// bought for a gap that does not exist.
4223
+ /// ONE METHOD, NOT A FAMILY (every method has a tier and a named caller). Opening a payment session
4224
+ /// is NOT here and is not an omission: measured at the market 2026-08-20, `openSession`'s caller is
4225
+ /// a BUYER, and a buying engram signs with a key it derived through `getEvmAddress`, which stamps.
4226
+ /// It is already marked before it can pay. Adding a case for it would be surface bought for a gap
4227
+ /// that does not exist.
4531
4228
  ///
4532
4229
  /// THE SURFACE WHITELIST IS CLOSED, exactly as `sysNotifyRentLifecycle`'s state whitelist is, and
4533
4230
  /// for the same reason: this is a lifecycle feed, not a free-text push into the owner's audit
@@ -4542,62 +4239,70 @@ type Engram =
4542
4239
  /// the origin: only the configured market can pass that value, so the line cannot be produced by
4543
4240
  /// any other caller.
4544
4241
  sysNotifyWalletActivity: (surface: text) -> (Result_2);
4545
- /// The rent RECEIPT seam (rent is the biller's; the engram keeps receipts): the biller tells this engram
4546
- /// that money moved on its behalf, and the engram appends a `fee.recorded` line to its own audit chain. It
4547
- /// computes nothing.
4242
+ /// The rent RECEIPT seam (rent is the biller's; the engram keeps receipts): the biller tells this
4243
+ /// engram that money moved on its behalf, and the engram appends a `fee.recorded` line to its own
4244
+ /// audit chain. It computes nothing.
4548
4245
  ///
4549
4246
  /// ⚠ GATED TO TWO PRINCIPALS AND NEITHER IS THE OWNER — the SPAWNING REGISTRY or the CONFIGURED
4550
- /// CASHIER. An owner cannot write their own fee receipts, which is the point: a receipt an owner
4247
+ /// BILLER. An owner cannot write their own fee receipts, which is the point: a receipt an owner
4551
4248
  /// could forge is not evidence. `getBillerId` publishes which biller this engram accepts, so the
4552
4249
  /// same fact is checkable from outside.
4553
4250
  ///
4554
4251
  /// This is the whole of what moving rent to the biller left on the engram. Entitlement, custody and
4555
4252
  /// fee math live on the biller; here there is an append-only record and no arithmetic — so a
4556
4253
  /// disagreement between the two is visible rather than reconciled silently.
4557
- /// ⟨2026-08-24, the 0.16.0 pre-cut audit⟩ ONE FEE-EVENT RECORD, not three positional
4558
- /// arguments. The audit records that the interface review prescribed this fold and it "was refused for a
4559
- /// wire-break reason the ruling voids", with the instruction to execute it or ratify
4560
- /// positional-forever with a dated note — "silence spends the window". Executed.
4561
- ///
4562
- /// The argument for a record here is EVOLUTION, not transposition: unlike `setTopUpLimits`'s two
4563
- /// adjacent nats, these three types differ, so a swap would not type-check. What positional
4564
- /// arguments cost is the next field. A fee event is exactly the shape that grows one — token,
4565
- /// amount, rate — and the interface-evolution rule (2026-08-16) is that an INBOUND record gains optional fields forever
4566
- /// while an argument LIST cannot gain anything without breaking every caller at once.
4567
- ///
4568
- /// ⚠ ALL FOUR CALLERS MOVE IN THE SAME CHANGE, and this is the fatal direction of the client-subset rule: three
4569
- /// inline hand-IDLs in the biller and one in the registry declare this method's argument shape
4570
- /// structurally. Every one of them sits inside `try { … } catch (_e) {}`, which reads as
4571
- /// containment and is not: a reply-decode mismatch calls `ic0.trap` INSIDE the caller's own
4572
- /// callback, and Motoko's `catch` sees rejects, never traps. That is the failure that took
4573
- /// production monitoring dark for ~33h. The ENGRAM WASM MUST SHIP BEFORE its callers, and
4574
- /// the interface-compatibility gate is suspended for the cut, so nothing mechanical will catch a wrong order.
4254
+ ///
4255
+ /// ONE FEE-EVENT RECORD, not three positional arguments (since 0.16.0). The argument for a record
4256
+ /// here is EVOLUTION, not transposition: unlike `setTopUpLimits`'s two adjacent nats, these three
4257
+ /// types differ, so a swap would not type-check. What positional arguments cost is the next field. A
4258
+ /// fee event is exactly the shape that grows one — token, amount, rate — and the interface-evolution
4259
+ /// rule is that an INBOUND record gains optional fields forever while an argument LIST cannot gain
4260
+ /// anything without breaking every caller at once.
4261
+ ///
4262
+ /// ⚠ ITS CALLERS DECLARE THIS SHAPE BY HAND, and this is the fatal direction of the client-subset
4263
+ /// rule: hand-written IDLs in the biller and in the registry declare this method's argument shape
4264
+ /// structurally. A caller that wraps the call in `try { … } catch (_e) {}` is not contained by it:
4265
+ /// a reply-decode mismatch calls `ic0.trap` INSIDE the caller's own callback, and Motoko's `catch`
4266
+ /// sees rejects, never traps. That failure once took a deployment's monitoring dark for ~33h. Change
4267
+ /// the shape only with the ENGRAM WASM shipping BEFORE its callers.
4575
4268
  sysRecordFeeEvent: (fee:
4576
4269
  record {
4577
4270
  cycles: nat;
4578
4271
  paidThroughNs: opt int;
4579
4272
  scheduleVersion: opt text;
4580
4273
  }) -> (Result_2);
4581
- /// ⟨2026-11-04, the owner's ruling: a marketplace sale is paid into the selling engram's own
4582
- /// wallet, and the engram writes each sale to its record⟩ THE MARKET WRITING A SALE TO THIS ENGRAM'S
4583
- /// RECORD, after it has paid this engram's own account (ckUSDC) or address (another chain). The
4584
- /// money does not pass through here and nothing here moves any: a ledger account needs no running
4585
- /// canister, so the sale is paid whatever state this engram is in, and this method only writes the
4586
- /// line that says so — one `market.sale` row per sale, its details from `SaleNotice.details`.
4274
+ /// THE MARKET WRITING A SALE TO THIS ENGRAM'S RECORD, after it has paid this engram's own account
4275
+ /// (ckUSDC) or address (another chain): a marketplace sale is paid into the selling engram's own
4276
+ /// wallet, and the engram writes each sale to its record. The money does not pass through here and
4277
+ /// nothing here moves any: a ledger account needs no running canister, so the sale is paid whatever
4278
+ /// state this engram is in, and this method only writes the line that says so — one `market.sale`
4279
+ /// row per sale, its details from `SaleNotice.details`.
4587
4280
  ///
4588
4281
  /// GATED TO THE CONFIGURED MARKET (`AccessControl.requireMarketSale`), the pointer the spawning
4589
4282
  /// registry set once (`sysSetMarketId`). Neither the owner nor an agent may write a sale row: a
4590
4283
  /// receipt an owner could write is a receipt an owner could forge.
4591
4284
  ///
4285
+ /// NO MARKET SET YET IS "NOT YET", NOT A REFUSAL. With `marketId` null the gate's refusal is
4286
+ /// answered `#Unavailable`, and the market PARKS the notice (on any other `#Err` it drops a sale's
4287
+ /// line at once, which would lose the line for good while the money had landed). `marketId` is not
4288
+ /// final: the registry sets it later (`sysSetMarketId`), and then `retrySaleNotices` or the seller's
4289
+ /// next `registerSeller` writes the line; the market's 30-day age cap ends the wait. That arm writes
4290
+ /// NO `sysRecordSale.denied` row: nothing was denied, and `retrySaleNotices` is open to any caller,
4291
+ /// so a row per press would be spam on the owner's read log. A caller that is not the configured
4292
+ /// market, once one is set, is still `#Refused` with its row. WHAT WOULD MAKE THIS WRONG: a
4293
+ /// `marketId` that can be set to null on purpose (a market retired from an engram) — then null
4294
+ /// would mean "never", and parking for 30 days would hold a line nobody can write. Witness:
4295
+ /// test/market-route/sale-route.test.ts S7 and record-row.test.ts R3.
4296
+ ///
4592
4297
  /// IDEMPOTENT ON THE RECEIPT ID. The market retries a notice it could not deliver (this engram out
4593
4298
  /// of compute, upgrading, stopped), and a retry of one that did land must learn it succeeded: a
4594
4299
  /// repeat answers `#Ok` and writes nothing — no row, no denial row (`sysNotifyWalletActivity`'s
4595
4300
  /// contract). The receipt ids live in `saleReceiptsStable`.
4596
4301
  ///
4597
4302
  /// IT AWAITS NOTHING, deliberately, and test/market-route-wiring.test.ts rule E3 holds that: no
4598
- /// outgoing call means nothing to count under wiring rule 20, and NO WAKE DOOR — a sale brings
4599
- /// dollars, not compute, so a paused engram's wake would find no room on every engram that is
4600
- /// actually paused (a design question, defaulted to "wakes nothing unless the owner objects").
4303
+ /// outgoing call means nothing to count under the counted-call rule (wiring rule 20 in
4304
+ /// test/timer-pause-wiring.test.ts), and NO WAKE DOOR — a sale brings dollars, not compute, so a
4305
+ /// paused engram's wake would find no room on every engram that is actually paused.
4601
4306
  ///
4602
4307
  /// NOT GATED ON a guardian's payment freeze (that stops this engram's own signing — money out;
4603
4308
  /// `sysRecordFeeEvent` is not freeze-gated either), on `pauseWrites` (memory writes), or on the
@@ -4605,57 +4310,40 @@ type Engram =
4605
4310
  ///
4606
4311
  /// It also stamps `walletActivatedAt` ("market-sale"): money landing in this engram's account IS
4607
4312
  /// the wallet-bearing event, and it covers services, which the market's listing notice never did.
4608
- /// The listing notice (`sysNotifyWalletActivity`) stays, as ruled 2026-08-20; whether to retire it
4609
- /// is the owner's question.
4610
- ///
4611
- /// ⟨2026-11-04, the owner's ruling that a sale's record line waits until a market is set, beside the
4612
- /// gate paragraph above⟩ NO MARKET SET YET IS "NOT YET", NOT A REFUSAL. With `marketId` null the
4613
- /// gate's refusal is answered `#Unavailable`, and the market PARKS the notice (it drops a sale's line
4614
- /// on any other `#Err` at once — the defect this closes: the money landed and the line was lost for
4615
- /// good). `marketId` is not final: the registry sets it later (`sysSetMarketId`), and then
4616
- /// `retrySaleNotices` or the seller's next `registerSeller` writes the line; the market's 30-day age
4617
- /// cap ends the wait. That arm writes NO `sysRecordSale.denied` row: nothing was denied, and
4618
- /// `retrySaleNotices` is open to any caller, so a row per press would be spam on the owner's read
4619
- /// log. A caller that is not the configured market, once one is set, is still `#Refused` with its
4620
- /// row, unchanged. WHAT WOULD MAKE THIS WRONG: a `marketId` that can be set to null on purpose (a
4621
- /// market retired from an engram) — then null would mean "never", and parking for 30 days would hold
4622
- /// a line nobody can write. Witness: test/market-route/sale-route.test.ts S7 and record-row.test.ts R3.
4313
+ /// The listing notice (`sysNotifyWalletActivity`) stays; whether to retire it is an open question.
4623
4314
  sysRecordSale: (sale: SaleNotice) -> (Result_2);
4624
4315
  /// Give back what a paid security update advanced this engram and the install did not use.
4625
4316
  ///
4626
4317
  /// CALLER: the registry that spawned this engram, right after it installed a security update it
4627
- /// paid for, and nobody else (the surface-budget rule: a `sys` method names its caller). Sends the smallest of: the advance, what this engram holds
4628
- /// above its balance before the update, and what sits above its 30-day reserve plus send headroom
4629
- /// (`RestartRepay.giveBack`) — attached to the registry's `sysRepayUpgradeAdvance`, which accepts no
4630
- /// more than it advanced. The registry writes off what is not returned; nothing is owed after.
4631
- /// ⟨CORRECTED 2026-10-28, beside "its 30-day reserve" above — the owner's automatic-pause ruling⟩ The reserve is
4632
- /// this engram's freezing reserve at its own setting (`freezeReservation` = `lineEstimate`), not a
4633
- /// 30-day figure: about 430B more at a ~305-day setting.
4634
- /// ⟨2026-10-26, the owner's review choice: "take back only what we added; anything left over goes
4635
- /// to the 90-day write-off"⟩ The registry now names the ONE advance it is asking for (`advanceId`,
4636
- /// the one its deposit for this install put on its ledger) and `advance` is that advance's amount
4637
- /// alone — never the sum of every advance this engram has out. The engram passes the id back to
4638
- /// `sysRepayUpgradeAdvance` unchanged, and the registry settles that advance only. The engram's own
4639
- /// caps are unchanged (`RestartRepay.giveBack`). HONEST LIMIT, unchanged by that choice: the engram cannot
4640
- /// tell its owner's top-up from the unused advance, so when the install used part of the advance and
4641
- /// the owner added compute meanwhile, up to the part the install used can still come from the
4642
- /// owner's top-up (the cap is the advance, not its unused part).
4643
- /// ⟨2026-11-15, from an adversarial review, beside "and nobody else" and "The engram's own caps are
4644
- /// unchanged" above⟩ THE CAPS CHANGED, and the caller's figures are upper bounds only. Answered
4645
- /// once per upgrade this engram saw, within 30 minutes of it (`upgradeSeenAtNs`); only to a caller
4646
- /// that is one of its controllers, asked of the network in this call (`controllerRefusal`); never more than
4647
- /// 320.005B (`RestartRepay.ADVANCE_MAX_CYCLES`); and never taking this engram under its own
4648
- /// signing floor (`RestartRepay.aboveFloor`) — was line + 0.1T, which is under that floor.
4649
- /// ⟨CORRECTED 2026-11-15, later, beside "never taking this engram under its own signing floor"
4650
- /// above⟩ That rule returned 0 to every registry that had really paid: a paid engram is under its
4651
- /// signing floor by construction (MEASURED: 138.66B advanced, 0 returned). The floor is now
4652
- /// `RestartRepay.giveBackFloor`: an update never leaves this engram lower than it was before it.
4653
- /// One that could sign before the update can sign after the give-back; one already under its
4654
- /// signing floor returns what was advanced and no more, never under its reserve and send headroom.
4655
- /// The balance before is the caller's figure; RestartRepay.mo's header says what a controller that
4656
- /// lies about it can take (at most the cap, once per real upgrade, never below reserve + headroom).
4657
- /// RestartRepay.mo's header says what a controller can still do. The record line gains `left=`:
4658
- /// what actually left, beside the registry's `returned=`.
4318
+ /// paid for, and nobody else (a `sys` method names its caller): answered only to a caller that is
4319
+ /// one of this engram's controllers, asked of the network in this call (`controllerRefusal`), and
4320
+ /// once per upgrade this engram saw, within 30 minutes of it (`upgradeSeenAtNs`).
4321
+ ///
4322
+ /// The registry names the ONE advance it is asking for (`advanceId`, the one its deposit for this
4323
+ /// install put on its ledger), and `advance` is that advance's amount alone — never the sum of
4324
+ /// every advance this engram has out. The engram passes the id back to `sysRepayUpgradeAdvance`
4325
+ /// unchanged, attached to what it sends, and the registry settles that advance only: it accepts no
4326
+ /// more than it advanced, writes off what is not returned, and nothing is owed after.
4327
+ ///
4328
+ /// WHAT IS SENT. The caller's figures are upper bounds only. The engram sends the smallest of: the
4329
+ /// advance, what it holds above its balance before the update, and what sits above its freezing
4330
+ /// reserve at its own setting (`freezeReservation` = `lineEstimate`) plus send headroom
4331
+ /// (`RestartRepay.giveBack`); never more than 320.005B (`RestartRepay.ADVANCE_MAX_CYCLES`); and never
4332
+ /// so much that the update leaves this engram lower than it was before it
4333
+ /// (`RestartRepay.giveBackFloor`). One that could sign before the update can sign after the
4334
+ /// give-back; one already under its signing floor returns what was advanced and no more, never under
4335
+ /// its reserve and send headroom. (A floor at the signing floor itself returned 0 to every registry
4336
+ /// that had really paid, because a paid engram is under its signing floor by construction —
4337
+ /// MEASURED: 138.66B advanced, 0 returned.) The balance before is the caller's figure;
4338
+ /// RestartRepay.mo's header says what a controller that lies about it can take (at most the cap,
4339
+ /// once per real upgrade, never below reserve + headroom).
4340
+ ///
4341
+ /// HONEST LIMIT: the engram cannot tell its owner's top-up from the unused advance, so when the
4342
+ /// install used part of the advance and the owner added compute meanwhile, up to the part the
4343
+ /// install used can still come from the owner's top-up (the cap is the advance, not its unused
4344
+ /// part).
4345
+ ///
4346
+ /// The record line carries `left=`: what actually left, beside the registry's `returned=`.
4659
4347
  sysReturnUpgradeAdvance: (a:
4660
4348
  record {
4661
4349
  advance: nat;
@@ -4665,37 +4353,37 @@ type Engram =
4665
4353
  /// Point this engram at the biller that converts its tokens → cycles. Settable, not hardcoded:
4666
4354
  /// coupling is by principal id, so the same wasm runs against any deployment's biller.
4667
4355
  ///
4668
- /// ⟨0.16.0, rent is the biller's; the engram keeps receipts⟩ Renamed from `setCashierId`, and NARROWED
4669
- /// to the spawning registry (ruled in the 0.16.0 interface plan). Two changes, for two reasons:
4670
- /// · "cashier" is a PLATFORM word and this is the OSS wire. `biller` names the role, not the
4671
- /// product that fills it.
4672
- /// · The write is now sys-tier. It previously accepted the OWNER as well, and that second
4673
- /// writer is what the ruling removed — three writers for one field (owner, spawner, and the
4674
- /// frontend acting for the owner) is a last-write-wins race over a money-routing target.
4356
+ /// Renamed from `setCashierId` in 0.16.0 and NARROWED to the spawning registry (rent is the
4357
+ /// biller's; the engram keeps receipts). Two changes, for two reasons:
4358
+ /// · `biller` names the role, not the product that fills it: this is the protocol's wire.
4359
+ /// · The write is sys-tier. It accepted the OWNER as well, and three writers for one field
4360
+ /// (owner, spawner, and an app acting for the owner) is a last-write-wins race over a
4361
+ /// money-routing target.
4675
4362
  ///
4676
- /// ⚠ THE COST, RULED AND ACCEPTED: an engram whose registry never set this has NO owner remedy.
4363
+ /// ⚠ THE COST, ACCEPTED: an engram whose registry never set this has NO owner remedy.
4677
4364
  /// `convertEarningsToCycles` fails closed against a null biller, and with the owner leg gone
4678
4365
  /// nobody but the spawning registry can fix it. That refusal therefore names the real remedy
4679
4366
  /// rather than telling an owner to run a call they can no longer make.
4680
4367
  sysSetBillerId: (id: principal) -> (Result_2);
4681
4368
  /// Give this engram its BIRTH CHAIN: its ancestors' birth records and its own, root first, its own
4682
- /// last ⟨2026-10-26, the owner's lineage rulings: each engram keeps its birth record and its ancestors'
4683
- /// copies, and the registry certifies each record's fingerprint⟩.
4369
+ /// last. Each engram keeps its birth record and its ancestors' copies, and the registry certifies
4370
+ /// each record's fingerprint.
4684
4371
  ///
4685
4372
  /// CALLER: the registry that spawned this engram, from its birth push or its sweep's retry, and
4686
- /// nobody else (the surface-budget rule: a `sys` method names its caller) — the same authority as `sysSetBillerId`, through the named gate
4687
- /// `AccessControl.requireSpawningRegistry`. ⚠ THE REGISTRY'S CLIENT DECLARATION IS HAND-WRITTEN
4688
- /// (`sysSetBirthChain : ([BirthRecord.BirthRecord]) -> async Wire.Result<()>`, in `mintAndPush`): a
4689
- /// different reply type here traps inside the registry's callback, and a different name leaves every
4690
- /// newborn without its record, silently retried. test/lineage-wiring.test.ts holds the two equal.
4373
+ /// nobody else (a `sys` method names its caller) — the same authority as `sysSetBillerId`, through
4374
+ /// the named gate `AccessControl.requireSpawningRegistry`. ⚠ THE REGISTRY'S CLIENT DECLARATION IS
4375
+ /// HAND-WRITTEN (`sysSetBirthChain : ([BirthRecord.BirthRecord]) -> async Wire.Result<()>`, in
4376
+ /// `mintAndPush`): a different reply type here traps inside the registry's callback, and a different
4377
+ /// name leaves every newborn without its record, silently retried. test/lineage-wiring.test.ts holds
4378
+ /// the two equal.
4691
4379
  ///
4692
4380
  /// SET ONCE: the same chain again answers `#Ok` and changes nothing (the registry's sweep may re-send
4693
4381
  /// a push whose reply was lost); a different one is refused `#Conflict`. THE ENGRAM DOES NOT HASH:
4694
4382
  /// it checks only that the chain ends with its own record. The fingerprints are the registry's to
4695
4383
  /// certify and the client's `verifyBirthChain` to check.
4696
4384
  sysSetBirthChain: (chain: vec BirthRecord) -> (Result_2);
4697
- /// Name the origin of the page where this engram's owner approves a connector sign-in.
4698
- /// ⟨2026-11-08, the owner's ruling that an engram sends sign-ins to its own environment's app⟩
4385
+ /// Name the origin of the page where this engram's owner approves a connector sign-in: an engram
4386
+ /// sends sign-ins to its own environment's app.
4699
4387
  ///
4700
4388
  /// CALLER: the registry that spawned this engram, from its birth push (`pushToNewborn`), and nobody
4701
4389
  /// else — the same authority as `sysSetMetricsReaderId`, through the named gate
@@ -4711,8 +4399,8 @@ type Engram =
4711
4399
  /// and nothing changes. SET ONCE: the same origin again answers `#Ok` and changes nothing; another is
4712
4400
  /// refused `#Conflict`. Never cleared. Recorded in the chained record (`oauth.sysSetConsentOrigin`).
4713
4401
  sysSetConsentOrigin: (origin: text) -> (Result_2);
4714
- /// Point this engram at the commerce satellite allowed to ask it for signatures. ⟨0.16.0, commerce moved to
4715
- /// the market; signing stayed here⟩
4402
+ /// Point this engram at the commerce satellite allowed to ask it for signatures. (Commerce lives in
4403
+ /// the market since 0.16.0; signing stayed here.)
4716
4404
  ///
4717
4405
  /// SAME AUTHORITY AS `sysSetBillerId`, and for a stronger reason. That one routes money; this one
4718
4406
  /// confers the capability to ask this canister to sign with its own tECDSA key. Three writers for
@@ -4725,63 +4413,58 @@ type Engram =
4725
4413
  /// an owner to run a call they cannot make.
4726
4414
  sysSetMarketId: (id: principal) -> (Result_2);
4727
4415
  /// Name the metrics reader allowed to read this engram's seat weeks (`sysGetAgentSeatWeeks`).
4728
- /// ⟨2026-10-02, the owner's ruling of that day⟩
4729
4416
  ///
4730
- /// CALLER: the registry that spawned this engram, and nobody else (the surface-budget rule: a `sys` method names its caller) — the same authority
4731
- /// as `sysSetBillerId` and `sysSetMarketId`. The registry calls it once, at spawn, last of its
4732
- /// pushes, with exactly this interface: `sysSetMetricsReaderId : (Principal) -> async
4733
- /// Wire.Result<()>`. ⚠ THAT CLIENT DECLARATION IS HAND-WRITTEN AT THE REGISTRY: a different NAME
4734
- /// here leaves every newborn with no reader, silently (the push is best-effort and its reject is
4735
- /// caught), and a different REPLY type traps inside the registry's callback. Rename neither without
4736
- /// the registry; test/seat-weeks-wiring.test.ts compares the two.
4417
+ /// CALLER: the registry that spawned this engram, and nobody else (a `sys` method names its caller)
4418
+ /// — the same authority as `sysSetBillerId` and `sysSetMarketId`. The registry calls it once, at
4419
+ /// spawn, last of its pushes, with exactly this interface: `sysSetMetricsReaderId : (Principal) ->
4420
+ /// async Wire.Result<()>`. ⚠ THAT CLIENT DECLARATION IS HAND-WRITTEN AT THE REGISTRY: a different
4421
+ /// NAME here leaves every newborn with no reader, silently (the push is best-effort and its reject
4422
+ /// is caught), and a different REPLY type traps inside the registry's callback. Rename neither
4423
+ /// without the registry; test/seat-weeks-wiring.test.ts compares the two.
4737
4424
  ///
4738
4425
  /// A CANISTER ONLY: a person's principal, the anonymous principal or the management canister is
4739
4426
  /// refused `#Invalid` and nothing changes — a person named here would be handed this engram's seat
4740
- /// counts. Set or replaced, never cleared: the owner's control is the switch
4741
- /// (`setSeatWeeksReadEnabled`), not the pointer.
4742
- /// ⟨CORRECTED 2026-10-26, the owner's lineage ruling that the market, biller and usage reader are set once
4743
- /// at birth⟩ "Set or replaced" is no longer true: it is SET ONCE. The same reader again answers `#Ok` and
4744
- /// changes nothing; another is refused `#Conflict` (`AccessControl.setOnce` says why). Still never cleared. The
4745
- /// chained record entry (`metrics.sysSetMetricsReaderId`) is the evidence of when the read was granted, and to
4746
- /// whom.
4427
+ /// counts. SET ONCE, at birth, as the market and the biller are: the same reader again answers
4428
+ /// `#Ok` and changes nothing; another is refused `#Conflict` (`AccessControl.setOnce` says why).
4429
+ /// Never cleared: the owner's control is the switch (`setSeatWeeksReadEnabled`), not the pointer.
4430
+ /// The chained record entry (`metrics.sysSetMetricsReaderId`) is the evidence of when the read was
4431
+ /// granted, and to whom.
4747
4432
  sysSetMetricsReaderId: (reader: principal) -> (Result_2);
4748
4433
  /// The market asks this engram to sign a registered type — the seam where commerce meets signing,
4749
- /// settlement leg. ⟨0.16.0⟩
4434
+ /// settlement leg.
4750
4435
  ///
4751
4436
  /// THE ENGRAM DOES NOT TRUST THE MARKET WITH ANYTHING BEYOND "ask". Every control that bounds
4752
- /// what may be signed stays here and is unchanged: the type must already be OWNER-REGISTERED
4753
- /// (the market cannot introduce a shape), its cool-off must have elapsed, its per-type daily cap
4754
- /// still binds, the destination allowlist still fails closed, and a payments freeze still stops
4755
- /// it. What the market supplies is the request; what the engram supplies is the whole policy.
4756
- /// ⟨2026-10-14⟩ And the type's per-field rules, its own destination list (the destination-list ruling) and
4757
- /// the signing floor (the typed-data signing-floor ruling) — all in `eip712SignFor`, so they bind the
4758
- /// market as they bind the owner; a refusal here is on the chained record under the market's caller
4759
- /// and role.
4437
+ /// what may be signed stays here: the type must already be OWNER-REGISTERED (the market cannot
4438
+ /// introduce a shape), its cool-off must have elapsed, its per-type daily cap binds, its per-field
4439
+ /// rules, its own destination list (failing closed) and the signing floor bind, and a payments
4440
+ /// freeze stops it — all in `eip712SignFor`, so they bind the market as they bind the owner. What
4441
+ /// the market supplies is the request; what the engram supplies is the whole policy. A refusal
4442
+ /// here is on the chained record under the market's caller and role.
4760
4443
  ///
4761
4444
  /// That is what "signatures only" means in code, and it is why this method needs no new authority
4762
4445
  /// model: an unregistered typeId is refused for the market exactly as it is for the owner.
4763
4446
  ///
4764
- /// ⟨2026-11-02, the child build's withdrawal-pinning step⟩ In an engram opened through another, approving a trading
4765
- /// key (`HyperliquidTransaction:ApproveAgent`) is refused to the market (`#Refused`): it is signed by
4447
+ /// In an engram opened through another, approving a trading key
4448
+ /// (`HyperliquidTransaction:ApproveAgent`) is refused to the market (`#Refused`): it is signed by
4766
4449
  /// that engram's sign-in alone, through `signEip712`.
4767
4450
  sysSignEip712: (typeId: blob, values: vec record {
4768
4451
  text;
4769
4452
  Eip712Value;
4770
4453
  }) -> (Result_5);
4771
4454
  /// The market asks this engram to sign an x402 payment — the seam where commerce meets signing, the
4772
- /// paid-request leg. ⟨0.16.0⟩
4455
+ /// paid-request leg.
4773
4456
  ///
4774
4457
  /// THE MARKET SUPPLIES THE REQUEST; THE ENGRAM SUPPLIES THE POLICY. Every control below the caller
4775
- /// gate is unchanged and still binds: a payments freeze stops it, the recipient must be on the
4776
- /// owner's EVM allowlist if the owner has set one, the per-transaction and per-day caps hold, and
4777
- /// an over-policy request goes to the OWNER'S approval queue rather than through.
4778
- /// ⟨2026-11-19, beside the sentence above⟩ The allowlist clause is history: the never-populated list
4779
- /// and its check went at the 0.16.0 fresh install. The freeze, the caps and the queue still bind.
4458
+ /// gate binds: a payments freeze stops it, the per-transaction and per-day caps hold, and an
4459
+ /// over-policy request goes to the OWNER'S approval queue rather than through.
4780
4460
  ///
4781
- /// ⟨2026-11-19, at the 0.16.0 fresh install⟩ ONE RECORD, THE OWNER RAIL'S SHAPE (`Types.X402SignRequest`).
4782
- /// This took eight positional arguments, `tokenAddress` and `recipient` side by side as two `Text`
4783
- /// values a caller could swap without a type error; it now takes the same named record as
4784
- /// `signX402Payment`, so the two doors cannot drift apart and a swap is a field name, not a position.
4461
+ /// REFUSED UNTIL THE OWNER SETS THAT POLICY. While the owner has set no spending policy for the
4462
+ /// market's principal, this method and `sysSignEip712` sign nothing.
4463
+ ///
4464
+ /// ONE RECORD, THE OWNER RAIL'S SHAPE (`Types.X402SignRequest`): the same named record as
4465
+ /// `signX402Payment`, so the two doors cannot drift apart, and `tokenAddress` and `recipient` — two
4466
+ /// `Text` values a caller could swap without a type error as positional arguments — are field names,
4467
+ /// not positions.
4785
4468
  ///
4786
4469
  /// `#ApprovalPending` is a real answer here, not an error, exactly as it is for an agent: the
4787
4470
  /// market is told the spend needs the owner and can retry with the `approvalId` once granted. A
@@ -4790,78 +4473,71 @@ type Engram =
4790
4473
  ///
4791
4474
  /// READ `x402SignFor`'s declaration before setting a policy for this caller. The cap is ONE bucket
4792
4475
  /// for ALL market traffic; per-seller limits are not expressible in the store it reads.
4793
- ///
4794
- /// ⟨2026-11-16⟩ REFUSED UNTIL THE OWNER SETS THAT POLICY. While the owner has set no spending
4795
- /// policy for the market's principal, this method and `sysSignEip712` sign nothing.
4796
4476
  sysSignX402Payment: (req: X402SignRequest) -> (Result_4);
4797
- /// Write an `alerts.test` entry into the audit log; the drain timer delivers it to the webhook
4798
- /// within ~60s. ⟨2026-10-29, beside "within ~60s"⟩ Within seconds (a minute if a delivery was just
4799
- /// made). Owner-only; requires a configured URL so the test can actually go somewhere.
4477
+ /// Write an `alerts.test` entry into the audit log; the drain delivers it to the webhook within
4478
+ /// seconds (a minute if a delivery was just made). Owner-only; requires a configured URL so the
4479
+ /// test can actually go somewhere.
4800
4480
  testActionAlert: () -> (Result_2);
4801
4481
  /// Guardian test alert — an audited guardian action (`alerts.test`, role Guardian) that every
4802
- /// armed channel (owner + guardians) receives within ~60s (⟨2026-10-29⟩ within seconds; a minute if
4803
- /// a delivery was just made). Requires the caller's own channel
4804
- /// to be armed so the test has somewhere to land for them.
4482
+ /// armed channel (owner + guardians) receives within seconds (a minute if a delivery was just
4483
+ /// made). Requires the caller's own channel to be armed so the test has somewhere to land for them.
4805
4484
  testGuardianAlert: () -> (Result_2);
4806
- /// RENAMED from `init` (a name says what happens, not the mechanism). This is the OWNERSHIP-TRANSFER
4807
- /// method — the most consequential owner-facing operation on the canister — and it was named for
4808
- /// first-time setup, colliding with the actor's own `service : (initArgs)`. A reader scanning for
4809
- /// "how does ownership move" found nothing; a reader scanning for `init` found a constructor.
4810
- ///
4811
- /// Its read counterpart is `listOwnershipTransfers` (was `getOwnershipHistory`), which now shares
4812
- /// the stem — the pair was previously unfindable from either half.
4813
- /// ⟨0.16.0, refusals are values, never traps⟩ TWO OF THESE REFUSALS ARE THE FIRST-CLAIM PATH, and
4814
- /// they are not authorization.
4815
- ///
4816
- /// On an unowned engram there is no owner to refuse anyone, so "caller must set themselves as
4817
- /// owner" is a rule about the ARGUMENT — pass your own principal and it succeeds. `#Invalid` says
4818
- /// retrying with a different argument can work; `#Refused` would tell a first claimant their
4819
- /// standing was the problem, on the one call where nobody has standing yet.
4820
- ///
4821
- /// ⟨2026-09-29, the owner's control-handover ruling⟩ A CHANGE OF OWNER HANDS OVER CONTROL OF THE
4822
- /// CODE. The new owner becomes a controller of this canister and the former owner stops being one;
4823
- /// the answer says who moved it (`ControlHandover`). Managed: the registry moves it while it
4824
- /// accepts the transfer. Sovereign: the registry answers `#EngramMustMove` and this engram sets
4825
- /// its own controllers. THE OWNER CHANGES HERE ONLY AFTER CONTROL HAS MOVED — if it cannot move,
4826
- /// the registry's record is put back and nothing is transferred; if even that fails, the refusal
4827
- /// says who the registry now records and that the same call again finishes it. A standalone
4828
- /// engram (no registry) cannot know who controls it and changes the owner only, answering
4829
- /// `#NotHeldHere`. The rules are `src/shared/ControlHandover.mo`'s.
4830
- ///
4831
- /// ⟨2026-09-29, a review finding: a half-finished change of owner⟩ The registry now MARKS a change of
4832
- /// owner as unfinished from the moment it moves its record until it sees control move. A sovereign
4833
- /// engram therefore reports the move (`sysConfirmOwnershipTransfer`) after setting its own
4834
- /// controllers; until the registry hears it, the registry refuses the new owner's
4835
- /// `claimSovereignty`, `returnToManaged`, `abandonMyEngram` and `upgradeMyEngram` for this engram.
4836
- /// While a transfer is marked unfinished, a transfer to anyone but its would-be owner is refused by
4837
- /// the registry, by name; calling this again with that owner finishes it.
4838
- ///
4839
- /// ⟨2026-09-29, a review finding⟩ THE OWNER NAMING THEMSELVES IS A REPORT, NOT A HAND-ON. It is
4840
- /// the way out when the registry did not hear that a sovereign engram moved control: it moves
4841
- /// control to the same owner again and reports it, and it writes NO entry to
4842
- /// `listOwnershipTransfers` (until this day it wrote one from the owner to themselves, a hand-on
4843
- /// that did not happen). The record entry says it was a report. `ControlHandover.isReport`.
4844
- ///
4845
- /// ⟨2026-11-15, from an adversarial review, ruled the same day: THE NEW OWNER MUST ACCEPT⟩ NAMING
4846
- /// SOMEONE ELSE NOW OPENS AN OFFER AND CHANGES NOTHING ELSE. Until this day this one call, made by
4847
- /// the current owner alone, moved the engram, the registry's record and control of the code to a
4848
- /// principal who was never asked (`OwnershipOffer.mo` has the measurement). Now it records the
4849
- /// offer here (`ownershipOffer`), files it at the registry that spawned this engram
4485
+ /// THE OWNERSHIP-TRANSFER METHOD — the most consequential owner-facing operation on the canister. It
4486
+ /// was named `init` before 0.16.0 (a name says what happens, not the mechanism): named for
4487
+ /// first-time setup, it collided with the actor's own `service : (initArgs)`, so a reader scanning
4488
+ /// for "how does ownership move" found nothing and a reader scanning for `init` found a
4489
+ /// constructor. Its read counterpart is `listOwnershipTransfers`, which shares the stem.
4490
+ ///
4491
+ /// NAMING SOMEONE ELSE OPENS AN OFFER AND CHANGES NOTHING ELSE: the new owner must accept. This call
4492
+ /// records the offer here (`ownershipOffer`), files it at the registry that spawned this engram
4850
4493
  /// (`sysOfferOwnership`, which moves nothing either) and answers `#Offered` with the expiry
4851
4494
  /// (`OwnershipOffer.TTL_NS`, 7 days). The owner is still the owner, still controls the code, and
4852
4495
  /// every agent, guardian and limit is as it was. The hand-over happens when the named principal
4853
4496
  /// calls `acceptOwnership`, as themselves. A new offer replaces the open one; `cancelOwnershipOffer`
4854
4497
  /// withdraws it. Refused by the registry's own words when it refuses to file it (nothing is
4855
- /// recorded here then), and `#Unavailable` when it cannot be reached.
4856
- ///
4857
- /// TWO CALLS STILL MOVE AT ONCE, because in both the caller names THEMSELVES, so the consent is
4858
- /// the call: the first claim of an unowned engram, and the owner's report (above). HOW THE REPORT
4859
- /// RELATES TO THE OFFER: a report never opens one and never needs one. It is the repair for a
4498
+ /// recorded here then), and `#Unavailable` when it cannot be reached. Why: when this one call, made
4499
+ /// by the current owner alone, moved the engram, the registry's record and control of the code, it
4500
+ /// could move them to a principal who was never asked (`OwnershipOffer.mo` has the measurement).
4501
+ ///
4502
+ /// TWO CALLS STILL MOVE AT ONCE, because in both the caller names THEMSELVES, so the consent is the
4503
+ /// call: the first claim of an unowned engram, and the owner's report (below).
4504
+ ///
4505
+ /// THE FIRST CLAIM IS A CONTROLLER'S: an engram installed without `owner` in its install argument is
4506
+ /// claimed only by one of its controllers naming itself; anyone else is refused (`#Refused`) and
4507
+ /// nothing changes. The two first-claim refusals answer different questions. A caller that is not
4508
+ /// a controller has no standing to claim an unowned engram, so it is refused for standing
4509
+ /// (`#Refused`). A controller naming anyone but itself breaks a rule about the ARGUMENT ("caller
4510
+ /// must set themselves as owner"): `#Invalid`, and the same call naming its own principal
4511
+ /// succeeds.
4512
+ ///
4513
+ /// THE OWNER NAMING THEMSELVES IS A REPORT, NOT A HAND-ON (`ControlHandover.isReport`). It is the
4514
+ /// way out when the registry did not hear that a sovereign engram moved control: it moves control
4515
+ /// to the same owner again and reports it, and it writes NO entry to `listOwnershipTransfers` — an
4516
+ /// entry from the owner to themselves would record a hand-on that did not happen. The record entry
4517
+ /// says it was a report. A report never opens an offer and never needs one: it is the repair for a
4860
4518
  /// hand-over that already happened under an acceptance and that the registry did not hear the end
4861
- /// of; the registry treats it as a retry of a record it has already moved. An engram the registry
4862
- /// reinstalled after the network erased it comes back owned by the principal the registry records
4863
- /// and with no offer (the offer was in the erased state); its owner offers again, and the copy the
4864
- /// registry kept of the old offer ends at its own expiry and cannot move anything by itself.
4519
+ /// of, and the registry treats it as a retry of a record it has already moved.
4520
+ ///
4521
+ /// A CHANGE OF OWNER HANDS OVER CONTROL OF THE CODE. The new owner becomes a controller of this
4522
+ /// canister and the former owner stops being one; the answer says who moved it (`ControlHandover`).
4523
+ /// Managed: the registry moves it while it accepts the transfer. Sovereign: the registry answers
4524
+ /// `#EngramMustMove` and this engram sets its own controllers. THE OWNER CHANGES ONLY AFTER CONTROL
4525
+ /// HAS MOVED — if it cannot move, the registry's record is put back and nothing is transferred; if
4526
+ /// even that fails, the refusal says who the registry now records and that the same call again
4527
+ /// finishes it. A standalone engram (no registry) cannot know who controls it and changes the owner
4528
+ /// only, answering `#NotHeldHere`. The rules are `src/shared/ControlHandover.mo`'s.
4529
+ ///
4530
+ /// The registry MARKS a change of owner as unfinished from the moment it moves its record until it
4531
+ /// sees control move. A sovereign engram therefore reports the move (`sysConfirmOwnershipTransfer`)
4532
+ /// after setting its own controllers; until the registry hears it, the registry refuses the new
4533
+ /// owner's `claimSovereignty`, `returnToManaged`, `abandonMyEngram` and `upgradeMyEngram` for this
4534
+ /// engram. While a transfer is marked unfinished, a transfer to anyone but its would-be owner is
4535
+ /// refused by the registry, by name.
4536
+ ///
4537
+ /// An engram the registry reinstalled after the network erased it comes back owned by the principal
4538
+ /// the registry records and with no offer (the offer was in the erased state); its owner offers
4539
+ /// again, and the copy the registry kept of the old offer ends at its own expiry and cannot move
4540
+ /// anything by itself.
4865
4541
  transferOwnership: (newOwner: principal) -> (Result_3);
4866
4542
  /// OWNER-ONLY release of the payment freeze — and the asymmetry with `freezePayments` is the
4867
4543
  /// governance design, not an oversight.
@@ -4879,13 +4555,12 @@ type Engram =
4879
4555
  /// only. Refused, by name, below the room the hourly check-in needs; then nothing is armed.
4880
4556
  ///
4881
4557
  /// CALLER: the engram's owner, from the owner's app (its status line and its compute page), and
4882
- /// nobody else (the surface-budget rule: a `sys` method names its caller). ⟨2026-10-28, the owner's
4883
- /// automatic-pause ruling: "it wakes on the next payment, agent request or your Wake"⟩ The automatic
4884
- /// doors (the biller's receipt, Convert, an agent's MCP request) wake it when compute lands with
4885
- /// room; this is the owner's door, for compute that arrived with no receipt (a bare top-up). It
4886
- /// always reads the engram's own balance (no rate limit, no free filter), so a refusal states what
4887
- /// the engram measured. Both figures in a refusal are its own READING above its line, which runs ~82B
4888
- /// below the true figure, so the engram never calls it the gap.
4558
+ /// nobody else (every method names its caller). The automatic doors (the biller's receipt, Convert,
4559
+ /// an agent's MCP request) wake it when compute lands with room; this is the owner's door, for
4560
+ /// compute that arrived with no receipt (a bare top-up). It always reads the engram's own balance
4561
+ /// (no rate limit, no free filter), so a refusal states what the engram measured. Both figures in a
4562
+ /// refusal are its own READING above its line, which runs ~82B below the true figure, so the engram
4563
+ /// never calls it the gap.
4889
4564
  wakeTimers: () -> (Result_1);
4890
4565
  /// Consensus transform for the World ID /verify outcall. Replicas each call independently, so the raw
4891
4566
  /// response (timestamps, `uses`, request-id headers) is non-deterministic. Collapse it to a single
@@ -4900,9 +4575,10 @@ type Engram =
4900
4575
  context: blob;
4901
4576
  response: HttpRequestResult;
4902
4577
  }) -> (HttpRequestResult) query;
4903
- /// Write a memory file, creating it or adding a version to it. Returns a write receipt — the new
4904
- /// `version`, the audit `seq`, and the chain `head` after the write — so a caller can prove what
4905
- /// it wrote without a second read.
4578
+ /// Write a memory file, creating it or adding a version to it. Returns the write receipt
4579
+ /// (`WriteReceipt`) — the new `version`, the store's event `seq`, the file's chain `head` after the
4580
+ /// write, the rest of the event (`prev`, `atNs`, `contentRoot`, `size`) and where its record entry
4581
+ /// landed (`recordId`, `recordPrev`) — so a caller can prove what it wrote without a second read.
4906
4582
  ///
4907
4583
  /// ⚠ OWNER-ONLY, and this is the one most likely to surprise: an agent holding `write_memory`
4908
4584
  /// does NOT reach this method. Agent writes go through the agent surface, which applies the