@getdial/cli 0.21.0 → 0.22.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/cli.js CHANGED
@@ -93,7 +93,7 @@ number
93
93
  .command("purchase")
94
94
  .description("Purchase an additional phone number. POST /api/v1/numbers.")
95
95
  .requiredOption("--inbound-instruction <text>", "system prompt for inbound calls to this number")
96
- .option("--inbound-voice-gender <male|female>", "voice gender for inbound calls (defaults to the caller's language default voice)")
96
+ .option("--inbound-voice-gender <male|female>", "voice gender for inbound calls (default: female; pass male to override)")
97
97
  .option("--country <iso2>", "ISO-3166-1 alpha-2 country code (defaults to US server-side)")
98
98
  .option("--area-code <code>", "preferred area code (US/CA)")
99
99
  .option("--json", "machine-readable output")
@@ -108,7 +108,7 @@ number
108
108
  .command("set <number>")
109
109
  .description("Update a number's properties (at least one flag). PATCH /api/v1/numbers/<id>.")
110
110
  .option("--inbound-instruction <text>", "new system prompt for inbound calls to this number")
111
- .option("--inbound-voice-gender <male|female>", 'voice gender for inbound calls; pass "" to clear ( caller-language default)')
111
+ .option("--inbound-voice-gender <male|female>", 'voice gender for inbound calls; pass "" to clear (reverts to the default, female)')
112
112
  .option("--nickname <text>", 'human-readable label for the number, e.g. "Support line"; pass "" to clear')
113
113
  .option("--json", "machine-readable output")
114
114
  .action(async (numberArg, opts) => process.exit(await runNumberSet({
@@ -156,7 +156,8 @@ const call = program
156
156
  .option("--to <e164>", "destination phone number, E.164 (e.g. +14155551234)")
157
157
  .option("--outbound-instruction <text>", "system prompt for the agent that will speak")
158
158
  .option("--language <bcp47>", "BCP-47 language tag for the call (default: auto-detect from the destination number's country, alongside en-US)")
159
- .option("--voice-gender <male|female>", "voice gender for the agent (defaults to the language's default voice)")
159
+ .option("--voice-gender <male|female>", "voice gender for the agent (default: female; pass male to override)")
160
+ .option("--transfer-to <e164>", "forward-to number, E.164: the agent waits for a real human (riding out hold/IVR) then cold-transfers the call here")
160
161
  .option("--idempotency-key <key>", "unique key (e.g. a UUID) making the placement idempotent: re-running with the same key returns the already-placed call instead of dialing again")
161
162
  .option("--from-number-id <id>", "phoneNumberId to call from (defaults to onboard's number)")
162
163
  .option("--json", "machine-readable output")
@@ -170,6 +171,7 @@ const call = program
170
171
  outboundInstruction: opts.outboundInstruction,
171
172
  language: opts.language,
172
173
  voiceGender: opts.voiceGender,
174
+ transferTo: opts.transferTo,
173
175
  idempotencyKey: opts.idempotencyKey,
174
176
  fromNumberId: opts.fromNumberId,
175
177
  json: !!opts.json,
@@ -8,6 +8,7 @@ export async function runCallSend(opts) {
8
8
  outboundInstruction: opts.outboundInstruction,
9
9
  language: opts.language,
10
10
  voiceGender: opts.voiceGender,
11
+ transferTo: opts.transferTo,
11
12
  idempotencyKey: opts.idempotencyKey,
12
13
  fromNumberId: opts.fromNumberId,
13
14
  });
@@ -9,8 +9,9 @@ export async function placeCall(opts) {
9
9
  fromNumberId,
10
10
  outboundInstruction: opts.outboundInstruction,
11
11
  ...(opts.language && { language: opts.language }),
12
- // Omitted → the server uses the language's default voice gender.
12
+ // Omitted → the server uses the default voice gender (female).
13
13
  ...(opts.voiceGender ? { voiceGender: opts.voiceGender } : {}),
14
+ ...(opts.transferTo ? { transferTo: opts.transferTo } : {}),
14
15
  }, auth.apiKey, opts.idempotencyKey ? { "idempotency-key": opts.idempotencyKey } : undefined);
15
16
  if (!res.ok)
16
17
  throw new DialError("call_failed", res.error, res.status);
@@ -25,7 +25,7 @@ export const phoneNumberSchema = z
25
25
  nickname: z.string().nullable().optional().describe("Human-readable label for the number"),
26
26
  country: z.string().optional(),
27
27
  inboundInstruction: z.string().nullable().optional(),
28
- inboundVoiceGender: z.string().nullable().optional().describe('Voice gender for inbound calls ("male"/"female"); null → caller-language default'),
28
+ inboundVoiceGender: z.string().nullable().optional().describe('Voice gender for inbound calls ("male"/"female"); null → female (the default)'),
29
29
  })
