palbase 0.30.0 → 0.32.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.
Files changed (54) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{DF4GUELY.js → 3CS6VXYP.js} +1 -1
  8. package/dist/chunks/{SLQWIFCV.js → 3NIRNAKX.js} +2 -2
  9. package/dist/chunks/{KVYTS3P2.js → AD6BJ63E.js} +1 -1
  10. package/dist/chunks/{K5N4GOSB.js → DRCWV56K.js} +1 -1
  11. package/dist/chunks/{GT4Z7F3E.js → EVQIB54O.js} +2 -2
  12. package/dist/chunks/{CVO4TDIH.js → GAAU3U67.js} +1 -1
  13. package/dist/chunks/{2HCODUCC.js → IDM7ARVQ.js} +2 -2
  14. package/dist/chunks/{AU2V6M6Q.js → KH7PPBKZ.js} +2 -2
  15. package/dist/chunks/RUA3JVMI.js +2 -0
  16. package/dist/chunks/{DTMKEMIF.js → S6YHWYG6.js} +2 -2
  17. package/dist/chunks/{PN5NJVJ6.js → SGG2NIVV.js} +2 -2
  18. package/dist/chunks/{RYYYVFUC.js → UKIDPVMT.js} +1 -1
  19. package/dist/chunks/{WUUXHETU.js → VLU75M7B.js} +2 -2
  20. package/dist/chunks/{KGH6GRJH.js → VXZQNE2S.js} +2 -2
  21. package/dist/chunks/{MN7PDXRL.js → WEX24LUH.js} +2 -2
  22. package/dist/chunks/WQIMQXJP.js +22 -0
  23. package/dist/chunks/{FYJRLZWD.js → X7QBDTU7.js} +1 -1
  24. package/dist/chunks/{DGN5C3D4.js → XBVNY6FK.js} +2 -2
  25. package/dist/chunks/{LZN5JQDI.js → YCLTZO5T.js} +2 -2
  26. package/dist/chunks/{425EWENK.js → YNQPTVKR.js} +2 -2
  27. package/dist/chunks/{5KRLND5G.js → YTTXILO7.js} +2 -2
  28. package/dist/chunks/{AGYCOKIU.js → ZQHO7RWS.js} +1 -1
  29. package/dist/chunks/{Y5OIT4QP.js → ZW2DFP7N.js} +2 -2
  30. package/dist/cli.js +78 -78
  31. package/dist/cloud/index.js +2 -2
  32. package/dist/refuse/ai.js +1 -1
  33. package/dist/refuse/backend.js +1 -1
  34. package/dist/refuse/cloud.js +1 -1
  35. package/dist/refuse/server.js +1 -1
  36. package/dist/server/index.js +2 -2
  37. package/dist/server/testing.js +2 -2
  38. package/dist/web/calls-ui.js +2 -2
  39. package/dist/web/index.js +2 -2
  40. package/dist/web/message.js +2 -2
  41. package/dist/web/palbe.js +2 -2
  42. package/dist/web/paywall.js +2 -2
  43. package/dist/web/push-sw.js +1 -1
  44. package/dist/web/ssr.js +2 -2
  45. package/dist/web/vite.js +2 -2
  46. package/package.json +2 -2
  47. package/types/cloud/src/generated/project.d.ts +1 -1
  48. package/types/cloud/src/generated/studio.d.ts +3 -3
  49. package/types/internal/src/modules/calls.d.ts +15 -186
  50. package/types/internal/src/modules/machines.d.ts +44 -2
  51. package/types/web/src/calls.d.ts +6 -36
  52. package/types/web/src/client.d.ts +1 -1
  53. package/dist/chunks/5CGZD6ER.js +0 -2
  54. package/dist/chunks/VVHRNZRS.js +0 -22
