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

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/registry.did CHANGED
@@ -63,7 +63,7 @@ type Role =
63
63
  type Result_9 =
64
64
  variant {
65
65
  Err: Error;
66
- Ok: EngramComputeView;
66
+ Ok: RecoverReply;
67
67
  };
68
68
  type Result_8 =
69
69
  variant {
@@ -96,115 +96,130 @@ type Result_4 =
96
96
  Err: Error;
97
97
  Ok: MeterReading;
98
98
  };
99
+ type Result_31 =
100
+ variant {
101
+ Err: Error;
102
+ Ok: FleetCycleHealth;
103
+ };
104
+ type Result_30 =
105
+ variant {
106
+ Err: Error;
107
+ Ok: CertifiedStanding;
108
+ };
99
109
  type Result_3 =
100
110
  variant {
101
111
  Err: Error;
102
112
  Ok: ControlStep;
103
113
  };
114
+ type Result_29 =
115
+ variant {
116
+ Err: Error;
117
+ Ok: ChildSignInOffer;
118
+ };
104
119
  type Result_28 =
105
120
  variant {
106
121
  Err: Error;
107
- Ok: FleetCycleHealth;
122
+ Ok: blob;
108
123
  };
109
124
  type Result_27 =
110
125
  variant {
111
126
  Err: Error;
112
- Ok: CertifiedStanding;
127
+ Ok: PrivateMetrics;
113
128
  };
114
129
  type Result_26 =
115
130
  variant {
116
131
  Err: Error;
117
- Ok: blob;
132
+ Ok: RestartStatus;
118
133
  };
119
134
  type Result_25 =
120
135
  variant {
121
136
  Err: Error;
122
- Ok: PrivateMetrics;
137
+ Ok: OpeningCounts;
123
138
  };
124
139
  type Result_24 =
125
140
  variant {
126
141
  Err: Error;
127
- Ok: RestartStatus;
142
+ Ok: OpenedThrough;
128
143
  };
129
144
  type Result_23 =
130
145
  variant {
131
146
  Err: Error;
132
- Ok: OpeningCounts;
147
+ Ok: ReferralCounts;
133
148
  };
134
149
  type Result_22 =
135
150
  variant {
136
151
  Err: Error;
137
- Ok: OpenedThrough;
152
+ Ok: RegistryHealth;
138
153
  };
139
154
  type Result_21 =
140
155
  variant {
141
156
  Err: Error;
142
- Ok: ReferralCounts;
157
+ Ok: opt text;
143
158
  };
144
159
  type Result_20 =
145
160
  variant {
146
161
  Err: Error;
147
- Ok: opt text;
162
+ Ok: Page_6;
148
163
  };
149
164
  type Result_2 =
150
165
  variant {
151
166
  Err: Error;
152
- Ok: record {accepted: nat;};
167
+ Ok: principal;
153
168
  };
154
169
  type Result_19 =
155
170
  variant {
156
171
  Err: Error;
157
- Ok: Page_6;
172
+ Ok: RecordPage;
158
173
  };
159
174
  type Result_18 =
160
175
  variant {
161
176
  Err: Error;
162
- Ok: RecordPage;
177
+ Ok: Page_5;
163
178
  };
164
179
  type Result_17 =
165
180
  variant {
166
181
  Err: Error;
167
- Ok: Page_5;
182
+ Ok: vec OpenedEngram;
168
183
  };
169
184
  type Result_16 =
170
185
  variant {
171
186
  Err: Error;
172
- Ok: vec OpenedEngram;
187
+ Ok: Page_3;
173
188
  };
174
189
  type Result_15 =
175
190
  variant {
176
191
  Err: Error;
177
- Ok: Page_3;
192
+ Ok: Page_2;
178
193
  };
179
194
  type Result_14 =
180
195
  variant {
181
196
  Err: Error;
182
- Ok: Page_2;
197
+ Ok: Page_1;
183
198
  };
184
199
  type Result_13 =
185
200
  variant {
186
201
  Err: Error;
187
- Ok: Page_1;
202
+ Ok: Page;
188
203
  };
189
204
  type Result_12 =
190
205
  variant {
191
206
  Err: Error;
192
- Ok: Page;
207
+ Ok: vec text;
193
208
  };
194
209
  type Result_11 =
195
210
  variant {
196
211
  Err: Error;
197
- Ok: vec text;
212
+ Ok: CustodyMode;
198
213
  };
199
214
  type Result_10 =
200
215
  variant {
201
216
  Err: Error;
202
- Ok: CustodyMode;
217
+ Ok: EngramComputeView;
203
218
  };
204
219
  type Result_1 =
205
220
  variant {
206
221
  Err: Error;
207
- Ok: principal;
222
+ Ok: record {accepted: nat;};
208
223
  };
209
224
  type Result =
210
225
  variant {
@@ -248,6 +263,29 @@ type ReleaseClass =
248
263
  Feature;
249
264
  Security;
250
265
  };
266
+ type RegistryHealth =
267
+ record {
268
+ adminRoles: opt AdminRoles;
269
+ anchors: opt AnchorStats;
270
+ atNs: opt int;
271
+ clock: opt RegistryClockHealth;
272
+ cycleReserve:
273
+ opt record {
274
+ cycleBalance: nat;
275
+ minOperatingReserveCycles: nat;
276
+ };
277
+ };
278
+ type RegistryClockHealth =
279
+ record {
280
+ attemptTotal: opt nat;
281
+ lastAttemptAtNs: opt int;
282
+ lastError: opt text;
283
+ lastErrorAtNs: opt int;
284
+ lastOkAtNs: opt int;
285
+ nextWakeAtNs: opt int;
286
+ okTotal: opt nat;
287
+ overdue: opt nat;
288
+ };
251
289
  type ReferralCounts =
252
290
  record {
253
291
  agentsByTreesSpanned: TreesSpanned;
@@ -256,6 +294,15 @@ type ReferralCounts =
256
294
  openedThroughParentLive: nat;
257
295
  throughParent: PairedSoon;
258
296
  };
297
+ type RecoverReply =
298
+ record {
299
+ balance: nat;
300
+ billingLinked: bool;
301
+ finished: bool;
302
+ number: opt nat;
303
+ restartLoanOwed: nat;
304
+ template: text;
305
+ };
259
306
  type RecordPage =
