@engramx/idl 0.16.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.
@@ -0,0 +1,1423 @@
1
+ export const idlFactory = ({ IDL }) => {
2
+ const About = IDL.Record({
3
+ verifiedHuman: IDL.Bool,
4
+ guardianCount: IDL.Nat,
5
+ totalMemoryWrites: IDL.Nat,
6
+ lastAgentWriteAtNs: IDL.Opt(IDL.Int),
7
+ distinctReaderPrincipals: IDL.Nat,
8
+ lastWriteAtNs: IDL.Opt(IDL.Int),
9
+ totalBackupSize: IDL.Nat,
10
+ backupCount: IDL.Nat,
11
+ lastAgentReadAtNs: IDL.Opt(IDL.Int),
12
+ firstWriteAtNs: IDL.Opt(IDL.Int),
13
+ agentCount: IDL.Nat,
14
+ paidMemoryReadEnabled: IDL.Bool,
15
+ version: IDL.Text,
16
+ paymentsFrozen: IDL.Bool,
17
+ agentMemoryWrites: IDL.Nat,
18
+ agentMemoryReads: IDL.Nat,
19
+ auditLogSize: IDL.Nat,
20
+ memoryFileCount: IDL.Nat,
21
+ firstAgentWriteAtNs: IDL.Opt(IDL.Int),
22
+ lastReadAtNs: IDL.Opt(IDL.Int),
23
+ writesPaused: IDL.Bool,
24
+ distinctReaderClients: IDL.Nat,
25
+ totalMemoryReads: IDL.Nat,
26
+ walletActivatedAtNs: IDL.Opt(IDL.Int),
27
+ encryptionEnabled: IDL.Bool,
28
+ paidMemoryWriteEnabled: IDL.Bool,
29
+ });
30
+ const AgentStatus = IDL.Variant({
31
+ Active: IDL.Null,
32
+ Resigned: IDL.Null,
33
+ Revoked: IDL.Null,
34
+ });
35
+ const LogPosition = IDL.Record({ reads: IDL.Nat, record: IDL.Nat });
36
+ const HeldKey = IDL.Record({
37
+ key: IDL.Principal,
38
+ from: LogPosition,
39
+ until: LogPosition,
40
+ });
41
+ const AgentPermissions = IDL.Record({
42
+ canReadMemory: IDL.Bool,
43
+ scopes: IDL.Opt(IDL.Vec(IDL.Text)),
44
+ canReadBackup: IDL.Opt(IDL.Bool),
45
+ callsPerMinute: IDL.Nat,
46
+ canAppendMemory: IDL.Bool,
47
+ canReadWallet: IDL.Bool,
48
+ });
49
+ const EnrolmentProof = IDL.Record({
50
+ signature: IDL.Vec(IDL.Nat8),
51
+ enrolledKey: IDL.Principal,
52
+ rootPubkey: IDL.Vec(IDL.Nat8),
53
+ inviteCode: IDL.Text,
54
+ });
55
+ const AgentEndReason = IDL.Variant({
56
+ Resigned: IDL.Null,
57
+ OwnerRevoked: IDL.Null,
58
+ Reset: IDL.Null,
59
+ KillSwitch: IDL.Null,
60
+ GuardianRevoked: IDL.Null,
61
+ });
62
+ const AgentEnding = IDL.Record({
63
+ day: IDL.Int,
64
+ reason: AgentEndReason,
65
+ });
66
+ const KeyNomination = IDL.Record({ key: IDL.Principal, atNs: IDL.Int });
67
+ const AgentRecord = IDL.Record({
68
+ status: AgentStatus,
69
+ earlierKeys: IDL.Vec(HeldKey),
70
+ permissions: AgentPermissions,
71
+ principal: IDL.Principal,
72
+ keyRotationCount: IDL.Nat,
73
+ publicKeyHash: IDL.Opt(IDL.Text),
74
+ pairedAtNs: IDL.Int,
75
+ enrolment: EnrolmentProof,
76
+ lastSeenNs: IDL.Int,
77
+ name: IDL.Text,
78
+ root: IDL.Principal,
79
+ ended: IDL.Opt(AgentEnding),
80
+ keyNomination: IDL.Opt(KeyNomination),
81
+ keyRotatedAtNs: IDL.Int,
82
+ keyHeldFrom: LogPosition,
83
+ });
84
+ const Error = IDL.Variant({
85
+ Invalid: IDL.Text,
86
+ NotFound: IDL.Text,
87
+ Refused: IDL.Text,
88
+ Other: IDL.Text,
89
+ Unavailable: IDL.Text,
90
+ Conflict: IDL.Text,
91
+ });
92
+ const Result_70 = IDL.Variant({ Ok: AgentRecord, Err: Error });
93
+ const HttpHeader = IDL.Record({ value: IDL.Text, name: IDL.Text });
94
+ const HttpRequestResult = IDL.Record({
95
+ status: IDL.Nat,
96
+ body: IDL.Vec(IDL.Nat8),
97
+ headers: IDL.Vec(HttpHeader),
98
+ });
99
+ const Eip712Registration = IDL.Record({
100
+ encodeTypeString: IDL.Text,
101
+ cooloffEndsAtNs: IDL.Int,
102
+ typeId: IDL.Vec(IDL.Nat8),
103
+ });
104
+ const Result_69 = IDL.Variant({ Ok: Eip712Registration, Err: Error });
105
+ const Result_68 = IDL.Variant({
106
+ Ok: IDL.Record({ activatesAtNs: IDL.Int }),
107
+ Err: Error,
108
+ });
109
+ const GuardianPermissions = IDL.Record({
110
+ canFreezePayments: IDL.Bool,
111
+ canRevokeAgents: IDL.Bool,
112
+ scopes: IDL.Opt(IDL.Vec(IDL.Text)),
113
+ canPauseWrites: IDL.Bool,
114
+ });
115
+ const Result_1 = IDL.Variant({ Ok: IDL.Null, Err: Error });
116
+ const MemorySource = IDL.Variant({
117
+ sessionTranscript: IDL.Null,
118
+ human: IDL.Null,
119
+ fileSync: IDL.Null,
120
+ agentDerived: IDL.Null,
121
+ deterministic: IDL.Null,
122
+ });
123
+ const WriteReceipt = IDL.Record({
124
+ seq: IDL.Nat,
125
+ head: IDL.Vec(IDL.Nat8),
126
+ version: IDL.Nat,
127
+ });
128
+ const Result = IDL.Variant({ Ok: WriteReceipt, Err: Error });
129
+ const CondenseResult = IDL.Record({
130
+ seq: IDL.Nat,
131
+ toSeq: IDL.Nat,
132
+ opsRoot: IDL.Vec(IDL.Nat8),
133
+ head: IDL.Vec(IDL.Nat8),
134
+ fromSeq: IDL.Nat,
135
+ headAtBoundary: IDL.Vec(IDL.Nat8),
136
+ newFirstAvailableSeq: IDL.Nat,
137
+ historyBytesDelta: IDL.Int,
138
+ opCount: IDL.Nat,
139
+ });
140
+ const Result_67 = IDL.Variant({ Ok: CondenseResult, Err: Error });
141
+ const BackupType = IDL.Variant({
142
+ PartialSnapshot: IDL.Null,
143
+ IncrementalDiff: IDL.Null,
144
+ FullSnapshot: IDL.Null,
145
+ });
146
+ const Result_43 = IDL.Variant({ Ok: IDL.Text, Err: Error });
147
+ const Result_59 = IDL.Variant({ Ok: IDL.Vec(IDL.Nat8), Err: Error });
148
+ const Result_8 = IDL.Variant({ Ok: IDL.Nat, Err: Error });
149
+ const MemoryRangeExport = IDL.Record({
150
+ seq: IDL.Nat,
151
+ toSeq: IDL.Nat,
152
+ opsRoot: IDL.Vec(IDL.Nat8),
153
+ atNs: IDL.Int,
154
+ head: IDL.Vec(IDL.Nat8),
155
+ fromSeq: IDL.Nat,
156
+ authorFilter: IDL.Opt(IDL.Principal),
157
+ });
158
+ const Result_66 = IDL.Variant({ Ok: MemoryRangeExport, Err: Error });
159
+ const AlertConfig = IDL.Record({
160
+ url: IDL.Opt(IDL.Text),
161
+ money: IDL.Bool,
162
+ classes: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Bool))),
163
+ agentWrites: IDL.Bool,
164
+ guardian: IDL.Bool,
165
+ approvals: IDL.Bool,
166
+ });
167
+ const AlertStatus = IDL.Record({
168
+ lastDeliveredAtNs: IDL.Opt(IDL.Int),
169
+ failures: IDL.Nat,
170
+ totalAudit: IDL.Nat,
171
+ cursor: IDL.Nat,
172
+ disabled: IDL.Bool,
173
+ config: AlertConfig,
174
+ });
175
+ const Result_57 = IDL.Variant({ Ok: AlertStatus, Err: Error });
176
+ const Result_53 = IDL.Variant({
177
+ Ok: IDL.Record({ paths: IDL.Vec(IDL.Text) }),
178
+ Err: Error,
179
+ });
180
+ const OwnerRow = IDL.Record({
181
+ pairedDay: IDL.Nat,
182
+ lastPaymentDay: IDL.Opt(IDL.Nat),
183
+ root: IDL.Principal,
184
+ weeks: IDL.Nat64,
185
+ produced: IDL.Nat,
186
+ firstPaymentDay: IDL.Opt(IDL.Nat),
187
+ });
188
+ const Page_21 = IDL.Record({
189
+ total: IDL.Nat,
190
+ withheld: IDL.Nat,
191
+ items: IDL.Vec(OwnerRow),
192
+ });
193
+ const Result_64 = IDL.Variant({ Ok: Page_21, Err: Error });
194
+ const Role = IDL.Variant({
195
+ Anonymous: IDL.Null,
196
+ Viewer: IDL.Null,
197
+ Engram: IDL.Null,
198
+ Root: IDL.Null,
199
+ Buyer: IDL.Null,
200
+ WasmAdmin: IDL.Null,
201
+ Guardian: IDL.Null,
202
+ Seller: IDL.Null,
203
+ Admin: IDL.Null,
204
+ Agent: IDL.Null,
205
+ Other: IDL.Null,
206
+ Owner: IDL.Null,
207
+ });
208
+ const AuditEntry = IDL.Record({
209
+ id: IDL.Nat,
210
+ entryHash: IDL.Vec(IDL.Nat8),
211
+ callerRole: Role,
212
+ operation: IDL.Text,
213
+ details: IDL.Text,
214
+ caller: IDL.Principal,
215
+ success: IDL.Bool,
216
+ timestampNs: IDL.Int,
217
+ });
218
+ const AgentWriteRow = IDL.Record({
219
+ source: IDL.Opt(IDL.Text),
220
+ path: IDL.Opt(IDL.Text),
221
+ entry: AuditEntry,
222
+ version: IDL.Opt(IDL.Nat),
223
+ connector: IDL.Opt(IDL.Text),
224
+ });
225
+ const AgentWriteReview = IDL.Record({
226
+ cursor: IDL.Nat,
227
+ head: IDL.Nat,
228
+ rows: IDL.Vec(AgentWriteRow),
229
+ earliest: IDL.Nat,
230
+ capped: IDL.Bool,
231
+ });
232
+ const Result_63 = IDL.Variant({ Ok: AgentWriteReview, Err: Error });
233
+ const AnchorPushStatus = IDL.Record({
234
+ anchorTickAtNs: IDL.Opt(IDL.Int),
235
+ okAtNs: IDL.Opt(IDL.Int),
236
+ cadenceSeconds: IDL.Nat,
237
+ attemptTotal: IDL.Nat,
238
+ currentTotal: IDL.Nat,
239
+ timerTickAtNs: IDL.Opt(IDL.Int),
240
+ okTotal: IDL.Nat,
241
+ carrierArmedAtNs: IDL.Int,
242
+ attemptAtNs: IDL.Opt(IDL.Int),
243
+ skipCursor: IDL.Nat,
244
+ lastError: IDL.Text,
245
+ });
246
+ const AuditHead = IDL.Record({
247
+ headHash: IDL.Vec(IDL.Nat8),
248
+ size: IDL.Nat,
249
+ });
250
+ const BackupStatus = IDL.Variant({
251
+ Uploading: IDL.Null,
252
+ Failed: IDL.Null,
253
+ Finalized: IDL.Null,
254
+ });
255
+ const BackupMetadata = IDL.Record({
256
+ status: BackupStatus,
257
+ sha256: IDL.Text,
258
+ backupId: IDL.Text,
259
+ createdBy: IDL.Principal,
260
+ createdAtNs: IDL.Int,
261
+ totalSize: IDL.Nat,
262
+ backupLabel: IDL.Opt(IDL.Text),
263
+ backupType: BackupType,
264
+ dbType: IDL.Text,
265
+ chunkCount: IDL.Nat,
266
+ parentBackupId: IDL.Opt(IDL.Text),
267
+ });
268
+ const Result_62 = IDL.Variant({ Ok: BackupMetadata, Err: Error });
269
+ const CertifiedAuditHead = IDL.Record({
270
+ total: IDL.Nat,
271
+ certificate: IDL.Opt(IDL.Vec(IDL.Nat8)),
272
+ headHash: IDL.Vec(IDL.Nat8),
273
+ size: IDL.Nat,
274
+ witness: IDL.Opt(IDL.Vec(IDL.Nat8)),
275
+ });
276
+ const ChildAllowanceRow = IDL.Record({
277
+ root: IDL.Principal,
278
+ remaining: IDL.Nat,
279
+ });
280
+ const Result_61 = IDL.Variant({ Ok: ChildAllowanceRow, Err: Error });
281
+ const ChildOpening = IDL.Record({
282
+ attachCycles: IDL.Nat,
283
+ balance: IDL.Nat,
284
+ allowances: IDL.Vec(ChildAllowanceRow),
285
+ floorCycles: IDL.Nat,
286
+ });
287
+ const Result_60 = IDL.Variant({ Ok: ChildOpening, Err: Error });
288
+ const ServiceEntry = IDL.Record({
289
+ endpoint: IDL.Text,
290
+ name: IDL.Text,
291
+ version: IDL.Text,
292
+ domains: IDL.Vec(IDL.Text),
293
+ skills: IDL.Vec(IDL.Text),
294
+ });
295
+ const AgentCard = IDL.Record({
296
+ x402Support: IDL.Bool,
297
+ name: IDL.Text,
298
+ description: IDL.Text,
299
+ services: IDL.Vec(ServiceEntry),
300
+ });
301
+ const EvmAddresses = IDL.Record({
302
+ pay: IDL.Text,
303
+ engramRegistration: IDL.Text,
304
+ });
305
+ const Result_58 = IDL.Variant({ Ok: EvmAddresses, Err: Error });
306
+ const GenesisNote = IDL.Record({
307
+ predecessorSize: IDL.Opt(IDL.Nat),
308
+ predecessorHeadHash: IDL.Opt(IDL.Vec(IDL.Nat8)),
309
+ note: IDL.Text,
310
+ version: IDL.Text,
311
+ genesisAtNs: IDL.Int,
312
+ });
313
+ const MemoryEviction = IDL.Record({
314
+ evictSeq: IDL.Nat,
315
+ fromVersion: IDL.Nat,
316
+ evictedRoot: IDL.Vec(IDL.Nat8),
317
+ trigger: IDL.Variant({
318
+ globalCap: IDL.Null,
319
+ thinTail: IDL.Null,
320
+ perFileCap: IDL.Null,
321
+ thinLogSpaced: IDL.Null,
322
+ policy: IDL.Null,
323
+ }),
324
+ cause: IDL.Variant({ maxVersions: IDL.Null, maxBytes: IDL.Null }),
325
+ toVersion: IDL.Nat,
326
+ });
327
+ const MemoryVersionSummary = IDL.Record({
328
+ by: IDL.Principal,
329
+ seq: IDL.Nat,
330
+ contentRoot: IDL.Vec(IDL.Nat8),
331
+ atNs: IDL.Int,
332
+ kind: IDL.Variant({
333
+ set: IDL.Null,
334
+ restore: IDL.Null,
335
+ append: IDL.Null,
336
+ tombstone: IDL.Null,
337
+ }),
338
+ size: IDL.Nat,
339
+ version: IDL.Nat,
340
+ });
341
+ const MemoryHistory = IDL.Record({
342
+ evictions: IDL.Vec(MemoryEviction),
343
+ oldestRetainedVersion: IDL.Nat,
344
+ everCount: IDL.Nat,
345
+ retainedCount: IDL.Nat,
346
+ versions: IDL.Vec(MemoryVersionSummary),
347
+ evictedCount: IDL.Nat,
348
+ });
349
+ const Result_56 = IDL.Variant({ Ok: MemoryHistory, Err: Error });
350
+ const MemoryMaintainStatus = IDL.Record({
351
+ attachOk: IDL.Bool,
352
+ attachDetail: IDL.Text,
353
+ totalEvictions: IDL.Nat,
354
+ refusedQuota: IDL.Text,
355
+ more: IDL.Bool,
356
+ lastEvictions: IDL.Nat,
357
+ lastScrubbed: IDL.Nat,
358
+ lastMaintainAtNs: IDL.Opt(IDL.Int),
359
+ totalFindings: IDL.Nat,
360
+ refused: IDL.Bool,
361
+ });
362
+ const RetentionClassSpec = IDL.Variant({
363
+ vault: IDL.Null,
364
+ working: IDL.Record({
365
+ maxVersions: IDL.Opt(IDL.Nat),
366
+ maxBytes: IDL.Opt(IDL.Nat),
367
+ thinning: IDL.Variant({
368
+ tail: IDL.Null,
369
+ logSpaced: IDL.Record({ denseTail: IDL.Nat }),
370
+ }),
371
+ }),
372
+ });
373
+ const MemoryRetentionPolicy = IDL.Record({
374
+ entries: IDL.Vec(IDL.Tuple(IDL.Text, RetentionClassSpec)),
375
+ guards: IDL.Vec(IDL.Record({ notBeforeNs: IDL.Int, prefix: IDL.Text })),
376
+ });
377
+ const Result_55 = IDL.Variant({
378
+ Ok: MemoryRetentionPolicy,
379
+ Err: Error,
380
+ });
381
+ const GuardianStatus = IDL.Variant({
382
+ Active: IDL.Null,
383
+ Pending: IDL.Null,
384
+ });
385
+ const GuardianRecord = IDL.Record({
386
+ status: GuardianStatus,
387
+ permissions: GuardianPermissions,
388
+ principal: IDL.Principal,
389
+ name: IDL.Text,
390
+ addedAtNs: IDL.Int,
391
+ });
392
+ const Result_15 = IDL.Variant({ Ok: GuardianRecord, Err: Error });
393
+ const OwnerConsole = IDL.Record({
394
+ pendingApprovalCount: IDL.Nat,
395
+ memoryKeyEpoch: IDL.Nat,
396
+ owner: IDL.Opt(IDL.Principal),
397
+ agentRevisablePathCount: IDL.Nat,
398
+ protectedPathCount: IDL.Nat,
399
+ cyclesBalance: IDL.Nat,
400
+ unknownSessionRefusals: IDL.Nat,
401
+ });
402
+ const Result_54 = IDL.Variant({ Ok: OwnerConsole, Err: Error });
403
+ const SigningFloorStatus = IDL.Record({
404
+ floor: IDL.Nat,
405
+ signaturesAboveFloor: IDL.Nat,
406
+ balance: IDL.Nat,
407
+ perSignature: IDL.Nat,
408
+ });
409
+ const Result_52 = IDL.Variant({ Ok: SigningFloorStatus, Err: Error });
410
+ const SpendCeiling = IDL.Record({
411
+ spentToday: IDL.Nat,
412
+ maxPerDay: IDL.Opt(IDL.Nat),
413
+ });
414
+ const Result_51 = IDL.Variant({ Ok: SpendCeiling, Err: Error });
415
+ const SpendingPolicy = IDL.Record({
416
+ maxSessionDeposit: IDL.Opt(IDL.Nat),
417
+ blockedCallers: IDL.Opt(IDL.Vec(IDL.Principal)),
418
+ maxPerDay: IDL.Opt(IDL.Nat),
419
+ maxSessionDuration: IDL.Opt(IDL.Int),
420
+ sessionIdleTimeout: IDL.Opt(IDL.Int),
421
+ rateLimitPerMinute: IDL.Opt(IDL.Nat),
422
+ maxPerTransaction: IDL.Opt(IDL.Nat),
423
+ allowedCallers: IDL.Opt(IDL.Vec(IDL.Principal)),
424
+ maxConcurrentSessions: IDL.Opt(IDL.Nat),
425
+ });
426
+ const Result_50 = IDL.Variant({ Ok: SpendingPolicy, Err: Error });
427
+ const StorageReport = IDL.Record({
428
+ sessionFilesSize: IDL.Nat,
429
+ totalFiles: IDL.Nat,
430
+ memoryFilesSize: IDL.Nat,
431
+ totalContentSize: IDL.Nat,
432
+ backupCount: IDL.Nat,
433
+ memoryFilesCount: IDL.Nat,
434
+ versionHistorySize: IDL.Nat,
435
+ fileLimit: IDL.Nat,
436
+ backupSize: IDL.Nat,
437
+ auditLogSize: IDL.Nat,
438
+ versionHistoryCount: IDL.Nat,
439
+ sessionFilesCount: IDL.Nat,
440
+ });
441
+ const Result_49 = IDL.Variant({ Ok: StorageReport, Err: Error });
442
+ const TimerHealth = IDL.Record({
443
+ jobExpiryFastMode: IDL.Bool,
444
+ jobExpiryArmed: IDL.Bool,
445
+ alertTimerArmed: IDL.Bool,
446
+ sessionExpiryArmed: IDL.Bool,
447
+ });
448
+ const WalletBalances = IDL.Record({
449
+ icpE8s: IDL.Nat,
450
+ ckusdcE6s: IDL.Nat,
451
+ ckusdtE6s: IDL.Nat,
452
+ cycles: IDL.Nat,
453
+ });
454
+ const Result_48 = IDL.Variant({ Ok: WalletBalances, Err: Error });
455
+ const WorldIdConfig = IDL.Record({
456
+ action: IDL.Text,
457
+ appId: IDL.Text,
458
+ rpId: IDL.Text,
459
+ configured: IDL.Bool,
460
+ });
461
+ const Result_47 = IDL.Variant({ Ok: WorldIdConfig, Err: Error });
462
+ const WorldIdRpContext = IDL.Record({
463
+ signature: IDL.Text,
464
+ expiresAt: IDL.Nat,
465
+ createdAt: IDL.Nat,
466
+ rpId: IDL.Text,
467
+ nonce: IDL.Text,
468
+ });
469
+ const Result_46 = IDL.Variant({ Ok: WorldIdRpContext, Err: Error });
470
+ const Result_45 = IDL.Variant({ Ok: IDL.Opt(IDL.Text), Err: Error });
471
+ const HttpRequest = IDL.Record({
472
+ url: IDL.Text,
473
+ method: IDL.Text,
474
+ body: IDL.Vec(IDL.Nat8),
475
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
476
+ });
477
+ const HttpResponse = IDL.Record({
478
+ body: IDL.Vec(IDL.Nat8),
479
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
480
+ upgrade: IDL.Opt(IDL.Bool),
481
+ status_code: IDL.Nat16,
482
+ });
483
+ const Result_44 = IDL.Variant({ Ok: IDL.Bool, Err: Error });
484
+ const ActivitySnapshot = IDL.Record({
485
+ atNs: IDL.Int,
486
+ memoryReads: IDL.Nat,
487
+ memoryWrites: IDL.Nat,
488
+ });
489
+ const Page_20 = IDL.Record({
490
+ total: IDL.Nat,
491
+ withheld: IDL.Nat,
492
+ items: IDL.Vec(ActivitySnapshot),
493
+ });
494
+ const Result_42 = IDL.Variant({ Ok: Page_20, Err: Error });
495
+ const Page_19 = IDL.Record({
496
+ total: IDL.Nat,
497
+ withheld: IDL.Nat,
498
+ items: IDL.Vec(AgentRecord),
499
+ });
500
+ const Result_41 = IDL.Variant({ Ok: Page_19, Err: Error });
501
+ const Page_18 = IDL.Record({
502
+ total: IDL.Nat,
503
+ withheld: IDL.Nat,
504
+ items: IDL.Vec(
505
+ IDL.Record({
506
+ status: AgentStatus,
507
+ principal: IDL.Principal,
508
+ name: IDL.Text,
509
+ }),
510
+ ),
511
+ });
512
+ const Result_40 = IDL.Variant({ Ok: Page_18, Err: Error });
513
+ const ApprovalStatus = IDL.Variant({
514
+ Used: IDL.Null,
515
+ Approved: IDL.Null,
516
+ Denied: IDL.Null,
517
+ Expired: IDL.Null,
518
+ Pending: IDL.Null,
519
+ });
520
+ const ApprovalRequest = IDL.Record({
521
+ id: IDL.Text,
522
+ expiresAtNs: IDL.Int,
523
+ status: ApprovalStatus,
524
+ denialReason: IDL.Opt(IDL.Text),
525
+ policyField: IDL.Text,
526
+ approvedBy: IDL.Opt(IDL.Principal),
527
+ createdAtNs: IDL.Int,
528
+ approvedAtNs: IDL.Opt(IDL.Int),
529
+ binding: IDL.Text,
530
+ operation: IDL.Text,
531
+ rationale: IDL.Text,
532
+ policyLimit: IDL.Nat,
533
+ caller: IDL.Principal,
534
+ amount: IDL.Nat,
535
+ });
536
+ const Page_6 = IDL.Record({
537
+ total: IDL.Nat,
538
+ withheld: IDL.Nat,
539
+ items: IDL.Vec(ApprovalRequest),
540
+ });
541
+ const Result_28 = IDL.Variant({ Ok: Page_6, Err: Error });
542
+ const Page_1 = IDL.Record({
543
+ total: IDL.Nat,
544
+ withheld: IDL.Nat,
545
+ items: IDL.Vec(AuditEntry),
546
+ });
547
+ const Result_23 = IDL.Variant({ Ok: Page_1, Err: Error });
548
+ const Page_17 = IDL.Record({
549
+ total: IDL.Nat,
550
+ withheld: IDL.Nat,
551
+ items: IDL.Vec(BackupMetadata),
552
+ });
553
+ const Result_39 = IDL.Variant({ Ok: Page_17, Err: Error });
554
+ const BearerTokenStatus = IDL.Variant({
555
+ Active: IDL.Null,
556
+ Revoked: IDL.Null,
557
+ Expired: IDL.Null,
558
+ });
559
+ const BearerToken = IDL.Record({
560
+ expiresAtNs: IDL.Int,
561
+ status: BearerTokenStatus,
562
+ lastUsedNs: IDL.Int,
563
+ permissions: AgentPermissions,
564
+ tokenId: IDL.Text,
565
+ clientLabel: IDL.Text,
566
+ issuedAtNs: IDL.Int,
567
+ tokenHash: IDL.Text,
568
+ issuedBy: IDL.Principal,
569
+ });
570
+ const Page_16 = IDL.Record({
571
+ total: IDL.Nat,
572
+ withheld: IDL.Nat,
573
+ items: IDL.Vec(BearerToken),
574
+ });
575
+ const Result_38 = IDL.Variant({ Ok: Page_16, Err: Error });
576
+ const CondenseCheckpointRow = IDL.Record({
577
+ by: IDL.Principal,
578
+ seq: IDL.Nat,
579
+ toSeq: IDL.Nat,
580
+ opsRoot: IDL.Vec(IDL.Nat8),
581
+ atNs: IDL.Int,
582
+ fromSeq: IDL.Nat,
583
+ headAtBoundary: IDL.Vec(IDL.Nat8),
584
+ opCount: IDL.Nat,
585
+ });
586
+ const Page_15 = IDL.Record({
587
+ total: IDL.Nat,
588
+ withheld: IDL.Nat,
589
+ items: IDL.Vec(CondenseCheckpointRow),
590
+ });
591
+ const CheckpointPage = IDL.Record({
592
+ firstAvailableSeq: IDL.Nat,
593
+ page: Page_15,
594
+ scannedThroughSeq: IDL.Nat,
595
+ });
596
+ const Result_37 = IDL.Variant({ Ok: CheckpointPage, Err: Error });
597
+ const CycleSnapshot = IDL.Record({
598
+ seq: IDL.Nat,
599
+ source: IDL.Variant({ balance: IDL.Null, self: IDL.Null }),
600
+ atNs: IDL.Int,
601
+ cycles: IDL.Nat,
602
+ });
603
+ const Page_14 = IDL.Record({
604
+ total: IDL.Nat,
605
+ withheld: IDL.Nat,
606
+ items: IDL.Vec(CycleSnapshot),
607
+ });
608
+ const Result_36 = IDL.Variant({ Ok: Page_14, Err: Error });
609
+ const Page_13 = IDL.Record({
610
+ total: IDL.Nat,
611
+ withheld: IDL.Nat,
612
+ items: IDL.Vec(IDL.Text),
613
+ });
614
+ const Result_35 = IDL.Variant({ Ok: Page_13, Err: Error });
615
+ const AuthorityClass = IDL.Variant({
616
+ standingAuthority: IDL.Null,
617
+ valueBearing: IDL.Null,
618
+ standard: IDL.Null,
619
+ });
620
+ const RegisteredType = IDL.Record({
621
+ primaryType: IDL.Text,
622
+ encodeTypeString: IDL.Text,
623
+ cooloffEndsAtNs: IDL.Int,
624
+ domainName: IDL.Text,
625
+ typeId: IDL.Vec(IDL.Nat8),
626
+ verifyingContract: IDL.Text,
627
+ dailySignCap: IDL.Nat,
628
+ fields: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
629
+ domainSeparator: IDL.Vec(IDL.Nat8),
630
+ destinationFields: IDL.Vec(IDL.Text),
631
+ authorityClass: AuthorityClass,
632
+ typeHash: IDL.Vec(IDL.Nat8),
633
+ registeredAtNs: IDL.Int,
634
+ chainId: IDL.Nat,
635
+ domainVersion: IDL.Text,
636
+ ackIrrevocable: IDL.Bool,
637
+ });
638
+ const Page_12 = IDL.Record({
639
+ total: IDL.Nat,
640
+ withheld: IDL.Nat,
641
+ items: IDL.Vec(RegisteredType),
642
+ });
643
+ const Result_34 = IDL.Variant({ Ok: Page_12, Err: Error });
644
+ const Page_11 = IDL.Record({
645
+ total: IDL.Nat,
646
+ withheld: IDL.Nat,
647
+ items: IDL.Vec(IDL.Record({ activeFromNs: IDL.Int, address: IDL.Text })),
648
+ });
649
+ const Result_33 = IDL.Variant({ Ok: Page_11, Err: Error });
650
+ const Page_10 = IDL.Record({
651
+ total: IDL.Nat,
652
+ withheld: IDL.Nat,
653
+ items: IDL.Vec(GuardianRecord),
654
+ });
655
+ const Result_32 = IDL.Variant({ Ok: Page_10, Err: Error });
656
+ const ExportReceiptRow = IDL.Record({
657
+ by: IDL.Principal,
658
+ seq: IDL.Nat,
659
+ toSeq: IDL.Nat,
660
+ opsRoot: IDL.Vec(IDL.Nat8),
661
+ atNs: IDL.Int,
662
+ fromSeq: IDL.Nat,
663
+ authorFilter: IDL.Opt(IDL.Principal),
664
+ });
665
+ const Page_9 = IDL.Record({
666
+ total: IDL.Nat,
667
+ withheld: IDL.Nat,
668
+ items: IDL.Vec(ExportReceiptRow),
669
+ });
670
+ const ReceiptPage = IDL.Record({
671
+ firstAvailableSeq: IDL.Nat,
672
+ page: Page_9,
673
+ scannedThroughSeq: IDL.Nat,
674
+ });
675
+ const Result_31 = IDL.Variant({ Ok: ReceiptPage, Err: Error });
676
+ const Page_8 = IDL.Record({
677
+ total: IDL.Nat,
678
+ withheld: IDL.Nat,
679
+ items: IDL.Vec(
680
+ IDL.Record({
681
+ path: IDL.Text,
682
+ version: IDL.Nat,
683
+ lastModifiedAtNs: IDL.Int,
684
+ }),
685
+ ),
686
+ });
687
+ const Result_30 = IDL.Variant({ Ok: Page_8, Err: Error });
688
+ const MemoryLogChunkRef = IDL.Record({
689
+ hash: IDL.Vec(IDL.Nat8),
690
+ size: IDL.Nat,
691
+ birthSeq: IDL.Nat,
692
+ });
693
+ const MemoryLogManifest = IDL.Record({
694
+ contentRoot: IDL.Vec(IDL.Nat8),
695
+ totalSize: IDL.Nat,
696
+ chunks: IDL.Vec(MemoryLogChunkRef),
697
+ });
698
+ const MemoryLogImportNote = IDL.Variant({
699
+ legacyDelete: IDL.Null,
700
+ legacyTruncated: IDL.Record({
701
+ prefixHash: IDL.Vec(IDL.Nat8),
702
+ storedBytes: IDL.Nat,
703
+ }),
704
+ legacyGap: IDL.Record({ firstSurviving: IDL.Nat }),
705
+ legacyUnreconstructable: IDL.Record({
706
+ contentHash: IDL.Vec(IDL.Nat8),
707
+ reason: IDL.Text,
708
+ }),
709
+ genesis: IDL.Record({ boundTo: IDL.Opt(IDL.Vec(IDL.Nat8)) }),
710
+ });
711
+ const MemoryLogOp = IDL.Variant({
712
+ set: IDL.Record({ manifest: MemoryLogManifest }),
713
+ exported: IDL.Record({
714
+ toSeq: IDL.Nat,
715
+ opsRoot: IDL.Vec(IDL.Nat8),
716
+ fromSeq: IDL.Nat,
717
+ authorFilter: IDL.Opt(IDL.Principal),
718
+ }),
719
+ imported: MemoryLogImportNote,
720
+ restore: IDL.Record({
721
+ toVersion: IDL.Nat,
722
+ manifest: MemoryLogManifest,
723
+ }),
724
+ evict: IDL.Record({
725
+ fromVersion: IDL.Nat,
726
+ evictedRoot: IDL.Vec(IDL.Nat8),
727
+ toVersion: IDL.Nat,
728
+ chunkCount: IDL.Nat,
729
+ byteCount: IDL.Nat,
730
+ }),
731
+ append: IDL.Record({
732
+ deltaHash: IDL.Vec(IDL.Nat8),
733
+ deltaSize: IDL.Nat,
734
+ newSize: IDL.Nat,
735
+ }),
736
+ tombstone: IDL.Null,
737
+ condense: IDL.Record({
738
+ toSeq: IDL.Nat,
739
+ opsRoot: IDL.Vec(IDL.Nat8),
740
+ fromSeq: IDL.Nat,
741
+ headAtBoundary: IDL.Vec(IDL.Nat8),
742
+ opCount: IDL.Nat,
743
+ }),
744
+ });
745
+ const MemoryLogEvent = IDL.Record({
746
+ by: IDL.Principal,
747
+ op: MemoryLogOp,
748
+ seq: IDL.Nat,
749
+ contentRoot: IDL.Vec(IDL.Nat8),
750
+ atNs: IDL.Int,
751
+ path: IDL.Text,
752
+ prev: IDL.Vec(IDL.Nat8),
753
+ size: IDL.Nat,
754
+ version: IDL.Nat,
755
+ });
756
+ const Page_7 = IDL.Record({
757
+ total: IDL.Nat,
758
+ withheld: IDL.Nat,
759
+ items: IDL.Vec(MemoryLogEvent),
760
+ });
761
+ const LogPage = IDL.Record({
762
+ firstAvailableSeq: IDL.Nat,
763
+ head: IDL.Vec(IDL.Nat8),
764
+ page: Page_7,
765
+ });
766
+ const Result_29 = IDL.Variant({ Ok: LogPage, Err: Error });
767
+ const EngramSessionStatus = IDL.Variant({
768
+ closed: IDL.Null,
769
+ expired: IDL.Null,
770
+ other: IDL.Text,
771
+ open: IDL.Null,
772
+ closing: IDL.Null,
773
+ });
774
+ const EngramSessionState = IDL.Record({
775
+ id: IDL.Text,
776
+ status: EngramSessionStatus,
777
+ deposited: IDL.Nat,
778
+ openedAtNs: IDL.Int,
779
+ lastActivityAtNs: IDL.Int,
780
+ consumed: IDL.Nat,
781
+ voucherCount: IDL.Nat,
782
+ remaining: IDL.Nat,
783
+ payer: IDL.Principal,
784
+ });
785
+ const Page_5 = IDL.Record({
786
+ total: IDL.Nat,
787
+ withheld: IDL.Nat,
788
+ items: IDL.Vec(EngramSessionState),
789
+ });
790
+ const Result_27 = IDL.Variant({ Ok: Page_5, Err: Error });
791
+ const OwnershipTransfer = IDL.Record({
792
+ to: IDL.Principal,
793
+ atNs: IDL.Int,
794
+ from: IDL.Opt(IDL.Principal),
795
+ authorizedBy: IDL.Principal,
796
+ });
797
+ const Page_4 = IDL.Record({
798
+ total: IDL.Nat,
799
+ withheld: IDL.Nat,
800
+ items: IDL.Vec(OwnershipTransfer),
801
+ });
802
+ const Result_26 = IDL.Variant({ Ok: Page_4, Err: Error });
803
+ const MarketplacePaymentSignatures = IDL.Record({
804
+ marketplace: IDL.Principal,
805
+ sharedSignedToday: IDL.Nat,
806
+ limit: IDL.Nat,
807
+ });
808
+ const AgentPaymentSignatures = IDL.Record({
809
+ agent: IDL.Principal,
810
+ signedToday: IDL.Nat,
811
+ root: IDL.Principal,
812
+ });
813
+ const Page_3 = IDL.Record({
814
+ total: IDL.Nat,
815
+ withheld: IDL.Nat,
816
+ items: IDL.Vec(AgentPaymentSignatures),
817
+ });
818
+ const PaymentSignatureCounts = IDL.Record({
819
+ day: IDL.Int,
820
+ marketplace: IDL.Opt(MarketplacePaymentSignatures),
821
+ agents: Page_3,
822
+ limit: IDL.Nat,
823
+ });
824
+ const Result_25 = IDL.Variant({
825
+ Ok: PaymentSignatureCounts,
826
+ Err: Error,
827
+ });
828
+ const PurgedAgent = IDL.Record({
829
+ principal: IDL.Principal,
830
+ pairedAtNs: IDL.Int,
831
+ name: IDL.Text,
832
+ root: IDL.Principal,
833
+ enrolledKey: IDL.Principal,
834
+ ended: AgentEnding,
835
+ invite: IDL.Text,
836
+ purgedAtNs: IDL.Int,
837
+ });
838
+ const Page_2 = IDL.Record({
839
+ total: IDL.Nat,
840
+ withheld: IDL.Nat,
841
+ items: IDL.Vec(PurgedAgent),
842
+ });
843
+ const Result_24 = IDL.Variant({ Ok: Page_2, Err: Error });
844
+ const Repudiation = IDL.Record({
845
+ atNs: IDL.Int,
846
+ path: IDL.Text,
847
+ auditId: IDL.Nat,
848
+ version: IDL.Nat,
849
+ reason: IDL.Text,
850
+ });
851
+ const Page = IDL.Record({
852
+ total: IDL.Nat,
853
+ withheld: IDL.Nat,
854
+ items: IDL.Vec(Repudiation),
855
+ });
856
+ const Result_22 = IDL.Variant({ Ok: Page, Err: Error });
857
+ const Result_21 = IDL.Variant({ Ok: IDL.Principal, Err: Error });
858
+ const SessionConfig = IDL.Record({
859
+ autoClose: IDL.Bool,
860
+ idleTimeout: IDL.Opt(IDL.Int),
861
+ maxDeposit: IDL.Nat,
862
+ });
863
+ const Eip3009Authorization = IDL.Record({
864
+ r: IDL.Vec(IDL.Nat8),
865
+ s: IDL.Vec(IDL.Nat8),
866
+ v: IDL.Nat8,
867
+ to: IDL.Text,
868
+ value: IDL.Nat,
869
+ from: IDL.Text,
870
+ validAfter: IDL.Nat,
871
+ nonce: IDL.Vec(IDL.Nat8),
872
+ validBefore: IDL.Nat,
873
+ });
874
+ const PaymentSignature = IDL.Record({
875
+ signature: IDL.Vec(IDL.Nat8),
876
+ asset: IDL.Opt(IDL.Text),
877
+ publicKey: IDL.Opt(IDL.Vec(IDL.Nat8)),
878
+ scheme: IDL.Text,
879
+ network: IDL.Text,
880
+ sender: IDL.Text,
881
+ nonce: IDL.Vec(IDL.Nat8),
882
+ authorization: IDL.Opt(Eip3009Authorization),
883
+ });
884
+ const Result_20 = IDL.Variant({ Ok: EngramSessionState, Err: Error });
885
+ const TokenAmount = IDL.Variant({
886
+ Icp: IDL.Nat,
887
+ Ckusdc: IDL.Nat,
888
+ Ckusdt: IDL.Nat,
889
+ });
890
+ const ActionAuth = IDL.Record({
891
+ signature: IDL.Vec(IDL.Nat8),
892
+ pubkey: IDL.Vec(IDL.Nat8),
893
+ nonce: IDL.Nat,
894
+ });
895
+ const Enrolment = IDL.Record({
896
+ signature: IDL.Vec(IDL.Nat8),
897
+ enrolledKey: IDL.Principal,
898
+ rootPubkey: IDL.Vec(IDL.Nat8),
899
+ engram: IDL.Principal,
900
+ });
901
+ const TrackRecordNotice = IDL.Variant({
902
+ Recorded: IDL.Null,
903
+ NotRecorded: IDL.Text,
904
+ });
905
+ const Pairing = IDL.Record({
906
+ agent: AgentRecord,
907
+ trackRecord: TrackRecordNotice,
908
+ });
909
+ const Result_19 = IDL.Variant({ Ok: Pairing, Err: Error });
910
+ const CondensePreview = IDL.Record({
911
+ scannedFromSeq: IDL.Nat,
912
+ scanTruncated: IDL.Bool,
913
+ firstAvailableSeq: IDL.Nat,
914
+ unlocked: IDL.Bool,
915
+ totalEvents: IDL.Nat,
916
+ maxUnlockableToSeq: IDL.Nat,
917
+ bestUnfilteredReceipt: IDL.Opt(IDL.Record({ seq: IDL.Nat, toSeq: IDL.Nat, fromSeq: IDL.Nat })),
918
+ opCountInRange: IDL.Nat,
919
+ filteredReceiptsSeen: IDL.Nat,
920
+ coveringReceipt: IDL.Opt(IDL.Record({ seq: IDL.Nat, toSeq: IDL.Nat, fromSeq: IDL.Nat })),
921
+ proposedToSeq: IDL.Nat,
922
+ });
923
+ const Result_18 = IDL.Variant({ Ok: CondensePreview, Err: Error });
924
+ const SessionIntent = IDL.Record({
925
+ token: IDL.Text,
926
+ costPerCall: IDL.Opt(IDL.Nat),
927
+ minDeposit: IDL.Opt(IDL.Nat),
928
+ recipient: IDL.Text,
929
+ network: IDL.Text,
930
+ description: IDL.Opt(IDL.Text),
931
+ expiryNs: IDL.Int,
932
+ suggestedDeposit: IDL.Nat,
933
+ });
934
+ const MemoryFile = IDL.Record({
935
+ content: IDL.Vec(IDL.Nat8),
936
+ path: IDL.Text,
937
+ version: IDL.Nat,
938
+ lastModifiedBy: IDL.Principal,
939
+ lastModifiedAtNs: IDL.Int,
940
+ });
941
+ const Result_11 = IDL.Variant({ Ok: MemoryFile, Err: Error });
942
+ const BatchReadItem = IDL.Record({
943
+ result: IDL.Variant({ Ok: MemoryFile, Err: Error }),
944
+ path: IDL.Text,
945
+ });
946
+ const Result_17 = IDL.Variant({
947
+ Ok: IDL.Vec(BatchReadItem),
948
+ Err: Error,
949
+ });
950
+ const MemoryByteChunk = IDL.Record({
951
+ more: IDL.Bool,
952
+ fileSize: IDL.Nat,
953
+ bytes: IDL.Vec(IDL.Nat8),
954
+ });
955
+ const Result_16 = IDL.Variant({ Ok: MemoryByteChunk, Err: Error });
956
+ const ResetReport = IDL.Record({
957
+ agentsRemoved: IDL.Nat,
958
+ agentsPurged: IDL.Nat,
959
+ guardiansRemoved: IDL.Nat,
960
+ filesCleared: IDL.Nat,
961
+ });
962
+ const Result_14 = IDL.Variant({ Ok: ResetReport, Err: Error });
963
+ const UnrecordableEngagement = IDL.Record({
964
+ principal: IDL.Principal,
965
+ root: IDL.Principal,
966
+ ended: AgentEnding,
967
+ invite: IDL.Text,
968
+ });
969
+ const ResyncReport = IDL.Record({
970
+ startsAcknowledged: IDL.Nat,
971
+ cannotBeRecorded: IDL.Vec(UnrecordableEngagement),
972
+ endingsAcknowledged: IDL.Nat,
973
+ notRecorded: IDL.Vec(
974
+ IDL.Record({
975
+ why: IDL.Text,
976
+ principal: IDL.Principal,
977
+ root: IDL.Principal,
978
+ event: IDL.Text,
979
+ }),
980
+ ),
981
+ });
982
+ const Result_13 = IDL.Variant({ Ok: ResyncReport, Err: Error });
983
+ const Voucher = IDL.Record({
984
+ signature: IDL.Vec(IDL.Nat8),
985
+ sessionId: IDL.Text,
986
+ sequence: IDL.Nat,
987
+ cumulativeAmount: IDL.Nat,
988
+ });
989
+ const SessionContext = IDL.Record({
990
+ files: IDL.Vec(MemoryFile),
991
+ totalFiles: IDL.Nat,
992
+ truncated: IDL.Bool,
993
+ includedFiles: IDL.Nat,
994
+ totalBytes: IDL.Nat,
995
+ });
996
+ const Result_12 = IDL.Variant({ Ok: SessionContext, Err: Error });
997
+ const BackupRetentionReport = IDL.Record({
998
+ maxBackups: IDL.Nat,
999
+ dbType: IDL.Text,
1000
+ prunedBackups: IDL.Nat,
1001
+ });
1002
+ const Result_10 = IDL.Variant({
1003
+ Ok: BackupRetentionReport,
1004
+ Err: Error,
1005
+ });
1006
+ const Eip712Value = IDL.Variant({
1007
+ string: IDL.Text,
1008
+ bool: IDL.Bool,
1009
+ uint: IDL.Nat,
1010
+ address: IDL.Text,
1011
+ fixedBytes: IDL.Vec(IDL.Nat8),
1012
+ bytes: IDL.Vec(IDL.Nat8),
1013
+ });
1014
+ const Eip712SignatureOut = IDL.Record({
1015
+ r: IDL.Vec(IDL.Nat8),
1016
+ s: IDL.Vec(IDL.Nat8),
1017
+ v: IDL.Nat8,
1018
+ rendered: IDL.Text,
1019
+ digest: IDL.Vec(IDL.Nat8),
1020
+ });
1021
+ const Result_4 = IDL.Variant({ Ok: Eip712SignatureOut, Err: Error });
1022
+ const SignedTransaction = IDL.Record({
1023
+ txHash: IDL.Text,
1024
+ rawTx: IDL.Text,
1025
+ });
1026
+ const Result_9 = IDL.Variant({ Ok: SignedTransaction, Err: Error });
1027
+ const SignedAuthorization = IDL.Record({
1028
+ paidAmount: IDL.Nat,
1029
+ authorization: IDL.Record({
1030
+ to: IDL.Text,
1031
+ signature: IDL.Text,
1032
+ value: IDL.Nat,
1033
+ from: IDL.Text,
1034
+ validAfter: IDL.Nat,
1035
+ nonce: IDL.Text,
1036
+ validBefore: IDL.Nat,
1037
+ }),
1038
+ header: IDL.Text,
1039
+ });
1040
+ const X402SignOutcome = IDL.Variant({
1041
+ ApprovalPending: ApprovalRequest,
1042
+ Signed: SignedAuthorization,
1043
+ });
1044
+ const Result_3 = IDL.Variant({ Ok: X402SignOutcome, Err: Error });
1045
+ const Seat = IDL.Record({
1046
+ pairedDay: IDL.Nat,
1047
+ lastPaymentDay: IDL.Opt(IDL.Nat),
1048
+ weeks: IDL.Nat64,
1049
+ produced: IDL.Nat,
1050
+ firstPaymentDay: IDL.Opt(IDL.Nat),
1051
+ });
1052
+ const Result_7 = IDL.Variant({ Ok: IDL.Vec(Seat), Err: Error });
1053
+ const RailHealth = IDL.Record({
1054
+ sessionsExpired: IDL.Nat,
1055
+ sessionsClosed: IDL.Nat,
1056
+ paidVouchersConsumed: IDL.Nat,
1057
+ escrowOpen: IDL.Opt(IDL.Nat),
1058
+ sessionsOpen: IDL.Nat,
1059
+ sessionsClosing: IDL.Nat,
1060
+ cycles: IDL.Nat,
1061
+ sendHeadroom: IDL.Nat,
1062
+ memoryBytes: IDL.Nat,
1063
+ freezeReservation: IDL.Nat,
1064
+ unknownSessionRefusals: IDL.Nat,
1065
+ });
1066
+ const Result_6 = IDL.Variant({ Ok: RailHealth, Err: Error });
1067
+ const CallerSignatureCount = IDL.Record({
1068
+ count: IDL.Nat,
1069
+ role: Role,
1070
+ root: IDL.Opt(IDL.Principal),
1071
+ caller: IDL.Principal,
1072
+ });
1073
+ const SignatureCounts = IDL.Record({
1074
+ total: IDL.Nat,
1075
+ byCaller: IDL.Vec(CallerSignatureCount),
1076
+ });
1077
+ const Result_5 = IDL.Variant({ Ok: SignatureCounts, Err: Error });
1078
+ const ControlHandover = IDL.Variant({
1079
+ MovedByRegistry: IDL.Null,
1080
+ NotHeldHere: IDL.Null,
1081
+ MovedByEngram: IDL.Null,
1082
+ });
1083
+ const Result_2 = IDL.Variant({ Ok: ControlHandover, Err: Error });
1084
+ const Engram = IDL.Service({
1085
+ about: IDL.Func([], [About], ['query']),
1086
+ acceptAgentKeyNomination: IDL.Func([IDL.Principal], [Result_70], []),
1087
+ actionAlertTransform: IDL.Func(
1088
+ [
1089
+ IDL.Record({
1090
+ context: IDL.Vec(IDL.Nat8),
1091
+ response: HttpRequestResult,
1092
+ }),
1093
+ ],
1094
+ [HttpRequestResult],
1095
+ ['query'],
1096
+ ),
1097
+ addEip712Type: IDL.Func(
1098
+ [
1099
+ IDL.Record({
1100
+ primaryType: IDL.Text,
1101
+ canonicalTypeString: IDL.Text,
1102
+ domainName: IDL.Text,
1103
+ verifyingContract: IDL.Text,
1104
+ dailySignCap: IDL.Nat,
1105
+ fields: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
1106
+ destinationFields: IDL.Vec(IDL.Text),
1107
+ authorityClass: IDL.Variant({
1108
+ standingAuthority: IDL.Null,
1109
+ valueBearing: IDL.Null,
1110
+ standard: IDL.Null,
1111
+ }),
1112
+ chainId: IDL.Nat,
1113
+ domainVersion: IDL.Text,
1114
+ ackIrrevocable: IDL.Bool,
1115
+ }),
1116
+ ],
1117
+ [Result_69],
1118
+ [],
1119
+ ),
1120
+ addEvmWithdrawDestination: IDL.Func([IDL.Text], [Result_68], []),
1121
+ addGuardian: IDL.Func([IDL.Principal, IDL.Text, GuardianPermissions], [Result_1], []),
1122
+ appendMemory: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8), IDL.Opt(MemorySource)], [Result], []),
1123
+ applyCondense: IDL.Func([IDL.Nat], [Result_67], []),
1124
+ approveGuardian: IDL.Func([IDL.Principal], [Result_1], []),
1125
+ approveRequest: IDL.Func([IDL.Text], [Result_1], []),
1126
+ backupAbort: IDL.Func([IDL.Text], [Result_1], []),
1127
+ backupFinalize: IDL.Func([IDL.Text], [Result_1], []),
1128
+ backupInit: IDL.Func(
1129
+ [IDL.Text, BackupType, IDL.Opt(IDL.Text), IDL.Text, IDL.Opt(IDL.Text)],
1130
+ [Result_43],
1131
+ [],
1132
+ ),
1133
+ backupPullChunk: IDL.Func([IDL.Text, IDL.Nat], [Result_59], ['query']),
1134
+ backupPushChunk: IDL.Func([IDL.Text, IDL.Nat, IDL.Vec(IDL.Nat8)], [Result_1], []),
1135
+ cancelAgentKeyNomination: IDL.Func([IDL.Principal], [Result_1], []),
1136
+ closeSession: IDL.Func([IDL.Text], [Result_1], []),
1137
+ convertEarningsToCycles: IDL.Func([IDL.Text, IDL.Nat], [Result_8], []),
1138
+ createAgentInvite: IDL.Func([IDL.Text, AgentPermissions], [Result_43], []),
1139
+ createGuardianInvite: IDL.Func([IDL.Text, GuardianPermissions], [Result_43], []),
1140
+ deleteBackup: IDL.Func([IDL.Text], [Result_1], []),
1141
+ deleteMemoryFile: IDL.Func([IDL.Text], [Result], []),
1142
+ denyRequest: IDL.Func([IDL.Text, IDL.Text], [Result_1], []),
1143
+ ensureEvmReady: IDL.Func([], [Result_43], []),
1144
+ exportMemoryRange: IDL.Func([IDL.Nat, IDL.Nat, IDL.Opt(IDL.Principal)], [Result_66], []),
1145
+ freezePayments: IDL.Func([], [Result_1], []),
1146
+ getActionAlertStatus: IDL.Func([], [Result_57], ['query']),
1147
+ getAgentRevisablePaths: IDL.Func([], [Result_53], ['query']),
1148
+ getAgentSeatWeeks: IDL.Func([IDL.Nat, IDL.Nat], [Result_64], ['query']),
1149
+ getAgentWriteReview: IDL.Func([], [Result_63], ['query']),
1150
+ getAnchorPushStatus: IDL.Func([], [AnchorPushStatus], ['query']),
1151
+ getAuditHead: IDL.Func([], [AuditHead], ['query']),
1152
+ getBackupMetadata: IDL.Func([IDL.Text], [Result_62], ['query']),
1153
+ getBillerId: IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
1154
+ getCertifiedAuditHead: IDL.Func([], [CertifiedAuditHead], ['query']),
1155
+ getChildAllowance: IDL.Func([IDL.Principal], [Result_61], ['query']),
1156
+ getChildOpening: IDL.Func([], [Result_60], ['query']),
1157
+ getEncryptedMemoryKey: IDL.Func([IDL.Opt(IDL.Nat), IDL.Vec(IDL.Nat8)], [Result_59], []),
1158
+ getEngramCard: IDL.Func([], [AgentCard], ['query']),
1159
+ getEngramNumber: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
1160
+ getEvmAddress: IDL.Func([], [Result_58], []),
1161
+ getEvmOwnerAddress: IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
1162
+ getEvmSignerAddress: IDL.Func([], [Result_43], []),
1163
+ getGenesisNote: IDL.Func([], [GenesisNote], ['query']),
1164
+ getGuardianAlertStatus: IDL.Func([], [Result_57], ['query']),
1165
+ getMarketId: IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
1166
+ getMemoryHistory: IDL.Func(
1167
+ [IDL.Text, IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
1168
+ [Result_56],
1169
+ ['query'],
1170
+ ),
1171
+ getMemoryKeyEpoch: IDL.Func([], [IDL.Nat], ['query']),
1172
+ getMemoryKeyVerificationKey: IDL.Func([], [IDL.Vec(IDL.Nat8)], []),
1173
+ getMemoryMaintainStatus: IDL.Func([], [MemoryMaintainStatus], ['query']),
1174
+ getMemoryRetentionPolicy: IDL.Func([], [Result_55], ['query']),
1175
+ getMetricsReaderId: IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
1176
+ getMyGuardianStatus: IDL.Func([], [Result_15], ['query']),
1177
+ getOwnerConsole: IDL.Func([], [Result_54], ['query']),
1178
+ getProtectedPaths: IDL.Func([], [Result_53], ['query']),
1179
+ getSeatWeeksReadEnabled: IDL.Func([], [IDL.Bool], ['query']),
1180
+ getSigningFloor: IDL.Func([], [Result_52], ['query']),
1181
+ getSpawnedBy: IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
1182
+ getSpendCeiling: IDL.Func([], [Result_51], ['query']),
1183
+ getSpendPolicy: IDL.Func([IDL.Opt(IDL.Principal)], [Result_50], ['query']),
1184
+ getStorageStats: IDL.Func([], [Result_49], ['query']),
1185
+ getTimerHealth: IDL.Func([], [TimerHealth], ['query']),
1186
+ getTopUpLimits: IDL.Func(
1187
+ [],
1188
+ [IDL.Record({ cooldownSeconds: IDL.Nat, maxCkusdcE6s: IDL.Nat })],
1189
+ ['query'],
1190
+ ),
1191
+ getWalletBalances: IDL.Func([], [Result_48], []),
1192
+ getWorldIdConfig: IDL.Func([], [Result_47], ['query']),
1193
+ getWorldIdRpContext: IDL.Func([], [Result_46], []),
1194
+ getWorldIdRpSignerAddress: IDL.Func([], [Result_43], []),
1195
+ getWorldIdVerification: IDL.Func([], [Result_45], ['query']),
1196
+ guardianRevokeAgent: IDL.Func([IDL.Principal], [Result_1], []),
1197
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
1198
+ http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
1199
+ icrc21_canister_call_consent_message: IDL.Func(
1200
+ [
1201
+ IDL.Record({
1202
+ arg: IDL.Vec(IDL.Nat8),
1203
+ method: IDL.Text,
1204
+ user_preferences: IDL.Record({}),
1205
+ }),
1206
+ ],
1207
+ [
1208
+ IDL.Variant({
1209
+ Ok: IDL.Record({
1210
+ metadata: IDL.Record({
1211
+ utc_offset_minutes: IDL.Opt(IDL.Int16),
1212
+ language: IDL.Text,
1213
+ }),
1214
+ consent_message: IDL.Variant({
1215
+ GenericDisplayMessage: IDL.Text,
1216
+ }),
1217
+ }),
1218
+ Err: IDL.Record({
1219
+ description: IDL.Text,
1220
+ error_code: IDL.Nat,
1221
+ }),
1222
+ }),
1223
+ ],
1224
+ ['query'],
1225
+ ),
1226
+ isEvmAddressCached: IDL.Func([], [Result_44], ['query']),
1227
+ issueAuthCode: IDL.Func([IDL.Text, IDL.Text, IDL.Text, IDL.Opt(IDL.Text)], [Result_43], []),
1228
+ listActivitySnapshots: IDL.Func([IDL.Nat, IDL.Nat], [Result_42], ['query']),
1229
+ listAgents: IDL.Func([IDL.Nat, IDL.Nat], [Result_41], ['query']),
1230
+ listAgentsForGuardian: IDL.Func([IDL.Nat, IDL.Nat], [Result_40], ['query']),
1231
+ listApprovalRequests: IDL.Func(
1232
+ [IDL.Opt(ApprovalStatus), IDL.Nat, IDL.Nat],
1233
+ [Result_28],
1234
+ ['query'],
1235
+ ),
1236
+ listAuditEntries: IDL.Func([IDL.Nat, IDL.Nat], [Result_23], ['query']),
1237
+ listBackups: IDL.Func([IDL.Nat, IDL.Nat], [Result_39], ['query']),
1238
+ listBearerTokens: IDL.Func([IDL.Nat, IDL.Nat], [Result_38], ['query']),
1239
+ listCondenseCheckpoints: IDL.Func([IDL.Nat, IDL.Nat], [Result_37], ['query']),
1240
+ listCycleSnapshots: IDL.Func([IDL.Nat, IDL.Nat], [Result_36], ['query']),
1241
+ listDeletedMemoryFiles: IDL.Func([IDL.Nat, IDL.Nat], [Result_35], ['query']),
1242
+ listEip712Types: IDL.Func([IDL.Nat, IDL.Nat], [Result_34], ['query']),
1243
+ listEvmWithdrawDestinations: IDL.Func([IDL.Nat, IDL.Nat], [Result_33], ['query']),
1244
+ listGuardians: IDL.Func([IDL.Nat, IDL.Nat], [Result_32], ['query']),
1245
+ listMemoryExportReceipts: IDL.Func([IDL.Nat, IDL.Nat], [Result_31], ['query']),
1246
+ listMemoryFiles: IDL.Func([IDL.Nat, IDL.Nat], [Result_30], ['query']),
1247
+ listMemoryLog: IDL.Func([IDL.Nat, IDL.Nat, IDL.Opt(IDL.Principal)], [Result_29], ['query']),
1248
+ listMyApprovalRequests: IDL.Func([IDL.Nat, IDL.Nat], [Result_28], ['query']),
1249
+ listMySessions: IDL.Func([IDL.Nat, IDL.Nat], [Result_27], ['query']),
1250
+ listOwnershipTransfers: IDL.Func([IDL.Nat, IDL.Nat], [Result_26], ['query']),
1251
+ listPaymentSignatureCounts: IDL.Func([IDL.Nat, IDL.Nat], [Result_25], ['query']),
1252
+ listPurgedAgents: IDL.Func([IDL.Nat, IDL.Nat], [Result_24], ['query']),
1253
+ listReadLog: IDL.Func([IDL.Opt(IDL.Bool), IDL.Nat, IDL.Nat], [Result_23], ['query']),
1254
+ listRepudiations: IDL.Func([IDL.Nat, IDL.Nat], [Result_22], ['query']),
1255
+ markAgentWritesReviewed: IDL.Func([IDL.Opt(IDL.Nat)], [Result_8], []),
1256
+ nominateAgentKey: IDL.Func([IDL.Principal], [Result_1], []),
1257
+ openChildEngram: IDL.Func([], [Result_21], []),
1258
+ openSession: IDL.Func([SessionConfig, PaymentSignature], [Result_20], []),
1259
+ ownerWithdraw: IDL.Func([TokenAmount, IDL.Opt(ActionAuth)], [Result_8], []),
1260
+ pairAgent: IDL.Func([IDL.Record({ enrolment: Enrolment, code: IDL.Text })], [Result_19], []),
1261
+ pauseWrites: IDL.Func([], [Result_1], []),
1262
+ previewCondense: IDL.Func([IDL.Nat], [Result_18], ['query']),
1263
+ previewOpenSession: IDL.Func([], [SessionIntent], ['query']),
1264
+ readMemory: IDL.Func([IDL.Text], [Result_11], ['query']),
1265
+ readMemoryBatch: IDL.Func([IDL.Vec(IDL.Text)], [Result_17], ['query']),
1266
+ readMemoryBytes: IDL.Func(
1267
+ [IDL.Text, IDL.Nat, IDL.Nat, IDL.Opt(IDL.Nat)],
1268
+ [Result_16],
1269
+ ['query'],
1270
+ ),
1271
+ recoverEscrow: IDL.Func([IDL.Text, IDL.Nat], [Result_8], []),
1272
+ registerGuardian: IDL.Func([IDL.Text], [Result_15], []),
1273
+ removeCallerSpendPolicy: IDL.Func([IDL.Principal], [Result_1], []),
1274
+ removeEip712Type: IDL.Func([IDL.Vec(IDL.Nat8)], [Result_1], []),
1275
+ removeEvmWithdrawDestination: IDL.Func([IDL.Text], [Result_1], []),
1276
+ removeGuardian: IDL.Func([IDL.Principal], [Result_1], []),
1277
+ repudiateMemoryWrite: IDL.Func([IDL.Text, IDL.Nat, IDL.Text], [Result_8], []),
1278
+ resetEngram: IDL.Func([], [Result_14], []),
1279
+ resignAgent: IDL.Func([], [Result_1], []),
1280
+ resumeWrites: IDL.Func([], [Result_1], []),
1281
+ resyncAgentEdges: IDL.Func([], [Result_13], []),
1282
+ returnToManaged: IDL.Func([], [Result_1], []),
1283
+ reviseMemory: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [Result], []),
1284
+ revokeAgent: IDL.Func([IDL.Principal], [Result_1], []),
1285
+ revokeAllAgents: IDL.Func([], [Result_8], []),
1286
+ revokeAllBearerTokens: IDL.Func([], [Result_8], []),
1287
+ revokeAllInvites: IDL.Func([], [Result_8], []),
1288
+ revokeBearerToken: IDL.Func([IDL.Text], [Result_1], []),
1289
+ rollbackMemory: IDL.Func([IDL.Text, IDL.Nat], [Result], []),
1290
+ rotateAgentKeyHash: IDL.Func([IDL.Text], [Result_1], []),
1291
+ seedMemory: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [Result], []),
1292
+ sessionAppendMemory: IDL.Func([Voucher, IDL.Text, IDL.Vec(IDL.Nat8)], [Result], []),
1293
+ sessionReadContext: IDL.Func([IDL.Text], [Result_12], []),
1294
+ sessionReadMemory: IDL.Func([Voucher, IDL.Text], [Result_11], []),
1295
+ setActionAlertConfig: IDL.Func([AlertConfig], [Result_1], []),
1296
+ setAgentPermissions: IDL.Func([IDL.Principal, AgentPermissions], [Result_1], []),
1297
+ setAgentRevisablePaths: IDL.Func([IDL.Vec(IDL.Text)], [Result_1], []),
1298
+ setBackupRetention: IDL.Func([IDL.Text, IDL.Nat], [Result_10], []),
1299
+ setCallerSpendPolicy: IDL.Func([IDL.Principal, SpendingPolicy], [Result_1], []),
1300
+ setChildAllowance: IDL.Func([IDL.Principal, IDL.Nat], [Result_1], []),
1301
+ setEncryptionEnabled: IDL.Func([IDL.Bool], [Result_1], []),
1302
+ setEvmOwnerAddress: IDL.Func([IDL.Text], [Result_1], []),
1303
+ setGuardianAlertConfig: IDL.Func([AlertConfig], [Result_1], []),
1304
+ setMemoryRetentionPolicy: IDL.Func(
1305
+ [IDL.Vec(IDL.Tuple(IDL.Text, RetentionClassSpec))],
1306
+ [Result_1],
1307
+ [],
1308
+ ),
1309
+ setPaidMemoryReadEnabled: IDL.Func([IDL.Bool], [Result_1], []),
1310
+ setPaidMemoryWriteEnabled: IDL.Func([IDL.Bool], [Result_1], []),
1311
+ setProtectedPaths: IDL.Func([IDL.Vec(IDL.Text)], [Result_1], []),
1312
+ setSeatWeeksReadEnabled: IDL.Func([IDL.Bool], [Result_1], []),
1313
+ setSpendCeiling: IDL.Func([IDL.Opt(IDL.Nat)], [Result_1], []),
1314
+ setSpendPolicy: IDL.Func([SpendingPolicy], [Result_1], []),
1315
+ setTopUpLimits: IDL.Func(
1316
+ [IDL.Record({ cooldownSeconds: IDL.Nat, maxCkusdcE6s: IDL.Nat })],
1317
+ [Result_1],
1318
+ [],
1319
+ ),
1320
+ setWorldIdConfig: IDL.Func([IDL.Text, IDL.Text, IDL.Text], [Result_1], []),
1321
+ setWorldIdProof: IDL.Func([IDL.Text, IDL.Text], [Result_1], []),
1322
+ signEip712: IDL.Func(
1323
+ [IDL.Vec(IDL.Nat8), IDL.Vec(IDL.Tuple(IDL.Text, Eip712Value))],
1324
+ [Result_4],
1325
+ [],
1326
+ ),
1327
+ signEngramRegistration: IDL.Func(
1328
+ [
1329
+ IDL.Record({
1330
+ maxFeePerGas: IDL.Nat,
1331
+ nonce: IDL.Nat,
1332
+ maxPriorityFeePerGas: IDL.Nat,
1333
+ }),
1334
+ ],
1335
+ [Result_9],
1336
+ [],
1337
+ ),
1338
+ signX402Payment: IDL.Func(
1339
+ [
1340
+ IDL.Record({
1341
+ tokenVersion: IDL.Text,
1342
+ tokenAddress: IDL.Text,
1343
+ approvalId: IDL.Opt(IDL.Text),
1344
+ recipient: IDL.Text,
1345
+ rationale: IDL.Opt(IDL.Text),
1346
+ tokenName: IDL.Text,
1347
+ chainId: IDL.Nat,
1348
+ amount: IDL.Nat,
1349
+ }),
1350
+ ],
1351
+ [Result_3],
1352
+ [],
1353
+ ),
1354
+ syncEngramNumber: IDL.Func([], [Result_8], []),
1355
+ sysApplyGenesisSeed: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [Result_8], []),
1356
+ sysForceCloseSession: IDL.Func([IDL.Text], [Result_1], []),
1357
+ sysGetAgentSeatWeeks: IDL.Func([], [Result_7], []),
1358
+ sysGetRailHealth: IDL.Func([], [Result_6], ['query']),
1359
+ sysGetSignatureCounts: IDL.Func([], [Result_5], []),
1360
+ sysNotifyRentLifecycle: IDL.Func([IDL.Text, IDL.Text], [Result_1], []),
1361
+ sysNotifyWalletActivity: IDL.Func([IDL.Text], [Result_1], []),
1362
+ sysRecordFeeEvent: IDL.Func(
1363
+ [
1364
+ IDL.Record({
1365
+ paidThroughNs: IDL.Opt(IDL.Int),
1366
+ cycles: IDL.Nat,
1367
+ scheduleVersion: IDL.Opt(IDL.Text),
1368
+ }),
1369
+ ],
1370
+ [Result_1],
1371
+ [],
1372
+ ),
1373
+ sysSetBillerId: IDL.Func([IDL.Principal], [Result_1], []),
1374
+ sysSetEngramNumber: IDL.Func([IDL.Nat], [Result_1], []),
1375
+ sysSetMarketId: IDL.Func([IDL.Principal], [Result_1], []),
1376
+ sysSetMetricsReaderId: IDL.Func([IDL.Principal], [Result_1], []),
1377
+ sysSignEip712: IDL.Func(
1378
+ [IDL.Vec(IDL.Nat8), IDL.Vec(IDL.Tuple(IDL.Text, Eip712Value))],
1379
+ [Result_4],
1380
+ [],
1381
+ ),
1382
+ sysSignX402Payment: IDL.Func(
1383
+ [
1384
+ IDL.Nat,
1385
+ IDL.Text,
1386
+ IDL.Text,
1387
+ IDL.Nat,
1388
+ IDL.Text,
1389
+ IDL.Text,
1390
+ IDL.Opt(IDL.Text),
1391
+ IDL.Opt(IDL.Text),
1392
+ ],
1393
+ [Result_3],
1394
+ [],
1395
+ ),
1396
+ testActionAlert: IDL.Func([], [Result_1], []),
1397
+ testGuardianAlert: IDL.Func([], [Result_1], []),
1398
+ transferOwnership: IDL.Func([IDL.Principal], [Result_2], []),
1399
+ unfreezePayments: IDL.Func([], [Result_1], []),
1400
+ worldIdTransform: IDL.Func(
1401
+ [
1402
+ IDL.Record({
1403
+ context: IDL.Vec(IDL.Nat8),
1404
+ response: HttpRequestResult,
1405
+ }),
1406
+ ],
1407
+ [HttpRequestResult],
1408
+ ['query'],
1409
+ ),
1410
+ writeMemory: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8)], [Result], []),
1411
+ });
1412
+ return Engram;
1413
+ };
1414
+ export const init = ({ IDL }) => {
1415
+ return [
1416
+ IDL.Opt(
1417
+ IDL.Record({
1418
+ owner: IDL.Opt(IDL.Principal),
1419
+ registry: IDL.Opt(IDL.Principal),
1420
+ }),
1421
+ ),
1422
+ ];
1423
+ };