30
30
  .passthrough();
31
31
  export const messageSchema = z
@@ -6,7 +6,8 @@ const inputSchema = {
6
6
  to: z.string().min(7).describe("Destination phone number, E.164 (e.g. +14155550123)"),
7
7
  outboundInstruction: z.string().min(1).describe("System prompt for the AI voice agent on this call"),
8
8
  language: z.string().optional().describe("BCP-47 language tag for the call. Omit to auto-detect from the destination number's country (alongside en-US)."),
9
- voiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for the agent; defaults to the language's default voice"),
9
+ voiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for the agent; the default is female"),
10
+ transferTo: z.string().optional().describe("Forward-to number, E.164: the agent waits for a real human (riding out hold/IVR) then cold-transfers the call here. Must differ from `to` and the from number."),
10
11
  idempotencyKey: z.string().optional().describe("Unique key (e.g. a UUID) making the placement idempotent: retrying with the same key returns the already-placed call instead of dialing again"),
11
12
  fromNumberId: z.string().optional().describe("Number id to call from; defaults to your primary number"),
12
13
  };
@@ -26,6 +27,7 @@ export const placeCallTool = {
26
27
  outboundInstruction: args.outboundInstruction,
27
28
  language: args.language,
28
29
  voiceGender: args.voiceGender,
30
+ transferTo: args.transferTo,
29
31
  idempotencyKey: args.idempotencyKey,
30
32
  fromNumberId: args.fromNumberId,
31
33
  });
@@ -4,7 +4,7 @@ import { purchaseNumber } from "../../lib/ops/numbers.js";
4
4
  import { phoneNumberSchema } from "../schemas.js";
5
5
  const inputSchema = {
6
6
  inboundInstruction: z.string().min(1).describe("System prompt for inbound calls to this number"),
7
- inboundVoiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for inbound calls to this number (defaults to the caller's language default voice)"),
7
+ inboundVoiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for inbound calls to this number; the default is female"),
8
8
  country: z.string().optional().describe("ISO-3166-1 alpha-2 country code (defaults to US server-side)"),
9
9
  areaCode: z.string().optional().describe("Preferred area code (US/CA)"),
10
10
  };
@@ -5,7 +5,7 @@ import { phoneNumberSchema } from "../schemas.js";
5
5
  const inputSchema = {
6
6
  number: z.string().min(7).describe("The E.164 phone number to update (e.g. +14155550123)"),
7
7
  inboundInstruction: z.string().min(1).optional().describe("New system prompt for inbound calls to this number"),
8
- inboundVoiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for inbound calls to this number (defaults to the caller's language default voice)"),
8
+ inboundVoiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for inbound calls to this number; the default is female"),
9
9
  nickname: z.string().max(100).optional().describe('Human-readable label for the number, e.g. "Support line". Pass an empty string to clear it.'),
10
10
  };
11
11
  export const setNumberPropertiesTool = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getdial/cli",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Dial CLI — install, sign up, and run the local listen service.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/skills.tar.gz CHANGED
Binary file