@@ -49,10 +49,6 @@ export type Call = {
49
49
  metadata: {
50
50
  [key: string]: string;
51
51
  };
52
- /**
53
- * Between two devices, or through the media server
54
- */
55
- mode: "p2p" | "sfu";
56
52
  /**
57
53
  * Its people and bots
58
54
  */
@@ -102,18 +98,14 @@ export type CallEvent = {
102
98
  * direct or group
103
99
  */
104
100
  kind: string;
105
- /**
106
- * p2p or sfu
107
- */
108
- mode: string;
109
101
  /**
110
102
  * user or bot
111
103
  */
112
104
  participant_kind?: string;
113
105
  /**
114
- * The call's room on the media server
106
+ * The call's room on the media server: what an agent's ticket is for
115
107
  */
116
- room?: string | null;
108
+ room: string;
117
109
  /**
118
110
  * The call's state
119
111
  */
@@ -174,10 +166,6 @@ export type CallSettings = {
174
166
  * How many people (and bots) a call holds
175
167
  */
176
168
  max_participants: number;
177
- /**
178
- * Every direct call's media goes through the relay
179
- */
180
- relay_all: boolean;
181
169
  };
182
170
  /**
183
171
  * What to change (null hook: none)
@@ -195,10 +183,6 @@ export type CallSettingsRequest = {
195
183
  * 2 to 100
196
184
  */
197
185
  max_participants?: number;
198
- /**
199
- * Relay every direct call
200
- */
201
- relay_all?: boolean;
202
186
  };
203
187
  /**
204
188
  * The device
@@ -265,40 +249,6 @@ export type HookSettings = {
265
249
  */
266
250
  url: string;
267
251
  };
268
- /**
269
- * An ICE candidate
270
- */
271
- export type IceCandidate = {
272
- /**
273
- * The candidate line
274
- */
275
- candidate: string;
276
- /**
277
- * Its media section's index
278
- */
279
- sdp_m_line_index?: number | null;
280
- /**
281
- * Its media section's id
282
- */
283
- sdp_mid?: string | null;
284
- };
285
- /**
286
- * A STUN or TURN server
287
- */
288
- export type IceServer = {
289
- /**
290
- * The relay credential
291
- */
292
- credential?: string;
293
- /**
294
- * The server's URLs (stun:, turn:, turns:)
295
- */
296
- urls: string[];
297
- /**
298
- * The relay credential's name
299
- */
300
- username?: string;
301
- };
302
252
  /**
303
253
  * People to ask in
304
254
  */
@@ -313,50 +263,30 @@ export type InviteRequest = {
313
263
  user_ids: string[];
314
264
  };
315
265
  /**
316
- * How a device's media flows
266
+ * A device's way into the call's room on the media server, where every call's media flows — one to one or in a group: its url and the ticket its client connects with
317
267
  */
318
268
  export type Media = {
319
- /**
320
- * A direct call's ICE servers
321
- */
322
- ice_servers: IceServer[];
323
- /**
324
- * relay: every packet through the relay
325
- */
326
- ice_transport_policy: "all" | "relay";
327
- /**
328
- * Between the two devices, or through the media server
329
- */
330
- mode: "p2p" | "sfu";
331
- /**
332
- * This device makes the offer (the caller's); the other answers it
333
- */
334
- offerer: boolean;
335
- /**
336
- * Their device
337
- */
338
- peer_device_id: string | null;
339
- /**
340
- * The other person of a direct call
341
- */
342
- peer_user_id: string | null;
343
269
  /**
344
270
  * The call's room
345
271
  */
346
- room: string | null;
272
+ room: string;
347
273
  /**
348
274
  * The ticket into the call's room
349
275
  */
350
- token: string | null;
276
+ token: string;
351
277
  /**
352
278
  * The media server's url (wss://)
353
279
  */
354
- url: string | null;
280
+ url: string;
355
281
  };
356
282
  /**
357
283
  * A person, or a bot, in a call
358
284
  */
