@babelforce/babelconnect-sdk 0.12.0 → 0.13.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.
@@ -19,28 +19,15 @@ export declare const Agent: {
19
19
  readonly kind: MethodKind.Unary;
20
20
  };
21
21
  /**
22
- * Session opens the long-lived control stream. The client sends Command
23
- * intents; the server streams StateUpdate (one snapshot on open, then
24
- * entity-level patches). UI = f(AgentView).
25
- *
26
- * Native clients (Go/Dart desktop/mobile over HTTP/2) use this bidi stream.
27
- *
28
- * @generated from rpc babelconnect.v1.Agent.Session
29
- */
30
- readonly session: {
31
- readonly name: "Session";
32
- readonly I: typeof Command;
33
- readonly O: typeof StateUpdate;
34
- readonly kind: MethodKind.BiDiStreaming;
35
- };
36
- /**
37
- * Subscribe + Send are the browser-friendly split of Session: a browser speaks
38
- * gRPC-web, which cannot client-stream, so the bidi Session is impossible there.
39
- * Subscribe is the server→client half (the StateUpdate stream); Send is the
40
- * client→server half (one Command per unary call). Together they are equivalent
41
- * to Session for a single agent — the server keys both to the agent's one state
42
- * store. Command rejections still arrive as an Error on the Subscribe stream
43
- * (never on Send's reply), exactly as on Session.
22
+ * Subscribe + Send are the control stream, split into its server→client and
23
+ * client→server halves — the one shape every client uses (RPC-A4 retired the
24
+ * earlier bidi `Session` RPC, which needed HTTP/2 end-to-end and couldn't
25
+ * ride gRPC-web or a plain HTTP/1.1 ingress). Subscribe is the server→client
26
+ * half (StateUpdate: one snapshot on open, then entity-level patches; UI =
27
+ * f(AgentView)). Send is the client→server half (one Command per unary
28
+ * call). Together they key to the agent's one state store. Command
29
+ * rejections arrive as an Error on the Subscribe stream, never on Send's
30
+ * reply.
44
31
  *
45
32
  * @generated from rpc babelconnect.v1.Agent.Subscribe
46
33
  */
@@ -3,30 +3,35 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  // Package babelconnect.v1 is the control protocol between a babelconnect client
6
- // (the SDK, via Go/Dart/gRPC-web) and babelconnect-server. It carries CONTROL
7
- // ONLY — media is WebRTC on a separate plane; the server terminates the client's
8
- // WebRTC leg.
6
+ // (the SDK, via Go/Dart/gRPC-web/Connect) and babelconnect-server. It carries
7
+ // CONTROL ONLY — media is WebRTC on a separate plane; the server terminates the
8
+ // client's WebRTC leg.
9
9
  //
10
10
  // State lives on the SERVER, not the client. babelconnect-server holds the
11
11
  // canonical per-agent AgentView and pushes an initial snapshot + entity-level
12
- // patches over the Session stream; clients are DUMB RENDERERS — they apply
12
+ // patches over the Subscribe stream; clients are DUMB RENDERERS — they apply
13
13
  // patches mechanically and send Command intents, with no domain logic.
14
14
  //
15
- // Two entry points:
15
+ // Three entry points:
16
16
  // - Authenticate: unary handshake → the agent's identity.
17
- // - Session: a long-lived bidi stream. Client server: Command intents
18
- // (register/place/answer/hangup/mute/...). Server client:
19
- // StateUpdate (snapshot then patches). The WebRTC offer rides
20
- // on CallState (when RINGING); the client answers via the
21
- // AnswerCall intentsignaling fits the state model, no
22
- // separate event channel.
17
+ // - Subscribe: the server→client half StateUpdate (snapshot then
18
+ // patches). The WebRTC offer rides on CallState (when
19
+ // RINGING); the client answers via the AnswerCall intent —
20
+ // signaling fits the state model, no separate event channel.
21
+ // - Send: the client→server half one Command intent per call
22
+ // (register/place/answer/hangup/mute/...). Together with
23
+ // Subscribe this is the one blessed shape for every client
24
+ // (RPC-A4 retired the earlier bidi `Session` RPC once all
25
+ // clients had moved onto this split over the Connect
26
+ // protocol).
23
27
  //
