@kernlize/core 0.10.0 → 0.11.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.ts CHANGED
@@ -3,17 +3,17 @@ import { EventStore } from 'applesauce-core';
3
3
  import { RelayPool, RelayPoolOptions } from 'applesauce-relay';
4
4
  import { AccountManager, IAccount } from 'applesauce-accounts';
5
5
  import { RelayPoolHooks, RelayPoolLike, ShellBridge, ShellEnvironment, AuthHooks, ShellAdapter, OriginRegistry, NappletMessageDecision, CapabilityHooks, NappletRevocation, UnroutedMessageInfo } from '@kehto/shell';
6
- import { Capability, RelayPlanningServiceHandler, ConsentRequest, Signer, FirewallEvent, AclStateContainer, ServiceRegistry, ServiceHandler } from '@kehto/runtime';
6
+ import { Capability, RelayPlanningServiceHandler, ConsentRequest, Signer, FirewallEvent, AclStateContainer, ServiceHandler, PermissionRequirement, ServiceRegistry } from '@kehto/runtime';
7
+ import { CvmRegistryFamily, ConfigSettingsContext, ConfigServiceOptions, IntentCatalogEntry, RelayPoolServiceOptions, DmRelayPool, IdentityServiceOptions, DmAdapter, Uploader, CommonServiceOptions, WebrtcServiceOptions, ThemeService, DmService, ResourceFetchInit, IntentResolver, IntentDispatchParams } from '@kehto/services';
8
+ import { NostrFilter, NostrEvent, EventTemplate, NappletMessage } from '@napplet/core';
7
9
  import { NappletManifest, NappletArtifactCache, ResolvedNapplet } from '@kehto/nip/5d';
8
- import { NostrEvent, NostrFilter, EventTemplate, NappletMessage } from '@napplet/core';
9
10
  import { WindowVisibility, GuardConfig, GuardProfile, GuardEvent, MitigationDescription, GuardDisposition, OpClass } from '@kernlize/guard';
10
11
  import { MessagingRegistry, MessagingBackend, ReplyPrompt, ReplyAnswer, MessagingRegistryOptions, ProviderAvailability } from '@kernlize/messaging';
11
12
  import { BridgeRegistry, TorrentBackend, BridgeRegistryOptions, HttpBridgeOptions, HandoffOpener, ResourceResolveInit } from '@kernlize/bridges';
12
13
  import { EventCacheOpener, ConnectedEventCache } from './cache/index.js';
13
14
  export { AttachEventCacheOptions, AttachedEventCache, CacheRecoveryEvent, EventCache, EventCacheAdapter, EventRecords, FilenameStorage, IndexedDbCacheOptions, LockManagerLike, OpenEventCacheOptions, SqlStatement, SqlValue, SqliteDriver, SqliteFiles, SqliteOpfsOptions, attachEventCache, connectEventCache, createEventCache, createIndexedDbCacheAdapter, createMemoryCacheAdapter, createSqliteOpfsCacheAdapter, defaultWebCacheAdapters, fromEventDatabase, isCorruptionError, openEventCache } from './cache/index.js';
14
- import { ISigner } from 'applesauce-signers';
15
+ import { ISigner, PrivateKeySigner } from 'applesauce-signers';
15
16
  import { NostrEvent as NostrEvent$1, Filter } from 'applesauce-core/helpers';
16
- import { ConfigSettingsContext, ConfigServiceOptions, IntentCatalogEntry, RelayPoolServiceOptions, DmRelayPool, IdentityServiceOptions, DmAdapter, Uploader, CommonServiceOptions, ThemeService, DmService, ResourceFetchInit, IntentResolver, IntentDispatchParams } from '@kehto/services';
17
17
  import { AddressPointerLoader } from 'applesauce-loaders/loaders';
18
18
  import { CacheRequest } from 'applesauce-loaders';
19
19
  import { FirewallStateContainer, RateLimit } from '@kehto/rate-limit/legacy';
