@engramx/client 0.15.0 → 0.16.0-rc.4
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/README.md +255 -26
- package/dist/EngramClient.d.ts +235 -229
- package/dist/EngramClient.js +446 -1247
- package/dist/EngramClient.js.map +1 -1
- package/dist/MarketClient.d.ts +137 -0
- package/dist/MarketClient.js +228 -0
- package/dist/MarketClient.js.map +1 -0
- package/dist/ProfileManager.d.ts +4 -4
- package/dist/SessionManager.d.ts +3 -3
- package/dist/SessionManager.js +1 -1
- package/dist/SessionManager.js.map +1 -1
- package/dist/actionReceipt.d.ts +59 -0
- package/dist/actionReceipt.js +68 -2
- package/dist/actionReceipt.js.map +1 -1
- package/dist/auth.d.ts +16 -0
- package/dist/auth.js +38 -5
- package/dist/auth.js.map +1 -1
- package/dist/certifiedAudit.d.ts +32 -6
- package/dist/certifiedAudit.js +75 -14
- package/dist/certifiedAudit.js.map +1 -1
- package/dist/cli.js +100 -26
- package/dist/cli.js.map +1 -1
- package/dist/encryption.d.ts +30 -12
- package/dist/encryption.js +13 -15
- package/dist/encryption.js.map +1 -1
- package/dist/idl.d.ts +69 -0
- package/dist/idl.js +242 -0
- package/dist/idl.js.map +1 -0
- package/dist/index.d.ts +12 -18
- package/dist/index.js +54 -9
- package/dist/index.js.map +1 -1
- package/dist/ledgerfsHash.js +1 -1
- package/dist/ledgerfsHash.js.map +1 -1
- package/dist/lineage.js +8 -5
- package/dist/lineage.js.map +1 -1
- package/dist/memoryArchive.d.ts +384 -0
- package/dist/memoryArchive.js +477 -0
- package/dist/memoryArchive.js.map +1 -0
- package/dist/migrate.js +31 -4
- package/dist/migrate.js.map +1 -1
- package/dist/openEngram.d.ts +55 -0
- package/dist/openEngram.js +185 -0
- package/dist/openEngram.js.map +1 -0
- package/dist/pair.d.ts +33 -2
- package/dist/pair.js +56 -9
- package/dist/pair.js.map +1 -1
- package/dist/types.d.ts +246 -307
- package/dist/version.d.ts +8 -0
- package/dist/version.js +45 -0
- package/dist/version.js.map +1 -0
- package/dist/wire.d.ts +76 -0
- package/dist/wire.js +79 -0
- package/dist/wire.js.map +1 -0
- package/package.json +5 -14
- package/dist/bootstrap.d.ts +0 -21
- package/dist/bootstrap.js +0 -71
- package/dist/bootstrap.js.map +0 -1
package/dist/idl.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
type InterfaceFactory = (env: {
|
|
2
|
+
IDL: any;
|
|
3
|
+
}) => any;
|
|
4
|
+
/**
|
|
5
|
+
* Build a service carrying exactly `methods`, taking every signature from `generated`.
|
|
6
|
+
*
|
|
7
|
+
* Fails loudly and immediately on an unknown name. That is deliberate: the generated factory is
|
|
8
|
+
* vendored inside this package, so a missing name is a fact about this build, identical in every
|
|
9
|
+
* environment — never a runtime surprise that only some caller hits. The message names the fix,
|
|
10
|
+
* because the tempting wrong fix is to paste the old shape back in.
|
|
11
|
+
* ⟨2026-10-06⟩ "vendored inside this package" is no longer how: the factory comes from
|
|
12
|
+
* `@engramx/idl`, pinned to this package's exact version when it is packed. The conclusion stands
|
|
13
|
+
* for the same reason — one version of the interface per version of this package.
|
|
14
|
+
*/
|
|
15
|
+
export declare function projectService(generated: InterfaceFactory, methods: readonly string[], IDL: any): any;
|
|
16
|
+
/** A factory over the engram interface, narrowed to `methods`. */
|
|
17
|
+
export declare const engramSubset: (methods: readonly string[]) => InterfaceFactory;
|
|
18
|
+
/** A factory over the registry interface, narrowed to `methods`. */
|
|
19
|
+
export declare const registrySubset: (methods: readonly string[]) => InterfaceFactory;
|
|
20
|
+
/** A factory over the market interface, narrowed to `methods`. */
|
|
21
|
+
export declare const marketSubset: (methods?: readonly string[]) => InterfaceFactory;
|
|
22
|
+
/**
|
|
23
|
+
* The market methods MarketClient's actor may call.
|
|
24
|
+
*
|
|
25
|
+
* ⟨0.16.0, B-5⟩ Same rule as SDK_ENGRAM_METHODS, and it is worth restating because this list is
|
|
26
|
+
* NEW and lists are easiest to pad while they are new: ADDING A NAME IS A PRODUCT DECISION, not a
|
|
27
|
+
* maintenance one (L6). No addition without a named caller in this package. A name here that
|
|
28
|
+
* nothing calls reads as a supported capability to the next person who greps for one, and a name
|
|
29
|
+
* here the CANISTER does not serve is a construction-time failure — projectService throws on it.
|
|
30
|
+
*
|
|
31
|
+
* The market serves 64 methods. These nine are the BUYER path, which is the only path this SDK has
|
|
32
|
+
* ever wrapped: the seller surface (uploads, endpoints, service registration, pricing) is console
|
|
33
|
+
* work, and the admin surface is recovery work. Neither belongs in an agent's client library.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SDK_MARKET_METHODS: readonly ["confirmJob", "disputeJob", "getJob", "getJobResult", "getJobStatus", "listServices", "createJob"];
|
|
36
|
+
/**
|
|
37
|
+
* The engram methods EngramClient's actor may call.
|
|
38
|
+
*
|
|
39
|
+
* CUT FROM 108 TO 37 ON 2026-08-17 (ruling R3, the charter diet — 39 after the wrapper cut, then
|
|
40
|
+
* 37 once the two names whose CANISTER methods the same ruling removed came out too, see below).
|
|
41
|
+
* The old list was a verbatim
|
|
42
|
+
* transcription of the hand IDL, and the hand IDL had accumulated the union of every method anyone
|
|
43
|
+
* had ever wrapped — including 30-odd names (addGuardian, approveRequest, deleteEndpoint,
|
|
44
|
+
* guardianRevokeOperator, rollbackMemory, setPaymentPolicy, updateOperatorPermissions, …) that no
|
|
45
|
+
* code in this package called through any path. Declaring a method you never call is not free: an
|
|
46
|
+
* actor's declared interface is this package's least-authority statement about what an agent SDK
|
|
47
|
+
* is allowed to reach, and a name sitting here reads as a supported capability to the next person
|
|
48
|
+
* who greps for one. Removing a name removes nothing from the CANISTER — every method dropped below
|
|
49
|
+
* is still served, and still reachable by anyone who declares it.
|
|
50
|
+
*
|
|
51
|
+
* WHAT THE LIST IS NOW: exactly the names some surviving code path calls, and nothing else —
|
|
52
|
+
* EngramClient's own methods, `sessionContext` behind startSession, the two vetKD derivations
|
|
53
|
+
* inside encryption.ts, `createJob` behind submitServiceRequestWithPayment's
|
|
54
|
+
* pay-and-retry, and `writeMemory` for the two owner paths that legitimately use it — the CLI's
|
|
55
|
+
* owner-mode `git-revert`, which reaches the actor directly and says so at its call site, and the
|
|
56
|
+
* encryption migrations the encryption runbook names by hand. If a name here has no caller, that is
|
|
57
|
+
* a bug in this list, not a reserve.
|
|
58
|
+
*
|
|
59
|
+
* ADDING A NAME IS A PRODUCT DECISION, not a maintenance one (surface-budget rule L6): no addition
|
|
60
|
+
* without a named caller.
|
|
61
|
+
*/
|
|
62
|
+
export declare const SDK_ENGRAM_METHODS: readonly ["about", "appendMemory", "backupAbort", "backupFinalize", "backupInit", "backupPullChunk", "backupPushChunk", "getBackupMetadata", "getCertifiedAuditHead", "getEncryptedMemoryKey", "getMemoryHistory", "getMemoryKeyVerificationKey", "getOwnerConsole", "getProtectedPaths", "getWalletBalances", "getWorldIdVerification", "listAuditEntries", "listBackups", "listGuardians", "listMemoryFiles", "listMyApprovalRequests", "readMemory", "readMemoryBatch", "readMemoryBytes", "pairAgent", "reviseMemory", "resignAgent", "rotateAgentKeyHash", "nominateAgentKey", "acceptAgentKeyNomination", "getChildAllowance", "openChildEngram", "getSpawnedBy", "sessionReadContext", "setEncryptionEnabled", "writeMemory"];
|
|
63
|
+
/**
|
|
64
|
+
* The engram actor interface EngramClient builds. Exported because the fidelity gate imports it
|
|
65
|
+
* and because a caller holding its own agent may want the same narrowing; it is not part of the
|
|
66
|
+
* package's public entry point (`exports` maps "." only).
|
|
67
|
+
*/
|
|
68
|
+
export declare const idlFactory: InterfaceFactory;
|
|
69
|
+
export {};
|
package/dist/idl.js
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// idl.ts — the SDK's Candid surface, DERIVED from the generated factories rather than declared.
|
|
2
|
+
//
|
|
3
|
+
// WHAT CHANGED AND WHY (P1 of the ratified 2026-08 architecture refactor, ADR-0018 R1).
|
|
4
|
+
// Until 2026-08-16 this package carried a 1,161-line hand-written `idlFactory` inside
|
|
5
|
+
// EngramClient.ts. A fidelity gate compared it method-by-method against the didc-generated
|
|
6
|
+
// factory and required an EXACT match with an empty skew list — which is a proof, written in
|
|
7
|
+
// test form, that the hand IDL was already a pure projection of generated truth: a method
|
|
8
|
+
// allowlist and nothing else. Measured 2026-08-16: 108 declared methods, 0 signature
|
|
9
|
+
// mismatches, 0 methods absent from the generated factory. So the shapes were never carrying
|
|
10
|
+
// information; only the NAMES were. This module keeps the names and derives the shapes.
|
|
11
|
+
//
|
|
12
|
+
// The class of defect this removes is not hypothetical: a hand IDL that mistypes a field or
|
|
13
|
+
// omits a variant tag fails Candid decode only when the first value carrying that shape appears
|
|
14
|
+
// (a `#settlementPending` close, an `#Other` audit entry). The gate's own header records four
|
|
15
|
+
// such latent instances found in a single 2026-07-07 review pass — that is why it was written. A
|
|
16
|
+
// derived factory cannot hold that defect: there is no hand-typed shape left to be wrong. What
|
|
17
|
+
// remains checkable is FRESHNESS of the vendored copy and VALIDITY of the name list, and both are
|
|
18
|
+
// gates in test/idl-fidelity.test.ts.
|
|
19
|
+
// ⟨2026-10-06, the owner's ruling of 2026-10-05: "engramx/idl changes in rc.3"⟩ There is no vendored
|
|
20
|
+
// copy any more. The three factories below are imported from `@engramx/idl`, the package the
|
|
21
|
+
// release publishes the generated interfaces in, and `src/generated/` inside this package is
|
|
22
|
+
// deleted. The dependency is declared `workspace:*`, which packing rewrites to the EXACT version
|
|
23
|
+
// being released, so an installed @engramx/client@X always projects from @engramx/idl@X — the
|
|
24
|
+
// interface it was tested against, never a neighbouring one. FRESHNESS is no longer this package's
|
|
25
|
+
// question: @engramx/idl copies what scripts/gen-did.sh wrote, byte for byte, and its own test
|
|
26
|
+
// (test/idl-package.test.ts at the repo root) holds that. What test/idl-fidelity.test.ts checks
|
|
27
|
+
// now is that this package resolves the workspace's @engramx/idl, that the dist it resolves is
|
|
28
|
+
// the generator's current output, that the projection keeps the package's signatures, and the
|
|
29
|
+
// name list. WHAT WOULD MAKE THIS WRONG: a consumer forcing a different @engramx/idl version
|
|
30
|
+
// (an `overrides` entry, a hand-edited lockfile); the exact pin is then theirs to break.
|
|
31
|
+
//
|
|
32
|
+
// WHY A METHOD SUBSET SURVIVES AT ALL. ADR-0018 retires the client-subset rule for clients that
|
|
33
|
+
// ship WITH their canister — the platform apps deploy in the same release as the engram they
|
|
34
|
+
// talk to, so they can declare the full generated interface. An npm package does not ship with
|
|
35
|
+
// its canister: `upgradeMyEngram` is self-service with no registry-side gate, so an installed
|
|
36
|
+
// @engramx/client meets engrams older than itself by design (ldbxx has been `#ManualOnly` since
|
|
37
|
+
// 2026-08-16). Method-level narrowing stays cheap and safe in that direction — probe case 11
|
|
38
|
+
// measured an absent method as a CATCHABLE `IC0536` reject, not a decode trap — and it is also
|
|
39
|
+
// the package's least-authority statement about what an agent SDK is allowed to call.
|
|
40
|
+
//
|
|
41
|
+
// ⟨DELETED 2026-08-24 — a ~35-line block stood here and it is gone rather than annotated, because
|
|
42
|
+
// it was ACTIONABLE and its premise is void. What it said, so nobody reconstructs it:⟩
|
|
43
|
+
//
|
|
44
|
+
// · A SKEW LIST — "0.15.0 is on npm declaring `status().cyclesBalance : nat`, `listBackups : vec
|
|
45
|
+
// BackupMetadata` and `writeMemory -> Ok : nat`", against a HEAD that had moved under them.
|
|
46
|
+
// · A HOLD — "That is why the 0.16.0 cut is on hold (RATIFIED.md, 2026-08-16)."
|
|
47
|
+
// · AN ORDERING — ~20 lines resolving canister-first (return reshape) against client-first (field
|
|
48
|
+
// widened to `opt`) for INSTALLED 0.15.0 consumers, and a three-package rc-time republish
|
|
49
|
+
// choreography to sequence the conflict between them.
|
|
50
|
+
//
|
|
51
|
+
// THE HOLD IS THE ONE THAT MATTERED, AND IT IS FALSE. The cut is not on hold — it is being
|
|
52
|
+
// executed. The 2026-08-16 deferral was superseded the next day by
|
|
53
|
+
// the architecture execution plan (RATIFIED 2026-08-17), which measured the
|
|
54
|
+
// premise the deferral rested on and found it empty: production runs two engrams, both held by our
|
|
55
|
+
// own keys, and the whole npm set was FIRST published 2026-08-14 with realistically zero external
|
|
56
|
+
// installs. Its words: "interface compatibility protects nobody, and every choice made to preserve
|
|
57
|
+
// it buys noise." The owner then ruled on 2026-08-23 that the cut DISCARDS STATE — canisters may be
|
|
58
|
+
// shut down and respawned, and the v0.15.0 upgrade path is allowed to fail.
|
|
59
|
+
//
|
|
60
|
+
// THE ORDERING HAS NOTHING LEFT TO ORDER. A respawn is not an upgrade, so there is no engram-vs-
|
|
61
|
+
// installed-client sequence to get wrong; plan v2 replaced the republish choreography with "publish
|
|
62
|
+
// the npm set once, at deploy", after which the published client IS the API.
|
|
63
|
+
//
|
|
64
|
+
// AND THE SKEW LIST WAS ITSELF STALE, measured against `src/engram/engram.did` on 2026-08-24:
|
|
65
|
+
// `status()` does not exist at HEAD (it split into public `about()` + gated `getOwnerConsole()`),
|
|
66
|
+
// `cyclesBalance` is BARE `nat` again rather than the `opt nat` the list named, and `listBackups`
|
|
67
|
+
// changed its ARGUMENT tuple as well as its return (`(opt text) -> vec` became `(nat, nat) ->
|
|
68
|
+
// Result`). A list of what breaks is only ever true on the day it is measured, which is why the
|
|
69
|
+
// consumer-letter rule is "written FROM the gate's output, never from a document."
|
|
70
|
+
//
|
|
71
|
+
// The Candid mechanics those blocks cited are NOT deleted with them — they are ADR-0018's, they are
|
|
72
|
+
// probe-witnessed, and they still bind the method narrowing above: rule 0 freezes argument/return
|
|
73
|
+
// tuples, rule 4 forbids widening a shipped non-opt field, witness 5e/5g gives opt-promotion, probe
|
|
74
|
+
// case 12 gives reshape intolerance in both directions. That is why the paragraph above this one
|
|
75
|
+
// stands unchanged. Nothing in this file could have fixed a published client anyway; it only stops
|
|
76
|
+
// the SDK from getting the shapes wrong on its own.
|
|
77
|
+
//
|
|
78
|
+
// WHAT A SUBSET CAN NO LONGER DO, STATED SO NOBODY REBUILDS IT BY HAND. Field-level omission
|
|
79
|
+
// (the retired SKEW_OMISSIONS list) has no derived mechanism here: stripping a field from a
|
|
80
|
+
// generated record means rewriting the type graph, and a hand-written replacement shape is
|
|
81
|
+
// exactly the defect class this module exists to delete. If HEAD ever serves a response field
|
|
82
|
+
// an older engram does not, the fix is the interface law itself — the field is `opt` from birth
|
|
83
|
+
// (rule 1: absent + declared-`opt` decodes to null on both halves, measured cases 1 and 9) —
|
|
84
|
+
// or a codegen-time projection. Never a hand edit here.
|
|
85
|
+
import { idlFactory as generatedEngramIdl } from '@engramx/idl/engram';
|
|
86
|
+
import { idlFactory as generatedRegistryIdl } from '@engramx/idl/registry';
|
|
87
|
+
import { idlFactory as generatedMarketIdl } from '@engramx/idl/market';
|
|
88
|
+
/**
|
|
89
|
+
* Build a service carrying exactly `methods`, taking every signature from `generated`.
|
|
90
|
+
*
|
|
91
|
+
* Fails loudly and immediately on an unknown name. That is deliberate: the generated factory is
|
|
92
|
+
* vendored inside this package, so a missing name is a fact about this build, identical in every
|
|
93
|
+
* environment — never a runtime surprise that only some caller hits. The message names the fix,
|
|
94
|
+
* because the tempting wrong fix is to paste the old shape back in.
|
|
95
|
+
* ⟨2026-10-06⟩ "vendored inside this package" is no longer how: the factory comes from
|
|
96
|
+
* `@engramx/idl`, pinned to this package's exact version when it is packed. The conclusion stands
|
|
97
|
+
* for the same reason — one version of the interface per version of this package.
|
|
98
|
+
*/
|
|
99
|
+
export function projectService(generated, methods, IDL) {
|
|
100
|
+
const served = new Map(generated({ IDL })._fields);
|
|
101
|
+
const picked = {};
|
|
102
|
+
const missing = [];
|
|
103
|
+
for (const name of methods) {
|
|
104
|
+
const func = served.get(name);
|
|
105
|
+
if (func === undefined)
|
|
106
|
+
missing.push(name);
|
|
107
|
+
else
|
|
108
|
+
picked[name] = func;
|
|
109
|
+
}
|
|
110
|
+
if (missing.length > 0) {
|
|
111
|
+
throw new Error(`IDL projection: ${missing.join(', ')} absent from the generated engram/registry factory. ` +
|
|
112
|
+
'The canister renamed or removed the method — update the name list. Do NOT re-declare a shape by hand.');
|
|
113
|
+
}
|
|
114
|
+
return IDL.Service(picked);
|
|
115
|
+
}
|
|
116
|
+
/** A factory over the engram interface, narrowed to `methods`. */
|
|
117
|
+
export const engramSubset = (methods) => ({ IDL }) => projectService(generatedEngramIdl, methods, IDL);
|
|
118
|
+
/** A factory over the registry interface, narrowed to `methods`. */
|
|
119
|
+
export const registrySubset = (methods) => ({ IDL }) => projectService(generatedRegistryIdl, methods, IDL);
|
|
120
|
+
/** A factory over the market interface, narrowed to `methods`. */
|
|
121
|
+
export const marketSubset = (methods = SDK_MARKET_METHODS) => ({ IDL }) => projectService(generatedMarketIdl, methods, IDL);
|
|
122
|
+
/**
|
|
123
|
+
* The market methods MarketClient's actor may call.
|
|
124
|
+
*
|
|
125
|
+
* ⟨0.16.0, B-5⟩ Same rule as SDK_ENGRAM_METHODS, and it is worth restating because this list is
|
|
126
|
+
* NEW and lists are easiest to pad while they are new: ADDING A NAME IS A PRODUCT DECISION, not a
|
|
127
|
+
* maintenance one (L6). No addition without a named caller in this package. A name here that
|
|
128
|
+
* nothing calls reads as a supported capability to the next person who greps for one, and a name
|
|
129
|
+
* here the CANISTER does not serve is a construction-time failure — projectService throws on it.
|
|
130
|
+
*
|
|
131
|
+
* The market serves 64 methods. These nine are the BUYER path, which is the only path this SDK has
|
|
132
|
+
* ever wrapped: the seller surface (uploads, endpoints, service registration, pricing) is console
|
|
133
|
+
* work, and the admin surface is recovery work. Neither belongs in an agent's client library.
|
|
134
|
+
*/
|
|
135
|
+
export const SDK_MARKET_METHODS = [
|
|
136
|
+
'confirmJob',
|
|
137
|
+
'disputeJob',
|
|
138
|
+
'getJob',
|
|
139
|
+
'getJobResult',
|
|
140
|
+
'getJobStatus',
|
|
141
|
+
'listServices',
|
|
142
|
+
'createJob',
|
|
143
|
+
];
|
|
144
|
+
/**
|
|
145
|
+
* The engram methods EngramClient's actor may call.
|
|
146
|
+
*
|
|
147
|
+
* CUT FROM 108 TO 37 ON 2026-08-17 (ruling R3, the charter diet — 39 after the wrapper cut, then
|
|
148
|
+
* 37 once the two names whose CANISTER methods the same ruling removed came out too, see below).
|
|
149
|
+
* The old list was a verbatim
|
|
150
|
+
* transcription of the hand IDL, and the hand IDL had accumulated the union of every method anyone
|
|
151
|
+
* had ever wrapped — including 30-odd names (addGuardian, approveRequest, deleteEndpoint,
|
|
152
|
+
* guardianRevokeOperator, rollbackMemory, setPaymentPolicy, updateOperatorPermissions, …) that no
|
|
153
|
+
* code in this package called through any path. Declaring a method you never call is not free: an
|
|
154
|
+
* actor's declared interface is this package's least-authority statement about what an agent SDK
|
|
155
|
+
* is allowed to reach, and a name sitting here reads as a supported capability to the next person
|
|
156
|
+
* who greps for one. Removing a name removes nothing from the CANISTER — every method dropped below
|
|
157
|
+
* is still served, and still reachable by anyone who declares it.
|
|
158
|
+
*
|
|
159
|
+
* WHAT THE LIST IS NOW: exactly the names some surviving code path calls, and nothing else —
|
|
160
|
+
* EngramClient's own methods, `sessionContext` behind startSession, the two vetKD derivations
|
|
161
|
+
* inside encryption.ts, `createJob` behind submitServiceRequestWithPayment's
|
|
162
|
+
* pay-and-retry, and `writeMemory` for the two owner paths that legitimately use it — the CLI's
|
|
163
|
+
* owner-mode `git-revert`, which reaches the actor directly and says so at its call site, and the
|
|
164
|
+
* encryption migrations the encryption runbook names by hand. If a name here has no caller, that is
|
|
165
|
+
* a bug in this list, not a reserve.
|
|
166
|
+
*
|
|
167
|
+
* ADDING A NAME IS A PRODUCT DECISION, not a maintenance one (surface-budget rule L6): no addition
|
|
168
|
+
* without a named caller.
|
|
169
|
+
*/
|
|
170
|
+
export const SDK_ENGRAM_METHODS = [
|
|
171
|
+
// ⟨0.16.0, B-5⟩ REPOINTED AT THE FROZEN SURFACE. Twenty of the thirty-nine names here named a
|
|
172
|
+
// method the engram no longer serves — this list is a client IDL by another name, and a name in
|
|
173
|
+
// it that the canister does not serve fails at RUNTIME with method-not-found, exactly like the
|
|
174
|
+
// hand-written Motoko IDLs check-client-idls.mjs gates. Nothing type-checks it: projectService
|
|
175
|
+
// narrows a generated factory, and an actor call is `any`.
|
|
176
|
+
//
|
|
177
|
+
// Six of the twenty MOVED to the market with the commerce graft (confirmJob, disputeJob, getJob,
|
|
178
|
+
// getJobResult, listServices, createJob) and are NOT replaced here — they belong to a
|
|
179
|
+
// market client, not to an engram one.
|
|
180
|
+
//
|
|
181
|
+
// Three FOLDED and are gone with no replacement: auditLogSize and isEncryptionEnabled read from
|
|
182
|
+
// about() now (they were already repointed at status(), which itself folded into about()), and
|
|
183
|
+
// getEncryptedMemoryKeyForEpoch became getEncryptedMemoryKey(epoch).
|
|
184
|
+
'about',
|
|
185
|
+
'appendMemory',
|
|
186
|
+
'backupAbort',
|
|
187
|
+
'backupFinalize',
|
|
188
|
+
'backupInit',
|
|
189
|
+
'backupPullChunk',
|
|
190
|
+
'backupPushChunk',
|
|
191
|
+
'getBackupMetadata',
|
|
192
|
+
'getCertifiedAuditHead',
|
|
193
|
+
'getEncryptedMemoryKey',
|
|
194
|
+
'getMemoryHistory',
|
|
195
|
+
'getMemoryKeyVerificationKey',
|
|
196
|
+
// ⟨2026-08-25⟩ ADDED WITH ITS NAMED CALLER, which this list's own governance clause requires:
|
|
197
|
+
// migrate.ts's `hasValidPairing`, the package's only "does this engram recognise me" probe.
|
|
198
|
+
// The question it used to ask — `status().authorized` — has no field at HEAD. The gate here is
|
|
199
|
+
// #anyRole (owner | active agent | active guardian), NOT owner-only despite the name, so an
|
|
200
|
+
// agent SDK is entitled to it.
|
|
201
|
+
'getOwnerConsole',
|
|
202
|
+
'getProtectedPaths',
|
|
203
|
+
'getWalletBalances',
|
|
204
|
+
'getWorldIdVerification',
|
|
205
|
+
'listAuditEntries',
|
|
206
|
+
'listBackups',
|
|
207
|
+
'listGuardians',
|
|
208
|
+
'listMemoryFiles',
|
|
209
|
+
'listMyApprovalRequests',
|
|
210
|
+
'readMemory',
|
|
211
|
+
'readMemoryBatch',
|
|
212
|
+
'readMemoryBytes',
|
|
213
|
+
'pairAgent',
|
|
214
|
+
'reviseMemory',
|
|
215
|
+
// ⟨2026-09-28⟩ Named caller: EngramClient.resignAgent — the agent's own exit, which the owner
|
|
216
|
+
// decided the same day an agent must be able to take (and have recorded).
|
|
217
|
+
'resignAgent',
|
|
218
|
+
'rotateAgentKeyHash',
|
|
219
|
+
// ⟨2026-09-29, the owner's ruling of that date (follow-up 10, option A)⟩ Named callers:
|
|
220
|
+
// EngramClient.nominateAgentKey and EngramClient.acceptAgentKeyNomination — the agent's one-step
|
|
221
|
+
// key replacement (the current key nominates, the new key accepts). The owner's cancel is not
|
|
222
|
+
// an agent's call and is not on this list.
|
|
223
|
+
'nominateAgentKey',
|
|
224
|
+
'acceptAgentKeyNomination',
|
|
225
|
+
// ⟨2026-10-01, the owner's ruling 2 A⟩ Named caller for all three: the `open-engram` command
|
|
226
|
+
// (openEngram.ts) — an agent opens an engram of its own through the engram it works in. It reads
|
|
227
|
+
// its allowance (getChildAllowance), asks (openChildEngram), and reads the registry's id
|
|
228
|
+
// (getSpawnedBy, public) to print the owner kit's next command with nothing left to fill in.
|
|
229
|
+
'getChildAllowance',
|
|
230
|
+
'openChildEngram',
|
|
231
|
+
'getSpawnedBy',
|
|
232
|
+
'sessionReadContext',
|
|
233
|
+
'setEncryptionEnabled',
|
|
234
|
+
'writeMemory',
|
|
235
|
+
];
|
|
236
|
+
/**
|
|
237
|
+
* The engram actor interface EngramClient builds. Exported because the fidelity gate imports it
|
|
238
|
+
* and because a caller holding its own agent may want the same narrowing; it is not part of the
|
|
239
|
+
* package's public entry point (`exports` maps "." only).
|
|
240
|
+
*/
|
|
241
|
+
export const idlFactory = engramSubset(SDK_ENGRAM_METHODS);
|
|
242
|
+
//# sourceMappingURL=idl.js.map
|
package/dist/idl.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idl.js","sourceRoot":"","sources":["../src/idl.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,EAAE;AACF,wFAAwF;AACxF,sFAAsF;AACtF,2FAA2F;AAC3F,6FAA6F;AAC7F,0FAA0F;AAC1F,qFAA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BAAiB;IACjB,cAAc;IACd,oBAAoB;IACpB,sBAAsB;IACtB,aAAa;CACL,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqB,YAAY,CAAC,kBAAkB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
export { EngramClient } from './EngramClient.js';
|
|
2
|
+
export { MarketClient } from './MarketClient.js';
|
|
3
|
+
export { CanisterRefusal, errorKind, errorMessage, unwrapResult } from './wire.js';
|
|
4
|
+
export type { WireError, WireErrorKind, WireResult, WirePage } from './wire.js';
|
|
2
5
|
export type { EngramClientConfig } from './EngramClient.js';
|
|
6
|
+
export type { MemoryReceipt } from './EngramClient.js';
|
|
3
7
|
export { verifyCertifiedAuditHead } from './certifiedAudit.js';
|
|
4
8
|
export { verifyCertifiedLeaf, verifyCertifiedRegistryHead, verifyCertifiedAnchor, } from './certifiedAudit.js';
|
|
5
9
|
export type { CertifiedLeaf } from './certifiedAudit.js';
|
|
6
10
|
export type { CertifiedAuditHead, VerifiedAuditHead } from './certifiedAudit.js';
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
11
|
+
export { verifyActionReceipt, actionMessage, actionFields, enrolmentMessage, signEnrolment, } from './actionReceipt.js';
|
|
12
|
+
export type { ActionAuth, Enrolment } from './actionReceipt.js';
|
|
9
13
|
export * as Schema from './schema.js';
|
|
10
14
|
export { ProfileManager } from './ProfileManager.js';
|
|
11
15
|
export type { Profile, Insight } from './ProfileManager.js';
|
|
12
16
|
export { SessionManager } from './SessionManager.js';
|
|
13
17
|
export type { SessionSummary, SessionEntry } from './SessionManager.js';
|
|
14
|
-
|
|
15
|
-
export { EngramClient as VaultClient } from './EngramClient.js';
|
|
16
|
-
/** @deprecated Use EngramClientConfig instead */
|
|
17
|
-
export type { EngramClientConfig as VaultClientConfig } from './EngramClient.js';
|
|
18
|
-
export { loadSessionKey, identityFromSeed, generateSessionKey } from './auth.js';
|
|
18
|
+
export { loadSessionKey, identityFromSeed, generateSessionKey, loadOrCreateRootKey, } from './auth.js';
|
|
19
19
|
export { pair, PairError } from './pair.js';
|
|
20
20
|
export type { PairOptions, PairResult } from './pair.js';
|
|
21
|
+
export { openEngram, NOT_ALLOWED } from './openEngram.js';
|
|
22
|
+
export type { OpenEngramOptions, OpenEngramResult, OpenEngramIO, OpenEngramEngram, } from './openEngram.js';
|
|
21
23
|
export { setupOpenClaw, OpenClawNotFoundError } from './openclaw-setup.js';
|
|
22
24
|
export type { OpenClawSetupOptions, OpenClawSetupResult } from './openclaw-setup.js';
|
|
23
25
|
export { generateMcpConfig, claudeConfigPaths, installMcpConfig } from './claude-setup.js';
|
|
@@ -27,16 +29,8 @@ export type { MigrateOptions, MigrateFileEvent, MigrateCallback, MigrateResult,
|
|
|
27
29
|
export { resolveAndValidate, isValidCanisterId, isSafePathComponent } from './path-utils.js';
|
|
28
30
|
export { LRUCache } from './cache.js';
|
|
29
31
|
export { OfflineQueue } from './offline.js';
|
|
30
|
-
export type { Role,
|
|
31
|
-
/** @deprecated */ VaultStatus,
|
|
32
|
-
/** @deprecated */ VaultRecord,
|
|
33
|
-
/** @deprecated */ VaultRecordStatus, } from './types.js';
|
|
34
|
-
export { Ic402Client } from '@ic402/client';
|
|
35
|
-
export type { Ic402Identity, SessionHandle, SessionPreferences } from '@ic402/client';
|
|
36
|
-
export { signVoucher, encodeVoucherPayload } from '@ic402/client';
|
|
37
|
-
export type { SignedTransaction, SignedAuthorization, SignedTypedData } from '@ic402/client';
|
|
38
|
-
export type { ServiceDefinition, Job, JobStatus, PricingScheme, VerificationMethod, } from '@ic402/client';
|
|
39
|
-
export { Ic402Error, probeX402, fetchX402, findPaymentOption } from '@ic402/client';
|
|
40
|
-
export { broadcastTransaction, pollReceipt, registerAgent } from '@ic402/client';
|
|
32
|
+
export type { Role, AgentStatus, AgentPermissions, AgentRecord, ChildAllowanceRow, KeyNomination, LogPosition, HeldKey, AgentEnding, AgentEndReason, Pairing, TrackRecordNotice, EnrolmentProof, RawMemoryFile, MemoryVersionSummary, MemoryEviction, MemoryFile, MemoryFileInfo, SessionContext, MemoryHistory, MemoryRangePage, Account, AuditEntry, AuditPage, EngramStatus, OwnerConsole, EngramRecord, EngramRecordStatus, RegistryStatus, GuardianPermissions, GuardianRecord, BackupMetadata, BackupType, BackupStatus, ApprovalStatus, ApprovalRequest, } from './types.js';
|
|
41
33
|
export { verifyCanonicalLineage, classifyLineage, CANONICAL_REGISTRY_CANISTER_ID, type LineageVerdict, type CustodyMode, } from './lineage.js';
|
|
42
34
|
export { chunkHash, deltaHash, contentRoot, merkle, leaf, evictedRoot, opsRoot, eventHash, eventPreambleAndBody, manifestBytes, opBody, opTag, toHex, type Hash as LedgerFsHash, type ChunkRef as LedgerFsChunkRef, type Manifest as LedgerFsManifest, type Op as LedgerFsOp, type Event as LedgerFsEvent, type ImportNote as LedgerFsImportNote, } from './ledgerfsHash.js';
|
|
35
|
+
export { assembleMemoryArchive, verifyMemoryArchive, recomputeOpsRoot, memoryLogEventHash, toLedgerFsEvent, isResponseTooLarge, ARCHIVE_MAX_RANGE, ARCHIVE_PAGE_EVENTS, } from './memoryArchive.js';
|
|
36
|
+
export type { MemoryLogEvent, MemoryLogOp, MemoryLogImportNote, MemoryLogManifest, MemoryLogChunkRef, MemoryLogPage, MemoryLogPageFetcher, MemoryExportReceipt, MemoryCondenseResult, MemoryCondensePreview, MemoryReceiptRef, MemoryExportReceiptRow, MemoryCheckpointRow, MemoryArchive, MemoryArchiveVerification, AssembleArchiveOptions, OpsRootAttestation, } from './memoryArchive.js';
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,60 @@
|
|
|
1
1
|
export { EngramClient } from './EngramClient.js';
|
|
2
|
+
// ⟨0.16.0, B-5⟩ The commerce surface moved off the engram with boundary ruling B1, so the client
|
|
3
|
+
// that reaches it is a separate one. Exported beside EngramClient rather than folded into it
|
|
4
|
+
// because they address DIFFERENT CANISTERS — and a paid call needs both: the allowance names the
|
|
5
|
+
// market, the signature comes from the engram.
|
|
6
|
+
export { MarketClient } from './MarketClient.js';
|
|
7
|
+
export { CanisterRefusal, errorKind, errorMessage, unwrapResult } from './wire.js';
|
|
2
8
|
export { verifyCertifiedAuditHead } from './certifiedAudit.js';
|
|
3
9
|
// Tree-format verification (registry ≥ 0.7.17): the registry's certified_data is a merkle root and
|
|
4
10
|
// its bare-head method was REMOVED (loud break). Engram/cashier slots keep verifyCertifiedAuditHead.
|
|
5
11
|
export { verifyCertifiedLeaf, verifyCertifiedRegistryHead, verifyCertifiedAnchor, } from './certifiedAudit.js';
|
|
6
|
-
|
|
12
|
+
// Owner-action receipts (D1), VERIFY half only. An owner authorizes a money-path action by signing
|
|
13
|
+
// a canonical, domain-separated message with their IC identity key; the engram persists it into the
|
|
14
|
+
// tamper-evident audit log. Whoever later reads that log is a relying party, and this is what they
|
|
15
|
+
// need: recompute the canonical message, check the Ed25519 signature, and get back the
|
|
16
|
+
// self-authenticating principal that actually authorized it — without trusting EngramX. The
|
|
17
|
+
// encoding is pinned byte-for-byte against src/shared/IdentityBinding.mo by a Motoko parity test,
|
|
18
|
+
// so the two implementations cannot drift apart silently.
|
|
19
|
+
//
|
|
20
|
+
// The SIGNING half (signAction/toCandidActionAuth) is deliberately not exported here. It belongs to
|
|
21
|
+
// whoever holds the owner key, and after the 2026-08-17 charter diet this package holds no
|
|
22
|
+
// owner-money method to sign for; @engramx/owner is its home when an owner-side withdraw lands.
|
|
23
|
+
//
|
|
24
|
+
// ⟨2026-09-28⟩ The ENROLMENT signer IS exported: it is the agent's half, not the owner's. An agent's
|
|
25
|
+
// root key signs one statement per engram enrolling that engram's session key (owner decision of
|
|
26
|
+
// 2026-09-28, in its words: one root key per agent, with an enrolled key per client — "client"
|
|
27
|
+
// there is the engram ⟨2026-10-01⟩), and `EngramClient.pairAgent` and
|
|
28
|
+
// `pair` call it. Exported so an agent that pairs without the CLI can produce the same statement.
|
|
29
|
+
// ⟨2026-09-29, ic402 2.16.1⟩ `pairEnrolled`, the re-signing loop, is no longer exported: it went
|
|
30
|
+
// with the verifier fault it worked around. Sign once with `signEnrolment` and call `pairAgent`.
|
|
31
|
+
export { verifyActionReceipt, actionMessage, actionFields, enrolmentMessage, signEnrolment, } from './actionReceipt.js';
|
|
7
32
|
// Schema — shared path conventions for all integrations
|
|
8
33
|
export * as Schema from './schema.js';
|
|
9
34
|
// High-level managers (composable over EngramClient)
|
|
10
35
|
export { ProfileManager } from './ProfileManager.js';
|
|
11
36
|
export { SessionManager } from './SessionManager.js';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
37
|
+
// The `Vault*` aliases (VaultClient, VaultClientConfig, VaultStatus, VaultRecord,
|
|
38
|
+
// VaultRecordStatus) were removed on 2026-08-17. They dated from the pre-launch rename and had
|
|
39
|
+
// zero references anywhere — a deprecation path maintained for users who do not exist.
|
|
40
|
+
export { loadSessionKey, identityFromSeed, generateSessionKey, loadOrCreateRootKey, } from './auth.js';
|
|
15
41
|
export { pair, PairError } from './pair.js';
|
|
42
|
+
// ⟨2026-10-01, the owner's ruling 2 A⟩ The open-engram command, for an agent that runs it without the CLI.
|
|
43
|
+
export { openEngram, NOT_ALLOWED } from './openEngram.js';
|
|
16
44
|
export { setupOpenClaw, OpenClawNotFoundError } from './openclaw-setup.js';
|
|
17
45
|
export { generateMcpConfig, claudeConfigPaths, installMcpConfig } from './claude-setup.js';
|
|
18
46
|
export { migrateOpenClawMemory, recoverOpenClaw, createCheckpoint, rollbackCheckpoint, listCheckpoints, hasValidPairing, resumeMigration, findIncompleteCheckpoint, } from './migrate.js';
|
|
19
47
|
export { resolveAndValidate, isValidCanisterId, isSafePathComponent } from './path-utils.js';
|
|
20
48
|
export { LRUCache } from './cache.js';
|
|
21
49
|
export { OfflineQueue } from './offline.js';
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
// The blind `@ic402/client` re-export block (Ic402Client, signVoucher, encodeVoucherPayload,
|
|
51
|
+
// Ic402Error, probeX402, fetchX402, findPaymentOption, broadcastTransaction, pollReceipt,
|
|
52
|
+
// registerAgent, and their types) was removed on 2026-08-17. Nothing consumed any of them: the two
|
|
53
|
+
// hits that looked live were not — a downstream end-to-end suite imports `signVoucher` from the
|
|
54
|
+
// ic402 package directly, and the `fetchX402` in CLI-REFERENCE.md names a canister method of the
|
|
55
|
+
// same name that no longer exists. Re-exporting a dependency's whole surface makes this package's
|
|
56
|
+
// API the union of its own decisions and someone else's release notes. A caller that wants ic402
|
|
57
|
+
// should depend on ic402, whose version it can then pin itself.
|
|
27
58
|
// Canonical-lineage verification — the one-call check for agents/relying parties: is this
|
|
28
59
|
// engram canonically spawned (registry testimony), and does it run the attested template?
|
|
29
60
|
export { verifyCanonicalLineage, classifyLineage, CANONICAL_REGISTRY_CANISTER_ID, } from './lineage.js';
|
|
@@ -31,4 +62,18 @@ export { verifyCanonicalLineage, classifyLineage, CANONICAL_REGISTRY_CANISTER_ID
|
|
|
31
62
|
// every ledgerfs digest from the anchored chain without trusting the canister. Locked to the Motoko
|
|
32
63
|
// implementation by the `ledgerfs-goldens` cross-lock. This is the verifier surface, not a writer.
|
|
33
64
|
export { chunkHash, deltaHash, contentRoot, merkle, leaf, evictedRoot, opsRoot, eventHash, eventPreambleAndBody, manifestBytes, opBody, opTag, toHex, } from './ledgerfsHash.js';
|
|
65
|
+
// Archive — the owner's read → attest → verify → condense path over the memory log. The paging
|
|
66
|
+
// helper honours the engram's disclosed page cap and halves on a response the engram could not
|
|
67
|
+
// fit; the verifier recomputes the ops root through ledgerfsHash above, never through a second
|
|
68
|
+
// copy of the hash rules. Owner-only on the canister: a log entry's `path` is inside its own hash
|
|
69
|
+
// preimage, so it cannot be redacted for a lesser caller — which is why the EngramClient wrappers
|
|
70
|
+
// over this family left in the 2026-08-17 charter diet and these module functions did not. If you
|
|
71
|
+
// were calling `client.assembleMemoryArchive(opts)`, call `assembleMemoryArchive(fetchPage, opts)`
|
|
72
|
+
// with your own owner-authenticated actor's `getMemoryLogPage`: same walk, same verification, and
|
|
73
|
+
// the authority stays where it belongs.
|
|
74
|
+
// ⟨CORRECTED 2026-10-05⟩ There is no `getMemoryLogPage` at 0.16.0. The engram serves
|
|
75
|
+
// `listMemoryLog`, whose page is a different envelope from `MemoryLogPage`, so it cannot be passed
|
|
76
|
+
// straight in. See the note on `MemoryLogPage` in memoryArchive.ts: that adapter is an open
|
|
77
|
+
// question, not something done here.
|
|
78
|
+
export { assembleMemoryArchive, verifyMemoryArchive, recomputeOpsRoot, memoryLogEventHash, toLedgerFsEvent, isResponseTooLarge, ARCHIVE_MAX_RANGE, ARCHIVE_PAGE_EVENTS, } from './memoryArchive.js';
|
|
34
79
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,iGAAiG;AACjG,6FAA6F;AAC7F,iGAAiG;AACjG,+CAA+C;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAMnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,mGAAmG;AACnG,qGAAqG;AACrG,OAAO,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAI7B,mGAAmG;AACnG,oGAAoG;AACpG,mGAAmG;AACnG,uFAAuF;AACvF,4FAA4F;AAC5F,kGAAkG;AAClG,0DAA0D;AAC1D,EAAE;AAC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G;AAChG,iGAAiG;AACjG,kGAAkG;AAClG,iGAAiG;AACjG,gEAAgE;AAEhE,0FAA0F;AAC1F,0FAA0F;AAC1F,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,8BAA8B,GAG/B,MAAM,cAAc,CAAC;AAEtB,+FAA+F;AAC/F,oGAAoG;AACpG,mGAAmG;AACnG,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,MAAM,EACN,IAAI,EACJ,WAAW,EACX,OAAO,EACP,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,MAAM,EACN,KAAK,EACL,KAAK,GAON,MAAM,mBAAmB,CAAC;AAE3B,+FAA+F;AAC/F,+FAA+F;AAC/F,+FAA+F;AAC/F,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,mGAAmG;AACnG,kGAAkG;AAClG,wCAAwC;AACxC,qFAAqF;AACrF,mGAAmG;AACnG,4FAA4F;AAC5F,qCAAqC;AACrC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC"}
|
package/dist/ledgerfsHash.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ledgerfs — the TypeScript half of the frozen era-2 hash contract
|
|
2
|
-
// (
|
|
2
|
+
// (the Motoko half is src/ledgerfs/Hash.mo and src/ledgerfs/Encode.mo).
|
|
3
3
|
//
|
|
4
4
|
// This file is the SECOND implementation. Its entire reason to exist is that a third party holding
|
|
5
5
|
// only the anchored chain can recompute every ledgerfs digest without trusting the canister — so
|
package/dist/ledgerfsHash.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledgerfsHash.js","sourceRoot":"","sources":["../src/ledgerfsHash.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"ledgerfsHash.js","sourceR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AQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/lineage.js
CHANGED
|
@@ -16,15 +16,18 @@
|
|
|
16
16
|
// here without being suspect; treat lineage as the trust fact and the code bit as freshness.
|
|
17
17
|
import { Actor, CanisterStatus } from '@icp-sdk/core/agent';
|
|
18
18
|
import { Principal } from '@icp-sdk/core/principal';
|
|
19
|
+
import { engramSubset, registrySubset } from './idl.js';
|
|
19
20
|
/** The canonical registry — SET AT FLEET DEPLOY (empty until then, like @engramx/owner's
|
|
20
21
|
* config). While empty, verification without an explicit registryId reports 'indeterminate'
|
|
21
22
|
* rather than guessing. */
|
|
22
23
|
export const CANONICAL_REGISTRY_CANISTER_ID = 'safaa-qaaaa-aaaam-qjb5a-cai';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
// Both lineage actors are NARROWED views of the generated interfaces rather than hand-declared
|
|
25
|
+
// shapes. These three signatures were the last hand-typed Candid left in the package and the only
|
|
26
|
+
// ones with no fidelity gate at all — the exact configuration that produced the drift class
|
|
27
|
+
// ADR-0018 answers. Checked against the generated factories on 2026-08-16 before the swap: exact
|
|
28
|
+
// match on all three, so the narrowing is wire-identical to what shipped.
|
|
29
|
+
const engramLineageIdl = engramSubset(['getSpawnedBy']);
|
|
30
|
+
const registryLineageIdl = registrySubset(['getCustodyMode', 'getEngramWasmHash']);
|
|
28
31
|
/** Pure classification — exported for tests. */
|
|
29
32
|
export function classifyLineage(custody, registryAsked) {
|
|
30
33
|
if (!registryAsked || custody === null)
|
package/dist/lineage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineage.js","sourceRoot":"","sources":["../src/lineage.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,6FAA6F;AAC7F,mCAAmC;AACnC,EAAE;AACF,iGAAiG;AACjG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