24
28
  // The bearer token travels in gRPC metadata ("authorization: Bearer <token>")
25
29
  // on every call; Authenticate additionally returns the resolved identity.
26
30
  //
27
- // In addition to gRPC/gRPC-web, the unary RPCs are exposed as a REST+JSON surface
28
- // via grpc-gateway (the google.api.http annotations below) with an OpenAPI v2 spec
29
- // — one proto source of truth, two wire surfaces. Streaming stays gRPC/gRPC-web.
31
+ // In addition to gRPC/gRPC-web/Connect, the unary RPCs are exposed as a
32
+ // REST+JSON surface via grpc-gateway (the google.api.http annotations below)
33
+ // with an OpenAPI v2 spec — one proto source of truth, two wire surfaces.
34
+ // Streaming stays gRPC/gRPC-web/Connect.
30
35
  import { Ack, AgentView, AuthenticateRequest, Command, GetStateRequest, HistoryRequest, HistoryResponse, Identity, ListCampaignsRequest, ListCampaignsResponse, ListDispositionsRequest, ListDispositionsResponse, PhonebookRequest, PhonebookResponse, SendSmsRequest, SmsConversation, SmsThreadRequest, SmsThreadResponse, StateUpdate, SubscribeRequest, TransferTargetsRequest, TransferTargetsResponse } from "./babelconnect_pb.js";
31
36
  import { MethodKind } from "@bufbuild/protobuf";
32
37
  /**
@@ -48,28 +53,15 @@ export const Agent = {
48
53
  kind: MethodKind.Unary,
49
54
  },
50
55
  /**
51
- * Session opens the long-lived control stream. The client sends Command
52
- * intents; the server streams StateUpdate (one snapshot on open, then
53
- * entity-level patches). UI = f(AgentView).
54
- *
55
- * Native clients (Go/Dart desktop/mobile over HTTP/2) use this bidi stream.
56
- *
57
- * @generated from rpc babelconnect.v1.Agent.Session
58
- */
59
- session: {
60
- name: "Session",
61
- I: Command,
62
- O: StateUpdate,
63
- kind: MethodKind.BiDiStreaming,
64
- },
65
- /**
66
- * Subscribe + Send are the browser-friendly split of Session: a browser speaks
67
- * gRPC-web, which cannot client-stream, so the bidi Session is impossible there.
68
- * Subscribe is the server→client half (the StateUpdate stream); Send is the
69
- * client→server half (one Command per unary call). Together they are equivalent
70
- * to Session for a single agent — the server keys both to the agent's one state
71
- * store. Command rejections still arrive as an Error on the Subscribe stream
72
- * (never on Send's reply), exactly as on Session.
56
+ * Subscribe + Send are the control stream, split into its server→client and
57
+ * client→server halves — the one shape every client uses (RPC-A4 retired the
58
+ * earlier bidi `Session` RPC, which needed HTTP/2 end-to-end and couldn't
59
+ * ride gRPC-web or a plain HTTP/1.1 ingress). Subscribe is the server→client
60
+ * half (StateUpdate: one snapshot on open, then entity-level patches; UI =
61
+ * f(AgentView)). Send is the client→server half (one Command per unary
62
+ * call). Together they key to the agent's one state store. Command
63
+ * rejections arrive as an Error on the Subscribe stream, never on Send's
64
+ * reply.
73
65
  *
74
66
  * @generated from rpc babelconnect.v1.Agent.Subscribe
75
67
  */