@@ -23,9 +23,196 @@ export { CryptoFallbackReport, CryptoScope, createFallbackSubtle, installCryptoF
23
23
  import { GenericKeyValueStore, NostrNetworkInterface } from '@internet-privacy/marmot-ts';
24
24
  import { StorageAdapter } from 'nostr-double-ratchet';
25
25
  import { SignedEvent, BlobDescriptor } from 'blossom-client-sdk';
26
+ import { CvmRelayPool } from '@kehto/services/cvm-nostr-transport';
26
27
  import { Theme } from '@napplet/nap/theme/types';
27
28
  import 'applesauce-core/event-store';
28
29
 
30
+ /** What the person chose for meeting people and calling remote tools on this device. */
31
+ interface MultiplayerState {
32
+ /** Servers that introduce people and find tool servers; undefined leaves the host's choice. */
33
+ readonly servers?: readonly string[];
34
+ /** Servers that help connections through; undefined leaves the host's choice. */
35
+ readonly helpers?: readonly DirectIceServer[];
36
+ /** Tool families the person trusts, pinned to verified schemas. */
37
+ readonly families: readonly CvmRegistryFamily[];
38
+ }
39
+ /** The person's settings for direct connections and remote tools. */
40
+ interface MultiplayerSettings {
41
+ readonly state$: Observable<MultiplayerState>;
42
+ state(): MultiplayerState;
43
+ /** Choose the servers, or `undefined` to go back to the host's. Throws `invalid:relay-url`. */
44
+ setServers(urls: readonly string[] | undefined): void;
45
+ /** Choose the helpers, or `undefined` to go back to the host's. Throws `invalid:helper`. */
46
+ setHelpers(helpers: readonly DirectIceServer[] | undefined): void;
47
+ /** Trust a family, replacing one with the same label and provider. Throws `invalid:family`. */
48
+ saveFamily(family: CvmRegistryFamily): void;
49
+ removeFamily(label: string, pubkey: string): void;
50
+ }
51
+ /**
52
+ * Whether a tool family is one the shell can keep: a label, a provider key and
53
+ * relays, and 1 to 64 uniquely named tools each pinned to a schema hash.
54
+ *
55
+ * @param family - A candidate family.
56
+ * @returns True when it can be saved.
57
+ * @example
58
+ * ```ts
59
+ * validFamily({ family: 'rooms', server: { pubkey, relays: ['wss://tools.example'] }, tools: [{ name: 'join', schemaHash }] }); // true
60
+ * ```
61
+ */
62
+ declare function validFamily(family: CvmRegistryFamily): boolean;
63
+ /**
64
+ * The person's own settings for meeting people and calling remote tools, kept
65
+ * on this device. They override the host's defaults: the person chooses the
66
+ * servers that introduce them, whether anything helps their connections
67
+ * through, and which tool families they trust (D-043). A stored value that
68
+ * fails validation is read as unset rather than trusted.
69
+ *
70
+ * @param storage - Where the settings are kept, under `kernl:multiplayer:v1`.
71
+ * @returns The settings.
72
+ * @example
73
+ * ```ts
74
+ * const settings = createMultiplayerSettings(localStorage);
75
+ * settings.setServers(['wss://meet.example']);
76
+ * ```
77
+ */
78
+ declare function createMultiplayerSettings(storage: StorageLike): MultiplayerSettings;
79
+
80
+ /** The slice of applesauce's `RelayPool` kernl adapts. Narrow so tests can supply a fake. */
81
+ type ApplesaucePool = Pick<RelayPool, 'req' | 'request' | 'publish'>;
82
+ /**
83
+ * How the shell's own pool redials a relay that refused the connection.
84
+ *
85
+ * applesauce-relay 7.1 redials refused connections three times by default,
86
+ * pausing one, two and three seconds, and a publish waits for every relay it
87
+ * was sent to, so one dead relay in a tier held a publish for about six
88
+ * seconds. One redial after a second keeps the case it exists for: a busy
89
+ * public relay answers a websocket upgrade with 502 or 503 for a moment and
90
+ * accepts the next one (D-025, D-037). Subscriptions keep applesauce's
91
+ * default, because a live subscription should come back after a drop.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * const pool = new RelayPool(SHELL_RELAY_OPTIONS);
96
+ * ```
97
+ */
98
+ declare const SHELL_RELAY_OPTIONS: RelayPoolOptions;
99
+ /** A subscription that delivers events once each and signals the end of stored events. */
100
+ interface EoseSubscription {
101
+ unsubscribe(): void;
102
+ }
103
+ /**
104
+ * Subscribe through the pool's raw `req` so the end of stored events is
105
+ * observable: `EOSE` is reported once, after every relay has answered or
106
+ * failed, and events are deduplicated by id because `req` does not.
107
+ * applesauce's `subscription()` deduplicates but hides `EOSE`, which kehto's
108
+ * relay service relies on to answer `relay.subscribe`.
109
+ *
110
+ * @param pool - The shared applesauce pool.
111
+ * @param relays - Relay URLs to ask.
112
+ * @param filters - Filters for the request.
113
+ * @param callback - Receives each new event once, then `'EOSE'`.
114
+ * @returns A handle that closes the subscription.
115
+ * @example
116
+ * ```ts
117
+ * const sub = subscribeWithEose(pool, ['wss://relay.example'], [{ kinds: [1] }], (item) => {
118
+ * if (item !== 'EOSE') console.log(item.id);
119
+ * });
120
+ * sub.unsubscribe();
121
+ * ```
122
+ */
123
+ declare function subscribeWithEose(pool: Pick<ApplesaucePool, 'req'>, relays: string[], filters: NostrFilter[], callback: (item: NostrEvent | 'EOSE') => void): EoseSubscription;
124
+ /**
125
+ * Adapt the shared applesauce `RelayPool` to kehto's `RelayPoolLike`.
126
+ *
127
+ * @param pool - The one pool the shell owns (D-002).
128
+ * @returns An object kehto's `RelayPoolHooks.getRelayPool` can return.
129
+ * @example
130
+ * ```ts
131
+ * const like = createRelayPoolLike(pool);
132
+ * like.subscription(['wss://relay.example'], [{ kinds: [1] }]).subscribe((item) => {});
133
+ * ```
134
+ */
135
+ declare function createRelayPoolLike(pool: ApplesaucePool): RelayPoolLike;
136
+ /**
137
+ * Choose the relay tier for a set of filters.
138
+ *
139
+ * Profiles, follow lists and relay lists come from the discovery tier; applet
140
+ * manifests from the apps tier; everything else goes to the user's outbox
141
+ * relays plus the super tier. A filter without kinds cannot be classified and
142
+ * takes the general path.
143
+ *
144
+ * @param tiers - The current tier configuration.
145
+ * @param filters - Filters about to be sent.
146
+ * @returns Relay URLs, deduplicated.
147
+ * @example
148
+ * ```ts
149
+ * selectRelayTier(tiers, [{ kinds: [0], authors: [pubkey] }]); // discovery, then outbox and super
150
+ * ```
151
+ */
152
+ declare function selectRelayTier(tiers: RelayTiers, filters: readonly NostrFilter[]): string[];
153
+ /**
154
+ * Build kehto's `RelayPoolHooks` over the shared applesauce pool.
155
+ *
156
+ * Scoped relays (one relay per window, the NIP-29 pattern) are kept minimal:
157
+ * one open subscription per window, replaced on reopen, and events delivered
158
+ * to the window's bound port as `relay.event` envelopes.
159
+ *
160
+ * @param pool - The shared applesauce pool.
161
+ * @param tiers - Relay tiers used for `selectRelayTier`.
162
+ * @returns Hooks for `ShellAdapter.relayPool`.
163
+ * @example
164
+ * ```ts
165
+ * const adapter: ShellAdapter = { relayPool: createRelayPoolHooks(pool, tiers), ... };
166
+ * ```
167
+ */
168
+ declare function createRelayPoolHooks(pool: ApplesaucePool, tiers: RelayTiers): RelayPoolHooks;
169
+
170
+ /**
171
+ * How long a search waits for the servers it asked, in milliseconds.
172
+ *
173
+ * @example
174
+ * ```ts
175
+ * discoverToolFamilies(input, { pool, relays, fetch, timeoutMs: TOOL_DISCOVERY_TIMEOUT_MS / 3 });
176
+ * ```
177
+ */
178
+ declare const TOOL_DISCOVERY_TIMEOUT_MS = 15000;
179
+ /** A family found for the person to review: the provider, its verified tools, and where it came from. */
180
+ interface ToolFamilyCandidate {
181
+ readonly family: CvmRegistryFamily;
182
+ /** The announcement the inventory was read from. */
183
+ readonly eventId: string;
184
+ /** What the person typed, then the event. */
185
+ readonly source: string;
186
+ }
187
+ /** What a search needs. */
188
+ interface ToolDiscoveryOptions {
189
+ readonly pool: Pick<ApplesaucePool, 'request'>;
190
+ /** Asked when the reference names none. */
191
+ readonly relays: readonly string[];
192
+ /** Reads a website's published address. */
193
+ readonly fetch: typeof fetch;
194
+ readonly timeoutMs?: number;
195
+ }
196
+ /**
197
+ * Find tool families from what the person typed: a reference to a server's or
198
+ * a tool list's announcement, a tool's schema hash, or a website that
199
+ * publishes its provider. Only signed announcements are read; every tool's
200
+ * hash is computed again from its schema, and an announcement whose stated
201
+ * hash differs is refused. The newest inventory of each provider is the one
202
+ * read, never an older one in its place (D-043).
203
+ *
204
+ * @param input - What the person typed.
205
+ * @param options - Pool, default relays, and the website fetcher.
206
+ * @returns One candidate per provider, for the person to name and save.
207
+ * @throws `invalid:tool-reference`, `unavailable:website`, `invalid:tool-inventory`, or `unavailable:no-tools`.
208
+ * @example
209
+ * ```ts
210
+ * const [candidate] = await discoverToolFamilies('nevent1…', { pool, relays: tiers.get().super });
211
+ * settings.saveFamily({ ...candidate.family, family: 'rooms' });
212
+ * ```
213
+ */
214
+ declare function discoverToolFamilies(input: string, options: ToolDiscoveryOptions): Promise<ToolFamilyCandidate[]>;
215
+
29
216
  /** One applet as the store lists it. Read from a signed manifest; its bytes are verified only when it is opened. */
30
217
  interface CatalogEntry {
31
218
  /** kehto's publisher- and kind-safe identity; the same id the intent catalogue uses. */
@@ -452,96 +639,6 @@ declare function mailboxTags(mailboxes: Mailboxes, previous?: NostrEvent$1): str
452
639
  */
453
640
  declare function createAccountMailboxes(options: AccountMailboxesOptions): AccountMailboxes;
454
641
 
455
- /** The slice of applesauce's `RelayPool` kernl adapts. Narrow so tests can supply a fake. */
456
- type ApplesaucePool = Pick<RelayPool, 'req' | 'request' | 'publish'>;
457
- /**
458
- * How the shell's own pool redials a relay that refused the connection.
459
- *
460
- * applesauce-relay 7.1 redials refused connections three times by default,
461
- * pausing one, two and three seconds, and a publish waits for every relay it
462
- * was sent to, so one dead relay in a tier held a publish for about six
463
- * seconds. One redial after a second keeps the case it exists for: a busy
464
- * public relay answers a websocket upgrade with 502 or 503 for a moment and
465
- * accepts the next one (D-025, D-037). Subscriptions keep applesauce's
466
- * default, because a live subscription should come back after a drop.
467
- *
468
- * @example
469
- * ```ts
470
- * const pool = new RelayPool(SHELL_RELAY_OPTIONS);
471
- * ```
472
- */
473
- declare const SHELL_RELAY_OPTIONS: RelayPoolOptions;
474
- /** A subscription that delivers events once each and signals the end of stored events. */
475
- interface EoseSubscription {
476
- unsubscribe(): void;
477
- }
478
- /**
479
- * Subscribe through the pool's raw `req` so the end of stored events is
480
- * observable: `EOSE` is reported once, after every relay has answered or
481
- * failed, and events are deduplicated by id because `req` does not.
482
- * applesauce's `subscription()` deduplicates but hides `EOSE`, which kehto's
483
- * relay service relies on to answer `relay.subscribe`.
484
- *
485
- * @param pool - The shared applesauce pool.
486
- * @param relays - Relay URLs to ask.
487
- * @param filters - Filters for the request.
488
- * @param callback - Receives each new event once, then `'EOSE'`.
489
- * @returns A handle that closes the subscription.
490
- * @example
491
- * ```ts
492
- * const sub = subscribeWithEose(pool, ['wss://relay.example'], [{ kinds: [1] }], (item) => {
493
- * if (item !== 'EOSE') console.log(item.id);
494
- * });
495
- * sub.unsubscribe();
496
- * ```
497
- */
498
- declare function subscribeWithEose(pool: Pick<ApplesaucePool, 'req'>, relays: string[], filters: NostrFilter[], callback: (item: NostrEvent | 'EOSE') => void): EoseSubscription;
499
- /**
500
- * Adapt the shared applesauce `RelayPool` to kehto's `RelayPoolLike`.
501
- *
502
- * @param pool - The one pool the shell owns (D-002).
503
- * @returns An object kehto's `RelayPoolHooks.getRelayPool` can return.
504
- * @example
505
- * ```ts
506
- * const like = createRelayPoolLike(pool);
507
- * like.subscription(['wss://relay.example'], [{ kinds: [1] }]).subscribe((item) => {});
508
- * ```
509
- */
510
- declare function createRelayPoolLike(pool: ApplesaucePool): RelayPoolLike;
511
- /**
512
- * Choose the relay tier for a set of filters.
513
- *
514
- * Profiles, follow lists and relay lists come from the discovery tier; applet
515
- * manifests from the apps tier; everything else goes to the user's outbox
516
- * relays plus the super tier. A filter without kinds cannot be classified and
517
- * takes the general path.
518
- *
519
- * @param tiers - The current tier configuration.
520
- * @param filters - Filters about to be sent.
521
- * @returns Relay URLs, deduplicated.
522
- * @example
523
- * ```ts
524
- * selectRelayTier(tiers, [{ kinds: [0], authors: [pubkey] }]); // discovery, then outbox and super
525
- * ```
526
- */
527
- declare function selectRelayTier(tiers: RelayTiers, filters: readonly NostrFilter[]): string[];
528
- /**
529
- * Build kehto's `RelayPoolHooks` over the shared applesauce pool.
530
- *
531
- * Scoped relays (one relay per window, the NIP-29 pattern) are kept minimal:
532
- * one open subscription per window, replaced on reopen, and events delivered
533
- * to the window's bound port as `relay.event` envelopes.
534
- *
535
- * @param pool - The shared applesauce pool.
536
- * @param tiers - Relay tiers used for `selectRelayTier`.
537
- * @returns Hooks for `ShellAdapter.relayPool`.
538
- * @example
539
- * ```ts
540
- * const adapter: ShellAdapter = { relayPool: createRelayPoolHooks(pool, tiers), ... };
541
- * ```
542
- */
543
- declare function createRelayPoolHooks(pool: ApplesaucePool, tiers: RelayTiers): RelayPoolHooks;
544
-
545
642
  /**
546
643
  * File servers to use when the account has not published its own list: public
547
644
  * Blossom servers that answered an upload preflight when this was chosen.
@@ -1119,8 +1216,11 @@ interface ConsentLine {
1119
1216
  /** A write described as what it changes, not as JSON. */
1120
1217
  interface ConsentSummary {
1121
1218
  readonly title: string;
1122
- /** `destructive` replaces or erases part of the record; `public` puts something where anyone can fetch it; both are asked about. */
1123
- readonly severity: 'routine' | 'destructive' | 'public';
1219
+ /**
1220
+ * `destructive` replaces or erases part of the record; `public` puts something where anyone can fetch it;
1221
+ * `direct` connects the person to someone else, who learns their network address. All three are asked about.
1222
+ */
1223
+ readonly severity: 'routine' | 'destructive' | 'public' | 'direct';
1124
1224
  readonly lines: readonly ConsentLine[];
1125
1225
  readonly applet: AppletIdentity;
1126
1226
  /** The raw event, for an "advanced" disclosure. */
@@ -1263,6 +1363,37 @@ interface KernlOptions {
1263
1363
  readonly intervalMs: number;
1264
1364
  readonly attempts: number;
1265
1365
  };
1366
+ /** Where applets' remote tools are looked for, and which tool families the host vouches for (D-041). */
1367
+ readonly remoteTools?: RemoteToolsSettings;
1368
+ /** How applets connect people directly: the relays that introduce them and the ICE servers that help (D-042). */
1369
+ readonly directConnections?: DirectConnectionsSettings;
1370
+ }
1371
+ /** A STUN or TURN server, as `RTCPeerConnection` takes it. Its credentials stay in the shell. */
1372
+ interface DirectIceServer {
1373
+ readonly urls: readonly string[];
1374
+ readonly username?: string;
1375
+ readonly credential?: string;
1376
+ }
1377
+ /** The host's settings for direct connections between people. */
1378
+ interface DirectConnectionsSettings {
1379
+ /** Relays people in a room find each other through; the general (`super`) tier by default. */
1380
+ readonly relays?: readonly string[];
1381
+ /** STUN and TURN servers; none by default, so only people who can reach each other's devices connect. */
1382
+ readonly iceServers?: readonly DirectIceServer[];
1383
+ /** Makes a peer connection; the browser's `RTCPeerConnection` by default. Without either, the `webrtc` domain is not offered. */
1384
+ readonly createPeer?: (configuration: RTCConfiguration) => RTCPeerConnection;
1385
+ }
1386
+ /** The person's settings for meeting people and calling remote tools, kept on this device, and the search for tool families. */
1387
+ interface KernlMultiplayer extends MultiplayerSettings {
1388
+ /** Find tool families from an announcement reference, a schema hash or a website, over the servers in use (D-043). */
1389
+ discover(input: string): Promise<readonly ToolFamilyCandidate[]>;
1390
+ }
1391
+ /** The host's settings for remote tools. */
1392
+ interface RemoteToolsSettings {
1393
+ /** Relays a tool server is looked for on when the applet names none; the general (`super`) tier by default. */
1394
+ readonly relays?: readonly string[];
1395
+ /** Tool families pinned to verified schemas, for applets that ask by family; none by default. */
1396
+ readonly registry?: readonly CvmRegistryFamily[];
1266
1397
  }
1267
1398
  /** The applet store's catalogue. */
1268
1399
  interface AppletCatalog {
@@ -1308,6 +1439,8 @@ interface Kernl {
1308
1439
  readonly mailboxes: AccountMailboxes;
1309
1440
  /** Where the account's uploads go (BUD-03, kind 10063); the defaults while it has no list. */
1310
1441
  readonly files: AccountFileServers;
1442
+ /** The person's servers, helpers and trusted tool families for meeting people and calling remote tools (D-043). */
1443
+ readonly multiplayer: KernlMultiplayer;
1311
1444
  /** Monitored servers (NIP-66) for completing and suggesting; idle until `start()`. */
1312
1445
  readonly directory: RelayDirectory;
1313
1446
  readonly intents: Intents;
@@ -3033,6 +3166,226 @@ declare function createKernlNetwork(options: Pick<KernlOptions, 'eventCache'>, p
3033
3166
  */
3034
3167
  declare function commonActionsFor(parts: Omit<KernlNetworkParts, 'destroyed$'>, network: Pick<KernlNetwork, 'profiles' | 'replaceableLoader' | 'signer'>, consent: SigningConsent): CommonServiceOptions;
3035
3168
 
3169
+ /** A key per applet window that belongs to no account. */
3170
+ interface WindowIdentities {
3171
+ /** The window's signer, made the first time the window needs one. */
3172
+ signer(windowId: string): PrivateKeySigner;
3173
+ /** Wipe the window's key. The next use makes a new one. */
3174
+ release(windowId: string): void;
3175
+ }
3176
+ /**
3177
+ * Keys for the work a window does under its own name rather than the account's:
3178
+ * calling remote tools and reaching other people directly. Each window gets a
3179
+ * fresh key, so a server or a peer cannot link two applets, or one applet to
3180
+ * the account. The key lives in an applesauce signer, is never stored, and is
3181
+ * overwritten with zeros when the window ends (D-041).
3182
+ *
3183
+ * @returns The window identities.
3184
+ * @example
3185
+ * ```ts
3186
+ * const identities = createWindowIdentities();
3187
+ * const pubkey = await identities.signer('w1').getPublicKey();
3188
+ * identities.release('w1');
3189
+ * ```
3190
+ */
3191
+ declare function createWindowIdentities(): WindowIdentities;
3192
+
3193
+ /** What the remote tools service needs from the shell. */
3194
+ interface RemoteToolsOptions {
3195
+ readonly pool: ApplesaucePool;
3196
+ /** Where a tool server is looked for when the applet names no relay for it; read when a window first calls one. */
3197
+ readonly relays: () => readonly string[];
3198
+ readonly identities: WindowIdentities;
3199
+ /** Tool families the host and the person vouch for, pinned to verified schemas; read when a window first calls one. */
3200
+ readonly registry?: () => readonly CvmRegistryFamily[];
3201
+ }
3202
+ /**
3203
+ * The host's tool families and the person's together. The person's family
3204
+ * takes the place of the host's with the same label and provider, so what
3205
+ * they chose is what an applet asking by that label reaches (D-043).
3206
+ *
3207
+ * @param host - Families from `KernlOptions.remoteTools.registry`.
3208
+ * @param own - Families the person trusts.
3209
+ * @returns The families the tool service offers.
3210
+ * @example
3211
+ * ```ts
3212
+ * mergeFamilies(options.remoteTools?.registry ?? [], kernl.multiplayer.state().families);
3213
+ * ```
3214
+ */
3215
+ declare function mergeFamilies(host: readonly CvmRegistryFamily[], own: readonly CvmRegistryFamily[]): CvmRegistryFamily[];
3216
+ /**
3217
+ * kehto's tool transport over the shell's one pool. A request is published to
3218
+ * every relay and succeeds when any accepts it (D-028).
3219
+ *
3220
+ * @param pool - The shared applesauce pool.
3221
+ * @returns The relay surface `createNostrCvmTransport` takes.
3222
+ * @example
3223
+ * ```ts
3224
+ * createNostrCvmTransport({ pool: createCvmRelayPool(pool), defaultRelays });
3225
+ * ```
3226
+ */
3227
+ declare function createCvmRelayPool(pool: ApplesaucePool): CvmRelayPool;
3228
+ /**
3229
+ * The `cvm` service: applets call tools on remote servers through the shell.
3230
+ *
3231
+ * Each window gets a kehto tool service of its own, with a transport that
3232
+ * calls as that window's key (D-041). Two applets that use the same server
3233
+ * neither share a client key nor receive each other's server events, and no
3234
+ * call is made as the account. When the window ends, its transport closes and
3235
+ * its key is wiped.
3236
+ *
3237
+ * @param options - Pool, default relays, window identities and an optional registry.
3238
+ * @returns The service handler to register as `cvm`.
3239
+ * @example
3240
+ * ```ts
3241
+ * registry.cvm = createRemoteToolsService({ pool, relays: () => tiers.get().super, identities });
3242
+ * ```
3243
+ */
3244
+ declare function createRemoteToolsService(options: RemoteToolsOptions): ServiceHandler;
3245
+
3246
+ /** What the direct connections service needs from the shell. */
3247
+ interface DirectConnectionsOptions {
3248
+ readonly pool: ApplesaucePool;
3249
+ /** Where people in a room find each other; read when a window first opens a session. */
3250
+ readonly relays: () => readonly string[];
3251
+ readonly identities: WindowIdentities;
3252
+ /** STUN and TURN servers that help connections through; read when a window first opens a session. */
3253
+ readonly iceServers: () => readonly DirectIceServer[];
3254
+ /** Makes a peer connection; the page's `RTCPeerConnection` by default. */
3255
+ readonly createPeer?: (configuration: RTCConfiguration) => RTCPeerConnection;
3256
+ /** The verified applet a window runs, or undefined. */
3257
+ readonly appletOf: (windowId: string) => Pick<AppletSummary, 'identity' | 'publisher' | 'manifest'> | undefined;
3258
+ /** Whether the person granted this window's applet direct connections, and has not blocked it. */
3259
+ readonly isGranted: (windowId: string) => boolean;
3260
+ /** Put the summary to the person; resolve true only on yes. */
3261
+ readonly ask: (summary: ConsentSummary) => Promise<boolean>;
3262
+ }
3263
+ /**
3264
+ * The stable address rooms are kept apart by: the publisher, the manifest
3265
+ * kind and the applet's name, the same for every version. Paja derives the
3266
+ * same string, so one applet meets the same rooms in either shell when both
3267
+ * introduce people through the same servers.
3268
+ *
3269
+ * @param summary - The verified applet.
3270
+ * @returns `<publisher>:<kind>:<name>`.
3271
+ * @example
3272
+ * ```ts
3273
+ * directNamespace(summary); // 'ab12…:35129:chess'
3274
+ * ```
3275
+ */
3276
+ declare function directNamespace(summary: Pick<AppletSummary, 'publisher' | 'manifest'>): string;
3277
+ /**
3278
+ * The consent prompt for one direct session: who it reaches, what they learn
3279
+ * about the person, what the shell cannot see, and which servers introduce
3280
+ * the two sides. A direct connection hands the other side the person's
3281
+ * network address, and what passes over it is out of the shell's sight, so
3282
+ * the prompt says both plainly.
3283
+ *
3284
+ * @param requirements - What kehto's WebRTC service planned for the session.
3285
+ * @param applet - The applet asking.
3286
+ * @returns The summary the host renders.
3287
+ * @example
3288
+ * ```ts
3289
+ * describeDirectConnection(requirements, identity).title; // 'Connect directly to other people'
3290
+ * ```
3291
+ */
3292
+ declare function describeDirectConnection(requirements: readonly PermissionRequirement[], applet: AppletIdentity): ConsentSummary;
3293
+ /**
3294
+ * The `webrtc` service: applets open direct sessions with other people.
3295
+ *
3296
+ * Each window gets kehto's WebRTC service over {@link createDirectSignaling},
3297
+ * signing under the window's own key. kehto opens a session only through the
3298
+ * runtime's approval step, which kernl supplies here instead of kehto's
3299
+ * permission authority: the window's applet must hold the `webrtc` grant, the
3300
+ * person is asked once per session, and the session's work stops when the
3301
+ * window ends, its grant changes or the person says no (D-042). Upstream
3302
+ * gap: kehto's ACL has no capability for `webrtc`, so the grant is checked
3303
+ * here, not by the ACL.
3304
+ *
3305
+ * @param options - Pool, relays, identities, ICE servers, peer factory and the grant and consent hooks.
3306
+ * @returns The service handler to register as `webrtc`.
3307
+ * @example
3308
+ * ```ts
3309
+ * registry.webrtc = createDirectConnectionsService({ pool, relays, identities, iceServers: [], createPeer, appletOf, isGranted, ask });
3310
+ * ```
3311
+ */
3312
+ declare function createDirectConnectionsService(options: DirectConnectionsOptions): ServiceHandler;
3313
+
3314
+ /**
3315
+ * The signaling format, shared with Paja so one applet meets the same rooms in
3316
+ * either shell when both introduce people through the same servers.
3317
+ *
3318
+ * @example
3319
+ * ```ts
3320
+ * JSON.parse(signal.content).v === DIRECT_SIGNALING_PROFILE; // a hello carries the format it speaks
3321
+ * ```
3322
+ */
3323
+ declare const DIRECT_SIGNALING_PROFILE = "soy-rtc/1";
3324
+ /**
3325
+ * The event kind signals travel in.
3326
+ *
3327
+ * @example
3328
+ * ```ts
3329
+ * const filter = { kinds: [DIRECT_SIGNAL_KIND], '#d': [wire] };
3330
+ * ```
3331
+ */
3332
+ declare const DIRECT_SIGNAL_KIND = 25050;
3333
+ /**
3334
+ * The largest JSON payload one message may carry, in bytes.
3335
+ *
3336
+ * @example
3337
+ * ```ts
3338
+ * new TextEncoder().encode(JSON.stringify(payload)).length <= DIRECT_MAX_PAYLOAD_BYTES; // else the send is refused
3339
+ * ```
3340
+ */
3341
+ declare const DIRECT_MAX_PAYLOAD_BYTES = 16384;
3342
+ /** The window's own signer: a key that belongs to no account. */
3343
+ interface SignalSigner {
3344
+ getPublicKey(): Promise<string>;
3345
+ signEvent(template: EventTemplate): Promise<NostrEvent>;
3346
+ readonly nip44: {
3347
+ encrypt(pubkey: string, plaintext: string): Promise<string>;
3348
+ decrypt(pubkey: string, ciphertext: string): Promise<string>;
3349
+ };
3350
+ }
3351
+ /** Where signals are published and read. */
3352
+ interface SignalRelay {
3353
+ subscribe(relays: readonly string[], filters: NostrFilter[], onEvent: (event: NostrEvent) => void): {
3354
+ close(): void;
3355
+ };
3356
+ publish(relays: readonly string[], event: NostrEvent): Promise<void>;
3357
+ }
3358
+ /** What one window's direct connections run on. */
3359
+ interface DirectSignalingOptions {
3360
+ readonly signer: SignalSigner;
3361
+ /** The applet's stable address; rooms of different applets never meet. */
3362
+ readonly namespace: string;
3363
+ readonly relays: readonly string[];
3364
+ readonly relay: SignalRelay;
3365
+ /** STUN and TURN addresses the host configured, approved with the session. */
3366
+ readonly iceEndpoints: readonly string[];
3367
+ readonly createPeer: () => RTCPeerConnection;
3368
+ }
3369
+ /**
3370
+ * kehto's WebRTC hooks for one window, speaking the `soy-rtc/1` signaling
3371
+ * format over the shell's pool.
3372
+ *
3373
+ * Signals are signed by the window's own key and carry the session's room
3374
+ * address, never the account. Offers and answers are encrypted to the one
3375
+ * peer they are for. Application data goes only through the data channel;
3376
+ * delivery is reliable and ordered, and a peer that asks for otherwise is
3377
+ * left out. A message is at most 16 KiB of JSON; at most four sessions per
3378
+ * window and eight peers per session (D-042).
3379
+ *
3380
+ * @param options - The window's signer and namespace, the relays, and the peer factory.
3381
+ * @returns Options for kehto's `createWebrtcService`.
3382
+ * @example
3383
+ * ```ts
3384
+ * createWebrtcService(createDirectSignaling({ signer, namespace, relays, relay, iceEndpoints: [], createPeer }));
3385
+ * ```
3386
+ */
3387
+ declare function createDirectSignaling(options: DirectSignalingOptions): WebrtcServiceOptions;
3388
+
3036
3389
  /**
3037
3390
  * Whether a host-supplied theme has the colours NAP-THEME requires.
3038
3391
  *
@@ -3082,6 +3435,18 @@ interface KernlServiceDeps {
3082
3435
  } | null;
3083
3436
  /** Identity lookups; defaults to the applesauce-backed providers. */
3084
3437
  readonly identity?: IdentityProviders;
3438
+ /** Keys for the work a window does under its own name; a fresh set by default (D-041). */
3439
+ readonly identities?: WindowIdentities;
3440
+ /** Where remote tools are looked for and which families the host vouches for. */
3441
+ readonly remoteTools?: RemoteToolsSettings | undefined;
3442
+ /** Direct connections; without them the `webrtc` domain is not offered (D-042). */
3443
+ readonly directConnections?: DirectConnectionsDeps | undefined;
3444
+ /** The person's own choices, which come before the host's (D-043). */
3445
+ readonly multiplayer?: Pick<MultiplayerSettings, 'state'>;
3446
+ }
3447
+ /** What the `webrtc` service needs beyond the pool and the window identities. */
3448
+ interface DirectConnectionsDeps extends Pick<DirectConnectionsOptions, 'createPeer' | 'appletOf' | 'isGranted' | 'ask'> {
3449
+ readonly settings: Omit<DirectConnectionsSettings, 'createPeer'>;
3085
3450
  }
3086
3451
  /** The registered services plus the handles the shell keeps calling. */
3087
3452
  interface KernlServices {
@@ -3105,11 +3470,12 @@ declare function resourceInitFor(deps: Pick<KernlServiceDeps, 'resolveIdentity'>
3105
3470
  /**
3106
3471
  * Register kehto's reference services over the shell's applesauce layer.
3107
3472
  *
3108
- * `relay`, `identity`, `theme`, `notify`, `link`, `resource`, `dm` and `outbox`
3109
- * are wired; every network path goes through the one pool, every resource
3110
- * fetch through the bridge registry's SSRF policy, links open only over
3111
- * `https:` and `mailto:`, notifications surface through the host, and outbox
3112
- * publishes pass the consent gate before they are signed.
3473
+ * `relay`, `identity`, `theme`, `notify`, `link`, `resource`, `dm`, `outbox`
3474
+ * and `cvm` are wired; every network path goes through the one pool, every
3475
+ * resource fetch through the bridge registry's SSRF policy, links open only
3476
+ * over `https:` and `mailto:`, notifications surface through the host, outbox
3477
+ * publishes pass the consent gate before they are signed, and remote tools are
3478
+ * called under each window's own key.
3113
3479
  *
3114
3480
  * @param deps - Pool, tiers, store, auth, consent gate, host, registries and identity resolver.
3115
3481
  * @returns The service registry and the theme and dm handles.
@@ -3477,4 +3843,4 @@ declare const PACKAGE_NAME = "@kernlize/core";
3477
3843
  */
3478
3844
  declare const KERNL_FRAME_POLICY_META: string;
3479
3845
 
3480
- export { type AccountFileServers, type AccountFileServersOptions, type AccountMailboxes, type AccountMailboxesOptions, type ApplesaucePool, type AppletCatalog, type AppletConfigOptions, type AppletHandle, type AppletIdentity, type AppletLifecycle, type AppletPointer, type AppletStatus, type AppletSummary, BASELINE_DOMAINS, BLOB_TIMEOUT_MS, BUILTIN_PUBLISHER, type BlossomUploaderOptions, type BuiltinApplet, CATALOG_EMIT_MS, CATALOG_LIMIT, CATALOG_SETTLE_MS, CATALOG_TIMEOUT_MS, CONTROLLER_DENY_POLICY, CURRENT_VERSION_TIMEOUT_MS, type CatalogEntry, type CatalogQuery, type CommonActionsOptions, ConnectedEventCache, type ConsentLine, type ConsentPrompt, type ConsentSummary, DEFAULT_FILE_SERVERS, DEFAULT_MONITOR_RELAYS, DEFAULT_RELAY_TIERS, DEFAULT_SUGGESTIONS, DELIVERY_RETRY, DOMAIN_CAPABILITIES, type DefaultBridgesOptions, type DefaultMessagingOptions, type DirectoryPool, type EoseSubscription, EventCacheOpener, type FileServerState, type FrameLike, type GrantRecord, type Grants, type GrantsOptions, type GroupMessagingOptions, type GuardFacade, type GuardPipeline, type GuardPipelineOptions, HANDLER_PREFERENCES_KIND, type HandlerChoice, type HandlerDefaults, type HandlerDefaultsOptions, type HandlerOption, type HandlerPreferences, type HandlerPrompt, type IdentityProfile, type IdentityProviderOptions, type IdentityProviders, type InboxRelays, type InstallableApplet, type InstalledApplet, type InstalledApplets, type InstalledContract, type IntentDeliveryOptions, type IntentRouter, type IntentRouterOptions, type Intents, KERNL_FRAME_POLICY_META, type Kernl, KernlAccountManager, type KernlGrants, type KernlHost, type KernlIntentDeps, type KernlIntents, type KernlNetwork, type KernlNetworkParts, type KernlOptions, type KernlServiceDeps, type KernlServices, LINK_PROTOCOLS, type LifecycleContext, type LoadCatalogOptions, type LookupBefore, type LookupReplaceableOptions, MANIFEST_TIMING, MESSAGING_UNAVAILABLE_REASONS, type MailboxPool, type MailboxSigner, type MailboxState, type Mailboxes, type ManifestTiming, type MessagingBackendFactories, type MessagingEncryption, type MountDeps, type MountGuardHooks, type MountPlan, type MountedApplet, type MultiServerUpload, type NamespacedStore, type OutboxRelayPoolLike, PACKAGE_NAME, PLAINTEXT_KEY_ACCOUNT_TYPES, type PipelineDisposition, type PlanMountOptions, type PreferenceSigner, type ProfileCard, type ProfileLoader, type ProfilePointer, type Profiles, type ProfilesOptions, type PublishAnswer, type PublishOutcome, type PublishedPointer, RUNTIME_FIREWALL_STORAGE_KEY, RUNTIME_OP_CLASSES, type RatchetMessagingOptions, type RelayDirectory, type RelayDirectoryOptions, type RelayListing, type RelayPermissions, type RelayTier, type RelayTiers, type ResolveAppletIdentity, type ResolveAppletOptions, type ResolvedApplet, type RuntimeFirewallHooks, type RuntimeFirewallHooksOptions, type RuntimeFirewallRules, type RuntimeFirewallState, type RuntimeRateRule, SHELL_RELAY_OPTIONS, type SealedGroupStoreOptions, type SealedRatchetStorageOptions, type Session, type SettingsPrompt, type ShellAdapterDeps, type SignerMessagingOptions, type SigningConsent, type SigningConsentOptions, type SigningTemplate, type StorageLike, type SuggestOptions, type SuggestPurpose, type TierMap, type TopicCount, UNKNOWN_CURRENT_VERSION, type UploadDetails, type WindowResolution, abbreviate, addressOf, applyRuntimeFirewallProfile, applyRuntimeFirewallRules, askUploadConsent, builtinAddress, capabilitiesForDomain, capabilitiesForDomains, catalogIdForRef, catalogRelays, commonActionsFor, createAccountFileServers, createAccountMailboxes, createAppletConfig, createAppletLifecycle, createAppletRelayBackend, createAppletRelayService, createAuthHooks, createBlossomUploader, createCommonActions, createConsentHandler, createDefaultBridges, createDefaultMessaging, createDmRelayPool, createEnvironmentResolver, createGrants, createGroupMessagesBackend, createGroupNetwork, createGuardPipeline, createHandlerDefaults, createIdentityProviders, createInstalledApplets, createIntentDelivery, createIntentRouter, createKernl, createKernlAccounts, createKernlIntents, createKernlNetwork, createKernlServices, createLegacyMessagesBackend, createNamespacedStore, createOutboxRelayPool, createPrivateMessagesBackend, createProfiles, createRatchetMessagesBackend, createRelayDirectory, createRelayPoolHooks, createRelayPoolLike, createRelayTiers, createReplaceableLoader, createRuntimeFirewallHooks, createSealedGroupStore, createSealedRatchetStorage, createShellAdapter, createSigningConsent, decodePointer, defaultFetchBlob, describeChange, describeOutcome, describeUpload, fetchManifestEvent, fileServerTags, fileServersFromEvent, fuzzyScore, grantNarrowingReason, isDestructiveKind, isReadOnlyAccount, isTheme, labelConversations, loadCatalog, lookupRelaysOf, lookupReplaceable, mailboxTags, mailboxesFromEvent, messagingSigner, mountApplet, newestEntries, openDefaultArtifactCache, parseHandlerPreferences, planMount, popularTopics, preferenceRelays, preferenceTemplate, preferredHandlers, publishAccepted, refForCatalogId, relayUrls, resolveApplet, resolveBuiltin, resolveWindow, resourceInitFor, runtimeFirewallRules, searchCatalog, selectRelayTier, signerAvailability, sizeWords, streamCatalog, subscribeWithEose, summarize, summarizePublish, toCatalogEntry, toGuardEvent, toProfileCard, toRelayUrl, toSession, wrapAccountSigner };
3846
+ export { type AccountFileServers, type AccountFileServersOptions, type AccountMailboxes, type AccountMailboxesOptions, type ApplesaucePool, type AppletCatalog, type AppletConfigOptions, type AppletHandle, type AppletIdentity, type AppletLifecycle, type AppletPointer, type AppletStatus, type AppletSummary, BASELINE_DOMAINS, BLOB_TIMEOUT_MS, BUILTIN_PUBLISHER, type BlossomUploaderOptions, type BuiltinApplet, CATALOG_EMIT_MS, CATALOG_LIMIT, CATALOG_SETTLE_MS, CATALOG_TIMEOUT_MS, CONTROLLER_DENY_POLICY, CURRENT_VERSION_TIMEOUT_MS, type CatalogEntry, type CatalogQuery, type CommonActionsOptions, ConnectedEventCache, type ConsentLine, type ConsentPrompt, type ConsentSummary, DEFAULT_FILE_SERVERS, DEFAULT_MONITOR_RELAYS, DEFAULT_RELAY_TIERS, DEFAULT_SUGGESTIONS, DELIVERY_RETRY, DIRECT_MAX_PAYLOAD_BYTES, DIRECT_SIGNALING_PROFILE, DIRECT_SIGNAL_KIND, DOMAIN_CAPABILITIES, type DefaultBridgesOptions, type DefaultMessagingOptions, type DirectConnectionsDeps, type DirectConnectionsOptions, type DirectConnectionsSettings, type DirectIceServer, type DirectSignalingOptions, type DirectoryPool, type EoseSubscription, EventCacheOpener, type FileServerState, type FrameLike, type GrantRecord, type Grants, type GrantsOptions, type GroupMessagingOptions, type GuardFacade, type GuardPipeline, type GuardPipelineOptions, HANDLER_PREFERENCES_KIND, type HandlerChoice, type HandlerDefaults, type HandlerDefaultsOptions, type HandlerOption, type HandlerPreferences, type HandlerPrompt, type IdentityProfile, type IdentityProviderOptions, type IdentityProviders, type InboxRelays, type InstallableApplet, type InstalledApplet, type InstalledApplets, type InstalledContract, type IntentDeliveryOptions, type IntentRouter, type IntentRouterOptions, type Intents, KERNL_FRAME_POLICY_META, type Kernl, KernlAccountManager, type KernlGrants, type KernlHost, type KernlIntentDeps, type KernlIntents, type KernlMultiplayer, type KernlNetwork, type KernlNetworkParts, type KernlOptions, type KernlServiceDeps, type KernlServices, LINK_PROTOCOLS, type LifecycleContext, type LoadCatalogOptions, type LookupBefore, type LookupReplaceableOptions, MANIFEST_TIMING, MESSAGING_UNAVAILABLE_REASONS, type MailboxPool, type MailboxSigner, type MailboxState, type Mailboxes, type ManifestTiming, type MessagingBackendFactories, type MessagingEncryption, type MountDeps, type MountGuardHooks, type MountPlan, type MountedApplet, type MultiServerUpload, type MultiplayerSettings, type MultiplayerState, type NamespacedStore, type OutboxRelayPoolLike, PACKAGE_NAME, PLAINTEXT_KEY_ACCOUNT_TYPES, type PipelineDisposition, type PlanMountOptions, type PreferenceSigner, type ProfileCard, type ProfileLoader, type ProfilePointer, type Profiles, type ProfilesOptions, type PublishAnswer, type PublishOutcome, type PublishedPointer, RUNTIME_FIREWALL_STORAGE_KEY, RUNTIME_OP_CLASSES, type RatchetMessagingOptions, type RelayDirectory, type RelayDirectoryOptions, type RelayListing, type RelayPermissions, type RelayTier, type RelayTiers, type RemoteToolsOptions, type RemoteToolsSettings, type ResolveAppletIdentity, type ResolveAppletOptions, type ResolvedApplet, type RuntimeFirewallHooks, type RuntimeFirewallHooksOptions, type RuntimeFirewallRules, type RuntimeFirewallState, type RuntimeRateRule, SHELL_RELAY_OPTIONS, type SealedGroupStoreOptions, type SealedRatchetStorageOptions, type Session, type SettingsPrompt, type ShellAdapterDeps, type SignalRelay, type SignalSigner, type SignerMessagingOptions, type SigningConsent, type SigningConsentOptions, type SigningTemplate, type StorageLike, type SuggestOptions, type SuggestPurpose, TOOL_DISCOVERY_TIMEOUT_MS, type TierMap, type ToolDiscoveryOptions, type ToolFamilyCandidate, type TopicCount, UNKNOWN_CURRENT_VERSION, type UploadDetails, type WindowIdentities, type WindowResolution, abbreviate, addressOf, applyRuntimeFirewallProfile, applyRuntimeFirewallRules, askUploadConsent, builtinAddress, capabilitiesForDomain, capabilitiesForDomains, catalogIdForRef, catalogRelays, commonActionsFor, createAccountFileServers, createAccountMailboxes, createAppletConfig, createAppletLifecycle, createAppletRelayBackend, createAppletRelayService, createAuthHooks, createBlossomUploader, createCommonActions, createConsentHandler, createCvmRelayPool, createDefaultBridges, createDefaultMessaging, createDirectConnectionsService, createDirectSignaling, createDmRelayPool, createEnvironmentResolver, createGrants, createGroupMessagesBackend, createGroupNetwork, createGuardPipeline, createHandlerDefaults, createIdentityProviders, createInstalledApplets, createIntentDelivery, createIntentRouter, createKernl, createKernlAccounts, createKernlIntents, createKernlNetwork, createKernlServices, createLegacyMessagesBackend, createMultiplayerSettings, createNamespacedStore, createOutboxRelayPool, createPrivateMessagesBackend, createProfiles, createRatchetMessagesBackend, createRelayDirectory, createRelayPoolHooks, createRelayPoolLike, createRelayTiers, createRemoteToolsService, createReplaceableLoader, createRuntimeFirewallHooks, createSealedGroupStore, createSealedRatchetStorage, createShellAdapter, createSigningConsent, createWindowIdentities, decodePointer, defaultFetchBlob, describeChange, describeDirectConnection, describeOutcome, describeUpload, directNamespace, discoverToolFamilies, fetchManifestEvent, fileServerTags, fileServersFromEvent, fuzzyScore, grantNarrowingReason, isDestructiveKind, isReadOnlyAccount, isTheme, labelConversations, loadCatalog, lookupRelaysOf, lookupReplaceable, mailboxTags, mailboxesFromEvent, mergeFamilies, messagingSigner, mountApplet, newestEntries, openDefaultArtifactCache, parseHandlerPreferences, planMount, popularTopics, preferenceRelays, preferenceTemplate, preferredHandlers, publishAccepted, refForCatalogId, relayUrls, resolveApplet, resolveBuiltin, resolveWindow, resourceInitFor, runtimeFirewallRules, searchCatalog, selectRelayTier, signerAvailability, sizeWords, streamCatalog, subscribeWithEose, summarize, summarizePublish, toCatalogEntry, toGuardEvent, toProfileCard, toRelayUrl, toSession, validFamily, wrapAccountSigner };