@muhkoo/connect 0.10.9-alpha.0 → 0.10.11-alpha.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.
@@ -4120,31 +4120,37 @@ class FileStorage {
4120
4120
  */
4121
4121
  async writeFileToShards(input) {
4122
4122
  await this.codec.ready(this.rsWasmModule);
4123
- const data = await toUint8Array(input.data);
4124
4123
  const fileId = input.fileId ?? generateId();
4125
4124
  const createdAt = Date.now();
4126
4125
  const chunks = [];
4127
- const totalChunks = Math.max(1, Math.ceil(data.length / this.chunkSize));
4126
+ // Read the source per-chunk so the peak memory footprint stays at
4127
+ // ~chunkSize even for multi-GB files. A Blob/File is sliced lazily (only
4128
+ // the current chunk's bytes are materialized) — reading the whole thing
4129
+ // up front would blow past the browser's ~2GB ArrayBuffer cap and throw
4130
+ // "the file could not be read". A caller that already has the bytes in a
4131
+ // Uint8Array just gets zero-copy subarray views.
4132
+ const asBytes = input.data instanceof Uint8Array ? input.data : null;
4133
+ const size = asBytes ? asBytes.length : input.data.size;
4134
+ const readChunk = async (start, end) => asBytes ? asBytes.subarray(start, end)
4135
+ : new Uint8Array(await input.data.slice(start, end).arrayBuffer());
4136
+ const totalChunks = Math.max(1, Math.ceil(size / this.chunkSize));
4128
4137
  input.onProgress?.(0, totalChunks);
4129
- // Slicing + encrypting + encoding + uploading is done per-chunk so
4130
- // the peak memory footprint stays at ~chunkSize even for huge files.
4131
- // Within a chunk, the shard uploads are parallelized up to
4132
- // `this.concurrency`.
4133
- for (let chunkIndex = 0; chunkIndex * this.chunkSize < Math.max(1, data.length); chunkIndex++) {
4138
+ // Within a chunk, the shard uploads are parallelized up to `this.concurrency`.
4139
+ for (let chunkIndex = 0; chunkIndex * this.chunkSize < Math.max(1, size); chunkIndex++) {
4134
4140
  const start = chunkIndex * this.chunkSize;
4135
- const end = Math.min(start + this.chunkSize, data.length);
4136
- const plaintext = data.subarray(start, end);
4141
+ const end = Math.min(start + this.chunkSize, size);
4142
+ const plaintext = await readChunk(start, end);
4137
4143
  chunks.push(await this.writeChunk(plaintext, chunkIndex));
4138
4144
  input.onProgress?.(chunks.length, totalChunks);
4139
4145
  // Stop after one iteration if the file is empty — we still emit a
4140
4146
  // single zero-length chunk so the manifest has a stable shape.
4141
- if (data.length === 0)
4147
+ if (size === 0)
4142
4148
  break;
4143
4149
  }
4144
4150
  const manifest = {
4145
4151
  id: fileId,
4146
4152
  name: input.metadata.name,
4147
- size: data.length,
4153
+ size,
4148
4154
  type: input.metadata.type,
4149
4155
  path: input.metadata.path,
4150
4156
  lastModified: input.metadata.lastModified ?? createdAt,
@@ -4180,6 +4186,19 @@ class FileStorage {
4180
4186
  }
4181
4187
  return { data: out, stat: manifestToStat(manifest) };
4182
4188
  }
4189
+ /**
4190
+ * Streaming inverse of {@link writeFileToShards}: yields each chunk's
4191
+ * decrypted plaintext in order WITHOUT concatenating. Peak memory stays at
4192
+ * ~one chunk, so multi-GB files (which overflow a single `Uint8Array`) can be
4193
+ * piped straight to a file/socket. Same shard sourcing (cache → peers →
4194
+ * origin) and per-chunk auth as {@link readFileFromShards}.
4195
+ */
4196
+ async *readChunksFromShards(manifest) {
4197
+ await this.codec.ready(this.rsWasmModule);
4198
+ for (const chunkManifest of [...manifest.chunks].sort((a, b) => a.chunkIndex - b.chunkIndex)) {
4199
+ yield await this.readChunk(chunkManifest);
4200
+ }
4201
+ }
4183
4202
  // -------------------------------------------------------------------------
4184
4203
  // Space-backed convenience wrappers — encrypt + upload + write manifest.
4185
4204
  // Require a `SharedSpaceClient` to have been provided at construction.
@@ -4313,14 +4332,6 @@ class FileStorage {
4313
4332
  await Promise.all(workers);
4314
4333
  }
4315
4334
  }
4316
- /** Normalize `data` to a flat `Uint8Array`. */
4317
- async function toUint8Array(data) {
4318
- if (data instanceof Uint8Array)
4319
- return data;
4320
- // Blob covers File too (File extends Blob in every runtime we target).
4321
- const ab = await data.arrayBuffer();
4322
- return new Uint8Array(ab);
4323
- }
4324
4335
 
4325
4336
  /**
4326
4337
  * HTTP client for the gated file-manifest store on a SharedSpace
@@ -4526,8 +4537,12 @@ class AuthClient {
4526
4537
  * Read a factor record for `username` (returns an indistinguishable decoy if
4527
4538
  * absent). Gated types (email) require the recover `verifyToken`.
4528
4539
  */
4529
- async vaultRead(username, factorType, verifyToken) {
4530
- const res = await this.fetchFn(`${this.baseUrl}/api/auth/vault`, this.json("POST", { username, factorType, verifyToken }));
4540
+ async vaultRead(username, factorType, verifyToken,
4541
+ /** Passkeys are per-origin: naming the caller's host returns THAT origin's
4542
+ * passkey instead of whichever was enrolled first (which WebAuthn would
4543
+ * refuse). Ignored for other factor types. */
4544
+ rpId) {
4545
+ const res = await this.fetchFn(`${this.baseUrl}/api/auth/vault`, this.json("POST", { username, factorType, verifyToken, rpId }));
4531
4546
  return await this.parse("vaultRead", res);
4532
4547
  }
4533
4548
  /**
@@ -5057,7 +5072,7 @@ function base64UrlDecode(s) {
5057
5072
  * expect (and isn't serving a stale cached bundle). Keep this in sync with
5058
5073
  * `package.json` `version`.
5059
5074
  */
5060
- const VERSION = "0.10.9-alpha.0";
5075
+ const VERSION = "0.10.11-alpha.0";
5061
5076
 
5062
5077
  /**
5063
5078
  * `HttpClient` — the one place the unified {@link Client} talks to the
@@ -5118,6 +5133,8 @@ class HttpClient {
5118
5133
  /** Origin of {@link baseUrl} — credentials are only attached same-origin. */
5119
5134
  baseOrigin;
5120
5135
  apiKey;
5136
+ /** Scoped machine access token — takes precedence over {@link apiKey} on `X-Muhkoo-Key`. */
5137
+ accessToken;
5121
5138
  getSessionToken;
5122
5139
  onUnauthorized;
5123
5140
  fetchFn;
@@ -5132,6 +5149,7 @@ class HttpClient {
5132
5149
  this.baseOrigin = "";
5133
5150
  }
5134
5151
  this.apiKey = opts.apiKey ?? null;
5152
+ this.accessToken = opts.accessToken ?? null;
5135
5153
  this.getSessionToken = opts.getSessionToken ?? (() => null);
5136
5154
  this.onUnauthorized = opts.onUnauthorized ?? null;
5137
5155
  const f = opts.fetch ?? globalThis.fetch;
@@ -5152,8 +5170,11 @@ class HttpClient {
5152
5170
  // server-reflected path that escapes `baseUrl`) must NOT receive the app
5153
5171
  // key or session token, or it becomes a token-exfiltration vector.
5154
5172
  if (this.isSameOrigin(input)) {
5155
- if (this.apiKey)
5156
- headers.set("X-Muhkoo-Key", this.apiKey);
5173
+ // Access token and app key resolve through the same accelerator path
5174
+ // and ride the same header; the access token takes precedence.
5175
+ const key = this.accessToken ?? this.apiKey;
5176
+ if (key)
5177
+ headers.set("X-Muhkoo-Key", key);
5157
5178
  const token = this.getSessionToken();
5158
5179
  if (token)
5159
5180
  headers.set("X-Muhkoo-Session", token);
@@ -5567,6 +5588,35 @@ async function passkeyPrfCapable() {
5567
5588
  function defaultRpId() {
5568
5589
  return typeof location !== "undefined" ? location.hostname : "";
5569
5590
  }
5591
+ /**
5592
+ * Can a passkey enrolled under `rpId` be used from the CURRENT origin?
5593
+ *
5594
+ * WebAuthn only accepts an RP id that is the origin's own host or a registrable
5595
+ * *parent* of it — so a passkey enrolled on `app.example.com` is unusable on
5596
+ * `app.example.net`, and one enrolled on a full host is unusable from a sibling
5597
+ * host. An app served on BOTH a custom domain and the platform host therefore
5598
+ * needs one passkey per origin.
5599
+ *
5600
+ * Call this BEFORE `navigator.credentials.get()`: passing a foreign rpId throws
5601
+ * a raw "The requested RPID did not match the origin or related origins", which
5602
+ * is a dead end for the user. Checking first lets the caller fall back to normal
5603
+ * sign-in (and offer to enroll a passkey for this origin) instead.
5604
+ */
5605
+ function rpIdUsableForOrigin(rpId, host) {
5606
+ const h = host ?? (typeof location !== "undefined" ? location.hostname : "");
5607
+ if (!rpId || !h)
5608
+ return false;
5609
+ return h === rpId || h.endsWith(`.${rpId}`);
5610
+ }
5611
+ /** Thrown when the account's passkey belongs to a different origin. Callers
5612
+ * should treat this as "no passkey here" and fall back to another factor. */
5613
+ class PasskeyOriginError extends Error {
5614
+ code = "passkey_wrong_origin";
5615
+ constructor(message = "No passkey is enrolled for this site. Sign in another way, then add one for this device.") {
5616
+ super(message);
5617
+ this.name = "PasskeyOriginError";
5618
+ }
5619
+ }
5570
5620
  /**
5571
5621
  * Create a passkey with PRF and return its credential id, a fresh PRF salt, and
5572
5622
  * the PRF output for that salt. Throws if the authenticator can't do PRF.
@@ -6260,12 +6310,22 @@ class ZkAuth {
6260
6310
  * its PRF, unwraps the master seed → identity → session.
6261
6311
  */
6262
6312
  async loginWithPasskey(username, opts = {}) {
6263
- const { factor } = await this.deps.auth.vaultRead(username, "passkey");
6313
+ // Ask for THIS origin's passkey — they're enrolled per-origin, so the
6314
+ // account's first passkey may belong to a different host entirely.
6315
+ const host = defaultRpId();
6316
+ const { factor } = await this.deps.auth.vaultRead(username, "passkey", undefined, host);
6264
6317
  const params = factor?.params;
6265
6318
  if (!factor?.wrap || !factor?.iv || !params?.credentialId || !params?.prfSalt) {
6266
6319
  throw new Error("No passkey is set up for this account.");
6267
6320
  }
6268
- const prfOutput = await evaluatePasskeyPrf(params.rpId ?? defaultRpId(), fromBase64(params.credentialId), fromBase64(params.prfSalt));
6321
+ const rpId = params.rpId ?? host;
6322
+ // Refuse a foreign rpId up front: WebAuthn would throw a raw "requested
6323
+ // RPID did not match the origin", which reads as a hard failure to the
6324
+ // user. A typed error lets the app fall back to another factor and offer
6325
+ // to enroll a passkey for this origin.
6326
+ if (!rpIdUsableForOrigin(rpId, host))
6327
+ throw new PasskeyOriginError();
6328
+ const prfOutput = await evaluatePasskeyPrf(rpId, fromBase64(params.credentialId), fromBase64(params.prfSalt));
6269
6329
  const key = await wrapKeyFromBytes(prfOutput, "muhkoo-passkey-wrap");
6270
6330
  const seed = await unwrapSeed({ iv: factor.iv, ct: factor.wrap }, key);
6271
6331
  const identity = await deriveIdentityFromSeed(seed);
@@ -6285,6 +6345,27 @@ class ZkAuth {
6285
6345
  const { factors } = await this.deps.auth.vaultFactors(token);
6286
6346
  return factors;
6287
6347
  }
6348
+ /**
6349
+ * Is a passkey enrolled that can unlock from THIS origin?
6350
+ *
6351
+ * Passkeys are origin-bound, so an app served on both a custom domain and the
6352
+ * platform host needs one per host. Use this to decide whether to offer
6353
+ * "Unlock with passkey" or go straight to sign-in — prompting with another
6354
+ * origin's passkey fails with a raw WebAuthn error. Requires a session
6355
+ * (metadata read); returns false when signed out or unsupported.
6356
+ */
6357
+ async hasPasskeyForThisOrigin() {
6358
+ if (!passkeySupported())
6359
+ return false;
6360
+ try {
6361
+ const host = defaultRpId();
6362
+ const factors = await this.listFactors();
6363
+ return factors.some((f) => f.type === "passkey" && rpIdUsableForOrigin(f.rpId, host));
6364
+ }
6365
+ catch {
6366
+ return false;
6367
+ }
6368
+ }
6288
6369
  /** Remove a login method by id (can't remove your only one). Session-authed. */
6289
6370
  async removeFactor(id) {
6290
6371
  const token = this.deps.session.token;
@@ -7617,6 +7698,13 @@ class Space {
7617
7698
  async getFile(manifest) {
7618
7699
  return this.fileStorage().readFileFromShards(manifest);
7619
7700
  }
7701
+ /** Streaming read: async-iterate a stored file's decrypted chunks in order,
7702
+ * never holding the whole file in memory. Use for multi-GB files (a single
7703
+ * `Uint8Array` can't hold them) — e.g. a transcoder piping the raw to a temp
7704
+ * file. Same peer/origin shard sourcing as {@link getFile}. */
7705
+ getFileStream(manifest) {
7706
+ return this.fileStorage().readChunksFromShards(manifest);
7707
+ }
7620
7708
  /** Declare a file's shards (ref++ + meter) for a manifest already stored —
7621
7709
  * used to back-fill accounting for files written before commit existed, or to
7622
7710
  * register a manifest received via sharing. `putFile` already commits new
@@ -10091,6 +10179,59 @@ class FunctionsNamespace {
10091
10179
  }
10092
10180
  }
10093
10181
 
10182
+ /**
10183
+ * `client.accessTokens` — manage an app's **access tokens**: scoped, expiring,
10184
+ * non-ZK machine-to-machine credentials (`mk_<env>_at_…`).
10185
+ *
10186
+ * const { plaintext } = await client.accessTokens.create(appId, {
10187
+ * scopes: ["db:read", "db:write"], env: "live", expiresInDays: 30,
10188
+ * label: "ci-runner",
10189
+ * });
10190
+ * // hand `plaintext` to the machine caller as its ClientOptions.accessToken
10191
+ *
10192
+ * These are MANAGEMENT calls — creating/listing/revoking tokens is authorized by
10193
+ * the developer session (same as the `agents`/`functions` namespaces). The token
10194
+ * itself resolves through the SAME accelerator path as an app key (the
10195
+ * `X-Muhkoo-Key` header), but is scoped to a fixed vocabulary of permissions and
10196
+ * expires. The plaintext is returned ONCE, on create — store it then; it can't
10197
+ * be read back.
10198
+ */
10199
+ /** All valid {@link Scope}s, in canonical order. */
10200
+ const ACCESS_TOKEN_SCOPES = [
10201
+ "db:read",
10202
+ "db:write",
10203
+ "kv:read",
10204
+ "kv:write",
10205
+ "storage:read",
10206
+ "storage:write",
10207
+ "messages:read",
10208
+ "messages:write",
10209
+ "functions:invoke",
10210
+ "ai:infer",
10211
+ ];
10212
+ class AccessTokensNamespace {
10213
+ deps;
10214
+ constructor(deps) {
10215
+ this.deps = deps;
10216
+ }
10217
+ /** List the app's access tokens (metadata only — never the plaintext). */
10218
+ async list(appId) {
10219
+ const res = await this.deps.http.get(this.path(appId, ""));
10220
+ return res.tokens ?? [];
10221
+ }
10222
+ /** Mint an access token (owner/editor only). The plaintext is returned once. */
10223
+ async create(appId, input) {
10224
+ return this.deps.http.post(this.path(appId, ""), input);
10225
+ }
10226
+ /** Revoke an access token by its `keyId`. */
10227
+ async revoke(appId, keyId) {
10228
+ return this.deps.http.del(this.path(appId, `/${encodeURIComponent(keyId)}`));
10229
+ }
10230
+ path(appId, suffix) {
10231
+ return `/api/apps/${encodeURIComponent(appId)}/access-tokens${suffix}`;
10232
+ }
10233
+ }
10234
+
10094
10235
  /**
10095
10236
  * `ChatKeyVault` — SDK-owned lifecycle for a member's long-lived ratchet/space
10096
10237
  * keypair (the connect `KeyStore` entry keyed by the member id / username).
@@ -11338,6 +11479,8 @@ class Client {
11338
11479
  agents;
11339
11480
  /** Serverless functions — `client.functions.deploy(appId, …)`, etc. */
11340
11481
  functions;
11482
+ /** Access tokens — `client.accessTokens.create(appId, …)`, etc. */
11483
+ accessTokens;
11341
11484
  /** Offline cache + sync — `client.offline.status`, `client.offline.snapshot`, etc. */
11342
11485
  offline;
11343
11486
  session;
@@ -11391,6 +11534,7 @@ class Client {
11391
11534
  this.http = new HttpClient({
11392
11535
  baseUrl: this.baseUrl,
11393
11536
  apiKey: options.apiKey,
11537
+ accessToken: options.accessToken,
11394
11538
  getSessionToken: () => this.session.token,
11395
11539
  fetch: reportingFetch,
11396
11540
  // Self-heal stale sessions: on a 401, try a silent re-auth (only
@@ -11467,6 +11611,7 @@ class Client {
11467
11611
  });
11468
11612
  this.agents = new AgentsNamespace({ http: this.http });
11469
11613
  this.functions = new FunctionsNamespace({ http: this.http, fnHostSuffix: options.functionsHostSuffix });
11614
+ this.accessTokens = new AccessTokensNamespace({ http: this.http });
11470
11615
  // Replay deferred shard uploads on reconnect. The bytes live in the
11471
11616
  // Cache API keyed by hash; re-PUT them through a (defer-free) shard
11472
11617
  // client so a failure surfaces as transient and the entry stays queued.
@@ -11616,6 +11761,7 @@ function MuhkooDB(meta) {
11616
11761
  table: meta.table ?? String(propertyKey),
11617
11762
  access: meta.access ?? "read",
11618
11763
  description: meta.description,
11764
+ backend: meta.backend ?? false,
11619
11765
  });
11620
11766
  });
11621
11767
  }
@@ -11655,9 +11801,12 @@ function ejectAgentPrompt(appClass) {
11655
11801
  for (const s of d.spaces)
11656
11802
  lines.push(`- ${s.name}: ${s.description}`);
11657
11803
  }
11658
- if (d.tables.length) {
11804
+ // Backend-only tables are deliberately withheld — the agent should never be
11805
+ // told about server-managed / internal state it can't (and shouldn't) touch.
11806
+ const promptTables = d.tables.filter((t) => !t.backend);
11807
+ if (promptTables.length) {
11659
11808
  lines.push("", "App database tables:");
11660
- for (const t of d.tables) {
11809
+ for (const t of promptTables) {
11661
11810
  const verbs = t.access === "write"
11662
11811
  ? "read & write — db_query/db_get/db_insert/db_update/db_delete"
11663
11812
  : "read-only — db_query/db_get";
@@ -11675,7 +11824,7 @@ function ejectAgentPrompt(appClass) {
11675
11824
  // How to respond — the load-bearing behavioral contract. Without this, models
11676
11825
  // (especially gpt-oss) tend to run tool calls and then end their turn with no
11677
11826
  // user-facing message, so the user sees the work happen but gets no reply.
11678
- const hasTools = d.tables.length > 0 || d.functions.length > 0;
11827
+ const hasTools = promptTables.length > 0 || d.functions.length > 0;
11679
11828
  lines.push("", "How to respond:");
11680
11829
  if (hasTools) {
11681
11830
  lines.push("- When you need information or need to make a change, call your tools immediately — don't ask the user to do it, and don't describe or name the tools to them.", "- After your tool calls return, you MUST send one final reply to the channel, in plain language, that answers the request using the results.");
@@ -11885,5 +12034,5 @@ var bundledLoader = /*#__PURE__*/Object.freeze({
11885
12034
  default: loadRsWasm
11886
12035
  });
11887
12036
 
11888
- export { AES_GCM_IV_BYTES, AES_GCM_KEY_BYTES, AES_GCM_TAG_BYTES, AgentsNamespace, AuthClient, AuthNamespace, AuthPublicInput, Authenticator, BlockEngine, BroadcastChannel, BroadcastChannelEvents, ChannelExistsError, ChannelNotFoundError, ChunkCipher, Client, ConnectivityManager, DEFAULT_AUTH_BASE_URL, DEFAULT_BASE_URL, DEFAULT_FN_HOST_SUFFIX, DbCache, DoubleRatchet, DoubleRatchetCipher, DoubleRatchetManager, EncryptedSession, EventCore, EventCoreEvents, Field, Field as FieldElement, FileStorage, FunctionsNamespace, HLC, HashKnowledge, HttpClient, HttpError, IndexedDbStore, KEEPER_MEMBER_ID, KeyStore, KeyringClient, KvCache, KvNamespace, LocalEngineHost, LocalStorageSessionStore, MemorySessionStore, Message, Message as MessageDefault, MessageNamespace, MuhkooAgent, MuhkooDB, MuhkooFunction, MuhkooSpace, NoopStore, OfflineLockedError, OfflineManager, OutboundQueue, P2P_SUBJECT, PBKDF2_DEFAULT_ITERATIONS, PREIMAGE_POK_VERIFICATION_KEY, Packet, PeerExchange, PeerNetwork, PersonalSpaceClient, Poseidon, PreimagePoK, ReedSolomonCodec, Space as Room, SerializeMessage, SessionState, ShardCache, ShardClient, SharedSpaceClient, SnapshotNamespace, Space, SpaceCache, SpaceKeyring, SpaceNamespace, SpacePacketCipher, SpaceSignaler, StorageNamespace, SyncEngine, VaultUnavailableError, WSTransport, WebRtcTransport, WorkerEngineHost, ZERO_HLC, ZkAuth, buildCommitment, compareHlc, compilePrograms, decodeFromHex, decorators, decryptAesGcm, defaultCircuitUrls, defaultSessionStore, deleteBeatsWrite, deleteRegister, deriveAesKeyFromPassphrase, deriveBitsHkdf, deriveIdentity, deriveIdentityFromSeed, deriveMasterSeedFromPassword, ejectAgentPrompt, ejectAgentTools, emptyMap, emptyRegister, encodeToHex, encryptAesGcm, exportPublicKeyBase64, exportPublicKeyHex, generateAuthProof, generatePkce, getMuhkooAppDescriptor, getSubtle, initBn128Wasm, initRsWasm, initializeCircuits, isNewer, isOfflineCapable, isP2pCapable, isProvisional, manifestToStat, materializeRow, mergeMap, mergeMessage, mergeRegister, messageKey, pack, padHandle, poseidonHash, protocol, provisionalHandle, quickVerify, randomBytes, randomState, sealSeed, shardHash, signMessage, stableStringify, toField, tombstoneRow, unpack, unsealSeed, unwrapWithPassphrase, verify, verifyGroth16, verifyHashKnowledge, verifyPreimagePoK, wrapWithPassphrase, writeBeatsTombstone, writeColumns, writeRegister };
12037
+ export { ACCESS_TOKEN_SCOPES, AES_GCM_IV_BYTES, AES_GCM_KEY_BYTES, AES_GCM_TAG_BYTES, AccessTokensNamespace, AgentsNamespace, AuthClient, AuthNamespace, AuthPublicInput, Authenticator, BlockEngine, BroadcastChannel, BroadcastChannelEvents, ChannelExistsError, ChannelNotFoundError, ChunkCipher, Client, ConnectivityManager, DEFAULT_AUTH_BASE_URL, DEFAULT_BASE_URL, DEFAULT_FN_HOST_SUFFIX, DbCache, DoubleRatchet, DoubleRatchetCipher, DoubleRatchetManager, EncryptedSession, EventCore, EventCoreEvents, Field, Field as FieldElement, FileStorage, FunctionsNamespace, HLC, HashKnowledge, HttpClient, HttpError, IndexedDbStore, KEEPER_MEMBER_ID, KeyStore, KeyringClient, KvCache, KvNamespace, LocalEngineHost, LocalStorageSessionStore, MemorySessionStore, Message, Message as MessageDefault, MessageNamespace, MuhkooAgent, MuhkooDB, MuhkooFunction, MuhkooSpace, NoopStore, OfflineLockedError, OfflineManager, OutboundQueue, P2P_SUBJECT, PBKDF2_DEFAULT_ITERATIONS, PREIMAGE_POK_VERIFICATION_KEY, Packet, PasskeyOriginError, PeerExchange, PeerNetwork, PersonalSpaceClient, Poseidon, PreimagePoK, ReedSolomonCodec, Space as Room, SerializeMessage, SessionState, ShardCache, ShardClient, SharedSpaceClient, SnapshotNamespace, Space, SpaceCache, SpaceKeyring, SpaceNamespace, SpacePacketCipher, SpaceSignaler, StorageNamespace, SyncEngine, VaultUnavailableError, WSTransport, WebRtcTransport, WorkerEngineHost, ZERO_HLC, ZkAuth, buildCommitment, compareHlc, compilePrograms, createPasskeyWithPrf, decodeFromHex, decorators, decryptAesGcm, defaultCircuitUrls, defaultRpId, defaultSessionStore, deleteBeatsWrite, deleteRegister, deriveAesKeyFromPassphrase, deriveBitsHkdf, deriveIdentity, deriveIdentityFromSeed, deriveMasterSeedFromPassword, ejectAgentPrompt, ejectAgentTools, emptyMap, emptyRegister, encodeToHex, encryptAesGcm, evaluatePasskeyPrf, exportPublicKeyBase64, exportPublicKeyHex, generateAuthProof, generatePkce, getMuhkooAppDescriptor, getSubtle, initBn128Wasm, initRsWasm, initializeCircuits, isNewer, isOfflineCapable, isP2pCapable, isProvisional, manifestToStat, materializeRow, mergeMap, mergeMessage, mergeRegister, messageKey, pack, padHandle, passkeyPrfCapable, passkeySupported, poseidonHash, protocol, provisionalHandle, quickVerify, randomBytes, randomState, rpIdUsableForOrigin, sealSeed, shardHash, signMessage, stableStringify, toField, tombstoneRow, unpack, unsealSeed, unwrapWithPassphrase, verify, verifyGroth16, verifyHashKnowledge, verifyPreimagePoK, wrapWithPassphrase, writeBeatsTombstone, writeColumns, writeRegister };
11889
12038
  //# sourceMappingURL=index.js.map