@atbash/sdk 0.17.0-dev.0 → 0.18.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -136,14 +136,24 @@ interface MemoryScanOptions {
136
136
  type Network = "public" | "private";
137
137
  /**
138
138
  * Per-call chain overrides. Pass exactly what you need to override —
139
- * `network` selects between the SDK's known chains, `blockchainRid` /
140
- * `nodeUrls` pin a fully custom chain. Pass none of these to fall back
141
- * to the SDK's defaults (or to org-resolved chain when `orgName` is set).
139
+ * `network` selects between the SDK's known chains, `blockchainRid` pins a
140
+ * custom one, and `endpoint` names the Dashboard the calls travel over. Pass
141
+ * none of these to fall back to the SDK's defaults (or to the org-resolved
142
+ * chain when `orgName` is set).
142
143
  */
143
144
  interface ChainOpts {
144
145
  network?: Network;
145
146
  blockchainRid?: string;
147
+ /**
148
+ * No longer dialled: memory reaches the chain through the Dashboard. Kept
149
+ * because callers and the other bindings still carry it as chain config.
150
+ */
146
151
  nodeUrls?: readonly string[];
152
+ /**
153
+ * Dashboard base URL. Memory reaches the chain through it, so this is where
154
+ * those requests go; defaults to the endpoint compiled into the core.
155
+ */
156
+ endpoint?: string;
147
157
  }
148
158
  /** Canonical verdict after normalization. */
149
159
  type Verdict = "ALLOW" | "HOLD" | "BLOCK" | "No verdict";
@@ -527,12 +537,6 @@ declare class Atbash {
527
537
  */
528
538
  private _agentExistsCache;
529
539
  private static readonly AGENT_EXISTS_TTL_MS;
530
- /**
531
- * Cached bearer token for risk-engine / insurance read calls. Built
532
- * lazily as a signed `log_tool_call` tx and refreshed every 4 min so
533
- * server-side replay protection windows never expire it mid-session.
534
- */
535
- private _authBearers;
536
540
  /** Guards `logEnvironmentOnce` — hosts construct several clients. */
537
541
  private static environmentLogged;
538
542
  constructor(privkey: string, options?: AtbashOptions);
@@ -555,6 +559,48 @@ declare class Atbash {
555
559
  * validated against the trusted allowlist / self-hosted policy; a
556
560
  * self-hosted endpoint's `verifyPubKey` becomes the client default.
557
561
  */
562
+ /**
563
+ * Decide which key this client signs as.
564
+ *
565
+ * Most specific wins: a key passed in code, then a key file the host named,
566
+ * then the environment, then the default key file. `config.json` is absent
567
+ * from that list on purpose — it is a settings file, writable by anything
568
+ * that can write the user's home and read by every Atbash integration on the
569
+ * machine, so letting it name the key meant one stray value silently
570
+ * re-pointed who each of them signed as.
571
+ *
572
+ * A named `keyPath` that does not exist throws rather than falling through.
573
+ * The caller said which file holds its identity; quietly signing as a
574
+ * different one is the outcome worth refusing.
575
+ *
576
+ * @param options - The `fromConfig` options, read for `agentKey` and `keyPath`.
577
+ * @returns The resolved agent identity.
578
+ * @throws When a named key file is missing, or no identity can be found.
579
+ */
580
+ private static resolveIdentity;
581
+ /**
582
+ * Add the one thing a machine with no key file needs to hear.
583
+ *
584
+ * This is the only path where the operator cannot see what happened: no key
585
+ * file, and the key they are looking for sits in `config.json`, which no
586
+ * longer selects the identity. A bare "key file not found" sends them hunting
587
+ * for a key they already have. Only this branch gets the hint — a caller who
588
+ * named a `keyPath` is told about that path, where a stranded key is noise.
589
+ *
590
+ * @param err - The "key file not found" error from the default lookup.
591
+ * @returns The same error, or one that also names the key in config.json.
592
+ */
593
+ private static explainStrandedKey;
594
+ /**
595
+ * Say so when `config.json` still holds an agent key.
596
+ *
597
+ * Nothing signs with it any more, and silence would leave an operator
598
+ * believing one identity is in force while another is. The pubkey is named,
599
+ * not the key, so the line is safe in a log.
600
+ *
601
+ * @param logger - The host logger, when one was supplied.
602
+ */
603
+ private static warnOnStrandedKey;
558
604
  static fromConfig(options?: FromConfigOptions): Atbash;
559
605
  get pubkey(): string;
560
606
  get privkey(): string;
@@ -939,22 +985,6 @@ declare const BOOT_SYNC_HINT = "check the chain endpoint and orgName if the caus
939
985
  */
940
986
  declare function bootSyncFailureLine(cause: unknown): string;
941
987
 
942
- /**
943
- * Make a chain query result crossable at the NAPI boundary.
944
- *
945
- * `postchain-client` decodes a Rell `byte_array` into a Node `Buffer`. The
946
- * core's `parse*` functions take `serde_json::Value`, and NAPI-RS cannot
947
- * convert a `Buffer` into one — it reaches the methods every `Uint8Array`
948
- * inherits and fails with "JS functions cannot be represented as a
949
- * serde_json::Value", which names functions for what is a plain Buffer.
950
- *
951
- * The conversion has to happen here because the failure is in the argument
952
- * conversion, before any core code runs. Of the shapes the core accepts —
953
- * hex string, `[u8]`, `{ data: [...] }` — hex is the cheapest to produce.
954
- */
955
- /** Recursively rewrite byte containers to hex, leaving everything else as-is. */
956
- declare function gtvToFfiSafe(value: unknown): unknown;
957
-
958
988
  /** Derive the 32-byte AES key from an agent's secp256k1 privkey (hex). Deterministic — same privkey always yields the same key. */
959
989
  declare function deriveMemoryKey(privkey: string): Promise<Buffer>;
960
990
  /** Encrypt UTF-8 plaintext. `ciphertext` has the 16-byte GCM auth tag appended, matching the SDK's on-chain byte layout. */
@@ -993,7 +1023,7 @@ interface CommitMemoryOptions {
993
1023
  filePath?: string;
994
1024
  /** Org name — when set, the SDK resolves which chain the agent lives on. */
995
1025
  orgName?: string;
996
- /** Atbash service endpoint for org→chain lookup. */
1026
+ /** Atbash service endpoint — where memory reaches the chain, and the org→chain lookup. */
997
1027
  endpoint?: string;
998
1028
  /** Self-hosted judge response-signing pubkey; required with a non-allowlisted `endpoint`. */
999
1029
  verifyPubKey?: string;
@@ -1001,6 +1031,7 @@ interface CommitMemoryOptions {
1001
1031
  }
1002
1032
  interface RollbackMemoryOptions {
1003
1033
  orgName?: string;
1034
+ /** Atbash service endpoint — where memory reaches the chain, and the org→chain lookup. */
1004
1035
  endpoint?: string;
1005
1036
  /** Self-hosted judge response-signing pubkey; required with a non-allowlisted `endpoint`. */
1006
1037
  verifyPubKey?: string;
@@ -1174,6 +1205,17 @@ interface GuardMemoryWriteInput extends ClassifyMemoryWriteOptions {
1174
1205
  debug?: boolean;
1175
1206
  /** Optional logger for debug probe + persist-failure warnings. */
1176
1207
  logger?: GuardLogger;
1208
+ /** Agent home directory names to accept beyond the built-in list. */
1209
+ agentHomeDirs?: string[];
1210
+ /**
1211
+ * Root the caller keeps memory under, when it is not an agent home.
1212
+ *
1213
+ * Only pass a value the host stated outright. A root defaulted from the
1214
+ * process working directory would make whichever directory the host happened
1215
+ * to start in look like a memory store — which is how a stray MEMORY.md once
1216
+ * ended up inside a plugin checkout.
1217
+ */
1218
+ memoryRoot?: string;
1177
1219
  }
1178
1220
  /** Plugin-facing decision. Shape mirrors what plugins return from `before_tool_call`. */
1179
1221
  interface GuardMemoryDecision {
@@ -1191,21 +1233,6 @@ interface GuardMemoryWriteResult {
1191
1233
  /** Present when handled. True only after the chain transaction confirms. */
1192
1234
  committed?: boolean;
1193
1235
  }
1194
- /**
1195
- * Guarded memory-write flow. Returns `{ handled: false }` when the tool
1196
- * call isn't a memory write, otherwise returns a `decision` the plugin
1197
- * should return from its hook.
1198
- *
1199
- * Verdict handling:
1200
- * - `red` → not persisted to chain; decision blocks (unless `enforce: false`)
1201
- * - `yellow` → persisted with its LLM score; decision allows once the chain confirms
1202
- * - `green` → persisted with its LLM score; decision allows once the chain confirms
1203
- * - anything else → not persisted; decision blocks (unless `enforce: false`)
1204
- *
1205
- * A write is acknowledged only after the chain transaction confirms, for
1206
- * yellow exactly as for green. An unconfirmed write blocks in enforce mode
1207
- * and remains unaudited in observe mode.
1208
- */
1209
1236
  declare function guardMemoryWrite(input: GuardMemoryWriteInput): Promise<GuardMemoryWriteResult>;
1210
1237
 
1211
1238
  /**
@@ -1269,10 +1296,19 @@ declare class PointerStore {
1269
1296
  private cache;
1270
1297
  private loading;
1271
1298
  constructor(filePath: string);
1272
- /** Resolves the pointer for `agentPubkeyHex`, or a zero-pointer that will force a sync on first use. */
1273
- get(agentPubkeyHex: string): Promise<MemoryPointer>;
1274
- /** Persists an updated pointer. Failures are swallowed to a logger callback (if provided) so sync never blocks the caller. */
1275
- set(agentPubkeyHex: string, pointer: MemoryPointer, onError?: (err: Error) => void): Promise<void>;
1299
+ /**
1300
+ * The pointer for one agent's file, or a zero-pointer forcing a sync.
1301
+ *
1302
+ * @param filePath - The file's chain slot, i.e. its basename.
1303
+ */
1304
+ get(agentPubkeyHex: string, filePath: string): Promise<MemoryPointer>;
1305
+ /**
1306
+ * Persist one file's pointer, leaving the agent's other files alone.
1307
+ *
1308
+ * Write failures are reported to `onError` rather than thrown: a cache that
1309
+ * cannot be written must not take down the read it was speeding up.
1310
+ */
1311
+ set(agentPubkeyHex: string, filePath: string, pointer: MemoryPointer, onError?: (err: Error) => void): Promise<void>;
1276
1312
  private ensureLoaded;
1277
1313
  private loadOnce;
1278
1314
  private persist;
@@ -1367,6 +1403,17 @@ interface MemoryGuardManagerOptions {
1367
1403
  workspaceDir: string;
1368
1404
  /** Absolute MEMORY.md path. Default `<workspaceDir>/MEMORY.md`. */
1369
1405
  memoryFilePath?: string;
1406
+ /**
1407
+ * Root this host keeps memory under, when it is not an agent home.
1408
+ *
1409
+ * Only set this from a value the host stated outright — never from
1410
+ * `process.cwd()`. A guessed root makes whichever directory the host started
1411
+ * in look like a memory store, which is how a stray MEMORY.md once ended up
1412
+ * inside a plugin checkout.
1413
+ */
1414
+ memoryRoot?: string;
1415
+ /** Agent home directory names to accept beyond the built-in list. */
1416
+ agentHomeDirs?: string[];
1370
1417
  /** Persistent pointer file. Default `<workspaceDir>/.atbash/memory-pointer.json`. */
1371
1418
  pointerFilePath?: string;
1372
1419
  /** File-backed log. Default `<workspaceDir>/.atbash/plugin.log`. */
@@ -1413,6 +1460,10 @@ declare class MemoryGuardManager {
1413
1460
  private readonly pointerStore;
1414
1461
  private readonly logger;
1415
1462
  private readonly memoryFilePath;
1463
+ /** Base for resolving the relative paths a host sends. */
1464
+ private readonly workspaceDir;
1465
+ /** Set by `verifyOneFile` when the file it checked was actually on chain. */
1466
+ private lastVerified;
1416
1467
  private readonly ttlMs;
1417
1468
  private readonly rollbackMinScore;
1418
1469
  private readonly enforce;
@@ -1430,6 +1481,14 @@ declare class MemoryGuardManager {
1430
1481
  private _resolvedChainOpts;
1431
1482
  private _resolveChainInflight?;
1432
1483
  constructor(opts: MemoryGuardManagerOptions);
1484
+ /**
1485
+ * Carry this manager's host into `chainOpts`.
1486
+ *
1487
+ * Memory reads reach the chain through that host, and they are handed only
1488
+ * `chainOpts` — without this a self-hosted deployment would read from the
1489
+ * compiled-in default host while writing to its own.
1490
+ */
1491
+ private withEndpoint;
1433
1492
  /**
1434
1493
  * Resolve `orgName` → chain once, cache forever. `commitMemoryVersion`
1435
1494
  * already does this for writes; without the same call on the read
@@ -1447,15 +1506,27 @@ declare class MemoryGuardManager {
1447
1506
  */
1448
1507
  runBootProbe(): Promise<void>;
1449
1508
  /**
1450
- * Returns a `HookDecision` when the guard reached a decision about this event.
1451
- * Returns `null` for non-memory events, other files this manager does not
1452
- * own, or unverified observe-mode reads. An enforced read of the managed
1453
- * file blocks when verification cannot complete.
1509
+ * Bring one chain file into step with its local counterpart.
1454
1510
  *
1455
- * A returned decision carries `audited` (see `HookDecision`). Only
1456
- * `{ allow: true, audited: true }` means "checked and cleared"; anything else
1457
- * that allows is a call the host still needs to judge.
1511
+ * Only a file that already exists locally is touched. Restoring one that is
1512
+ * absent would mean choosing where to create it, and the root is a guess the
1513
+ * moment more than one could apply — the same guess that once wrote a
1514
+ * MEMORY.md into a plugin checkout.
1515
+ *
1516
+ * @returns What happened, for the single summary line the caller logs.
1458
1517
  */
1518
+ private syncOneAtBoot;
1519
+ /**
1520
+ * Where a chain slot's file lives locally, or null when we do not have it.
1521
+ *
1522
+ * A stated root is tried first, then each agent home that actually exists in
1523
+ * the user's home directory — the same rule that produced the slot, run
1524
+ * backwards. Only an existing file is returned: creating one would mean
1525
+ * picking a root, and picking is guessing.
1526
+ */
1527
+ private locate;
1528
+ /** Roots a chain slot may be joined to, most specific first. */
1529
+ private memoryRoots;
1459
1530
  handleBeforeToolCall(event: unknown, ctx: unknown): Promise<HookDecision | null>;
1460
1531
  private mapGuardResult;
1461
1532
  /**
@@ -1473,12 +1544,70 @@ declare class MemoryGuardManager {
1473
1544
  * also covers events carrying two different path keys, where the classifier
1474
1545
  * and the host could otherwise disagree about which one is authoritative.
1475
1546
  */
1476
- private vouchesForTarget;
1547
+ /**
1548
+ * The memory files this tool call reads, as absolute paths.
1549
+ *
1550
+ * Relative paths resolve against the workspace, not `process.cwd()`. The host
1551
+ * sends paths relative to the agent's workspace; resolving them against the
1552
+ * process's own directory made the guard protect whichever directory the host
1553
+ * happened to start in, which on one machine was a plugin checkout.
1554
+ *
1555
+ * @returns Every named target, de-duplicated; empty when the call names none.
1556
+ */
1557
+ private readTargets;
1558
+ /**
1559
+ * Say what the read classifier saw and what it concluded.
1560
+ *
1561
+ * The write path has `emitDebugProbe`; this is its counterpart, so a tool
1562
+ * call can be followed across the fork instead of only after it. `false` here
1563
+ * is the normal answer for a write — it means the call goes to the write
1564
+ * classifier next, not that it was ignored.
1565
+ *
1566
+ * @param isMemoryRead - What `classifyMemoryRead` returned.
1567
+ */
1568
+ private emitReadProbe;
1569
+ /**
1570
+ * The chain slot for a path, or null when the file gets no chain record.
1571
+ *
1572
+ * One helper so the boot probe and every read agree: taking a basename in one
1573
+ * place and a relative path in the other would verify a file against a record
1574
+ * that is not its own.
1575
+ */
1576
+ private slotFor;
1577
+ /**
1578
+ * Verify every memory file this call reads, each against its own chain slot.
1579
+ *
1580
+ * A call naming several files is only cleared when all of them are, so one
1581
+ * unverifiable file cannot ride along with a verified one.
1582
+ *
1583
+ * @returns A block for the first file that fails, an audited allow when all
1584
+ * were verified, or null when none of them is on chain.
1585
+ */
1477
1586
  private handleMemoryRead;
1587
+ /**
1588
+ * Check one memory file against the chain slot of the same name.
1589
+ *
1590
+ * A file with no chain version is passed through rather than blocked: there
1591
+ * is no claim to protect, so refusing would only stop an agent reading memory
1592
+ * it has never committed. A file that IS on chain must match, or the read is
1593
+ * refused — that is the whole guarantee.
1594
+ *
1595
+ * @returns A decision when the read must not proceed, else null.
1596
+ */
1597
+ private verifyOneFile;
1478
1598
  /** Complete queued audit-log writes before a host shuts down or removes its workspace. */
1479
1599
  flushLogs(): Promise<void>;
1600
+ /**
1601
+ * A read this guard could not verify.
1602
+ *
1603
+ * Enforcing, that is a block. Observing, the host audits it as usual — but
1604
+ * the reason is said out loud either way, or an unverified read looks
1605
+ * identical to a clean one in the log.
1606
+ */
1480
1607
  private unverifiedRead;
1481
1608
  private writeMemoryAtomic;
1609
+ /** Replace `target` in one step, so a reader never sees a half-written file. */
1610
+ private writeFileAtomic;
1482
1611
  }
1483
1612
  declare function createMemoryGuardManager(opts: MemoryGuardManagerOptions): MemoryGuardManager;
1484
1613
 
@@ -1631,4 +1760,4 @@ declare function containsSecret(text: string): boolean;
1631
1760
  declare function createMemorySnapshot(entries: MemoryEntry[], takenAt: number): MemorySnapshot;
1632
1761
  declare function diffMemorySnapshots(before: MemorySnapshot, after: MemorySnapshot): MemoryDiffResult;
1633
1762
 
1634
- export { type ActionType, type AgentAuth, type AgentLookupOptions, type AgentMemoryEntry, type AgentPolicy, type AnomalySeverity, type AnomalyType, Atbash, AtbashAPIError, type AtbashLogger, type AtbashOptions, type AtbashUserConfig, BOOT_SYNC_HINT, type ChainConfig, type ChainOpts, type ClassifierToolContext, type ClassifierToolEvent, type ClassifyMemoryReadOptions, type ClassifyMemoryWriteOptions, type ClientSource, type CommitMemoryOptions, DEFAULT_BLOCKCHAIN_RID, DEFAULT_CHROMIA_NODE_URLS, DEFAULT_ENDPOINT, DEFAULT_MEMORY_PATH_PATTERNS, DEFAULT_MEMORY_READ_TOOL_NAMES, DEFAULT_MEMORY_WRITE_TOOL_NAMES, type Decision, type DecisionVerdict, EciesDomain, type EncryptedMemory, type Envelope, type FromConfigOptions, type GuardLogger, type GuardMemoryDecision, type GuardMemoryWriteInput, type GuardMemoryWriteResult, type HeldAction, type HeldActionReview, type HookDecision, HttpClient, HttpTransportError, type JudgeEndpointConfig, type JudgeOptions, type JudgeResult, type JudgmentState, type JudgmentStatus, KEY_FILENAMES, type KeyPair, type LogToolCallOptions, type LogToolCallResult, type MemoryAnomaly, type MemoryDiffResult, type MemoryEntry, MemoryGuardManager, type MemoryGuardManagerOptions, MemoryIntegrityError, type MemoryPointer, type MemoryRollbackEvent, type MemoryScanOptions, type MemoryScanResult, type MemoryScanVerdict, type MemorySnapshot, type ModifiedEntry, type Network, type OrgSubscription, PRIVATE_CHAIN, PUBLIC_CHAIN, PointerStore, type Provider, type PubkeyValue, type RedactResult, type RollbackMemoryOptions, type SecretKind, type SecretMatch, SignatureVerificationError, type Subscription, type SyncMemoryOptions, type SyncMemoryResult, type TelemetryConfig, type TierInfo, type ToolCallFull, type ToolCallInput, type ToolCallRecord, type ValidatedEndpoint, type Verdict, type WrappedLogger, bootSyncFailureLine, buildAllowedJudgeHosts, canonicalAllow, chainForNetwork, chooseKeyPath, claimHashHex, classifyMemoryRead, classifyMemoryWrite, columnAad, commitMemoryVersion, containsEvasionCharacters, containsSecret, createFileLogger, createMemoryGuardManager, createMemorySnapshot, decryptForOrg, decryptMemoryContent, defaultPluginLogPath, defaultPointerPath, deriveMemoryKey, derivePublicKey, diffMemorySnapshots, encryptForOrg, encryptMemoryContent, encryptedLength, flushTelemetry, generateKeypair, getActiveAgentMemory, getActiveMemoryId, getConfigDir, getConfigPath, getMemoryById, getMemoryHistory, getRecentAgentMemory, getRollbackHistory, gtvToFfiSafe, guardMemoryWrite, isEnvelope, isValidPrivateKey, keyFingerprintOf, keyPathCandidates, loadAgent, loadAgentFromFile, loadUserConfig, normalizeActionForHash, normalizeActionType, normalizeForMatching, normalizeStatus, normalizeVerdict, packEnvelope, parseEnvelope, pubkeyToHex, recordCall, recordDuration, redactJsonStrings, redactSecrets, resolve, resolveKeyPath, rollbackMemory, saveUserConfig, scanMemory, scanMemoryBatch, setupTelemetry, shutdownTelemetry, signEncryptedToolCall, signJudgeAction, signLogToolCall, syncLocalMemory, validateJudgeEndpoint, verifyJudgeResponseSignature, verifySignature };
1763
+ export { type ActionType, type AgentAuth, type AgentLookupOptions, type AgentMemoryEntry, type AgentPolicy, type AnomalySeverity, type AnomalyType, Atbash, AtbashAPIError, type AtbashLogger, type AtbashOptions, type AtbashUserConfig, BOOT_SYNC_HINT, type ChainConfig, type ChainOpts, type ClassifierToolContext, type ClassifierToolEvent, type ClassifyMemoryReadOptions, type ClassifyMemoryWriteOptions, type ClientSource, type CommitMemoryOptions, DEFAULT_BLOCKCHAIN_RID, DEFAULT_CHROMIA_NODE_URLS, DEFAULT_ENDPOINT, DEFAULT_MEMORY_PATH_PATTERNS, DEFAULT_MEMORY_READ_TOOL_NAMES, DEFAULT_MEMORY_WRITE_TOOL_NAMES, type Decision, type DecisionVerdict, EciesDomain, type EncryptedMemory, type Envelope, type FromConfigOptions, type GuardLogger, type GuardMemoryDecision, type GuardMemoryWriteInput, type GuardMemoryWriteResult, type HeldAction, type HeldActionReview, type HookDecision, HttpClient, HttpTransportError, type JudgeEndpointConfig, type JudgeOptions, type JudgeResult, type JudgmentState, type JudgmentStatus, KEY_FILENAMES, type KeyPair, type LogToolCallOptions, type LogToolCallResult, type MemoryAnomaly, type MemoryDiffResult, type MemoryEntry, MemoryGuardManager, type MemoryGuardManagerOptions, MemoryIntegrityError, type MemoryPointer, type MemoryRollbackEvent, type MemoryScanOptions, type MemoryScanResult, type MemoryScanVerdict, type MemorySnapshot, type ModifiedEntry, type Network, type OrgSubscription, PRIVATE_CHAIN, PUBLIC_CHAIN, PointerStore, type Provider, type PubkeyValue, type RedactResult, type RollbackMemoryOptions, type SecretKind, type SecretMatch, SignatureVerificationError, type Subscription, type SyncMemoryOptions, type SyncMemoryResult, type TelemetryConfig, type TierInfo, type ToolCallFull, type ToolCallInput, type ToolCallRecord, type ValidatedEndpoint, type Verdict, type WrappedLogger, bootSyncFailureLine, buildAllowedJudgeHosts, canonicalAllow, chainForNetwork, chooseKeyPath, claimHashHex, classifyMemoryRead, classifyMemoryWrite, columnAad, commitMemoryVersion, containsEvasionCharacters, containsSecret, createFileLogger, createMemoryGuardManager, createMemorySnapshot, decryptForOrg, decryptMemoryContent, defaultPluginLogPath, defaultPointerPath, deriveMemoryKey, derivePublicKey, diffMemorySnapshots, encryptForOrg, encryptMemoryContent, encryptedLength, flushTelemetry, generateKeypair, getActiveAgentMemory, getActiveMemoryId, getConfigDir, getConfigPath, getMemoryById, getMemoryHistory, getRecentAgentMemory, getRollbackHistory, guardMemoryWrite, isEnvelope, isValidPrivateKey, keyFingerprintOf, keyPathCandidates, loadAgent, loadAgentFromFile, loadUserConfig, normalizeActionForHash, normalizeActionType, normalizeForMatching, normalizeStatus, normalizeVerdict, packEnvelope, parseEnvelope, pubkeyToHex, recordCall, recordDuration, redactJsonStrings, redactSecrets, resolve, resolveKeyPath, rollbackMemory, saveUserConfig, scanMemory, scanMemoryBatch, setupTelemetry, shutdownTelemetry, signEncryptedToolCall, signJudgeAction, signLogToolCall, syncLocalMemory, validateJudgeEndpoint, verifyJudgeResponseSignature, verifySignature };