@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.
- package/dist/browser/index.js +179 -30
- package/dist/browser/index.js.map +1 -1
- package/dist/connect.d.ts +203 -3
- package/dist/server/index.js +179 -30
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -2445,8 +2445,12 @@ class AuthClient {
|
|
|
2445
2445
|
* Read a factor record for `username` (returns an indistinguishable decoy if
|
|
2446
2446
|
* absent). Gated types (email) require the recover `verifyToken`.
|
|
2447
2447
|
*/
|
|
2448
|
-
async vaultRead(username, factorType, verifyToken
|
|
2449
|
-
|
|
2448
|
+
async vaultRead(username, factorType, verifyToken,
|
|
2449
|
+
/** Passkeys are per-origin: naming the caller's host returns THAT origin's
|
|
2450
|
+
* passkey instead of whichever was enrolled first (which WebAuthn would
|
|
2451
|
+
* refuse). Ignored for other factor types. */
|
|
2452
|
+
rpId) {
|
|
2453
|
+
const res = await this.fetchFn(`${this.baseUrl}/api/auth/vault`, this.json("POST", { username, factorType, verifyToken, rpId }));
|
|
2450
2454
|
return await this.parse("vaultRead", res);
|
|
2451
2455
|
}
|
|
2452
2456
|
/**
|
|
@@ -2976,7 +2980,7 @@ function base64UrlDecode(s) {
|
|
|
2976
2980
|
* expect (and isn't serving a stale cached bundle). Keep this in sync with
|
|
2977
2981
|
* `package.json` `version`.
|
|
2978
2982
|
*/
|
|
2979
|
-
const VERSION = "0.10.
|
|
2983
|
+
const VERSION = "0.10.11-alpha.0";
|
|
2980
2984
|
|
|
2981
2985
|
/**
|
|
2982
2986
|
* `HttpClient` — the one place the unified {@link Client} talks to the
|
|
@@ -3037,6 +3041,8 @@ class HttpClient {
|
|
|
3037
3041
|
/** Origin of {@link baseUrl} — credentials are only attached same-origin. */
|
|
3038
3042
|
baseOrigin;
|
|
3039
3043
|
apiKey;
|
|
3044
|
+
/** Scoped machine access token — takes precedence over {@link apiKey} on `X-Muhkoo-Key`. */
|
|
3045
|
+
accessToken;
|
|
3040
3046
|
getSessionToken;
|
|
3041
3047
|
onUnauthorized;
|
|
3042
3048
|
fetchFn;
|
|
@@ -3051,6 +3057,7 @@ class HttpClient {
|
|
|
3051
3057
|
this.baseOrigin = "";
|
|
3052
3058
|
}
|
|
3053
3059
|
this.apiKey = opts.apiKey ?? null;
|
|
3060
|
+
this.accessToken = opts.accessToken ?? null;
|
|
3054
3061
|
this.getSessionToken = opts.getSessionToken ?? (() => null);
|
|
3055
3062
|
this.onUnauthorized = opts.onUnauthorized ?? null;
|
|
3056
3063
|
const f = opts.fetch ?? globalThis.fetch;
|
|
@@ -3071,8 +3078,11 @@ class HttpClient {
|
|
|
3071
3078
|
// server-reflected path that escapes `baseUrl`) must NOT receive the app
|
|
3072
3079
|
// key or session token, or it becomes a token-exfiltration vector.
|
|
3073
3080
|
if (this.isSameOrigin(input)) {
|
|
3074
|
-
|
|
3075
|
-
|
|
3081
|
+
// Access token and app key resolve through the same accelerator path
|
|
3082
|
+
// and ride the same header; the access token takes precedence.
|
|
3083
|
+
const key = this.accessToken ?? this.apiKey;
|
|
3084
|
+
if (key)
|
|
3085
|
+
headers.set("X-Muhkoo-Key", key);
|
|
3076
3086
|
const token = this.getSessionToken();
|
|
3077
3087
|
if (token)
|
|
3078
3088
|
headers.set("X-Muhkoo-Session", token);
|
|
@@ -3486,6 +3496,35 @@ async function passkeyPrfCapable() {
|
|
|
3486
3496
|
function defaultRpId() {
|
|
3487
3497
|
return typeof location !== "undefined" ? location.hostname : "";
|
|
3488
3498
|
}
|
|
3499
|
+
/**
|
|
3500
|
+
* Can a passkey enrolled under `rpId` be used from the CURRENT origin?
|
|
3501
|
+
*
|
|
3502
|
+
* WebAuthn only accepts an RP id that is the origin's own host or a registrable
|
|
3503
|
+
* *parent* of it — so a passkey enrolled on `app.example.com` is unusable on
|
|
3504
|
+
* `app.example.net`, and one enrolled on a full host is unusable from a sibling
|
|
3505
|
+
* host. An app served on BOTH a custom domain and the platform host therefore
|
|
3506
|
+
* needs one passkey per origin.
|
|
3507
|
+
*
|
|
3508
|
+
* Call this BEFORE `navigator.credentials.get()`: passing a foreign rpId throws
|
|
3509
|
+
* a raw "The requested RPID did not match the origin or related origins", which
|
|
3510
|
+
* is a dead end for the user. Checking first lets the caller fall back to normal
|
|
3511
|
+
* sign-in (and offer to enroll a passkey for this origin) instead.
|
|
3512
|
+
*/
|
|
3513
|
+
function rpIdUsableForOrigin(rpId, host) {
|
|
3514
|
+
const h = host ?? (typeof location !== "undefined" ? location.hostname : "");
|
|
3515
|
+
if (!rpId || !h)
|
|
3516
|
+
return false;
|
|
3517
|
+
return h === rpId || h.endsWith(`.${rpId}`);
|
|
3518
|
+
}
|
|
3519
|
+
/** Thrown when the account's passkey belongs to a different origin. Callers
|
|
3520
|
+
* should treat this as "no passkey here" and fall back to another factor. */
|
|
3521
|
+
class PasskeyOriginError extends Error {
|
|
3522
|
+
code = "passkey_wrong_origin";
|
|
3523
|
+
constructor(message = "No passkey is enrolled for this site. Sign in another way, then add one for this device.") {
|
|
3524
|
+
super(message);
|
|
3525
|
+
this.name = "PasskeyOriginError";
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3489
3528
|
/**
|
|
3490
3529
|
* Create a passkey with PRF and return its credential id, a fresh PRF salt, and
|
|
3491
3530
|
* the PRF output for that salt. Throws if the authenticator can't do PRF.
|
|
@@ -4179,12 +4218,22 @@ class ZkAuth {
|
|
|
4179
4218
|
* its PRF, unwraps the master seed → identity → session.
|
|
4180
4219
|
*/
|
|
4181
4220
|
async loginWithPasskey(username, opts = {}) {
|
|
4182
|
-
|
|
4221
|
+
// Ask for THIS origin's passkey — they're enrolled per-origin, so the
|
|
4222
|
+
// account's first passkey may belong to a different host entirely.
|
|
4223
|
+
const host = defaultRpId();
|
|
4224
|
+
const { factor } = await this.deps.auth.vaultRead(username, "passkey", undefined, host);
|
|
4183
4225
|
const params = factor?.params;
|
|
4184
4226
|
if (!factor?.wrap || !factor?.iv || !params?.credentialId || !params?.prfSalt) {
|
|
4185
4227
|
throw new Error("No passkey is set up for this account.");
|
|
4186
4228
|
}
|
|
4187
|
-
const
|
|
4229
|
+
const rpId = params.rpId ?? host;
|
|
4230
|
+
// Refuse a foreign rpId up front: WebAuthn would throw a raw "requested
|
|
4231
|
+
// RPID did not match the origin", which reads as a hard failure to the
|
|
4232
|
+
// user. A typed error lets the app fall back to another factor and offer
|
|
4233
|
+
// to enroll a passkey for this origin.
|
|
4234
|
+
if (!rpIdUsableForOrigin(rpId, host))
|
|
4235
|
+
throw new PasskeyOriginError();
|
|
4236
|
+
const prfOutput = await evaluatePasskeyPrf(rpId, fromBase64(params.credentialId), fromBase64(params.prfSalt));
|
|
4188
4237
|
const key = await wrapKeyFromBytes(prfOutput, "muhkoo-passkey-wrap");
|
|
4189
4238
|
const seed = await unwrapSeed({ iv: factor.iv, ct: factor.wrap }, key);
|
|
4190
4239
|
const identity = await deriveIdentityFromSeed(seed);
|
|
@@ -4204,6 +4253,27 @@ class ZkAuth {
|
|
|
4204
4253
|
const { factors } = await this.deps.auth.vaultFactors(token);
|
|
4205
4254
|
return factors;
|
|
4206
4255
|
}
|
|
4256
|
+
/**
|
|
4257
|
+
* Is a passkey enrolled that can unlock from THIS origin?
|
|
4258
|
+
*
|
|
4259
|
+
* Passkeys are origin-bound, so an app served on both a custom domain and the
|
|
4260
|
+
* platform host needs one per host. Use this to decide whether to offer
|
|
4261
|
+
* "Unlock with passkey" or go straight to sign-in — prompting with another
|
|
4262
|
+
* origin's passkey fails with a raw WebAuthn error. Requires a session
|
|
4263
|
+
* (metadata read); returns false when signed out or unsupported.
|
|
4264
|
+
*/
|
|
4265
|
+
async hasPasskeyForThisOrigin() {
|
|
4266
|
+
if (!passkeySupported())
|
|
4267
|
+
return false;
|
|
4268
|
+
try {
|
|
4269
|
+
const host = defaultRpId();
|
|
4270
|
+
const factors = await this.listFactors();
|
|
4271
|
+
return factors.some((f) => f.type === "passkey" && rpIdUsableForOrigin(f.rpId, host));
|
|
4272
|
+
}
|
|
4273
|
+
catch {
|
|
4274
|
+
return false;
|
|
4275
|
+
}
|
|
4276
|
+
}
|
|
4207
4277
|
/** Remove a login method by id (can't remove your only one). Session-authed. */
|
|
4208
4278
|
async removeFactor(id) {
|
|
4209
4279
|
const token = this.deps.session.token;
|
|
@@ -5832,31 +5902,37 @@ class FileStorage {
|
|
|
5832
5902
|
*/
|
|
5833
5903
|
async writeFileToShards(input) {
|
|
5834
5904
|
await this.codec.ready(this.rsWasmModule);
|
|
5835
|
-
const data = await toUint8Array(input.data);
|
|
5836
5905
|
const fileId = input.fileId ?? generateId();
|
|
5837
5906
|
const createdAt = Date.now();
|
|
5838
5907
|
const chunks = [];
|
|
5839
|
-
|
|
5908
|
+
// Read the source per-chunk so the peak memory footprint stays at
|
|
5909
|
+
// ~chunkSize even for multi-GB files. A Blob/File is sliced lazily (only
|
|
5910
|
+
// the current chunk's bytes are materialized) — reading the whole thing
|
|
5911
|
+
// up front would blow past the browser's ~2GB ArrayBuffer cap and throw
|
|
5912
|
+
// "the file could not be read". A caller that already has the bytes in a
|
|
5913
|
+
// Uint8Array just gets zero-copy subarray views.
|
|
5914
|
+
const asBytes = input.data instanceof Uint8Array ? input.data : null;
|
|
5915
|
+
const size = asBytes ? asBytes.length : input.data.size;
|
|
5916
|
+
const readChunk = async (start, end) => asBytes ? asBytes.subarray(start, end)
|
|
5917
|
+
: new Uint8Array(await input.data.slice(start, end).arrayBuffer());
|
|
5918
|
+
const totalChunks = Math.max(1, Math.ceil(size / this.chunkSize));
|
|
5840
5919
|
input.onProgress?.(0, totalChunks);
|
|
5841
|
-
//
|
|
5842
|
-
|
|
5843
|
-
// Within a chunk, the shard uploads are parallelized up to
|
|
5844
|
-
// `this.concurrency`.
|
|
5845
|
-
for (let chunkIndex = 0; chunkIndex * this.chunkSize < Math.max(1, data.length); chunkIndex++) {
|
|
5920
|
+
// Within a chunk, the shard uploads are parallelized up to `this.concurrency`.
|
|
5921
|
+
for (let chunkIndex = 0; chunkIndex * this.chunkSize < Math.max(1, size); chunkIndex++) {
|
|
5846
5922
|
const start = chunkIndex * this.chunkSize;
|
|
5847
|
-
const end = Math.min(start + this.chunkSize,
|
|
5848
|
-
const plaintext =
|
|
5923
|
+
const end = Math.min(start + this.chunkSize, size);
|
|
5924
|
+
const plaintext = await readChunk(start, end);
|
|
5849
5925
|
chunks.push(await this.writeChunk(plaintext, chunkIndex));
|
|
5850
5926
|
input.onProgress?.(chunks.length, totalChunks);
|
|
5851
5927
|
// Stop after one iteration if the file is empty — we still emit a
|
|
5852
5928
|
// single zero-length chunk so the manifest has a stable shape.
|
|
5853
|
-
if (
|
|
5929
|
+
if (size === 0)
|
|
5854
5930
|
break;
|
|
5855
5931
|
}
|
|
5856
5932
|
const manifest = {
|
|
5857
5933
|
id: fileId,
|
|
5858
5934
|
name: input.metadata.name,
|
|
5859
|
-
size
|
|
5935
|
+
size,
|
|
5860
5936
|
type: input.metadata.type,
|
|
5861
5937
|
path: input.metadata.path,
|
|
5862
5938
|
lastModified: input.metadata.lastModified ?? createdAt,
|
|
@@ -5892,6 +5968,19 @@ class FileStorage {
|
|
|
5892
5968
|
}
|
|
5893
5969
|
return { data: out, stat: manifestToStat(manifest) };
|
|
5894
5970
|
}
|
|
5971
|
+
/**
|
|
5972
|
+
* Streaming inverse of {@link writeFileToShards}: yields each chunk's
|
|
5973
|
+
* decrypted plaintext in order WITHOUT concatenating. Peak memory stays at
|
|
5974
|
+
* ~one chunk, so multi-GB files (which overflow a single `Uint8Array`) can be
|
|
5975
|
+
* piped straight to a file/socket. Same shard sourcing (cache → peers →
|
|
5976
|
+
* origin) and per-chunk auth as {@link readFileFromShards}.
|
|
5977
|
+
*/
|
|
5978
|
+
async *readChunksFromShards(manifest) {
|
|
5979
|
+
await this.codec.ready(this.rsWasmModule);
|
|
5980
|
+
for (const chunkManifest of [...manifest.chunks].sort((a, b) => a.chunkIndex - b.chunkIndex)) {
|
|
5981
|
+
yield await this.readChunk(chunkManifest);
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5895
5984
|
// -------------------------------------------------------------------------
|
|
5896
5985
|
// Space-backed convenience wrappers — encrypt + upload + write manifest.
|
|
5897
5986
|
// Require a `SharedSpaceClient` to have been provided at construction.
|
|
@@ -6025,14 +6114,6 @@ class FileStorage {
|
|
|
6025
6114
|
await Promise.all(workers);
|
|
6026
6115
|
}
|
|
6027
6116
|
}
|
|
6028
|
-
/** Normalize `data` to a flat `Uint8Array`. */
|
|
6029
|
-
async function toUint8Array(data) {
|
|
6030
|
-
if (data instanceof Uint8Array)
|
|
6031
|
-
return data;
|
|
6032
|
-
// Blob covers File too (File extends Blob in every runtime we target).
|
|
6033
|
-
const ab = await data.arrayBuffer();
|
|
6034
|
-
return new Uint8Array(ab);
|
|
6035
|
-
}
|
|
6036
6117
|
|
|
6037
6118
|
/**
|
|
6038
6119
|
* HTTP client for the gated file-manifest store on a SharedSpace
|
|
@@ -7348,6 +7429,13 @@ class Space {
|
|
|
7348
7429
|
async getFile(manifest) {
|
|
7349
7430
|
return this.fileStorage().readFileFromShards(manifest);
|
|
7350
7431
|
}
|
|
7432
|
+
/** Streaming read: async-iterate a stored file's decrypted chunks in order,
|
|
7433
|
+
* never holding the whole file in memory. Use for multi-GB files (a single
|
|
7434
|
+
* `Uint8Array` can't hold them) — e.g. a transcoder piping the raw to a temp
|
|
7435
|
+
* file. Same peer/origin shard sourcing as {@link getFile}. */
|
|
7436
|
+
getFileStream(manifest) {
|
|
7437
|
+
return this.fileStorage().readChunksFromShards(manifest);
|
|
7438
|
+
}
|
|
7351
7439
|
/** Declare a file's shards (ref++ + meter) for a manifest already stored —
|
|
7352
7440
|
* used to back-fill accounting for files written before commit existed, or to
|
|
7353
7441
|
* register a manifest received via sharing. `putFile` already commits new
|
|
@@ -9822,6 +9910,59 @@ class FunctionsNamespace {
|
|
|
9822
9910
|
}
|
|
9823
9911
|
}
|
|
9824
9912
|
|
|
9913
|
+
/**
|
|
9914
|
+
* `client.accessTokens` — manage an app's **access tokens**: scoped, expiring,
|
|
9915
|
+
* non-ZK machine-to-machine credentials (`mk_<env>_at_…`).
|
|
9916
|
+
*
|
|
9917
|
+
* const { plaintext } = await client.accessTokens.create(appId, {
|
|
9918
|
+
* scopes: ["db:read", "db:write"], env: "live", expiresInDays: 30,
|
|
9919
|
+
* label: "ci-runner",
|
|
9920
|
+
* });
|
|
9921
|
+
* // hand `plaintext` to the machine caller as its ClientOptions.accessToken
|
|
9922
|
+
*
|
|
9923
|
+
* These are MANAGEMENT calls — creating/listing/revoking tokens is authorized by
|
|
9924
|
+
* the developer session (same as the `agents`/`functions` namespaces). The token
|
|
9925
|
+
* itself resolves through the SAME accelerator path as an app key (the
|
|
9926
|
+
* `X-Muhkoo-Key` header), but is scoped to a fixed vocabulary of permissions and
|
|
9927
|
+
* expires. The plaintext is returned ONCE, on create — store it then; it can't
|
|
9928
|
+
* be read back.
|
|
9929
|
+
*/
|
|
9930
|
+
/** All valid {@link Scope}s, in canonical order. */
|
|
9931
|
+
const ACCESS_TOKEN_SCOPES = [
|
|
9932
|
+
"db:read",
|
|
9933
|
+
"db:write",
|
|
9934
|
+
"kv:read",
|
|
9935
|
+
"kv:write",
|
|
9936
|
+
"storage:read",
|
|
9937
|
+
"storage:write",
|
|
9938
|
+
"messages:read",
|
|
9939
|
+
"messages:write",
|
|
9940
|
+
"functions:invoke",
|
|
9941
|
+
"ai:infer",
|
|
9942
|
+
];
|
|
9943
|
+
class AccessTokensNamespace {
|
|
9944
|
+
deps;
|
|
9945
|
+
constructor(deps) {
|
|
9946
|
+
this.deps = deps;
|
|
9947
|
+
}
|
|
9948
|
+
/** List the app's access tokens (metadata only — never the plaintext). */
|
|
9949
|
+
async list(appId) {
|
|
9950
|
+
const res = await this.deps.http.get(this.path(appId, ""));
|
|
9951
|
+
return res.tokens ?? [];
|
|
9952
|
+
}
|
|
9953
|
+
/** Mint an access token (owner/editor only). The plaintext is returned once. */
|
|
9954
|
+
async create(appId, input) {
|
|
9955
|
+
return this.deps.http.post(this.path(appId, ""), input);
|
|
9956
|
+
}
|
|
9957
|
+
/** Revoke an access token by its `keyId`. */
|
|
9958
|
+
async revoke(appId, keyId) {
|
|
9959
|
+
return this.deps.http.del(this.path(appId, `/${encodeURIComponent(keyId)}`));
|
|
9960
|
+
}
|
|
9961
|
+
path(appId, suffix) {
|
|
9962
|
+
return `/api/apps/${encodeURIComponent(appId)}/access-tokens${suffix}`;
|
|
9963
|
+
}
|
|
9964
|
+
}
|
|
9965
|
+
|
|
9825
9966
|
/**
|
|
9826
9967
|
* `ChatKeyVault` — SDK-owned lifecycle for a member's long-lived ratchet/space
|
|
9827
9968
|
* keypair (the connect `KeyStore` entry keyed by the member id / username).
|
|
@@ -11069,6 +11210,8 @@ class Client {
|
|
|
11069
11210
|
agents;
|
|
11070
11211
|
/** Serverless functions — `client.functions.deploy(appId, …)`, etc. */
|
|
11071
11212
|
functions;
|
|
11213
|
+
/** Access tokens — `client.accessTokens.create(appId, …)`, etc. */
|
|
11214
|
+
accessTokens;
|
|
11072
11215
|
/** Offline cache + sync — `client.offline.status`, `client.offline.snapshot`, etc. */
|
|
11073
11216
|
offline;
|
|
11074
11217
|
session;
|
|
@@ -11122,6 +11265,7 @@ class Client {
|
|
|
11122
11265
|
this.http = new HttpClient({
|
|
11123
11266
|
baseUrl: this.baseUrl,
|
|
11124
11267
|
apiKey: options.apiKey,
|
|
11268
|
+
accessToken: options.accessToken,
|
|
11125
11269
|
getSessionToken: () => this.session.token,
|
|
11126
11270
|
fetch: reportingFetch,
|
|
11127
11271
|
// Self-heal stale sessions: on a 401, try a silent re-auth (only
|
|
@@ -11198,6 +11342,7 @@ class Client {
|
|
|
11198
11342
|
});
|
|
11199
11343
|
this.agents = new AgentsNamespace({ http: this.http });
|
|
11200
11344
|
this.functions = new FunctionsNamespace({ http: this.http, fnHostSuffix: options.functionsHostSuffix });
|
|
11345
|
+
this.accessTokens = new AccessTokensNamespace({ http: this.http });
|
|
11201
11346
|
// Replay deferred shard uploads on reconnect. The bytes live in the
|
|
11202
11347
|
// Cache API keyed by hash; re-PUT them through a (defer-free) shard
|
|
11203
11348
|
// client so a failure surfaces as transient and the entry stays queued.
|
|
@@ -11457,6 +11602,7 @@ function MuhkooDB(meta) {
|
|
|
11457
11602
|
table: meta.table ?? String(propertyKey),
|
|
11458
11603
|
access: meta.access ?? "read",
|
|
11459
11604
|
description: meta.description,
|
|
11605
|
+
backend: meta.backend ?? false,
|
|
11460
11606
|
});
|
|
11461
11607
|
});
|
|
11462
11608
|
}
|
|
@@ -11496,9 +11642,12 @@ function ejectAgentPrompt(appClass) {
|
|
|
11496
11642
|
for (const s of d.spaces)
|
|
11497
11643
|
lines.push(`- ${s.name}: ${s.description}`);
|
|
11498
11644
|
}
|
|
11499
|
-
|
|
11645
|
+
// Backend-only tables are deliberately withheld — the agent should never be
|
|
11646
|
+
// told about server-managed / internal state it can't (and shouldn't) touch.
|
|
11647
|
+
const promptTables = d.tables.filter((t) => !t.backend);
|
|
11648
|
+
if (promptTables.length) {
|
|
11500
11649
|
lines.push("", "App database tables:");
|
|
11501
|
-
for (const t of
|
|
11650
|
+
for (const t of promptTables) {
|
|
11502
11651
|
const verbs = t.access === "write"
|
|
11503
11652
|
? "read & write — db_query/db_get/db_insert/db_update/db_delete"
|
|
11504
11653
|
: "read-only — db_query/db_get";
|
|
@@ -11516,7 +11665,7 @@ function ejectAgentPrompt(appClass) {
|
|
|
11516
11665
|
// How to respond — the load-bearing behavioral contract. Without this, models
|
|
11517
11666
|
// (especially gpt-oss) tend to run tool calls and then end their turn with no
|
|
11518
11667
|
// user-facing message, so the user sees the work happen but gets no reply.
|
|
11519
|
-
const hasTools =
|
|
11668
|
+
const hasTools = promptTables.length > 0 || d.functions.length > 0;
|
|
11520
11669
|
lines.push("", "How to respond:");
|
|
11521
11670
|
if (hasTools) {
|
|
11522
11671
|
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.");
|
|
@@ -12086,5 +12235,5 @@ var bundledLoader = /*#__PURE__*/Object.freeze({
|
|
|
12086
12235
|
default: loadRsWasm
|
|
12087
12236
|
});
|
|
12088
12237
|
|
|
12089
|
-
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_BASE_URL, DEFAULT_FN_HOST_SUFFIX, DbCache, DbNamespace, DbTable, 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, Logger, 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, Ready, ReedSolomonCodec, Retry, Space as Room, SerializeMessage, SessionState, ShardCache, ShardClient, SharedSpaceClient, SnapshotNamespace, Space, SpaceCache, SpaceKeyring, SpaceNamespace, SpacePacketCipher, SpaceSignaler, StorageNamespace, SyncEngine, VERSION, VaultUnavailableError, WSTransport, WebRtcTransport, WorkerEngineHost, ZERO_HLC, ZkAuth, _accountId, _formatBytes, _messageId, _objectId, _packetId, _socketId, _userId, appLogger$1 as appLogger, assertType, base58Decode, base58Encode, buildCommitment, compareHlc, compilePrograms, concatBytes, decodeFromHex, decorators, decryptAesGcm, defaultCircuitUrls, defaultSessionStore, deleteBeatsWrite, deleteRegister, deriveAesKeyFromPassphrase, deriveBitsHkdf, deriveIdentity, deriveIdentityFromSeed, deriveMasterSeedFromPassword, deserialize, ejectAgentPrompt, ejectAgentTools, emptyMap, emptyRegister, encodeToHex, encryptAesGcm, exportPublicKeyBase64, exportPublicKeyHex, fromBase64$1 as fromBase64, fromBase64Url, fromHex, generateAuthProof, generateChecksum, generateId, generatePkce, getIPAddress, getId, getMuhkooAppDescriptor, getSubtle, initBn128Wasm, initRsWasm, initializeCircuits, isNewer, isNumber, isOfflineCapable, isP2pCapable, isProvisional, log, manifestToStat, materializeRow, mergeMap, mergeMessage, mergeRegister, messageKey, pack, padHandle, poseidonHash, protocol, provisionalHandle, quickVerify, randomBytes, randomState, sealSeed, serialize, shardHash, signMessage, stableStringify, toBase64$1 as toBase64, toBase64Url, toField, toHex, tombstoneRow, unpack, unsealSeed, unwrapWithPassphrase, utf8Decode, utf8Encode, verify, verifyChecksum, verifyGroth16, verifyHashKnowledge, verifyPreimagePoK, wrapWithPassphrase, writeBeatsTombstone, writeColumns, writeRegister };
|
|
12238
|
+
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_BASE_URL, DEFAULT_FN_HOST_SUFFIX, DbCache, DbNamespace, DbTable, 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, Logger, 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, Ready, ReedSolomonCodec, Retry, Space as Room, SerializeMessage, SessionState, ShardCache, ShardClient, SharedSpaceClient, SnapshotNamespace, Space, SpaceCache, SpaceKeyring, SpaceNamespace, SpacePacketCipher, SpaceSignaler, StorageNamespace, SyncEngine, VERSION, VaultUnavailableError, WSTransport, WebRtcTransport, WorkerEngineHost, ZERO_HLC, ZkAuth, _accountId, _formatBytes, _messageId, _objectId, _packetId, _socketId, _userId, appLogger$1 as appLogger, assertType, base58Decode, base58Encode, buildCommitment, compareHlc, compilePrograms, concatBytes, decodeFromHex, decorators, decryptAesGcm, defaultCircuitUrls, defaultSessionStore, deleteBeatsWrite, deleteRegister, deriveAesKeyFromPassphrase, deriveBitsHkdf, deriveIdentity, deriveIdentityFromSeed, deriveMasterSeedFromPassword, deserialize, ejectAgentPrompt, ejectAgentTools, emptyMap, emptyRegister, encodeToHex, encryptAesGcm, exportPublicKeyBase64, exportPublicKeyHex, fromBase64$1 as fromBase64, fromBase64Url, fromHex, generateAuthProof, generateChecksum, generateId, generatePkce, getIPAddress, getId, getMuhkooAppDescriptor, getSubtle, initBn128Wasm, initRsWasm, initializeCircuits, isNewer, isNumber, isOfflineCapable, isP2pCapable, isProvisional, log, manifestToStat, materializeRow, mergeMap, mergeMessage, mergeRegister, messageKey, pack, padHandle, poseidonHash, protocol, provisionalHandle, quickVerify, randomBytes, randomState, rpIdUsableForOrigin, sealSeed, serialize, shardHash, signMessage, stableStringify, toBase64$1 as toBase64, toBase64Url, toField, toHex, tombstoneRow, unpack, unsealSeed, unwrapWithPassphrase, utf8Decode, utf8Encode, verify, verifyChecksum, verifyGroth16, verifyHashKnowledge, verifyPreimagePoK, wrapWithPassphrase, writeBeatsTombstone, writeColumns, writeRegister };
|
|
12090
12239
|
//# sourceMappingURL=index.js.map
|