260
307
  record {
261
308
  hashFirstFrom: nat;
@@ -436,10 +483,13 @@ type EngramComputeView =
436
483
  record {
437
484
  cycles: nat;
438
485
  eraseAboutNs: opt int;
486
+ erased: opt bool;
439
487
  frozen: bool;
440
488
  idlePerDay: nat;
441
489
  line: nat;
442
490
  quiet: bool;
491
+ recoverOpen: opt bool;
492
+ recoveredAtNs: opt int;
443
493
  restartOpenUntilNs: opt int;
444
494
  runState: variant {
445
495
  running;
@@ -502,6 +552,12 @@ type ControlStep =
502
552
  EngramMustMove;
503
553
  MovedByRegistry;
504
554
  };
555
+ type ChildSignInOffer =
556
+ record {
557
+ parentActive: bool;
558
+ parentIsFirstEngram: bool;
559
+ parentOwner: opt principal;
560
+ };
505
561
  type ChangelogEntry =
506
562
  record {
507
563
  atNs: int;
@@ -534,7 +590,9 @@ type CertifiedAnchorLeaf =
534
590
  conflicts: nat;
535
591
  disputed: bool;
536
592
  engram: principal;
593
+ era: opt nat;
537
594
  head: blob;
595
+ recoveredAtNs: opt int;
538
596
  refusedConflicts: nat;
539
597
  total: nat;
540
598
  version: nat;
@@ -566,6 +624,7 @@ type AnchorView =
566
624
  record {
567
625
  atNs: int;
568
626
  disputed: bool;
627
+ era: opt nat;
569
628
  head: blob;
570
629
  total: nat;
571
630
  };
@@ -606,6 +665,16 @@ service : {
606
665
  /// CANISTER ID, so an engram's ciphertext and wallet cannot follow it anywhere (engramx
607
666
  /// docs/ENCRYPTION-OPERATIONS.md, "Canister-id binding"). Abandoning is starting over, not
608
667
  /// migrating, and the caller must be told so before they do it.
668
+ ///
669
+ /// ⟨2026-11-02⟩ REFUSED for an engram opened through another: it is never abandoned, so it stays on
670
+ /// this registry's security updates for life; it ends by its parent's cut-off or by running dry.
671
+ ///
672
+ /// ⟨2026-11-05, the owner's ruling 2A of 2026-11-04 — "abandoned engrams are NOT recoverable"⟩
673
+ /// WITHDRAW YOUR DIGITAL DOLLARS FIRST. Nobody pays for an abandoned engram: when its compute runs out it stops,
674
+ /// and the network erases it about 30 days later. An abandoned engram is never recovered once it is
675
+ /// erased (`recoverMyEngram` refuses it, and the cashier refuses its top-ups), so whatever its wallet
676
+ /// still holds then stays at its address with no program that can move it. Withdraw it while the
677
+ /// engram runs.
609
678
  abandonMyEngram: () -> (Result);
610
679
  addAuditViewer: (viewer: principal) -> (Result);
611
680
  /// Add a changelog entry (admin only)
@@ -642,6 +711,9 @@ service : {
642
711
  /// ⚠ IT IS REVERSIBLE, which is the fact most worth publishing: the engram's own
643
712
  /// `returnToManaged` adds the registry back ALONGSIDE the owner. Sovereignty is a door, not a
644
713
  /// cliff.
714
+ ///
715
+ /// ⟨2026-11-02, the owner's ruling "choice 4 without hand over"⟩ REFUSED for an engram opened
716
+ /// through another: it stays managed by this registry for life, and its key is never a controller.
645
717
  claimSovereignty: () -> (Result);
646
718
  /// Assemble the pushed chunks into the engram template and install it as the current one.
647
719
  ///
@@ -699,7 +771,7 @@ service : {
699
771
  /// this one is a noun. That gate now reads the census's L7 citations as a second population for
700
772
  /// exactly this blind spot.⟩
701
773
  fleetCycleHealth: (offset: nat, limit: nat, thresholdCycles: nat) ->
702
- (Result_28);
774
+ (Result_31);
703
775
  /// PUBLIC: ⟨0.16.0, L2.4⟩ `fleetSummary` — the ONE public projection of this registry,
704
776
  /// replacing `status()` and ABSORBING `publicMetrics()`.
705
777
  ///
@@ -803,7 +875,7 @@ service : {
803
875
  /// is the agent's ROOT principal — the identity an owner sees as `root` on each key in their own
804
876
  /// `listAgents`. "The agent itself" is a caller holding that root key. A key for one engram has no
805
877
  /// record of its own here; asking about one gets the refusal or, from the key itself, `#NotFound`.
806
- getAgentStanding: (agent: principal) -> (Result_27) query;
878
+ getAgentStanding: (agent: principal) -> (Result_30) query;
807
879
  /// Fleet-wide anchoring liveness. Exists because ABSENCE is otherwise uninformative: an engram
808
880
  /// that never wrote, one still on a template without the push, and one whose push is broken all
809
881
  /// render as an empty getAnchors. Nothing distinguishes the first from the third, so a silently
@@ -870,6 +942,26 @@ service : {
870
942
  /// answers: there is no certified absence proof (spec question Q8). A `fingerprint` that is not 32
871
943
  /// bytes is never a fingerprint, and answers `null` before the lookup.
872
944
  getCertifiedBirth: (fingerprint: blob) -> (opt CertifiedBirth) query;
945
+ /// ⟨2026-11-02, the owner's ruling "1-4 all as you recommended"; the lead's answer L4 with the
946
+ /// Challenge's fix C3.2⟩ WHAT THE KIT OFFERS AS A NEW ENGRAM'S SIGN-IN, read before it opens one
947
+ /// through `parent`. The answer: the parent's owner — ONLY when the parent is a first engram (the
948
+ /// kit offers that principal as the default sign-in only then, after it prints it and the person
949
+ /// running the agent confirms it is theirs; for a parent opened through another the field is
950
+ /// absent, so the read never discloses a key file's principal); whether the parent is a first
951
+ /// engram; and whether it is registered, `#Active` and not abandoned (`isRegisteredActiveEngram`'s
952
+ /// rule).
953
+ ///
954
+ /// CALLER: a lasting key with a LIVE engagement with `parent` at this registry, in either store
955
+ /// (`Engagements.hasOpenEither` — the same fact `sysOpenChild`'s admission reads, so exactly the
956
+ /// keys that may be opened an engram through `parent` may read what it offers). It discloses the
957
+ /// parent's owner to the parent's own engaged agent, the party `getParentOf` answers once the child
958
+ /// exists. Anyone else is REFUSED loudly (ADR-0002), in the same words whether or not `parent` is
959
+ /// an engram, so a refusal tells a stranger nothing. A QUERY, so the refusal is not in the denial
960
+ /// log (`denied` says why a query cannot write). `#NotFound` only to an engaged caller, for a
961
+ /// parent this registry holds no owner for.
962
+ /// Called by: the owner kit's opening of an engram through a parent, signed by the agent's lasting
963
+ /// key, before it names the new engram's sign-in.
964
+ getChildSignInOffer: (parent: principal) -> (Result_29) query;
873
965
  /// The ATTESTABLE custody-mode fact (agent-native model item 19): "managed" | "sovereign" |
874
966
  /// "unknown", derived from the registry's OWN transition records (claimSovereignty /
875
967
  /// returnToManaged maintain sovereignEngramIds) — NOT from a canister_status probe, which needs
@@ -892,7 +984,7 @@ service : {
892
984
  ///
893
985
  /// Derived from records, never probed: a canister_status call would trap for exactly the
894
986
  /// canisters we are not the controller of, i.e. the sovereign ones this read exists to identify.
895
- getCustodyMode: (canisterId: principal) -> (Result_10) query;
987
+ getCustodyMode: (canisterId: principal) -> (Result_11) query;
896
988
  /// Cycles-health probe — slim, cycles-only shape; the money fields moved to the cashier's
897
989
  /// getCycleReserveStatus. Read by health-alert.mjs in registry mode.
898
990
  ///
@@ -933,7 +1025,7 @@ service : {
933
1025
  /// same words whether or not the key opened anything, so the refusal tells a stranger nothing.
934
1026
  /// `#NotFound` only to a permitted reader, for a key that opened nothing: a true answer, like
935
1027
  /// `listMyAgentDisputes`'s empty list.
936
- getEngramOpenedThrough: (key: principal) -> (Result_22) query;
1028
+ getEngramOpenedThrough: (key: principal) -> (Result_24) query;
937
1029
  /// The i-th 1 MiB slice of the attested engram wasm (0-indexed). The caller reassembles all
938
1030
  /// chunks in order and MUST verify sha256(reassembled) == getEngramWasmHash before installing —
939
1031
  /// the hash is the attestation; the bytes are a convenience. Out-of-range index → empty blob.
@@ -944,7 +1036,7 @@ service : {
944
1036
  /// its hash. A reassembler that reads `""` as end-of-stream cannot tell a finished download from
945
1037
  /// a truncated one, so it would hash a partial wasm and report a mismatch against the official
946
1038
  /// list, which reads as "this template is unofficial" rather than "I stopped reading too early".
947
- getEngramWasmChunk: (index: nat) -> (Result_26) query;
1039
+ getEngramWasmChunk: (index: nat) -> (Result_28) query;
948
1040
  /// The stored template's release class — FREE and UNGATED, because it is the checkable half of a
949
1041
  /// promise made to people who are not our customers. ⟨2026-10-25⟩ The funding rule it checks:
950
1042
  /// #Security — the registry pays for the install on every running engram it can reach, any size;
@@ -986,7 +1078,7 @@ service : {
986
1078
  /// So L7's "the denial-logging motive for update-for-read is retired by L1" does not hold at this
987
1079
  /// site. L1 retired the motive of trapping-to-refuse; it did not give queries the ability to
988
1080
  /// write, which is the thing this actually depends on.
989
- getFleetMetrics: () -> (Result_25);
1081
+ getFleetMetrics: () -> (Result_27);
990
1082
  /// PUBLIC: a genesis note that only privileged callers could read would defeat its purpose —
991
1083
  /// the reader who most needs it is the stranger deciding whether to trust this chain.
992
1084
  getGenesisNote: () -> (GenesisNote) query;
@@ -1050,7 +1142,7 @@ service : {
1050
1142
  /// we lend"⟩ "when the next restart is allowed" now reads "when the registry can next LEND to a
1051
1143
  /// restart": `nextRestartAtNs` is only the weekly limit on a loan. A restart on the owner's own
1052
1144
  /// compute is allowed now, whatever it says. Field name and shape unchanged.
1053
- getMyRestartStatus: () -> (Result_24) query;
1145
+ getMyRestartStatus: () -> (Result_26) query;
1054
1146
  /// ⟨2026-10-02⟩ How many engrams were ever opened, and how — lifetime sizes of state this registry
1055
1147
  /// never deletes, plus the two counters of refused openings (`Funnel.OpeningCounts` names each).
1056
1148
  /// All O(1); a reader differences them day to day.
@@ -1059,7 +1151,7 @@ service : {
1059
1151
  /// grant). Anyone else is REFUSED by name with their class — never a zero, which would read as
1060
1152
  /// "nothing was ever opened". A QUERY: counts only, and cheap; its refusal is not in the denial
1061
1153
  /// log (`denied` says why a query cannot write).
1062
- getOpeningCounts: () -> (Result_23) query;
1154
+ getOpeningCounts: () -> (Result_25) query;
1063
1155
  /// Where an engram was opened from ⟨2026-10-26, the owner's lineage ruling L4: "a child reads its own
1064
1156
  /// parent by its canister id"⟩: the engram, the engram it was opened from, and the cut-off's time if
1065
1157
  /// there is one. Closes "a handed-on child cannot read its own parent" — `getEngramOpenedThrough` is
@@ -1074,7 +1166,16 @@ service : {
1074
1166
  /// `#NotFound` only to a permitted reader: a first engram has no parent (a true answer), and an id
1075
1167
  /// this registry never opened is said to be one, not passed off as a first engram (ADR-0002).
1076
1168
  /// L8C: `listChildrenOf` is unchanged. L7B: the change-of-owner gate is unchanged.
1077
- getParentOf: (child: principal) -> (Result_22) query;
1169
+ getParentOf: (child: principal) -> (Result_24) query;
1170
+ /// PUBLIC: CALLER: the app, the owner kit and anyone checking an engram's record (ADR-0020). When this
1171
+ /// registry last REINSTALLED the engram on its own id after the network erased it (`recoverMyEngram`),
1172
+ /// or null — never recovered. ⟨2026-11-04, RECOVER-WALLET-1⟩ Public for `getAbandonedAtNs`'s reason: a
1173
+ /// record that restarted is a fact about the record that a stranger checking it needs, and the same date
1174
+ /// is certified in the engram's anchor leaf (`recoveredAtNs`, with its `era`).
1175
+ /// ⟨2026-11-05, beside the above⟩ Set when the reinstall BEGINS — the old record's anchors are set aside in
1176
+ /// the same message, before the install (`recoverMyEngram` says why) — so while a recover's install has not
1177
+ /// landed, the engram can read erased with this set; the compute probes' `recoverOpen` says one is open.
1178
+ getRecoveredAtNs: (canisterId: principal) -> (opt int) query;
1078
1179
  /// ⟨2026-10-02⟩ How far agents reach across owners — COUNTS ONLY: agents by how many trees their
1079
1180
  /// record spans (1 · 2 · 3–4 · 5+), engrams opened through a parent that are live or cut off, and
1080
1181
  /// engrams that paired an agent within seven days of opening. No principal, no row, no per-agent
@@ -1086,7 +1187,23 @@ service : {
1086
1187
  /// CALLERS: the admin and the audit viewers (the deployment's metrics reader holds a viewer grant),
1087
1188
  /// weekly. Anyone else is REFUSED by name with their class — never zeros. A QUERY: its cost grows
1088
1189
  /// with the agents and engrams it walks (one pass over each), so a reader asks weekly, not hourly.
1089
- getReferralCounts: (exclude: vec principal) -> (Result_21) query;
1190
+ getReferralCounts: (exclude: vec principal) -> (Result_23) query;
1191
+ /// ⟨2026-11-02, the owner's rulings "E ok." and "go ahead with your noticing failures changes"⟩ THE
1192
+ /// REGISTRY'S HEALTH IN ONE READ: its cycle reserve, its roster, its anchoring counts — the same
1193
+ /// answers `getCycleReserveStatus`, `getAdminRoles` and `getAnchorStats` give, which stay served
1194
+ /// unchanged for everyone who reads them one at a time — and the stamps of its clock, which wakes only
1195
+ /// at the deadlines it records (with a six-hour net) and so is silent by design: `clock.nextWakeAtNs`
1196
+ /// more than an hour behind `atNs` is a lost clock. `Types.RegistryHealth` says what each field
1197
+ /// means, and why every field is `opt` and always filled.
1198
+ ///
1199
+ /// CALLER: the deployment's monitor, once an hour, under the audit-viewer grant its daily count-of-use
1200
+ /// reading already holds (ADR-0020 rule 1). Also the admin.
1201
+ ///
1202
+ /// GATED, LIKE THE COUNT-OF-USE READS THAT MONITOR MAKES (`getOpeningCounts`): the admin or an audit
1203
+ /// viewer; anyone else is REFUSED by name — never an empty or zero reading. A QUERY: its refusal is
1204
+ /// not in the denial log (a query cannot write; `denied` says why). One read where there were three
1205
+ /// saves the monitor and this registry two calls an hour each.
1206
+ getRegistryHealth: () -> (Result_22) query;
1090
1207
  /// PUBLIC: the biller identity is an operational fact a
1091
1208
  /// payer's cashier must verify BEFORE taking money (paying into a cashier the registry does not
1092
1209
  /// recognize as biller would collect funds it cannot convert into credit).
@@ -1150,7 +1267,7 @@ service : {
1150
1267
  /// on us that only we can read.
1151
1268
  getSecurityReleaseCount: () -> (nat) query;
1152
1269
  /// ⟨2026-10-01, the owner's ruling of that day (2 A)⟩ Cumulative cycles accepted at the sponsored
1153
- /// door (`sysSpawnChild`) and forwarded into engrams opened through another — cycles the calling
1270
+ /// door (`sysOpenChild`) and forwarded into engrams opened through another — cycles the calling
1154
1271
  /// engrams attached, never the registry's own. Kept apart from the grant counter
1155
1272
  /// (`totalCyclesAllocated`) so neither figure is inflated by the other.
1156
1273
  ///
@@ -1193,7 +1310,7 @@ service : {
1193
1310
  /// `?Text` had to carry both "you may not ask" and "this engram was never funded for an upgrade"
1194
1311
  /// — and the second is a claim about OUR OWN SPEND, not an absence of one. `#Ok(null)` now means
1195
1312
  /// never funded, `#Err(#Refused)` means not your business, and no caller has to guess which.
1196
- getUpgradeFundedTemplate: (canisterId: principal) -> (Result_20) query;
1313
+ getUpgradeFundedTemplate: (canisterId: principal) -> (Result_21) query;
1197
1314
  /// Cumulative cycles the registry has granted to engrams for upgrades — ⟨2026-10-25⟩ the meter on
1198
1315
  /// security-update funding: the registry pays only for security updates on running engrams (was:
1199
1316
  /// "the meter on the never-gated pull path"; the pull is still never refused, and a feature update
@@ -1250,7 +1367,7 @@ service : {
1250
1367
  /// `[]` here is a SUBSTANTIVE CLAIM ABOUT ANOTHER PRINCIPAL'S FLEET — "this agent works
1251
1368
  /// nowhere" — handed to a caller who merely lacks a grant. Readable by an admin, an audit viewer,
1252
1369
  /// or that agent about itself.
1253
- listAgentEngrams: (agent: principal) -> (Result_17) query;
1370
+ listAgentEngrams: (agent: principal) -> (Result_18) query;
1254
1371
  /// Contradictory submissions, oldest-first. Empty is the normal case. Never trimmed.
1255
1372
  ///
1256
1373
  /// ⟨0.16.0, L3 — PAGED 2026-08-18⟩ This returned the WHOLE list, and the list is one an engram
@@ -1278,7 +1395,7 @@ service : {
1278
1395
  /// while keeping the evidence that two of them disagree — the fabricate-on-refusal shape aimed at
1279
1396
  /// the one reader the anchors exist for.
1280
1397
  listAnchorConflicts: (canisterId: principal, start: nat, limit: nat) ->
1281
- (Result_19) query;
1398
+ (Result_20) query;
1282
1399
  /// Witnessed heads for an engram, oldest-first. PUBLIC and ungated — an anchor a stranger cannot
1283
1400
  /// read is not an anchor (ratified: "recorded where counterparties can check them").
1284
1401
  ///
@@ -1314,6 +1431,11 @@ service : {
1314
1431
  /// anything. A cap that is part of the ratified design is not the unbounded growth paging exists
1315
1432
  /// for. WHAT WOULD MAKE THIS WRONG: the ring outgrowing one reply, or rows withheld per caller —
1316
1433
  /// then it pages, and that is a break.
1434
+ /// ⟨2026-11-04, the owner's ruling 3A′ — RECOVER-WALLET-1⟩ EVERY ERA, oldest first. An engram the registry
1435
+ /// recovered after the network erased it has more than one record: each anchor carries `era` (0 = its
1436
+ /// first record, k = after its k-th recover), the earlier eras' anchors as they stood when each was set
1437
+ /// aside, then the current era's. Nothing is withheld or deleted. `disputed` is read against the
1438
+ /// contradictions recorded during the anchor's own era.
1317
1439
  listAnchors: (canisterId: principal) -> (vec AnchorView) query;
1318
1440
  /// ⟨0.16.0, L1 + L2.1⟩ RENAMED from `readAuditLog`, and the refusal is now a VALUE.
1319
1441
  ///
@@ -1341,7 +1463,7 @@ service : {
1341
1463
  /// this read sliced, which is not a number about the record. The gate is unchanged: hash-only rows
1342
1464
  /// for strangers were ruled for the engram's record, and the status console decides a signed-in
1343
1465
  /// visitor's tier by whether this read refuses.
1344
- listAuditEntries: (start: nat, limit: nat) -> (Result_18) query;
1466
+ listAuditEntries: (start: nat, limit: nat) -> (Result_19) query;
1345
1467
  /// ⟨0.16.0, L2.2⟩ RENAMED from `getMetricsViewers` — the viewer triple unifies on "audit viewer"
1346
1468
  /// across every canister, because a roster that grants audit reads should not be named after
1347
1469
  /// metrics on one canister and audit on another.
@@ -1349,7 +1471,7 @@ service : {
1349
1471
  /// MEASURED FABRICATION, kept in the record: this arm answered `(vec {})` to an ANONYMOUS caller
1350
1472
  /// on 2026-08-11 while viewers existed. An empty vec reads as "nobody holds read-only ops access"
1351
1473
  /// when the truth was "you are not on the roster".
1352
- listAuditViewers: () -> (Result_17) query;
1474
+ listAuditViewers: () -> (Result_18) query;
1353
1475
  /// PUBLIC: the release history, paged.
1354
1476
  ///
1355
1477
  /// ⟨0.16.0, L2.1⟩ A `Page`, not a bare vec. The old shape returned the WHOLE changelog on every
@@ -1367,13 +1489,13 @@ service : {
1367
1489
  ///
1368
1490
  /// Built by a pass over `parentOf` rather than from a second, reverse index: one stored fact and a
1369
1491
  /// pass bounded by the number of opened engrams, instead of two facts to keep in step.
1370
- listChildrenOf: (engram: principal) -> (Result_16) query;
1492
+ listChildrenOf: (engram: principal) -> (Result_17) query;
1371
1493
  /// ⟨0.16.0⟩ RENAMED from `readDenialLog`; the refusal becomes a value.
1372
1494
  ///
1373
1495
  /// An empty denial log reads as NOBODY HAS EVER BEEN REFUSED HERE, which is the opposite of what
1374
1496
  /// this log exists to record — so "empty" was never an acceptable answer to a caller who simply
1375
1497
  /// lacks the grant. The old trap said so; this says the same thing as data.
1376
- listDenialEntries: (start: nat, limit: nat) -> (Result_15) query;
1498
+ listDenialEntries: (start: nat, limit: nat) -> (Result_16) query;
1377
1499
  /// ⟨2026-10-02⟩ ONE ROW PER ENGAGEMENT, for the deployment's own count of use — DAYS, never
1378
1500
  /// instants, and NEVER the agent's root, enrolled key or invite.
1379
1501
  ///
@@ -1398,7 +1520,7 @@ service : {
1398
1520
  /// and a query cannot write (the reason `listEngrams` is an update). This is the most sensitive of
1399
1521
  /// the three reads — one row per engagement — so who was turned away is worth a record.
1400
1522
  listEngagementRows: (sinceDay: int, start: nat, limit: nat, companyList:
1401
- vec principal) -> (Result_14);
1523
+ vec principal) -> (Result_15);
1402
1524
  /// ⟨0.16.0, L1⟩ THE `authorized : ?Bool` FLAG IS GONE, AND SO IS EVERYTHING BUILT AROUND IT.
1403
1525
  ///
1404
1526
  /// The flag was the most carefully-argued compromise in this canister, and every word of that
@@ -1429,7 +1551,7 @@ service : {
1429
1551
  /// written and correct; what it lacked was the glyph a gate can see. Its case is the one L7's
1430
1552
  /// own text had to be corrected for — the forcing call is not a system API at all, it is
1431
1553
  /// `denied()`, a state write. See `scripts/check-update-for-read.mjs`.
1432
- listEngrams: (offset: nat, limit: nat) -> (Result_13);
1554
+ listEngrams: (offset: nat, limit: nat) -> (Result_14);
1433
1555
  /// ⟨2026-09-28, owner decision: an agent may read its own record⟩ The caller's OWN dispute
1434
1556
  /// statements, oldest first, verbatim. Keyed by `msg.caller`, so it cannot be pointed at anyone
1435
1557
  /// else, and an empty list is a true answer about the caller ("you have appended none"), never a
@@ -1476,10 +1598,10 @@ service : {
1476
1598
  /// that zero applies the SHIPPED DEFAULT — silently reversing every explicit ManualOnly consent
1477
1599
  /// choice in the fleet. That is the consequence this refusal exists to prevent, and it belongs in
1478
1600
  /// the message a caller actually receives.
1479
- listUpdatePrefs: (start: nat, limit: nat) -> (Result_12) query;
1601
+ listUpdatePrefs: (start: nat, limit: nat) -> (Result_13) query;
1480
1602
  /// Mint one-shot reserve invites (invite-issuer or admin). Codes use IC-secure randomness over a
1481
1603
  /// 32-symbol no-ambiguous alphabet (8 chars ≈ 40 bits). Batch-capped; table hard-capped.
1482
- mintReserveInvites: (count: nat) -> (Result_11);
1604
+ mintReserveInvites: (count: nat) -> (Result_12);
1483
1605
  /// The PROBED twin of `getCustodyMode`: same question, asked of the IC rather than of our
1484
1606
  /// records — hence the `probe` verb rather than a second noun.
1485
1607
  ///
@@ -1505,7 +1627,7 @@ service : {
1505
1627
  /// `ic.canister_status`. That is also the whole point of the `probe` verb — the value is read
1506
1628
  /// LIVE from the management canister rather than from a stored transition record, so a query
1507
1629
  /// could not produce it at all, not merely more cheaply.
1508
- probeCustodyMode: () -> (Result_10);
1630
+ probeCustodyMode: () -> (Result_11);
1509
1631
  /// What YOUR OWN engram's compute is, read by the registry — the one read that works while it is
1510
1632
  /// frozen.
1511
1633
  ///
@@ -1522,7 +1644,23 @@ service : {
1522
1644
  /// No rate limit (the do-less): each call costs the registry one management
1523
1645
  /// call — INFERRED a few million cycles, not measured. `eraseAboutNs` is "about" and never invented:
1524
1646
  /// null when the network reports no idle burn.
1525
- probeMyEngramCompute: () -> (Result_9);
1647
+ probeMyEngramCompute: () -> (Result_10);
1648
+ /// What an engram OPENED THROUGH ANOTHER is running on, read by the registry — for its key file and its
1649
+ /// sign-in (the person), the read `probeMyEngramCompute` is for a first engram's owner.
1650
+ ///
1651
+ /// CALLER: the app's Access page, signed in as the person, for a child row whose own `getOwnerSignIn`
1652
+ /// call is rejected (an erased child answers nothing) — and the owner kit, as the key file (ADR-0020).
1653
+ /// ⟨2026-11-04, the owner's ruling "1B" — "the registry starts keeping the person's sign-in for them"⟩
1654
+ /// The person may SEE, not ask and not pay: the ask (`recoverMyEngram`) and the payment (the cashier's
1655
+ /// top-up, admitted only from the key file) stay the key file's. Gated to the child's key file
1656
+ /// (`canisterToOwner`) and its sign-in AS NOTED HERE (`childSignIn`); refused to everyone else — the
1657
+ /// parent's owner included — with the SAME words whether or not `child` exists or is a child at all
1658
+ /// (`getEngramOpenedThrough`'s precedent: who works for whom is not disclosed by a refusal). UPDATE, not
1659
+ /// query, for `probeMyEngramCompute`'s reason (a query cannot call the management canister).
1660
+ /// ⟨L7⟩ ⟨marker added 2026-11-05, the reason above unchanged — platform check-update-for-read named it
1661
+ /// missing⟩ The system call that forces the update is `canister_status` on the management canister: a
1662
+ /// query cannot make an inter-canister call, so it could not read an erased child's network status at all.
1663
+ probeOpenedEngramCompute: (child: principal) -> (Result_10);
1526
1664
  /// ⟨0.16.0⟩ `Ok` CARRIES THE PRINCIPAL DIRECTLY, not a one-field record wrapping it.
1527
1665
  ///
1528
1666
  /// `#Ok : { canisterId : Principal }` was a record with nothing to disambiguate: the success of a
@@ -1537,7 +1675,37 @@ service : {
1537
1675
  opt record {
1538
1676
  invite: opt text;
1539
1677
  walletProof: opt blob;
1540
- }) -> (Result_1);
1678
+ }) -> (Result_2);
1679
+ /// RECOVER YOUR OWN ERASED ENGRAM — reinstall it on the SAME id, so its wallet and EVM address come back.
1680
+ ///
1681
+ /// CALLER: the owner, from the app's "Recover my wallet" (a first engram), or an engram's key file through
1682
+ /// the owner kit's `--recover` (an engram an agent opened through another) — ADR-0020. ⟨2026-11-04, the
1683
+ /// owner's rulings "1D. 2A." and "1B. the rest as recommended."⟩ Recover.mo says what a recover is and
1684
+ /// what does and does not come back.
1685
+ ///
1686
+ /// THE ORDER: the owner first adds compute to the empty engram through the cashier's existing top-up
1687
+ /// (each step its own tap; nothing here moves money, lends or funds); then this call reads the network's
1688
+ /// status of the engram as its controller, refuses by name unless the engram is ERASED (no module) and
1689
+ /// holds enough compute to install (`UpgradeFunding.noDipBar` — the line plus the install hold plus a
1690
+ /// margin; the exact shortfall is named), writes a durable "recover in progress" mark, installs the
1691
+ /// current template with `#install` ONLY (the network refuses it on a canister that holds a module), with
1692
+ /// the init record from this registry's own records (owner, registry, parent, the kept sign-in,
1693
+ /// `recoveredAtNs`), starts the engram if it was found stopped, sets the old record's anchors aside as an
1694
+ /// earlier era (the certified leaf says so), and re-sends what a newborn is told: its biller, market and
1695
+ /// metrics reader, a first fee line and its birth record. The mark is removed once the biller is in
1696
+ /// place; until then a second call finishes the work and answers `#Ok` with `finished = true`.
1697
+ /// ⟨CHANGED 2026-11-05, the canister review's M1 and L1⟩ The old record's anchors are set aside (and
1698
+ /// `recoveredAtNs` recorded) with the mark, BEFORE the install — the record ended at the erase — and no
1699
+ /// first fee line is sent (the balance before the install is not a fee). The compute probes'
1700
+ /// `recoverOpen` says a recover is open. An upgrade that finds a recover's install landed records it first.
1701
+ ///
1702
+ /// Refused, before anything is written: not your engram (`#NotFound`); not active, or ABANDONED (ruling
1703
+ /// 2A: an abandoned engram is not recovered — withdraw your digital dollars before you abandon an engram);
1704
+ /// sovereign; a change of owner unfinished; a restart open or
1705
+ /// a restart/recover call running; an update installing; no template; the status unreadable; NOT ERASED
1706
+ /// (`#Conflict` — "already recovered at T" when this registry recovered it, and no install); compute
1707
+ /// under the bar (`#Conflict` naming the shortfall).
1708
+ recoverMyEngram: () -> (Result_9);
1541
1709
  removeAuditViewer: (viewer: principal) -> (Result);
1542
1710
  /// ⟨0.16.0⟩ `Ok` IS THE ANSWER — the `{ reserved : Bool }` wrapper is gone.
1543
1711
  ///
@@ -1608,8 +1776,12 @@ service : {
1608
1776
  /// second call while one is still running for the same engram (`restartCallsRunning`), which is
1609
1777
  /// what now keeps two interleaved calls from both lending or both stopping and starting — the week
1610
1778
  /// used to double as that guard.
1779
+ /// ⟨2026-11-04, beside the lists above — BACKLOG ERASED-REFUSE-1⟩ Also refused, first after the status
1780
+ /// read: an ERASED engram (its canister holds no program) — nothing is stopped or lent into it.
1611
1781
  restartMyStoppedEngram: () -> (Result_8);
1612
1782
  /// Return to managed: user calls AFTER adding registry back as controller
1783
+ ///
1784
+ /// ⟨2026-11-02⟩ Refused for an engram opened through another, which is never independent.
1613
1785
  returnToManaged: () -> (Result);
1614
1786
  /// Set admin. Authority decision lives in the pure Auth module (unit-tested); this func keeps only
1615
1787
  /// the async controller check + applies the outcome. When admin is null: REGISTRY_ROOT or a canister
@@ -1670,6 +1842,9 @@ service : {
1670
1842
  ///
1671
1843
  /// `claimSovereignty` sets this to `#ManualOnly` as a side effect, since a registry that is no
1672
1844
  /// longer a controller could not honour anything else.
1845
+ ///
1846
+ /// ⟨2026-11-02⟩ An engram opened through another is refused `#ManualOnly`: it takes this registry's
1847
+ /// updates automatically for life.
1673
1848
  setUpdatePreference: (pref: UpdatePreference) -> (Result);
1674
1849
  /// Set the spawn-ceiling dial (admin-only, audit-logged, bounded 1..SPAWN_CEILING_MAX).
1675
1850
  /// The effective daily cap stays min(ceiling, reserve-derived) — raising the dial never
@@ -1688,6 +1863,8 @@ service : {
1688
1863
  /// starts it. If the owner walks away, the sweep finishes it after 30 minutes: install if covered,
1689
1864
  /// restore, start. Never left stopped. It lends nothing, so it takes no week; it refuses an engram
1690
1865
  /// that is not stuck, so a healthy engram is never taken offline (spec question Q15).
1866
+ /// ⟨2026-11-04 — BACKLOG ERASED-REFUSE-1⟩ It also refuses an ERASED engram (its canister holds no
1867
+ /// program): there is nothing to restart, and nothing is stopped.
1691
1868
  stopMyEngramForRestart: () -> (Result_6);
1692
1869
  /// An engram witnesses its own audit head. Callable ONLY by a registered engram — msg.caller is
1693
1870
  /// the engram principal, so attribution needs no signature and cannot be forged by a third party.
@@ -1738,6 +1915,15 @@ service : {
1738
1915
  /// cycles-attached like the sweep; same row semantics, one engram, no heartbeat stamp
1739
1916
  /// (a single probe is not a completed round).
1740
1917
  sysMeterEngram: (canisterId: principal) -> (Result_4);
1918
+ /// CALLER: an engram opened through another, from inside its three sign-in writers — `setOwnerSignIn`,
1919
+ /// `declineSignIn` (the sign-in's own decline) and `acceptSignIn` — BEFORE it writes its own seat
1920
+ /// (ADR-0020). ⟨2026-11-04, the owner's ruling "1B"⟩ The registry keeps the child's seated sign-in
1921
+ /// (`childSignIn` says why, and why the order is registry-first): `?p` notes `p` as the sign-in, `null`
1922
+ /// notes that none is seated. A record argument, so it can grow by opt fields (ADR-0018 rule 0).
1923
+ /// Refused, with nothing written: a caller this registry did not open through another engram (a first
1924
+ /// engram has no sign-in; anything else is no engram here), and a sign-in the door would refuse at
1925
+ /// birth (`ChildDoor.signInRefusal` — the key file itself, the anonymous principal, a canister).
1926
+ sysNoteChildSignIn: (req: record {signIn: opt principal;}) -> (Result);
1741
1927
  /// ⟨2026-10-02⟩ An engram tells this registry that its owner reset it.
1742
1928
  ///
1743
1929
  /// CALLER: a registered engram, about itself — `canisterToOwner` membership, checked first
@@ -1795,6 +1981,85 @@ service : {
1795
1981
  /// a transfer the engram did not finish, and moves control again (that is the way out `stuck`
1796
1982
  /// names). The rules are in `src/shared/ControlHandover.mo`.
1797
1983
  sysNotifyOwnershipTransfer: (newOwner: principal) -> (Result_3);
1984
+ /// ⟨2026-10-01, the owner's ruling of that day: the October concept's decision 1, "build it now"⟩
1985
+ /// THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
1986
+ /// (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
1987
+ /// owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
1988
+ ///
1989
+ /// CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
1990
+ /// `sysRecordAgentEdge` checks it (ADR-0020: every `sys` method names and checks its caller). The
1991
+ /// engram's own rules (the owner's standing allowance for this agent, its frozen-payments state,
1992
+ /// its balance) are the engram's to check before it calls; this method checks what only the
1993
+ /// registry can know.
1994
+ ///
1995
+ /// NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
1996
+ /// every refusal before the accept returns the attached cycles to the caller by construction —
1997
+ /// the IC returns unaccepted cycles when the call replies. After the accept:
1998
+ /// · the network refuses the canister → what it refunded is deposited back to the caller, and
1999
+ /// the reply says how much came back;
2000
+ /// · the template will not install after one retry → the cycles are INSIDE the new canister and
2001
+ /// no canister can withdraw another's cycles. The one honest exception to "returned on every
2002
+ /// failure": nothing is recorded, and the reply names the canister, its controllers (this
2003
+ /// registry and the key) and what the key can do with it;
2004
+ /// ⟨CORRECTED 2026-11-02, beside the line above — the owner's ruling "choice 4 without hand
2005
+ /// over" (V0)⟩ The controller is THIS REGISTRY ALONE; the key is not one and can install
2006
+ /// nothing. The reply names the canister and says the cycles sit in it unrecorded, for whoever
2007
+ /// runs this deployment to decide on;
2008
+ /// · the key came to own an engram during the awaits → the new canister is named, nothing is
2009
+ /// recorded (the same third guard `spawnEngramFor` carries).
2010
+ ///
2011
+ /// WHAT IT DOES NOT DO, deliberately: it never attaches the registry's own cycles (the grant stays
2012
+ /// with first engrams); it never writes a predecessor (a key with any record was refused); it never
2013
+ /// consults the reserve gate (the parent owner's approval is this door's admission — the gate's
2014
+ /// arming note stays on `provisionEngram`); it never tells the calling engram anything but this
2015
+ /// reply. No payment AMOUNT reaches it (ADR-0005): it carries cycles and a key, nothing else.
2016
+ ///
2017
+ /// THE RATE LIMIT ⟨2026-10-01, evening — the owner's ruling "1B"; until then this door shared
2018
+ /// first engrams' limiter in full: their 24-hour count, their in-flight count and
2019
+ /// `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
2020
+ /// hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
2021
+ /// `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
2022
+ /// `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
2023
+ /// on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
2024
+ /// first engram's slot, and is never refused for the registry's own low balance. The per-key
2025
+ /// pending mark (`createEngramPending`) stays shared: it is about ONE key, not a count, and a key
2026
+ /// must not be mid-spawn at both doors at once.
2027
+ ///
2028
+ /// THE CUT-OFF AT BIRTH. If the caller ended the key's engagement while the canister was being
2029
+ /// created (the ending is recorded by `sysRecordAgentEdge` between this method's awaits), the
2030
+ /// opened engram is recorded AND cut off in the same step — the cycles are already in it, so the
2031
+ /// key keeps it, but it starts on nobody's record. Without this the ending's cut-off writer would
2032
+ /// have found no `openedThroughParent` row yet, and the engram would never be cut off.
2033
+ /// WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
2034
+ /// the post-await re-check and the record below.
2035
+ ///
2036
+ /// ⟨2026-11-02, the owner's rulings "choice 4 without hand over" (V0) and "1-4 all as you
2037
+ /// recommended"⟩ CONTROLLED BY THIS REGISTRY ALONE, AND BORN KNOWING ITS PARENT AND ITS SIGN-IN.
2038
+ /// The canister's controllers are `[this registry]` — the key is not a controller, so it can never
2039
+ /// reinstall, delete or re-control the engram; only this registry installs code on it. Such an
2040
+ /// engram is managed for life: `claimSovereignty`, `returnToManaged`, `abandonMyEngram`, a
2041
+ /// `#ManualOnly` preference and a change of owner (`sysNotifyOwnershipTransfer`) are all refused
2042
+ /// for it, by `parentOf`. `signIn` is the opened engram's second credential, named by the person
2043
+ /// running the agent (`ChildDoor.signInRefusal` refuses the key itself, the anonymous principal and
2044
+ /// a canister); it and the parent travel in the engram's init record, so the engram knows both
2045
+ /// before it answers its first message. `null` = no sign-in: the engram keeps small limits for life.
2046
+ /// An engram built before this argument sends one argument; the missing trailing `opt` decodes as
2047
+ /// `null` (Candid's rule for a missing optional argument), and the engram opens with no sign-in.
2048
+ /// ⟨CORRECTED 2026-11-02, later — the stage-1 review's B1, beside the two lines above, which no
2049
+ /// longer hold⟩ ONE RECORD, A NEW NAME. This door was `sysSpawnChild(ownerKey : Principal)`; giving
2050
+ /// it a second positional argument grew its argument TUPLE, which ADR-0018 rule 0 freezes ("evolution
2051
+ /// happens inside records", ratified R1) and the interface gate reads as ILLEGAL. So the door is
2052
+ /// `sysOpenChild({ ownerKey; signIn })` — later fields are opt fields of this record, never another
2053
+ /// argument — and `sysSpawnChild` is REMOVED (a NOTICE at the gate). An engram built before this
2054
+ /// change still calls `sysSpawnChild`; this registry no longer serves it, so that call is REJECTED
2055
+ /// (IC0536, a reject the engram's `try` catches — ADR-0018 probe 11), the attached cycles come back
2056
+ /// as the call's refund, and nothing is opened. An older engram therefore never opens an engram with
2057
+ /// no sign-in by accident; it opens them again once it runs a template that calls this method.
2058
+ /// (Was: the one-argument call decoded `signIn` as `null` — INFERRED for moc 2.1.0, never witnessed.)
2059
+ sysOpenChild: (req: record {
2060
+ ownerKey: principal;
2061
+ signIn: opt principal;
2062
+ }) -> (Result_2);
1798
2063
  /// ⟨2026-09-28, owner decision: build the full agent track-record design for the launch release⟩
1799
2064
  /// An engram tells this registry that one of its agents started, or ended and WHY.
1800
2065
  ///
@@ -1890,7 +2155,7 @@ service : {
1890
2155
  /// WHAT WOULD MAKE THIS WRONG: an engram naming an id other than the one it was handed — it can only
1891
2156
  /// name one of its OWN advances (the caller must match), so the worst it can do is settle its own
1892
2157
  /// other advance early with cycles that are still the registry's.
1893
- sysRepayUpgradeAdvance: (a: record {advanceId: nat;}) -> (Result_2);
2158
+ sysRepayUpgradeAdvance: (a: record {advanceId: nat;}) -> (Result_1);
1894
2159
  /// ⟨2026-09-29, owner ruling follow-up 8⟩ A SOVEREIGN engram could not change its own controllers
1895
2160
  /// after this registry moved its record, and asks for the record back so the transfer does not
1896
2161
  /// complete. Gated like `sysNotifyOwnershipTransfer` (the caller must BE the engram), and only for
@@ -1899,54 +2164,6 @@ service : {
1899
2164
  /// Refuses, saying why, when the record cannot be put back (`ControlHandover.revertRefusal`); the
1900
2165
  /// engram then answers its owner with `ControlHandover.stuck`.
1901
2166
  sysRevertOwnershipTransfer: (formerOwner: principal) -> (Result);
1902
- /// ⟨2026-10-01, the owner's ruling of that day: the October concept's decision 1, "build it now"⟩
1903
- /// THE SPONSORED DOOR. An engram opens an engram for one of its agents: the caller is the engram
1904
- /// (the engram it is opened from — `parentOf` in code), `ownerKey` is the agent's LASTING key, which
1905
- /// owns what is opened, and the cycles the opened engram lives on are the ones the caller ATTACHES.
1906
- ///
1907
- /// CALLER: a registered engram — `canisterToOwner` membership, checked first, exactly as
1908
- /// `sysRecordAgentEdge` checks it (ADR-0020: every `sys` method names and checks its caller). The
1909
- /// engram's own rules (the owner's standing allowance for this agent, its frozen-payments state,
1910
- /// its balance) are the engram's to check before it calls; this method checks what only the
1911
- /// registry can know.
1912
- ///
1913
- /// NOTHING IS ACCEPTED UNTIL EVERY CHECK HAS PASSED (`ChildDoor.admission`, cheapest first), so
1914
- /// every refusal before the accept returns the attached cycles to the caller by construction —
1915
- /// the IC returns unaccepted cycles when the call replies. After the accept:
1916
- /// · the network refuses the canister → what it refunded is deposited back to the caller, and
1917
- /// the reply says how much came back;
1918
- /// · the template will not install after one retry → the cycles are INSIDE the new canister and
1919
- /// no canister can withdraw another's cycles. The one honest exception to "returned on every
1920
- /// failure": nothing is recorded, and the reply names the canister, its controllers (this
1921
- /// registry and the key) and what the key can do with it;
1922
- /// · the key came to own an engram during the awaits → the new canister is named, nothing is
1923
- /// recorded (the same third guard `spawnEngramFor` carries).
1924
- ///
1925
- /// WHAT IT DOES NOT DO, deliberately: it never attaches the registry's own cycles (the grant stays
1926
- /// with first engrams); it never writes a predecessor (a key with any record was refused); it never
1927
- /// consults the reserve gate (the parent owner's approval is this door's admission — the gate's
1928
- /// arming note stays on `provisionEngram`); it never tells the calling engram anything but this
1929
- /// reply. No payment AMOUNT reaches it (ADR-0005): it carries cycles and a key, nothing else.
1930
- ///
1931
- /// THE RATE LIMIT ⟨2026-10-01, evening — the owner's ruling "1B"; until then this door shared
1932
- /// first engrams' limiter in full: their 24-hour count, their in-flight count and
1933
- /// `effectiveDailyCap`⟩. The door shares only the DIAL (`spawnCeiling`) and the WINDOW LENGTH (24
1934
- /// hours). Its count is its own (`sponsoredCreationTimestampsBuf`, pruned by
1935
- /// `pruneSponsoredWindow`), its in-flight count is its own (`sponsoredInFlight`), and its cap is
1936
- /// `spawnCeiling` alone — the reserve-derived term never applies, because the opened engram lives
1937
- /// on the cycles the caller attached and the registry funds nothing. So an opening never uses up a
1938
- /// first engram's slot, and is never refused for the registry's own low balance. The per-key
1939
- /// pending mark (`createEngramPending`) stays shared: it is about ONE key, not a count, and a key
1940
- /// must not be mid-spawn at both doors at once.
1941
- ///
1942
- /// THE CUT-OFF AT BIRTH. If the caller ended the key's engagement while the canister was being
1943
- /// created (the ending is recorded by `sysRecordAgentEdge` between this method's awaits), the
1944
- /// opened engram is recorded AND cut off in the same step — the cycles are already in it, so the
1945
- /// key keeps it, but it starts on nobody's record. Without this the ending's cut-off writer would
1946
- /// have found no `openedThroughParent` row yet, and the engram would never be cut off.
1947
- /// WHAT WOULD MAKE THIS WRONG: a second path that writes `parentOf`, or an `await` placed between
1948
- /// the post-await re-check and the record below.
1949
- sysSpawnChild: (ownerKey: principal) -> (Result_1);
1950
2167
  /// Admin: upgrade one engram to the current template. RESPECTS the owner's update preference —
1951
2168
  /// an engram set to `#ManualOnly` is not moved by this method, which is what makes the preference
1952
2169
  /// meaningful rather than advisory. The owner's own `upgradeMyEngram` is unaffected either way.
@@ -1955,6 +2172,8 @@ service : {
1955
2172
  /// paid only for a #Security update on a running engram. A push is the registry's own initiative,
1956
2173
  /// so where the engram cannot hold the install even with its setting lowered, the push is SKIPPED
1957
2174
  /// with `#Conflict` and not attempted — the owner can still pull it, and the pull is never refused.
2175
+ /// ⟨2026-11-04 — BACKLOG ERASED-REFUSE-1⟩ An ERASED engram (its canister holds no program) is not
2176
+ /// pushed: `#Conflict`, by name, before anything is added.
1958
2177
  upgradeEngram: (canisterId: principal) -> (Result);
1959
2178
  /// Upgrade YOUR OWN engram to the registry's current template. Self-service — no admin, no
1960
2179
  /// queue, no approval.
@@ -1985,6 +2204,8 @@ service : {
1985
2204
  /// (UpgradeFunding.pullFailure): `#Conflict` when the engram needs more compute (the owner's
1986
2205
  /// action — add compute), `#Unavailable` when the registry could not pay this time (retryable).
1987
2206
  /// A failure after a paid or unneeded deposit answers `#Unavailable` with the network's reply.
2207
+ /// ⟨2026-11-04 — BACKLOG ERASED-REFUSE-1⟩ On an ERASED engram (its canister holds no program) nothing
2208
+ /// is paid; the install is still attempted, the network refuses it, and the reply says "erased".
1988
2209
  ///
1989
2210
  /// An engram already on the current template is a silent no-op. A SOVEREIGN engram gets
1990
2211
  /// "registry is no longer a controller" — accurate, because it is no longer ours to install on.