@@ -235,7 +235,7 @@ export declare class SubscribeRequest extends Message<SubscribeRequest> {
235
235
  /**
236
236
  * Ack is the empty reply to Send. It only confirms the server accepted the
237
237
  * command for processing — the resulting state (or an Error) is delivered on the
238
- * Subscribe stream, the same way Session reports it.
238
+ * Subscribe stream, never in this reply.
239
239
  *
240
240
  * @generated from message babelconnect.v1.Ack
241
241
  */
@@ -1431,7 +1431,7 @@ export declare class WrapUpStatus extends Message<WrapUpStatus> {
1431
1431
  static equals(a: WrapUpStatus | PlainMessage<WrapUpStatus> | undefined, b: WrapUpStatus | PlainMessage<WrapUpStatus> | undefined): boolean;
1432
1432
  }
1433
1433
  /**
1434
- * StateUpdate is the single server → client message on the Session stream. On
1434
+ * StateUpdate is the single server → client message on the Subscribe stream. On
1435
1435
  * open the client receives a snapshot; thereafter partial patches. `seq` is
1436
1436
  * monotonic across snapshot+patch — a gap means the client should resubscribe
1437
1437
  * for a fresh snapshot. `error` is an out-of-band notice (command rejection /
@@ -1493,7 +1493,7 @@ export declare class StateUpdate extends Message<StateUpdate> {
1493
1493
  static equals(a: StateUpdate | PlainMessage<StateUpdate> | undefined, b: StateUpdate | PlainMessage<StateUpdate> | undefined): boolean;
1494
1494
  }
1495
1495
  /**
1496
- * Keepalive is an empty heartbeat frame sent on the Session/Subscribe streams so
1496
+ * Keepalive is an empty heartbeat frame sent on the Subscribe stream so
1497
1497
  * idle connections through proxies/LBs are not closed as idle. Notably the AWS
1498
1498
  * Classic ELB in front of ingress-nginx (dev/prod EKS) has a 300s connection
1499
1499
  * idle timeout; without these frames a quiet agent's gRPC-web server-stream is
@@ -323,7 +323,7 @@ export class SubscribeRequest extends Message {
323
323
  /**
324
324
  * Ack is the empty reply to Send. It only confirms the server accepted the
325
325
  * command for processing — the resulting state (or an Error) is delivered on the
326
- * Subscribe stream, the same way Session reports it.
326
+ * Subscribe stream, never in this reply.
327
327
  *
328
328
  * @generated from message babelconnect.v1.Ack
329
329
  */
@@ -2009,7 +2009,7 @@ export class WrapUpStatus extends Message {
2009
2009
  }
2010
2010
  }
2011
2011
  /**
2012
- * StateUpdate is the single server → client message on the Session stream. On
2012
+ * StateUpdate is the single server → client message on the Subscribe stream. On
2013
2013
  * open the client receives a snapshot; thereafter partial patches. `seq` is
2014
2014
  * monotonic across snapshot+patch — a gap means the client should resubscribe
2015
2015
  * for a fresh snapshot. `error` is an out-of-band notice (command rejection /
@@ -2056,7 +2056,7 @@ export class StateUpdate extends Message {
2056
2056
  }
2057
2057
  }
2058
2058
  /**
2059
- * Keepalive is an empty heartbeat frame sent on the Session/Subscribe streams so
2059
+ * Keepalive is an empty heartbeat frame sent on the Subscribe stream so
2060
2060
  * idle connections through proxies/LBs are not closed as idle. Notably the AWS
2061
2061
  * Classic ELB in front of ingress-nginx (dev/prod EKS) has a 300s connection
2062
2062
  * idle timeout; without these frames a quiet agent's gRPC-web server-stream is
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.12.0";
1
+ export declare const SDK_VERSION = "0.13.0";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated by scripts/gen-version.mjs (npm prebuild) from package.json.
2
2
  // Do not edit by hand.
3
- export const SDK_VERSION = "0.12.0";
3
+ export const SDK_VERSION = "0.13.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babelforce/babelconnect-sdk",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "TypeScript SDK for babelconnect — server-authoritative agent state over gRPC-web, native WebRTC audio, and an embeddable widget (iframe + postMessage) for the Flutter web app.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://babelforce.github.io/babelconnect-sdk/",