@getdial/cli 0.20.1 → 0.21.1

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,11 +93,13 @@ 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 (default: female; pass male to override)")
96
97
  .option("--country <iso2>", "ISO-3166-1 alpha-2 country code (defaults to US server-side)")
97
98
  .option("--area-code <code>", "preferred area code (US/CA)")
98
99
  .option("--json", "machine-readable output")
99
100
  .action(async (opts) => process.exit(await runNumberPurchase({
100
101
  inboundInstruction: opts.inboundInstruction,
102
+ inboundVoiceGender: opts.inboundVoiceGender,
101
103
  country: opts.country,
102
104
  areaCode: opts.areaCode,
103
105
  json: !!opts.json,
@@ -106,11 +108,13 @@ number
106
108
  .command("set <number>")
107
109
  .description("Update a number's properties (at least one flag). PATCH /api/v1/numbers/<id>.")
108
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 (reverts to the default, female)')
109
112
  .option("--nickname <text>", 'human-readable label for the number, e.g. "Support line"; pass "" to clear')
110
113
  .option("--json", "machine-readable output")
111
114
  .action(async (numberArg, opts) => process.exit(await runNumberSet({
112
115
  number: numberArg,
113
116
  inboundInstruction: opts.inboundInstruction,
117
+ inboundVoiceGender: opts.inboundVoiceGender,
114
118
  nickname: opts.nickname,
115
119
  json: !!opts.json,
116
120
  })));
@@ -152,6 +156,7 @@ const call = program
152
156
  .option("--to <e164>", "destination phone number, E.164 (e.g. +14155551234)")
153
157
  .option("--outbound-instruction <text>", "system prompt for the agent that will speak")
154
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 (default: female; pass male to override)")
155
160
  .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")
156
161
  .option("--from-number-id <id>", "phoneNumberId to call from (defaults to onboard's number)")
157
162
  .option("--json", "machine-readable output")
@@ -164,6 +169,7 @@ const call = program
164
169
  to: opts.to,
165
170
  outboundInstruction: opts.outboundInstruction,
166
171
  language: opts.language,
172
+ voiceGender: opts.voiceGender,
167
173
  idempotencyKey: opts.idempotencyKey,
168
174
  fromNumberId: opts.fromNumberId,
169
175
  json: !!opts.json,
@@ -7,6 +7,7 @@ export async function runCallSend(opts) {
7
7
  to: opts.to,
8
8
  outboundInstruction: opts.outboundInstruction,
9
9
  language: opts.language,
10
+ voiceGender: opts.voiceGender,
10
11
  idempotencyKey: opts.idempotencyKey,
11
12
  fromNumberId: opts.fromNumberId,
12
13
  });
@@ -5,6 +5,7 @@ export async function runNumberPurchase(opts) {
5
5
  try {
6
6
  const n = await purchaseNumber({
7
7
  inboundInstruction: opts.inboundInstruction,
8
+ inboundVoiceGender: opts.inboundVoiceGender,
8
9
  country: opts.country,
9
10
  areaCode: opts.areaCode,
10
11
  });
@@ -6,6 +6,7 @@ export async function runNumberSet(opts) {
6
6
  const n = await setNumberProperties({
7
7
  number: opts.number,
8
8
  inboundInstruction: opts.inboundInstruction,
9
+ ...(opts.inboundVoiceGender !== undefined ? { inboundVoiceGender: opts.inboundVoiceGender } : {}),
9
10
  ...(opts.nickname !== undefined ? { nickname: opts.nickname } : {}),
10
11
  });
11
12
  if (opts.json) {
@@ -13,10 +14,11 @@ export async function runNumberSet(opts) {
13
14
  }
14
15
  else {
15
16
  console.log(`updated.`);
16
- console.log(` number: ${n.number}`);
17
- console.log(` id: ${n.id}`);
18
- console.log(` nickname: ${n.nickname ?? ""}`);
19
- console.log(` inbound instruction: ${n.inboundInstruction ?? ""}`);
17
+ console.log(` number: ${n.number}`);
18
+ console.log(` id: ${n.id}`);
19
+ console.log(` nickname: ${n.nickname ?? ""}`);
20
+ console.log(` inbound instruction: ${n.inboundInstruction ?? ""}`);
21
+ console.log(` inbound voice gender: ${n.inboundVoiceGender ?? ""}`);
20
22
  }
21
23
  return 0;
22
24
  }
@@ -9,6 +9,8 @@ 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 default voice gender (female).
13
+ ...(opts.voiceGender ? { voiceGender: opts.voiceGender } : {}),
12
14
  }, auth.apiKey, opts.idempotencyKey ? { "idempotency-key": opts.idempotencyKey } : undefined);
13
15
  if (!res.ok)
14
16
  throw new DialError("call_failed", res.error, res.status);
@@ -11,6 +11,8 @@ export async function listNumbers() {
11
11
  export async function purchaseNumber(opts) {
12
12
  const auth = requireAuth();
13
13
  const body = { inboundInstruction: opts.inboundInstruction };
14
+ if (opts.inboundVoiceGender)
15
+ body.inboundVoiceGender = opts.inboundVoiceGender;
14
16
  if (opts.country)
15
17
  body.country = opts.country;
16
18
  if (opts.areaCode)
@@ -24,10 +26,13 @@ export async function setNumberProperties(opts) {
24
26
  const body = {};
25
27
  if (opts.inboundInstruction !== undefined)
26
28
  body.inboundInstruction = opts.inboundInstruction;
29
+ // Empty string clears the override → send null (the enum API rejects "").
30
+ if (opts.inboundVoiceGender !== undefined)
31
+ body.inboundVoiceGender = opts.inboundVoiceGender || null;
27
32
  if (opts.nickname !== undefined)
28
33
  body.nickname = opts.nickname;
29
34
  if (Object.keys(body).length === 0) {
30
- throw new DialError("bad_request", "Provide at least one property to update (inboundInstruction or nickname).");
35
+ throw new DialError("bad_request", "Provide at least one property to update (inboundInstruction, inboundVoiceGender, or nickname).");
31
36
  }
32
37
  const auth = requireAuth();
33
38
  // The REST API keys numbers by id; the CLI/tool takes the E.164 number for ergonomics,
@@ -25,6 +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 → female (the default)'),
28
29
  })
29
30
  .passthrough();
30
31
  export const messageSchema = z
@@ -6,6 +6,7 @@ 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; the default is female"),
9
10
  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"),
10
11
  fromNumberId: z.string().optional().describe("Number id to call from; defaults to your primary number"),
11
12
  };
@@ -24,6 +25,7 @@ export const placeCallTool = {
24
25
  to: args.to,
25
26
  outboundInstruction: args.outboundInstruction,
26
27
  language: args.language,
28
+ voiceGender: args.voiceGender,
27
29
  idempotencyKey: args.idempotencyKey,
28
30
  fromNumberId: args.fromNumberId,
29
31
  });
@@ -4,6 +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; the default is female"),
7
8
  country: z.string().optional().describe("ISO-3166-1 alpha-2 country code (defaults to US server-side)"),
8
9
  areaCode: z.string().optional().describe("Preferred area code (US/CA)"),
9
10
  };
@@ -19,6 +20,7 @@ export const purchaseNumberTool = {
19
20
  run: async (args) => jsonResult({
20
21
  number: await purchaseNumber({
21
22
  inboundInstruction: args.inboundInstruction,
23
+ inboundVoiceGender: args.inboundVoiceGender,
22
24
  country: args.country,
23
25
  areaCode: args.areaCode,
24
26
  }),
@@ -5,6 +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; the default is female"),
8
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.'),
9
10
  };
10
11
  export const setNumberPropertiesTool = {
@@ -20,6 +21,7 @@ export const setNumberPropertiesTool = {
20
21
  number: await setNumberProperties({
21
22
  number: args.number,
22
23
  inboundInstruction: args.inboundInstruction,
24
+ ...(args.inboundVoiceGender !== undefined ? { inboundVoiceGender: args.inboundVoiceGender } : {}),
23
25
  ...(args.nickname !== undefined ? { nickname: args.nickname } : {}),
24
26
  }),
25
27
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getdial/cli",
3
- "version": "0.20.1",
3
+ "version": "0.21.1",
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