@happyrobot-ai/sdk 0.1.25 → 0.1.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyrobot-ai/sdk",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "TypeScript SDK for the HappyRobot Public API",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",
@@ -33,9 +33,9 @@ export declare class VoiceResource {
33
33
  * Call this from your server, then pass the returned `url` and `token`
34
34
  * to the browser where they can be used to initialize `HappyRobotVoiceClient`.
35
35
  *
36
- * Provide `workflow_id` to start a new call, or `session_id` to join an
37
- * in-progress call. Pair `session_id` with `should_takeover: true` to drop
38
- * the AI agent and take over the call.
36
+ * Provide `workflow_id` to start a new call, or `session_id` (with the
37
+ * required `should_takeover: true`) to take over an in-progress call, which
38
+ * drops the AI agent.
39
39
  */
40
40
  createToken(body: CreateVoiceTokenBody): Promise<CreateVoiceTokenResponse>;
41
41
  }
@@ -36,9 +36,9 @@ class VoiceResource {
36
36
  * Call this from your server, then pass the returned `url` and `token`
37
37
  * to the browser where they can be used to initialize `HappyRobotVoiceClient`.
38
38
  *
39
- * Provide `workflow_id` to start a new call, or `session_id` to join an
40
- * in-progress call. Pair `session_id` with `should_takeover: true` to drop
41
- * the AI agent and take over the call.
39
+ * Provide `workflow_id` to start a new call, or `session_id` (with the
40
+ * required `should_takeover: true`) to take over an in-progress call, which
41
+ * drops the AI agent.
42
42
  */
43
43
  async createToken(body) {
44
44
  return this.http.request({
@@ -24,17 +24,17 @@ export type CreateVoiceTokenBody = (CreateVoiceTokenBase & {
24
24
  should_takeover?: never;
25
25
  }) | (CreateVoiceTokenBase & {
26
26
  /**
27
- * ID of an in-progress session to join. Generates a token for the
27
+ * ID of an in-progress session to take over. Generates a token for the
28
28
  * session's existing LiveKit room.
29
29
  */
30
30
  session_id: string;
31
31
  workflow_id?: never;
32
32
  /**
33
- * When `true`, the joining participant takes over the call and the AI
34
- * agent drops. When `false` (default), the participant joins alongside
35
- * the agent without dropping it.
33
+ * Must be `true`. Explicit opt-in confirming the joining participant
34
+ * takes over the call and the AI agent drops. Joining a live call
35
+ * without taking over is not supported.
36
36
  */
37
- should_takeover?: boolean;
37
+ should_takeover: true;
38
38
  });
39
39
  /** POST /voice/tokens response. */
40
40
  export interface CreateVoiceTokenResponse {