@happyrobot-ai/sdk 0.1.41 → 0.1.42

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.
@@ -14,6 +14,12 @@ export interface CreateVoiceAgentOptions {
14
14
  initialMessage?: string;
15
15
  /** Whether caller speech can interrupt the initial message. Defaults to false. */
16
16
  initialMessageUninterruptible?: boolean;
17
+ /**
18
+ * Milliseconds to wait before speaking the initial message. Defaults to 0 (no
19
+ * wait). If the other party speaks first, the wait ends early and the initial
20
+ * message becomes the agent's first turn.
21
+ */
22
+ initialMessageDelayMs?: number;
17
23
  /** LLM model override (TemplatedValue format). */
18
24
  model?: {
19
25
  type: "static";
@@ -18,7 +18,7 @@ exports.createVoiceAgent = createVoiceAgent;
18
18
  * ```
19
19
  */
20
20
  async function createVoiceAgent(client, options) {
21
- const { name, template = "voice-agent", prompt, initialMessage, initialMessageUninterruptible, model, publish = false, environment = "production", folderId, } = options;
21
+ const { name, template = "voice-agent", prompt, initialMessage, initialMessageUninterruptible, initialMessageDelayMs, model, publish = false, environment = "production", folderId, } = options;
22
22
  // 1. Create workflow from template
23
23
  const workflow = await client.workflows.create({
24
24
  name,
@@ -31,6 +31,7 @@ async function createVoiceAgent(client, options) {
31
31
  prompt_md: prompt,
32
32
  initial_message: initialMessage,
33
33
  initial_message_uninterruptible: initialMessageUninterruptible,
34
+ initial_message_delay_ms: initialMessageDelayMs,
34
35
  model,
35
36
  },
36
37
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyrobot-ai/sdk",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "TypeScript SDK for the HappyRobot Public API",
5
5
  "main": "./index.js",
6
6
  "module": "./index.mjs",