@engramx/client 0.16.0-rc.12 → 0.16.0-rc.13

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.
Files changed (56) hide show
  1. package/README.md +18 -8
  2. package/dist/EngramClient.d.ts +10 -14
  3. package/dist/EngramClient.js +14 -64
  4. package/dist/EngramClient.js.map +1 -1
  5. package/dist/ProfileManager.d.ts +3 -19
  6. package/dist/ProfileManager.js +1 -58
  7. package/dist/ProfileManager.js.map +1 -1
  8. package/dist/SessionManager.d.ts +1 -1
  9. package/dist/SessionManager.js.map +1 -1
  10. package/dist/claude-setup.d.ts +15 -6
  11. package/dist/claude-setup.js +30 -20
  12. package/dist/claude-setup.js.map +1 -1
  13. package/dist/cli.js +33 -166
  14. package/dist/cli.js.map +1 -1
  15. package/dist/connect-config.d.ts +109 -0
  16. package/dist/connect-config.js +251 -0
  17. package/dist/connect-config.js.map +1 -0
  18. package/dist/encryption.js +7 -1
  19. package/dist/encryption.js.map +1 -1
  20. package/dist/idl.d.ts +16 -1
  21. package/dist/idl.js +9 -1
  22. package/dist/idl.js.map +1 -1
  23. package/dist/index.d.ts +4 -5
  24. package/dist/index.js +5 -4
  25. package/dist/index.js.map +1 -1
  26. package/dist/ledgerfsHash.d.ts +0 -2
  27. package/dist/ledgerfsHash.js +0 -2
  28. package/dist/ledgerfsHash.js.map +1 -1
  29. package/dist/lineage.d.ts +7 -1
  30. package/dist/lineage.js +7 -1
  31. package/dist/lineage.js.map +1 -1
  32. package/dist/memoryArchive.d.ts +12 -77
  33. package/dist/memoryArchive.js.map +1 -1
  34. package/dist/migrate.d.ts +1 -30
  35. package/dist/migrate.js +13 -136
  36. package/dist/migrate.js.map +1 -1
  37. package/dist/openclaw-local.d.ts +86 -0
  38. package/dist/openclaw-local.js +332 -0
  39. package/dist/openclaw-local.js.map +1 -0
  40. package/dist/openclaw-setup.d.ts +2 -2
  41. package/dist/openclaw-setup.js +8 -36
  42. package/dist/openclaw-setup.js.map +1 -1
  43. package/dist/path-utils.d.ts +0 -16
  44. package/dist/path-utils.js +4 -27
  45. package/dist/path-utils.js.map +1 -1
  46. package/dist/schema.d.ts +6 -17
  47. package/dist/schema.js +6 -28
  48. package/dist/schema.js.map +1 -1
  49. package/dist/types.d.ts +46 -453
  50. package/dist/verify.d.ts +2 -0
  51. package/dist/verify.js +11 -0
  52. package/dist/verify.js.map +1 -0
  53. package/package.json +17 -5
  54. package/dist/offline.d.ts +0 -21
  55. package/dist/offline.js +0 -104
  56. package/dist/offline.js.map +0 -1