359
285
  export type Participant = {
286
+ /**
287
+ * What the media server sent them in the call (bytes): what the call is billed by, as its meter told it (up to a minute behind)
288
+ */
289
+ bytes: number;
360
290
  /**
361
291
  * The device they are in it on (answered on)
362
292
  */
@@ -402,80 +332,6 @@ export type Participant = {
402
332
  */
403
333
  user_id: string;
404
334
  };
405
- /**
406
- * A signal between a direct call's two devices: an offer or an answer carries its sdp, a candidate its candidate
407
- */
408
- export type Signal = {
409
- /**
410
- * The call
411
- */
412
- call_id: string;
413
- candidate?: IceCandidate;
414
- /**
415
- * When it was sent
416
- */
417
- created_at: string;
418
- /**
419
- * From which device
420
- */
421
- from_device_id: string;
422
- /**
423
- * Who sent it
424
- */
425
- from_user_id: string;
426
- /**
427
- * An offer's or an answer's SDP (absent on a candidate or a bye)
428
- */
429
- sdp?: string;
430
- /**
431
- * Its place in the call's order
432
- */
433
- seq: number;
434
- /**
435
- * For which device
436
- */
437
- to_device_id: string;
438
- /**
439
- * What it is
440
- */
441
- type: "offer" | "answer" | "candidate" | "bye";
442
- };
443
- /**
444
- * Signals
445
- */
446
- export type SignalList = {
447
- /**
448
- * The signals, in order
449
- */
450
- signals: Signal[];
451
- };
452
- /**
453
- * A signal to the other device
454
- */
455
- export type SignalRequest = {
456
- candidate?: IceCandidate;
457
- /**
458
- * The device sending it
459
- */
460
- device_id: string;
461
- /**
462
- * An offer's or an answer's SDP (32 KiB at most)
463
- */
464
- sdp?: string | null;
465
- /**
466
- * What it is
467
- */
468
- type: "offer" | "answer" | "candidate" | "bye";
469
- };
470
- /**
471
- * A signal kept
472
- */
473
- export type SignalSent = {
474
- /**
475
- * Its place in the call's order
476
- */
477
- seq: number;
478
- };
479
335
  /**
480
336
  * A call to make
481
337
  */
@@ -606,7 +462,7 @@ export declare function client(t: Transport): {
606
462
  /**
607
463
  * Call people
608
464
  *
609
- * Rings one person (a direct call, between the two devices) or asks several into a group call (on the media server), from the caller's device. `ring: false` makes a group call that rings no one: the people asked join it when they like (a huddle). A call to someone who is calling the caller this moment is that call, answered (200). A call to someone in another call — or being rung by one — ends at once, `busy`, and they hear they missed it. Who may be called is the project's: no one who blocked the caller or whom they blocked, no deleted account, a conversation's members alone when it names one (`conversation_id`), and whom the project's hook allows (`calls.can_call`). A call from a conversation is kept in it, as a `call` message.
465
+ * Rings one person (a direct call) or asks several into a group call, from the caller's device; either is a room on the media server, which the caller's device is in from the start (`POST /calls/{call_id}/media`). `ring: false` makes a group call that rings no one: the people asked join it when they like (a huddle). A call to someone who is calling the caller this moment is that call, answered (200). A call to someone in another call — or being rung by one — ends at once, `busy`, and they hear they missed it. Who may be called is the project's: no one who blocked the caller or whom they blocked, no deleted account, a conversation's members alone when it names one (`conversation_id`), and whom the project's hook allows (`calls.can_call`). A call from a conversation is kept in it, as a `call` message.
610
466
  */
611
467
  startCall(input: {
612
468
  body: StartCallRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -652,7 +508,7 @@ export declare function client(t: Transport): {
652
508
  /**
653
509
  * Let an agent in
654
510
  *
655
- * Lets the project's agent into the call as a bot: a participant everyone in it hears (and sees), listed as a bot (`kind` bot; on the media server, an agent). The ticket is the media server's url and an access token its open-source client and agent libraries connect with as they are — LiveKit's: the agent receives each person's audio as a track of its own, named by their user id, and publishes its own. A direct call between two devices moves to the media server for it, going on. Palbase runs no agent: transcribing, answering, taking notes are the agent's. The `calls.call.started` and `calls.participant.joined` webhooks are when to send one in.
511
+ * Lets the project's agent into the call as a bot: a participant everyone in it hears (and sees), listed as a bot (`kind` bot; on the media server, an agent). The ticket is the media server's url and an access token its open-source client and agent libraries connect with as they are — LiveKit's: the agent receives each person's audio as a track of its own, named by their user id, and publishes its own. What the media server sends it is billed as anyone's; past a Free project's call data no new agent comes in (`429 quota_exceeded`), one in the call already gets its way back in. Palbase runs no agent: transcribing, answering, taking notes are the agent's. The `calls.call.started` and `calls.participant.joined` webhooks are when to send one in.
656
512
  */
657
513
  createCallTicket(input: {
658
514
  path: {
@@ -672,7 +528,7 @@ export declare function client(t: Transport): {
672
528
  /**
673
529
  * Set call settings
674
530
  *
675
- * What it names changes: how many people (and bots) a call holds (2 to 100), whether every direct call's media goes through the relay (no one learns another's address, at the price of a hop), how many calls a person may start in an hour, and the hook asked whom one may call (`calls.can_call`; null: none). A hook set for the first time is given its signing secret, here, once.
531
+ * What it names changes: how many people (and bots) a call holds (2 to 100), how many calls a person may start in an hour, and the hook asked whom one may call (`calls.can_call`; null: none). A hook set for the first time is given its signing secret, here, once.
676
532
  */
677
533
  putCallSettings(input: {
678
534
  body: CallSettingsRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -758,7 +614,7 @@ export declare function client(t: Transport): {
758
614
  /**
759
615
  * How the media flows
760
616
  *
761
- * How the device's media flows in the call it is in. A direct call (`p2p`): the ICE servers its connection uses — STUN, and the relay with a credential of the device's own, revoked as it leaves — whether every packet goes through the relay (`ice_transport_policy` relay, the project's `relay_all`), and whether this device makes the offer. A group (`sfu`): the media server's url and a ticket into the call's room.
617
+ * A ticket into the call's room on the platform's media server, where every call's media flows — one to one or in a group — for the device the reader is in the call on: the media server's url, the ticket, the room. What the media server sends the call's people is what the project's calls are billed by.
762
618
  */
763
619
  getCallMedia(input: {
764
620
  path: {
@@ -770,7 +626,7 @@ export declare function client(t: Transport): {
770
626
  /**
771
627
  * Ask more people in
772
628
  *
773
- * Asks more people into a call the reader is in, ringing them (or not: `ring: false`). A direct call becomes a group on the media server: its devices are told (`mode` sfu on their channel) and move there, the call going on.
629
+ * Asks more people into a call the reader is in, ringing them (or not: `ring: false`). A direct call becomes a group, going on in the same room.
774
630
  */
775
631
  inviteToCall(input: {
776
632
  path: {
@@ -779,32 +635,5 @@ export declare function client(t: Transport): {
779
635
  body: InviteRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
780
636
  signal?: AbortSignal;
781
637
  }): Promise<Reply<200, Call>>;
782
- /**
783
- * Signals missed
784
- *
785
- * The signals for the device after `after` (the last seq it has), in order: what it missed of what was told.
786
- */
787
- listCallSignals(input: {
788
- path: {
789
- call_id: string;
790
- };
791
- query: {
792
- device_id: string; /** The last seq the device has (0: from the first) */
793
- after?: number;
794
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
795
- signal?: AbortSignal;
796
- }): Promise<Reply<200, SignalList>>;
797
- /**
798
- * Signal the other device
799
- *
800
- * An offer, an answer, a candidate or a goodbye for the other device of a direct call — kept for it, and told to it on its channel (`signal`) as it is sent. Nothing goes before the call is answered: no address leaves a device for someone who did not pick up.
801
- */
802
- sendCallSignal(input: {
803
- path: {
804
- call_id: string;
805
- };
806
- body: SignalRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
807
- signal?: AbortSignal;
808
- }): Promise<Reply<202, SignalSent>>;
809
638
  };
810
639
  export type Client = ReturnType<typeof client>;
@@ -307,7 +307,7 @@ export type MachineCreate = {
307
307
  */
308
308
  always_on?: boolean;
309
309
  /**
310
- * Whether a pull request opened against its branch is previewed: its head built into a machine of its own, <name>-pr<n>, in this environment, with this environment's settings and secrets, answering at <name>-pr<n>-<ref> until the pull request closes; the pull request is told where in a comment. Turn it on in an environment kept for previews, not production's: the pull request's code runs with the environment's secrets. A machine read with Palbase's GitHub App alone (source.access app).
310
+ * Whether a pull request opened against its branch is previewed: its head built into a machine of its own, <name>-pr<n>, in this environment, with this environment's settings and secrets, answering at <name>-pr<n>-<ref> until the pull request closes; the pull request is told where in a comment. Turn it on in an environment kept for previews, not production's: the pull request's code runs with the environment's secrets. A machine read with a platform's tokens (source.access token) previews what its platform puts (PUT /machines/{name}/previews/{pull_request}), no comment written.
311
311
  */
312
312
  previews?: boolean;
313
313
  /**
@@ -1857,6 +1857,23 @@ export type PreviewOpened = {
1857
1857
  */
1858
1858
  commit: string;
1859
1859
  };
1860
+ /**
1861
+ * A platform's pull request: its branch — one of the machine's repository's own — the head its machine's preview builds, and the token it is read with.
1862
+ */
1863
+ export type PreviewDeploy = {
1864
+ /**
1865
+ * The pull request's branch, of the machine's repository itself: a fork's pull request is not built with the environment's secrets.
1866
+ */
1867
+ branch: string;
1868
+ /**
1869
+ * The branch's head, its full SHA: a newer push answers 409 commit_not_head. Left out, the branch's head.
1870
+ */
1871
+ commit?: string;
1872
+ /**
1873
+ * A GitHub App installation's token (ghs_…) for the machine's repository alone, read-only: used once, never kept.
1874
+ */
1875
+ git_access_token: string;
1876
+ };
1860
1877
  /** Palbase Machines */
1861
1878
  export declare function client(t: Transport): {
1862
1879
  /**
@@ -2024,6 +2041,31 @@ export declare function client(t: Transport): {
2024
2041
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2025
2042
  signal?: AbortSignal;
2026
2043
  }): Promise<Reply<200, PreviewList>>;
2044
+ /**
2045
+ * Open or update a platform's pull request preview
2046
+ *
2047
+ * For a machine read with a platform's tokens (source.access token: PalCore's, whose repositories have no Palbase App, so no pull request is heard here): opens the preview of the pull request at the head of its branch — one of the machine's repository's own: a fork's is not built — its own machine, <name>-pr<n>, and a database of its own when the machine runs its database's migrations — or builds the open one at it, and opens one that went idle again. The branch is read with git_access_token, a GitHub App installation's token for the machine's repository alone (ghs_…), once; a commit named must be the branch's head (409 commit_not_head). Its address and state are read with GET /machines/{name}/previews; the platform tells its pull request itself. Refused in a production environment (409 previews_in_production), for a machine read with Palbase's GitHub App (409 previews_from_github), with previews off (409 previews_off), and when the environment's limits refuse the preview (409 preview_refused, with why).
2048
+ */
2049
+ putMachinePreview(input: {
2050
+ path: {
2051
+ name: string; /** The pull request's number. */
2052
+ pull_request: number;
2053
+ };
2054
+ body: PreviewDeploy; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2055
+ signal?: AbortSignal;
2056
+ }): Promise<Reply<202, PreviewOpened>>;
2057
+ /**
2058
+ * Close a platform's pull request preview
2059
+ *
2060
+ * For a machine read with a platform's tokens: closes the preview of the pull request, its pull request closed — its machine and its own database are deleted at once. A machine read with Palbase's GitHub App has its previews closed as GitHub tells (409 previews_from_github).
2061
+ */
2062
+ deleteMachinePreview(input: {
2063
+ path: {
2064
+ name: string; /** The pull request's number. */
2065
+ pull_request: number;
2066
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2067
+ signal?: AbortSignal;
2068
+ }): Promise<Reply<204, undefined>>;
2027
2069
  /**
2028
2070
  * List a machine's domains
2029
2071
  *
@@ -2721,7 +2763,7 @@ export declare function client(t: Transport): {
2721
2763
  /**
2722
2764
  * Open a machine's pull request preview again
2723
2765
  *
2724
- * Opens a machine's preview of an open pull request again, at the pull request's head: one closed for want of a push (state idle: no push for 3 days, its machine and its own database taken away) or refused at its last push (state refused) is made anew, with a new, empty database of its own when the machine runs its database's migrations. One open goes on as it is, and its 3 days start again. A fork's preview under fork protection opens only at a head an admin authorized (409 preview_waits_authorization); one the environment's limits refuse again answers 409 preview_refused, with why.
2766
+ * Opens a machine's preview of an open pull request again, at the pull request's head: one closed for want of a push (state idle: no push for 3 days, its machine and its own database taken away) or refused at its last push (state refused) is made anew, with a new, empty database of its own when the machine runs its database's migrations. One open goes on as it is, and its 3 days start again. A fork's preview under fork protection opens only at a head an admin authorized (409 preview_waits_authorization); one the environment's limits refuse again answers 409 preview_refused, with why. A machine read with a platform's tokens has an idle or refused preview opened again by its platform, with a token (PUT /machines/{name}/previews/{pull_request}): 409 preview_needs_token.
2725
2767
  */
2726
2768
  openMachinePreview(input: {
2727
2769
  path: {
@@ -22,7 +22,7 @@ export interface RemoteParticipant {
22
22
  name: string | null;
23
23
  imageUrl: string | null;
24
24
  bot: boolean;
25
- /** Their audio and video: one stream for the whole call, whichever way the media flows. */
25
+ /** Their audio and video: one stream for the whole call, the same object while they are in it. */
26
26
  stream: MediaStream;
27
27
  /** Their microphone is heard. */
28
28
  audio: boolean;
@@ -37,8 +37,6 @@ export interface CallState {
37
37
  phase: CallPhase;
38
38
  /** This person rang (or started the group). */
39
39
  outgoing: boolean;
40
- /** Between the two devices, or through the media server. */
41
- mode: 'p2p' | 'sfu';
42
40
  /** This device's microphone and camera, while it is in the call. */
43
41
  local: MediaStream | null;
44
42
  microphone: boolean;
@@ -64,15 +62,13 @@ export interface StartCallOptions {
64
62
  /** The name and picture shown to those rung; else the caller's messaging profile's. */
65
63
  callerName?: string;
66
64
  callerImageUrl?: string;
67
- /** This call's media through the relay alone (CallsOptions.forceRelay, for one call). */
68
- forceRelay?: boolean;
69
65
  /** A microphone (and camera) stream the app opened already; left open when the call ends. */
70
66
  media?: MediaStream;
71
67
  }
72
68
  export interface AnswerOptions {
73
69
  /** Send video (the call's own kind unless said): a video call answered by voice, or a voice call with the camera on. */
74
70
  video?: boolean;
75
- forceRelay?: boolean;
71
+ /** A microphone (and camera) stream the app opened already; left open when the call ends. */
76
72
  media?: MediaStream;
77
73
  }
78
74
  export interface HistoryOptions {
@@ -86,16 +82,10 @@ export interface HistoryOptions {
86
82
  }
87
83
  /** The browser's media, as calls uses it: a test's or a runtime's own. */
88
84
  export interface CallsRTC {
89
- RTCPeerConnection: typeof RTCPeerConnection;
90
85
  MediaStream: typeof MediaStream;
91
86
  getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
92
87
  }
93
88
  export interface CallsOptions {
94
- /**
95
- * Every call's media through the relay (iceTransportPolicy relay), never straight between the devices: neither
96
- * learns the other's address, at the price of a hop. The project's relay_all setting says it for every app.
97
- */
98
- forceRelay?: boolean;
99
89
  /** The others' voices play by themselves (true by default): false leaves each RemoteParticipant's stream to the app. */
100
90
  playAudio?: boolean;
101
91
  }
@@ -116,28 +106,17 @@ export declare class CallSession {
116
106
  private phase;
117
107
  private endReason;
118
108
  private error;
119
- private relay;
120
109
  private local;
121
110
  private tracks;
122
111
  /** The tracks this device opened, stopped when the call is done with them; an app's own stream is left open. */
123
112
  private readonly opened;
124
113
  private mic;
125
114
  private facing;
126
- private link;
127
- private linking;
128
- private linkState;
129
- private sdpSent;
130
- private answered;
131
- private answer;
132
- private inbox;
133
- private lastSeq;
134
- private readonly seen;
135
- private readonly sentSeqs;
136
115
  private room;
137
116
  private joiningRoom;
138
117
  private roomState;
139
118
  private readonly streams;
140
- private readonly via;
119
+ private readonly owners;
141
120
  private readonly mutedInRoom;
142
121
  private readonly players;
143
122
  private sink;
@@ -156,7 +135,7 @@ export declare class CallSession {
156
135
  decline(): Promise<void>;
157
136
  /** Hangs up (or, while it rings, cancels): a direct call ends for both; a group goes on for the others. */
158
137
  leave(): Promise<void>;
159
- /** Asks more people in (ringing them unless ring is false): a direct call becomes a group, going on. */
138
+ /** Asks more people in (ringing them unless ring is false): a direct call becomes a group, going on in the same room. */
160
139
  invite(userIds: string | string[], o?: {
161
140
  ring?: boolean;
162
141
  }): Promise<void>;
@@ -178,18 +157,9 @@ export declare class CallSession {
178
157
  /** This device's microphone (and camera): the app's stream, or opened here. */
179
158
  private open;
180
159
  private camera;
181
- /** The camera's track now (null: off), wherever the media flows. */
160
+ /** The camera's track now (null: off): sent to the room in place of the one before. */
182
161
  private putVideo;
183
- private toPeer;
184
- /** Sends a signal once the call is answered (nothing leaves before): an offer or answer in order, candidates after it. */
185
- private signal;
186
- private take;
187
- /** A signal between the last one handled and this one that is neither handled nor this device's own: missed. */
188
- private gapBefore;
189
- private fetchSignals;
190
- private handle;
191
- /** The connection between the devices is gone: what came through it goes too. */
192
- private unlink;
162
+ /** Into the call's room with a ticket of this device's: its microphone (and camera) sent there, the others' heard. */
193
163
  private toRoom;
194
164
  private streamOf;
195
165
  private heard;
@@ -72,7 +72,7 @@ export interface ClientOptions {
72
72
  language?: string | readonly string[];
73
73
  /** What the device keeps of the signed-in person's conversations (pb.messaging): dropped on sign-out unless keepOnSignOut. */
74
74
  messaging?: MessagingOptions;
75
- /** How the signed-in person's calls go (pb.calls): every call through the relay (forceRelay), voices played by themselves (playAudio). */
75
+ /** How the signed-in person's calls go (pb.calls): the others' voices played by themselves (playAudio). */
76
76
  calls?: CallsOptions;
77
77
  }
78
78
  /**