@@ -0,0 +1,109 @@
1
+ export interface ConnectParams {
2
+ canisterId: string;
3
+ /** IC gateway host. Defaults to mainnet (icp0.io). Local replica: http://localhost:4943 */
4
+ host?: string;
5
+ }
6
+ export declare const MAINNET_HOST = "https://icp0.io";
7
+ /** What a surface that prints the per-client guides passes: the engram, and the build's version. */
8
+ export interface GuideParams extends ConnectParams {
9
+ /**
10
+ * The @engramx/client version the surface printing these guides was BUILT with — its own
11
+ * package.json's version, which the release's version change stamps (X.Y.Z-rc.N while a release
12
+ * candidate soaks, X.Y.Z once the final release is cut). Every pairing command in the guides
13
+ * names it.
14
+ *
15
+ * ⟨2026-10-13⟩ It is also the @engramx/mcp version the local (stdio) server config names
16
+ * (`mcpPackage`): the protocol's packages share one version number, which each release's version
17
+ * change stamps into every one of them, so the surface's own version is both.
18
+ */
19
+ clientVersion: string;
20
+ }
21
+ /**
22
+ * The pairing command, pinned to the version the surface printing it was built with.
23
+ *
24
+ * WHY (the owner's ruling of 2026-10-03: print the exact version each page was built with).
25
+ * A bare `npx @engramx/client pair …` installs npm's default (`latest`), which is the last FINAL
26
+ * release: while a release candidate soaks under the `next` tag, every surface built from it would
27
+ * hand out a command that installs the previous release, and a previous release cannot pair with
28
+ * this release's engram (the 0.15.0 → 0.16.0 enrolment change). Pinned to the build's own version,
29
+ * the command names the final version once the final release is cut — through that release's own
30
+ * version change, with nothing to undo. WHAT WOULD MAKE THIS WRONG: a surface that prints the guides
31
+ * for a different release than the one it was built from (then `clientVersion` must be that
32
+ * release's), or a published version being withdrawn from npm (a pinned command then fails loudly,
33
+ * where a bare one would quietly install another release).
34
+ */
35
+ export declare function pairCommand(clientVersion: string, inviteCode: string, canisterId: string): string;
36
+ /** The remote MCP endpoint URL for an engram canister (boundary-node subdomain routing). */
37
+ export declare function mcpUrl({ canisterId, host }: ConnectParams): string;
38
+ /**
39
+ * The @engramx/mcp package the local (stdio) server config runs, pinned to the version the surface
40
+ * printing it was built with: `@engramx/mcp@<version>`.
41
+ *
42
+ * ⟨ADDED 2026-10-13, the owner's "fix … the MCP version in rc.12"⟩ WHY. The config said
43
+ * `npx -y @engramx/mcp`, and a bare name installs npm's default (`latest`) — the last FINAL release.
44
+ * While a release candidate soaks under `next`, that is the previous release (0.15.0 during the
45
+ * 0.16.0 soak, read from npm's dist-tags 2026-10-13), which cannot talk to this release's engram, so
46
+ * the first session started from the copied config failed. The defect class is the bare pairing
47
+ * command's (`pairCommand` above); that fix missed this one because the package name sits in an
48
+ * argument list, not a command line.
49
+ *
50
+ * A version that is not a release version — a surface that could not read its own — prints the
51
+ * visible blank `<version>`, which npm refuses by name (EINVALIDTAGNAME). Never `@engramx/mcp@` or
52
+ * the bare name: npm reads both as the range `*` and installs `latest`, the very failure this
53
+ * prevents (npm-package-arg, measured 2026-10-13 with npm 11.19.1).
54
+ *
55
+ * WHAT WOULD MAKE THIS WRONG: the packages no longer sharing one version number (then the surface
56
+ * must pass @engramx/mcp's own version), a surface printing the config for a release other than the
57
+ * one it was built from, or the named version being withdrawn from npm (the pinned config then
58
+ * fails loudly, where a bare one would quietly run another release).
59
+ */
60
+ export declare function mcpPackage(version: string): string;
61
+ /** What the stdio entry needs beyond the guides: the key file, when the surface knows it. */
62
+ export interface StdioParams extends GuideParams {
63
+ /**
64
+ * The session key file the server reads. ⟨2026-10-13⟩ Set by `engramx pair --target claude`, which
65
+ * just wrote that file (and may have been given `--key-path`); omitted by surfaces that do not
66
+ * know it, so the server reads its default, ~/.engramx/session.key.
67
+ */
68
+ sessionKeyPath?: string;
69
+ }
70
+ /** The stdio `mcpServers.engramx` entry, as every surface writes it. */
71
+ export interface StdioServerEntry {
72
+ command: string;
73
+ args: string[];
74
+ env: Record<string, string>;
75
+ }
76
+ /**
77
+ * Claude Desktop / Cursor STDIO server entry (local @engramx/mcp, session-key auth), running the
78
+ * @engramx/mcp version the surface was built with (`mcpPackage`).
79
+ */
80
+ export declare function stdioServerConfig({ canisterId, host, clientVersion, sessionKeyPath, }: StdioParams): StdioServerEntry;
81
+ /** The claude_desktop_config.json fragment with the engramx server under mcpServers. */
82
+ export declare function claudeDesktopConfig(p: StdioParams): {
83
+ mcpServers: {
84
+ engramx: StdioServerEntry;
85
+ };
86
+ };
87
+ export interface ClientGuide {
88
+ id: string;
89
+ name: string;
90
+ /** 'remote' = canister-hosted HTTP MCP + OAuth; 'stdio' = local @engramx/mcp + session key */
91
+ transport: 'remote' | 'stdio';
92
+ steps: string[];
93
+ /** Optional copy-paste install snippet (CLI command, YAML, or JSON). */
94
+ snippet?: string;
95
+ }
96
+ /** Per-client connection guides — identical wording in the CLI and the web page. */
97
+ export declare function clientGuides(p: GuideParams): ClientGuide[];
98
+ /** Everything a consumer needs in one call. */
99
+ export declare function connectInfo(p: GuideParams): {
100
+ canisterId: string;
101
+ host: string;
102
+ mcpUrl: string;
103
+ claudeDesktopConfig: {
104
+ mcpServers: {
105
+ engramx: StdioServerEntry;
106
+ };
107
+ };
108
+ guides: ClientGuide[];
109
+ };
@@ -0,0 +1,251 @@
1
+ // Canonical config generation for connecting AI clients (Claude.ai web, Claude Desktop, Cursor, …)
2
+ // to an engram's remote MCP endpoint. Used by the `@engramx/mcp connect` CLI.
3
+ //
4
+ // Dependency-free and free of Node/browser-only APIs so any consumer (this CLI, or a web UI) can
5
+ // import it unchanged. The contract test (connect-config.test.ts) pins the output — downstream UIs
6
+ // that re-render this config should reuse this module + that test so every surface stays identical.
7
+ //
8
+ // ⟨MOVED 2026-10-13, the bloat audit + the owner's 3A⟩ From integrations/mcp/src/ into
9
+ // @engramx/client, published as the browser-safe subpath `@engramx/client/connect-config`, so a web
10
+ // UI imports it instead of keeping a hand copy (the platform's was policed by a sync script). It is
11
+ // also now the ONE generator of the stdio `mcpServers.engramx` entry: claude-setup.ts
12
+ // (`engramx pair --target claude`) built a second one that had drifted (the session-key variable set
13
+ // there and not here; `ic0.app` the only mainnet spelling there). `stdioServerConfig` takes the
14
+ // key path for the surfaces that know it. Still dependency-free — test/browser-safe-subpaths.test.ts
15
+ // holds it to that.
16
+ //
17
+ // ⟨2026-10-03⟩ Every pairing command this module prints names the exact @engramx/client version the
18
+ // surface printing it was built with (`npx @engramx/client@<version> pair …`), so the caller passes
19
+ // that version in (`GuideParams.clientVersion`): this module cannot read a package.json and stay
20
+ // usable in a browser. This CLI passes its own package.json's version; a web UI passes the version
21
+ // it was built with. See `pairCommand` below for why.
22
+ // ⟨2026-10-13⟩ The local (stdio) server config takes that same version and names
23
+ // `@engramx/mcp@<version>` (`mcpPackage` below) — it named the bare package until then.
24
+ export const MAINNET_HOST = 'https://icp0.io';
25
+ /**
26
+ * The pairing command, pinned to the version the surface printing it was built with.
27
+ *
28
+ * WHY (the owner's ruling of 2026-10-03: print the exact version each page was built with).
29
+ * A bare `npx @engramx/client pair …` installs npm's default (`latest`), which is the last FINAL
30
+ * release: while a release candidate soaks under the `next` tag, every surface built from it would
31
+ * hand out a command that installs the previous release, and a previous release cannot pair with
32
+ * this release's engram (the 0.15.0 → 0.16.0 enrolment change). Pinned to the build's own version,
33
+ * the command names the final version once the final release is cut — through that release's own
34
+ * version change, with nothing to undo. WHAT WOULD MAKE THIS WRONG: a surface that prints the guides
35
+ * for a different release than the one it was built from (then `clientVersion` must be that
36
+ * release's), or a published version being withdrawn from npm (a pinned command then fails loudly,
37
+ * where a bare one would quietly install another release).
38
+ */
39
+ export function pairCommand(clientVersion, inviteCode, canisterId) {
40
+ return `npx @engramx/client@${clientVersion} pair ${inviteCode} --engram ${canisterId}`;
41
+ }
42
+ function isLocal(host) {
43
+ return host.includes('localhost') || host.includes('127.0.0.1');
44
+ }
45
+ /** The remote MCP endpoint URL for an engram canister (boundary-node subdomain routing). */
46
+ export function mcpUrl({ canisterId, host = MAINNET_HOST }) {
47
+ if (isLocal(host))
48
+ return `http://${canisterId}.localhost:4943/mcp`;
49
+ return `https://${canisterId}.icp0.io/mcp`;
50
+ }
51
+ /** A release version as the release's version change writes it: X.Y.Z, or X.Y.Z-<pre-release>. */
52
+ const RELEASE_VERSION = /^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$/;
53
+ /**
54
+ * The @engramx/mcp package the local (stdio) server config runs, pinned to the version the surface
55
+ * printing it was built with: `@engramx/mcp@<version>`.
56
+ *
57
+ * ⟨ADDED 2026-10-13, the owner's "fix … the MCP version in rc.12"⟩ WHY. The config said
58
+ * `npx -y @engramx/mcp`, and a bare name installs npm's default (`latest`) — the last FINAL release.
59
+ * While a release candidate soaks under `next`, that is the previous release (0.15.0 during the
60
+ * 0.16.0 soak, read from npm's dist-tags 2026-10-13), which cannot talk to this release's engram, so
61
+ * the first session started from the copied config failed. The defect class is the bare pairing
62
+ * command's (`pairCommand` above); that fix missed this one because the package name sits in an
63
+ * argument list, not a command line.
64
+ *
65
+ * A version that is not a release version — a surface that could not read its own — prints the
66
+ * visible blank `<version>`, which npm refuses by name (EINVALIDTAGNAME). Never `@engramx/mcp@` or
67
+ * the bare name: npm reads both as the range `*` and installs `latest`, the very failure this
68
+ * prevents (npm-package-arg, measured 2026-10-13 with npm 11.19.1).
69
+ *
70
+ * WHAT WOULD MAKE THIS WRONG: the packages no longer sharing one version number (then the surface
71
+ * must pass @engramx/mcp's own version), a surface printing the config for a release other than the
72
+ * one it was built from, or the named version being withdrawn from npm (the pinned config then
73
+ * fails loudly, where a bare one would quietly run another release).
74
+ */
75
+ export function mcpPackage(version) {
76
+ return `@engramx/mcp@${RELEASE_VERSION.test(version) ? version : '<version>'}`;
77
+ }
78
+ /**
79
+ * Claude Desktop / Cursor STDIO server entry (local @engramx/mcp, session-key auth), running the
80
+ * @engramx/mcp version the surface was built with (`mcpPackage`).
81
+ */
82
+ export function stdioServerConfig({ canisterId, host = MAINNET_HOST, clientVersion, sessionKeyPath, }) {
83
+ const env = { ENGRAM_CANISTER_ID: canisterId };
84
+ if (sessionKeyPath)
85
+ env['ENGRAM_SESSION_KEY_PATH'] = sessionKeyPath;
86
+ // Only pin a non-default host (e.g. local replica); mainnet is the @engramx/mcp default.
87
+ if (host !== MAINNET_HOST && host !== 'https://ic0.app')
88
+ env['ENGRAM_HOST'] = host;
89
+ // ⟨2026-10-13⟩ Was `args: ['-y', '@engramx/mcp']` — unpinned; `mcpPackage` says why.
90
+ return { command: 'npx', args: ['-y', mcpPackage(clientVersion)], env };
91
+ }
92
+ /** The claude_desktop_config.json fragment with the engramx server under mcpServers. */
93
+ export function claudeDesktopConfig(p) {
94
+ return { mcpServers: { engramx: stdioServerConfig(p) } };
95
+ }
96
+ /** Per-client connection guides — identical wording in the CLI and the web page. */
97
+ export function clientGuides(p) {
98
+ const url = mcpUrl(p);
99
+ const pair = pairCommand(p.clientVersion, '<invite-code>', p.canisterId);
100
+ return [
101
+ {
102
+ id: 'claude-web',
103
+ name: 'Claude (claude.ai)',
104
+ transport: 'remote',
105
+ steps: [
106
+ 'Open claude.ai → Settings → Connectors → Add custom connector.',
107
+ `Paste the MCP URL: ${url}`,
108
+ 'Sign in with the wallet that owns this engram, then approve.',
109
+ 'Your engram tools (read/append/list memory, audit log, wallet) appear in new chats.',
110
+ ],
111
+ },
112
+ {
113
+ id: 'claude-code',
114
+ name: 'Claude Code (CLI)',
115
+ transport: 'remote',
116
+ snippet: `claude mcp add engramx-memory ${url}`,
117
+ steps: [
118
+ 'Run the command, then restart claude-code — OAuth opens in your browser on first use.',
119
+ ],
120
+ },
121
+ {
122
+ id: 'claude-desktop',
123
+ name: 'Claude Desktop (remote)',
124
+ transport: 'remote',
125
+ steps: [
126
+ 'Claude Desktop → Settings → Connectors → Add custom connector.',
127
+ `Paste the MCP URL: ${url}`,
128
+ 'Authorize with your wallet.',
129
+ ],
130
+ },
131
+ {
132
+ id: 'cursor',
133
+ name: 'Cursor',
134
+ transport: 'remote',
135
+ steps: [
136
+ 'Cursor → Settings → MCP → Add new MCP server.',
137
+ `Paste the remote URL ${url}; the OAuth flow opens in your browser.`,
138
+ ],
139
+ },
140
+ {
141
+ id: 'copilot',
142
+ name: 'GitHub Copilot (VS Code, agent mode)',
143
+ transport: 'remote',
144
+ snippet: `{\n "servers": {\n "engramx-memory": { "type": "http", "url": "${url}" }\n }\n}`,
145
+ steps: [
146
+ 'VS Code → Command Palette → "MCP: Add Server" → HTTP → paste the URL; or add the JSON above to .vscode/mcp.json (workspace) or your user mcp.json.',
147
+ 'Open Copilot Chat in Agent mode and authorize with the wallet that owns this engram; your engram tools appear in the tool picker.',
148
+ 'Note: the GitHub Copilot CLI is a separate surface (gh copilot) — this flow is for Copilot Chat in VS Code.',
149
+ ],
150
+ },
151
+ {
152
+ id: 'continue',
153
+ name: 'Continue.dev',
154
+ transport: 'remote',
155
+ snippet: `mcpServers:\n - name: engramx-memory\n transport: streamable-http\n url: ${url}`,
156
+ steps: ['Add this YAML to .continue/mcpServers/engramx.yaml.'],
157
+ },
158
+ {
159
+ id: 'chatgpt',
160
+ name: 'ChatGPT (developer mode)',
161
+ transport: 'remote',
162
+ steps: [
163
+ 'ChatGPT → Settings → Apps & Connectors → enable Developer mode → New connector.',
164
+ `Add the MCP server URL: ${url}, then authorize with the wallet that owns this engram.`,
165
+ 'Web + paid tiers only (Plus/Pro/Business); the desktop/mobile apps and free tier cannot add a custom MCP.',
166
+ 'Our connector handshake with ChatGPT is still being verified — if the authorize step fails, seed via a paste prompt for now.',
167
+ ],
168
+ },
169
+ {
170
+ id: 'gemini-cli',
171
+ name: 'Gemini CLI',
172
+ transport: 'remote',
173
+ snippet: `gemini mcp add --transport http engramx-memory ${url}`,
174
+ steps: [
175
+ 'Run the command, then restart gemini-cli.',
176
+ 'If the OAuth handshake misbehaves, add an auth header (the key for this engram) or use the local stdio proxy instead.',
177
+ 'The consumer Gemini app has no custom-MCP support — use gemini-cli, or seed the app’s Saved Info via a paste prompt.',
178
+ ],
179
+ },
180
+ {
181
+ id: 'grok',
182
+ name: 'Grok',
183
+ transport: 'remote',
184
+ steps: [
185
+ 'Grok → Settings → Connectors → Bring your own MCP → add a custom connector.',
186
+ `Paste the MCP URL: ${url} and authorize. Paid tier.`,
187
+ ],
188
+ },
189
+ {
190
+ id: 'perplexity',
191
+ name: 'Perplexity',
192
+ transport: 'remote',
193
+ steps: [
194
+ 'Perplexity → Settings → Connectors → Add → Custom MCP (Pro / Max / Enterprise).',
195
+ `Paste the remote URL: ${url}; authorize with your wallet.`,
196
+ ],
197
+ },
198
+ {
199
+ id: 'lechat',
200
+ name: 'Mistral Le Chat',
201
+ transport: 'remote',
202
+ steps: [
203
+ 'Le Chat → + Add Connector → Custom MCP.',
204
+ `Name it "engramx" and paste the server URL: ${url}. Available on all tiers, including free.`,
205
+ ],
206
+ },
207
+ {
208
+ id: 'openclaw',
209
+ name: 'OpenClaw (self-hosted)',
210
+ transport: 'stdio',
211
+ snippet: pair,
212
+ steps: [
213
+ 'Run the command; it auto-detects OpenClaw and installs the engramx memory plugin.',
214
+ 'The engram becomes OpenClaw’s memory backend — it reads at session start and syncs new memories automatically.',
215
+ 'Get <invite-code> from the engram’s owner — you, if this is your engram — who creates it under Access → Agents; it works for thirty minutes.',
216
+ ],
217
+ },
218
+ {
219
+ id: 'sdk',
220
+ name: 'Your own agent (@engramx/client SDK)',
221
+ transport: 'stdio',
222
+ snippet: pair,
223
+ steps: [
224
+ 'Pair a key for this engram once with the command; get <invite-code> from the engram’s owner — you, if this is your engram — who creates it under Access → Agents. It works for thirty minutes.',
225
+ `In your agent: new EngramClient({ canisterId: '${p.canisterId}', sessionKeyPath: '~/.engramx/session.key' }), then startSession() to read this owner's memory back and appendMemory() as it learns.`,
226
+ 'This grant is append-only for writes — your agent can read and add memory, and cannot delete it. Overwriting existing content requires a separate grant the owner issues deliberately, per path: only on paths the owner lists for agents, and never on paths the owner has locked.',
227
+ ],
228
+ },
229
+ {
230
+ id: 'claude-desktop-stdio',
231
+ name: 'Claude Desktop / Cursor (local stdio)',
232
+ transport: 'stdio',
233
+ snippet: JSON.stringify(claudeDesktopConfig(p), null, 2),
234
+ steps: [
235
+ `Pair a key for this engram once: ${pair}`,
236
+ 'Add the JSON to claude_desktop_config.json under "mcpServers", then restart the app.',
237
+ ],
238
+ },
239
+ ];
240
+ }
241
+ /** Everything a consumer needs in one call. */
242
+ export function connectInfo(p) {
243
+ return {
244
+ canisterId: p.canisterId,
245
+ host: p.host ?? MAINNET_HOST,
246
+ mcpUrl: mcpUrl(p),
247
+ claudeDesktopConfig: claudeDesktopConfig(p),
248
+ guides: clientGuides(p),
249
+ };
250
+ }
251
+ //# sourceMappingURL=connect-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-config.js","sourceRoot":"","sources":["../src/connect-config.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,8EAA8E;AAC9E,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,oGAAoG;AACpG,EAAE;AACF,uFAAuF;AACvF,oGAAoG;AACpG,oGAAoG;AACpG,sFAAsF;AACtF,qGAAqG;AACrG,gGAAgG;AAChG,qGAAqG;AACrG,oBAAoB;AACpB,EAAE;AACF,oGAAoG;AACpG,oGAAoG;AACpG,iGAAiG;AACjG,mGAAmG;AACnG,sDAAsD;AACtD,iFAAiF;AACjF,wFAAwF;AAQxF,MAAM,CAAC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAiB9C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,aAAqB,EAAE,UAAkB,EAAE,UAAkB;IACvF,OAAO,uBAAuB,aAAa,SAAS,UAAU,aAAa,UAAU,EAAE,CAAC;AAC1F,CAAC;AAED,SA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U,uIAAuI;gBACrM,qRAAqR;aACtR;SACF;QACD;YACE,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,uCAAuC;YAC7C,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;YACxD,KAAK,EAAE;gBACL,oCAAoC,IAAI,EAAE;gBAC1C,sFAAsF;aACvF;SACF;KACF,CAAC;AACJ,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,WAAW,CAAC,CAAc;IACxC,OAAO;QACL,UAAU,EAAE,CAAC,CAAC,UAAU;QACxB,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,YAAY;QAC5B,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACjB,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,CAAC;QAC3C,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;KACxB,CAAC;AACJ,CAAC"}
@@ -70,7 +70,13 @@ export class EncryptionManager {
70
70
  async cacheModule() {
71
71
  if (!this.persistPath || typeof process === 'undefined' || !process.versions?.node)
72
72
  return null;
73
- return import('./keyCache.js');
73
+ // ⟨2026-10-13, the owner's 3A⟩ The specifier is a VARIABLE so a browser bundler does not follow
74
+ // it: this module is the browser-safe subpath `@engramx/client/encryption`, and keyCache.js is
75
+ // Node's file system. With a literal, Vite bundled keyCache (and node:fs) into a web build that
76
+ // can never reach it (persistence needs `process.versions.node`). Node resolves the variable
77
+ // relative to this file exactly as it did the literal. Held by test/browser-safe-subpaths.test.ts.
78
+ const keyCacheModule = './keyCache.js';
79
+ return (await import(/* @vite-ignore */ keyCacheModule));
74
80
  }
75
81
  async resolvedPath(kc) {
76
82
  return this.persistPath === '1' || this.persistPath === 'true'
@@ -1 +1 @@
1
- {"version":3,"file":"encryption.js","sourceRoot":"","sources":["../src/encryption.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,iFA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KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;qFACiF;IACjF,KAAK,CAAC,UAAU;QACd,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QACjB,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,IAAI,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YAC1B,MAAM,EAAE,CAAC,YAAY,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;CACF"}
package/dist/idl.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { _SERVICE as GeneratedEngramService } from '@engramx/idl/engram';
1
2
  type InterfaceFactory = (env: {
2
3
  IDL: any;
3
4
  }) => any;
@@ -28,7 +29,7 @@ export declare const marketSubset: (methods?: readonly string[]) => InterfaceFac
28
29
  * nothing calls reads as a supported capability to the next person who greps for one, and a name
29
30
  * here the CANISTER does not serve is a construction-time failure — projectService throws on it.
30
31
  *
31
- * The market serves 64 methods. These nine are the BUYER path, which is the only path this SDK has
32
+ * The market serves 64 methods. These seven are the BUYER path, which is the only path this SDK has
32
33
  * ever wrapped: the seller surface (uploads, endpoints, service registration, pricing) is console
33
34
  * work, and the admin surface is recovery work. Neither belongs in an agent's client library.
34
35
  */
@@ -55,11 +56,25 @@ export declare const SDK_MARKET_METHODS: readonly ["confirmJob", "disputeJob", "
55
56
  * owner-mode `git-revert`, which reaches the actor directly and says so at its call site, and the
56
57
  * encryption migrations the encryption runbook names by hand. If a name here has no caller, that is
57
58
  * a bug in this list, not a reserve.
59
+ * ⟨2026-10-13, the owner's 5A⟩ `git-revert` no longer calls writeMemory: its canister restore moved
60
+ * to @engramx/owner (`--restore`). The encryption migrations and `setMemoryEncryption` are now the
61
+ * only callers of `writeMemory` and `setEncryptionEnabled`; both names leave this list when that
62
+ * trio moves to the owner kit too (it waits on the kit taking `@engramx/client/encryption` as a
63
+ * dependency).
58
64
  *
59
65
  * ADDING A NAME IS A PRODUCT DECISION, not a maintenance one (surface-budget rule L6): no addition
60
66
  * without a named caller.
61
67
  */
62
68
  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"];
69
+ /** One of the engram methods this SDK may call. */
70
+ export type SdkEngramMethod = (typeof SDK_ENGRAM_METHODS)[number];
71
+ /**
72
+ * ⟨2026-10-13, the owner's 3A⟩ The TYPE of the actor EngramClient builds: the generated engram
73
+ * interface, narrowed to SDK_ENGRAM_METHODS. It was `ActorSubclass<any>`, so a call with the wrong
74
+ * arguments, a method this list does not declare, or a reply read as the wrong shape compiled and
75
+ * failed at run time (types.ts says which ones did). Now tsc checks every call and every reply.
76
+ */
77
+ export type SdkEngramService = Pick<GeneratedEngramService, SdkEngramMethod>;
63
78
  /**
64
79
  * The engram actor interface EngramClient builds. Exported because the fidelity gate imports it
65
80
  * and because a caller holding its own agent may want the same narrowing; it is not part of the
package/dist/idl.js CHANGED
@@ -128,7 +128,7 @@ export const marketSubset = (methods = SDK_MARKET_METHODS) => ({ IDL }) => proje
128
128
  * nothing calls reads as a supported capability to the next person who greps for one, and a name
129
129
  * here the CANISTER does not serve is a construction-time failure — projectService throws on it.
130
130
  *
131
- * The market serves 64 methods. These nine are the BUYER path, which is the only path this SDK has
131
+ * The market serves 64 methods. These seven are the BUYER path, which is the only path this SDK has
132
132
  * ever wrapped: the seller surface (uploads, endpoints, service registration, pricing) is console
133
133
  * work, and the admin surface is recovery work. Neither belongs in an agent's client library.
134
134
  */
@@ -163,6 +163,11 @@ export const SDK_MARKET_METHODS = [
163
163
  * owner-mode `git-revert`, which reaches the actor directly and says so at its call site, and the
164
164
  * encryption migrations the encryption runbook names by hand. If a name here has no caller, that is
165
165
  * a bug in this list, not a reserve.
166
+ * ⟨2026-10-13, the owner's 5A⟩ `git-revert` no longer calls writeMemory: its canister restore moved
167
+ * to @engramx/owner (`--restore`). The encryption migrations and `setMemoryEncryption` are now the
168
+ * only callers of `writeMemory` and `setEncryptionEnabled`; both names leave this list when that
169
+ * trio moves to the owner kit too (it waits on the kit taking `@engramx/client/encryption` as a
170
+ * dependency).
166
171
  *
167
172
  * ADDING A NAME IS A PRODUCT DECISION, not a maintenance one (surface-budget rule L6): no addition
168
173
  * without a named caller.
@@ -173,6 +178,9 @@ export const SDK_ENGRAM_METHODS = [
173
178
  // it that the canister does not serve fails at RUNTIME with method-not-found, exactly like the
174
179
  // hand-written Motoko IDLs check-client-idls.mjs gates. Nothing type-checks it: projectService
175
180
  // narrows a generated factory, and an actor call is `any`.
181
+ // ⟨2026-10-13, the owner's 3A⟩ Something does now: SdkEngramService (below) is the generated
182
+ // interface narrowed to this list, and EngramClient's actor has that type — a name here the
183
+ // canister stopped serving fails to compile, and so does a call to a name not here.
176
184
  //
177
185
  // Six of the twenty MOVED to the market with the commerce graft (confirmJob, disputeJob, getJob,
178
186
  // getJobResult, listServices, createJob) and are NOT replaced here — they belong to a
package/dist/idl.js.map CHANGED
@@ -1 +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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ACjB,mBAAmB;IACnB,mBAAmB;IACnB,wBAAwB;IACxB,kBAAkB;IAClB,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,wBAAwB;IACxB,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,WAAW;IACX,cAAc;IACd,8FAA8F;IAC9F,0EAA0E;IAC1E,aAAa;IACb,oBAAoB;IACpB,wFAAwF;IACxF,iGAAiG;IACjG,8FAA8F;IAC9F,2CAA2C;IAC3C,kBAAkB;IAClB,0BAA0B;IAC1B,6FAA6F;IAC7F,iGAAiG;IACjG,yFAAyF;IACzF,6FAA6F;IAC7F,mBAAmB;IACnB,iBAAiB;IACjB,cAAc;IACd,oBAAoB;IACpB,sBAAsB;IACtB,aAAa;CACL,CAAC;AAaX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqB,YAAY,CAAC,kBAAkB,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -21,16 +21,15 @@ export type { PairOptions, PairResult } from './pair.js';
21
21
  export { openEngram, NOT_ALLOWED } from './openEngram.js';
22
22
  export type { OpenEngramOptions, OpenEngramResult, OpenEngramIO, OpenEngramEngram, } from './openEngram.js';
23
23
  export { setupOpenClaw, OpenClawNotFoundError } from './openclaw-setup.js';
24
+ export { getOpenClawDir, loadOpenClawConfig, resolveMemoryDir, detectDatabases, encodeDatabaseBackup, restoreDatabaseBackup, snapshotSqliteFile, DB_TYPES, GITIGNORE_CONTENT, } from './openclaw-local.js';
25
+ export type { OpenClawConfig, DetectedDatabase, DbSuffix } from './openclaw-local.js';
24
26
  export type { OpenClawSetupOptions, OpenClawSetupResult } from './openclaw-setup.js';
25
27
  export { generateMcpConfig, claudeConfigPaths, installMcpConfig } from './claude-setup.js';
26
28
  export type { ClaudeSetupOptions, McpConfig } from './claude-setup.js';
27
29
  export { migrateOpenClawMemory, recoverOpenClaw, createCheckpoint, rollbackCheckpoint, listCheckpoints, hasValidPairing, resumeMigration, findIncompleteCheckpoint, } from './migrate.js';
28
30
  export type { MigrateOptions, MigrateFileEvent, MigrateCallback, MigrateResult, RecoverResult, RollbackResult, CheckpointSummary, CheckpointMetadata, } from './migrate.js';
29
- export { resolveAndValidate, isValidCanisterId, isSafePathComponent } from './path-utils.js';
30
- export { LRUCache } from './cache.js';
31
- export { OfflineQueue } from './offline.js';
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';
31
+ export type { Role, AgentStatus, AgentPermissions, AgentRecord, ChildAllowanceRow, KeyNomination, LogPosition, HeldKey, AgentEnding, AgentEndReason, Pairing, TrackRecordNotice, EnrolmentProof, RawMemoryFile, MemoryVersionSummary, MemoryEviction, MemoryFile, MemoryFileInfo, SessionContext, MemoryHistory, MemoryRangePage, AuditEntry, AuditPage, EngramStatus, OwnerConsole, GuardianPermissions, GuardianRecord, BackupMetadata, BackupType, BackupStatus, ApprovalStatus, ApprovalRequest, } from './types.js';
33
32
  export { verifyCanonicalLineage, classifyLineage, CANONICAL_REGISTRY_CANISTER_ID, type LineageVerdict, type CustodyMode, } from './lineage.js';
34
33
  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';
34
+ export { assembleMemoryArchive, verifyMemoryArchive, recomputeOpsRoot, memoryLogEventHash, toLedgerFsEvent, } from './memoryArchive.js';
36
35
  export type { MemoryLogEvent, MemoryLogOp, MemoryLogImportNote, MemoryLogManifest, MemoryLogChunkRef, MemoryLogPage, MemoryLogEventPage, MemoryLogPageFetcher, MemoryExportReceipt, MemoryCondenseResult, MemoryCondensePreview, MemoryReceiptRef, MemoryExportReceiptRow, MemoryCheckpointRow, MemoryArchive, MemoryArchiveVerification, AssembleArchiveOptions, OpsRootAttestation, } from './memoryArchive.js';
package/dist/index.js CHANGED
@@ -42,11 +42,12 @@ export { pair, PairError } from './pair.js';
42
42
  // ⟨2026-10-01, the owner's ruling 2 A⟩ The open-engram command, for an agent that runs it without the CLI.
43
43
  export { openEngram, NOT_ALLOWED } from './openEngram.js';
44
44
  export { setupOpenClaw, OpenClawNotFoundError } from './openclaw-setup.js';
45
+ // ⟨2026-10-13, the bloat audit⟩ Where OpenClaw keeps things on this machine, and the database backup
46
+ // format: the one copy, which the OpenClaw plugin imports for its backups and `migrate --recover`
47
+ // for its restore (openclaw-local.ts says why there were three).
48
+ export { getOpenClawDir, loadOpenClawConfig, resolveMemoryDir, detectDatabases, encodeDatabaseBackup, restoreDatabaseBackup, snapshotSqliteFile, DB_TYPES, GITIGNORE_CONTENT, } from './openclaw-local.js';
45
49
  export { generateMcpConfig, claudeConfigPaths, installMcpConfig } from './claude-setup.js';
46
50
  export { migrateOpenClawMemory, recoverOpenClaw, createCheckpoint, rollbackCheckpoint, listCheckpoints, hasValidPairing, resumeMigration, findIncompleteCheckpoint, } from './migrate.js';
47
- export { resolveAndValidate, isValidCanisterId, isSafePathComponent } from './path-utils.js';
48
- export { LRUCache } from './cache.js';
49
- export { OfflineQueue } from './offline.js';
50
51
  // The blind `@ic402/client` re-export block (Ic402Client, signVoucher, encodeVoucherPayload,
51
52
  // Ic402Error, probeX402, fetchX402, findPaymentOption, broadcastTransaction, pollReceipt,
52
53
  // registerAgent, and their types) was removed on 2026-08-17. Nothing consumed any of them: the two
@@ -79,5 +80,5 @@ export { chunkHash, deltaHash, contentRoot, merkle, leaf, evictedRoot, opsRoot,
79
80
  // the walk itself reads the served page now. `MemoryLogPage` IS `listMemoryLog`'s `LogPage`, and a
80
81
  // fetcher has that method's shape, so `assembleMemoryArchive(actor.listMemoryLog.bind(actor), opts)`
81
82
  // with an owner-authenticated actor is the whole call.
82
- export { assembleMemoryArchive, verifyMemoryArchive, recomputeOpsRoot, memoryLogEventHash, toLedgerFsEvent, isResponseTooLarge, ARCHIVE_MAX_RANGE, ARCHIVE_PAGE_EVENTS, } from './memoryArchive.js';
83
+ export { assembleMemoryArchive, verifyMemoryArchive, recomputeOpsRoot, memoryLogEventHash, toLedgerFsEvent, } from './memoryArchive.js';
83
84
  //# 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;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;AACF,oGAA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,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,mLAAmL;AACnL,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,mGAAmG;AACnG,kGAAkG;AAClG,wCAAwC;AACxC,qFAAqF;AACrF,mGAAmG;AACnG,4FAA4F;AAC5F,qCAAqC;AACrC,oGAAoG;AACpG,mGAAmG;AACnG,qGAAqG;AACrG,uDAAuD;AACvD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,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,qB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,EACrB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAoDtB,6FAA6F;AAC7F,0FAA0F;AAC1F,mGAAmG;AACnG,gGAAgG;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,mLAAmL;AACnL,kGAAkG;AAClG,kGAAkG;AAClG,kGAAkG;AAClG,mGAAmG;AACnG,kGAAkG;AAClG,wCAAwC;AACxC,qFAAqF;AACrF,mGAAmG;AACnG,4FAA4F;AAC5F,qCAAqC;AACrC,oGAAoG;AACpG,mGAAmG;AACnG,qGAAqG;AACrG,uDAAuD;AACvD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
@@ -4,8 +4,6 @@ export declare function sle64(t: number | bigint): Uint8Array;
4
4
  export declare function concat(parts: Uint8Array[]): Uint8Array;
5
5
  export declare function lp(b: Uint8Array): Uint8Array;
6
6
  export declare const lpText: (t: string) => Uint8Array;
7
- /** Principal raw bytes, length-prefixed — attribution, never authorization. */
8
- export declare const lpPrincipalRaw: (raw: Uint8Array) => Uint8Array;
9
7
  export declare const optBytes: (v: Uint8Array | null) => Uint8Array;
10
8
  export declare const chunkHash: (bytes: Uint8Array) => Hash;
11
9
  /** The #append delta attestation (owner-ratified era-2 gap fill, 2026-08-11): a DISTINCT domain,
@@ -60,8 +60,6 @@ export function lp(b) {
60
60
  }
61
61
  const utf8 = (s) => new TextEncoder().encode(s);
62
62
  export const lpText = (t) => lp(utf8(t));
63
- /** Principal raw bytes, length-prefixed — attribution, never authorization. */
64
- export const lpPrincipalRaw = (raw) => lp(raw);
65
63
  export const optBytes = (v) => v === null ? new Uint8Array([0x00]) : concat([new Uint8Array([0x01]), v]);
66
64
  // ── Domain-separated hash: SHA-256( ASCII(domain) ‖ 0x00 ‖ payload ) ───────────────────────────
67
65
  function h(domain, payload) {