@getdial/cli 0.30.0 → 0.31.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 +4 -0
- package/dist/commands/billing.js +3 -0
- package/dist/commands/number/purchase.js +1 -0
- package/dist/commands/number/set.js +2 -0
- package/dist/lib/ops/numbers.js +5 -1
- package/dist/mcp/schemas.js +1 -0
- package/dist/mcp/tools/purchase-number.js +2 -0
- package/dist/mcp/tools/set-number-properties.js +3 -1
- package/package.json +1 -1
- package/skills.tar.gz +0 -0
package/dist/cli.js
CHANGED
|
@@ -104,6 +104,7 @@ number
|
|
|
104
104
|
.requiredOption("--inbound-instruction <text>", "system prompt for inbound calls to this number")
|
|
105
105
|
.requiredOption("--explicit-programmatic-consent <text>", "required attestation that the account holder consented to provisioning this number programmatically (stored on the number)")
|
|
106
106
|
.option("--inbound-voice-gender <male|female>", "voice gender for inbound calls (default: female; pass male to override)")
|
|
107
|
+
.option("--inbound-language <bcp47>", "language tag inbound calls are pinned to (default: detect from the caller's country prefix, alongside en-US)")
|
|
107
108
|
.option("--area-code <code>", "preferred US area code (only US numbers can be provisioned; ignored with --include-imessage)")
|
|
108
109
|
.option("--include-imessage", "provision an iMessage number (pay-as-you-go only; provisioned asynchronously — poll `dial number list` until ready)")
|
|
109
110
|
.option("--json", "machine-readable output")
|
|
@@ -111,6 +112,7 @@ number
|
|
|
111
112
|
inboundInstruction: opts.inboundInstruction,
|
|
112
113
|
explicitProgrammaticConsent: opts.explicitProgrammaticConsent,
|
|
113
114
|
inboundVoiceGender: opts.inboundVoiceGender,
|
|
115
|
+
inboundLanguage: opts.inboundLanguage,
|
|
114
116
|
areaCode: opts.areaCode,
|
|
115
117
|
includeImessage: !!opts.includeImessage,
|
|
116
118
|
json: !!opts.json,
|
|
@@ -120,6 +122,7 @@ number
|
|
|
120
122
|
.description("Update a number's properties (at least one flag). PATCH /api/v1/numbers/<id>.")
|
|
121
123
|
.option("--inbound-instruction <text>", "new system prompt for inbound calls to this number")
|
|
122
124
|
.option("--inbound-voice-gender <male|female>", 'voice gender for inbound calls; pass "" to clear (reverts to the default, female)')
|
|
125
|
+
.option("--inbound-language <bcp47>", 'language tag inbound calls are pinned to; pass "" to clear (reverts to detecting from the caller\'s country prefix)')
|
|
123
126
|
.option("--nickname <text>", 'human-readable label for the number, e.g. "Support line"; pass "" to clear')
|
|
124
127
|
.option("--max-call-duration <seconds>", "call duration cap for this number, in seconds, applied as a hard ceiling to both inbound and outbound calls (the smallest of the per-number, account, and per-call caps wins)", (v) => {
|
|
125
128
|
const n = parseInt(v, 10);
|
|
@@ -143,6 +146,7 @@ number
|
|
|
143
146
|
number: numberArg,
|
|
144
147
|
inboundInstruction: opts.inboundInstruction,
|
|
145
148
|
inboundVoiceGender: opts.inboundVoiceGender,
|
|
149
|
+
inboundLanguage: opts.inboundLanguage,
|
|
146
150
|
nickname: opts.nickname,
|
|
147
151
|
maxCallDurationSeconds,
|
|
148
152
|
json: !!opts.json,
|
package/dist/commands/billing.js
CHANGED
|
@@ -19,6 +19,9 @@ export async function runBilling(opts) {
|
|
|
19
19
|
else {
|
|
20
20
|
console.log(`plan: pay-as-you-go`);
|
|
21
21
|
}
|
|
22
|
+
if (billing.numbersReleaseAt) {
|
|
23
|
+
console.log(`at risk: balance is negative — all numbers release ${billing.numbersReleaseAt} for non-payment (top up to keep them)`);
|
|
24
|
+
}
|
|
22
25
|
if (billing.numbers.length > 0) {
|
|
23
26
|
console.log(`numbers:`);
|
|
24
27
|
for (const n of billing.numbers) {
|
|
@@ -7,6 +7,7 @@ export async function runNumberPurchase(opts) {
|
|
|
7
7
|
inboundInstruction: opts.inboundInstruction,
|
|
8
8
|
explicitProgrammaticConsent: opts.explicitProgrammaticConsent,
|
|
9
9
|
inboundVoiceGender: opts.inboundVoiceGender,
|
|
10
|
+
inboundLanguage: opts.inboundLanguage,
|
|
10
11
|
areaCode: opts.areaCode,
|
|
11
12
|
includeImessage: opts.includeImessage,
|
|
12
13
|
});
|
|
@@ -7,6 +7,7 @@ export async function runNumberSet(opts) {
|
|
|
7
7
|
number: opts.number,
|
|
8
8
|
inboundInstruction: opts.inboundInstruction,
|
|
9
9
|
...(opts.inboundVoiceGender !== undefined ? { inboundVoiceGender: opts.inboundVoiceGender } : {}),
|
|
10
|
+
...(opts.inboundLanguage !== undefined ? { inboundLanguage: opts.inboundLanguage } : {}),
|
|
10
11
|
...(opts.nickname !== undefined ? { nickname: opts.nickname } : {}),
|
|
11
12
|
...(opts.maxCallDurationSeconds !== undefined ? { maxCallDurationSeconds: opts.maxCallDurationSeconds } : {}),
|
|
12
13
|
});
|
|
@@ -20,6 +21,7 @@ export async function runNumberSet(opts) {
|
|
|
20
21
|
console.log(` nickname: ${n.nickname ?? ""}`);
|
|
21
22
|
console.log(` inbound instruction: ${n.inboundInstruction ?? ""}`);
|
|
22
23
|
console.log(` inbound voice gender: ${n.inboundVoiceGender ?? ""}`);
|
|
24
|
+
console.log(` inbound language: ${n.inboundLanguage ?? ""}`);
|
|
23
25
|
}
|
|
24
26
|
return 0;
|
|
25
27
|
}
|
package/dist/lib/ops/numbers.js
CHANGED
|
@@ -16,6 +16,8 @@ export async function purchaseNumber(opts) {
|
|
|
16
16
|
};
|
|
17
17
|
if (opts.inboundVoiceGender)
|
|
18
18
|
body.inboundVoiceGender = opts.inboundVoiceGender;
|
|
19
|
+
if (opts.inboundLanguage)
|
|
20
|
+
body.inboundLanguage = opts.inboundLanguage;
|
|
19
21
|
// iMessage numbers ignore areaCode, so only send it for standard numbers.
|
|
20
22
|
if (opts.includeImessage)
|
|
21
23
|
body.capabilities = ["sms", "call", "imessage"];
|
|
@@ -33,12 +35,14 @@ export async function setNumberProperties(opts) {
|
|
|
33
35
|
// Empty string clears the override → send null (the enum API rejects "").
|
|
34
36
|
if (opts.inboundVoiceGender !== undefined)
|
|
35
37
|
body.inboundVoiceGender = opts.inboundVoiceGender || null;
|
|
38
|
+
if (opts.inboundLanguage !== undefined)
|
|
39
|
+
body.inboundLanguage = opts.inboundLanguage || null;
|
|
36
40
|
if (opts.nickname !== undefined)
|
|
37
41
|
body.nickname = opts.nickname;
|
|
38
42
|
if (opts.maxCallDurationSeconds !== undefined)
|
|
39
43
|
body.maxCallDurationSeconds = opts.maxCallDurationSeconds;
|
|
40
44
|
if (Object.keys(body).length === 0) {
|
|
41
|
-
throw new DialError("bad_request", "Provide at least one property to update (inboundInstruction, inboundVoiceGender, nickname, or maxCallDurationSeconds).");
|
|
45
|
+
throw new DialError("bad_request", "Provide at least one property to update (inboundInstruction, inboundVoiceGender, inboundLanguage, nickname, or maxCallDurationSeconds).");
|
|
42
46
|
}
|
|
43
47
|
const auth = requireAuth();
|
|
44
48
|
// The REST API keys numbers by id; the CLI/tool takes the E.164 number for ergonomics,
|
package/dist/mcp/schemas.js
CHANGED
|
@@ -26,6 +26,7 @@ export const phoneNumberSchema = z
|
|
|
26
26
|
country: z.string().optional(),
|
|
27
27
|
inboundInstruction: z.string().nullable().optional(),
|
|
28
28
|
inboundVoiceGender: z.string().nullable().optional().describe('Voice gender for inbound calls ("male"/"female"); null → female (the default)'),
|
|
29
|
+
inboundLanguage: z.string().nullable().optional().describe("BCP-47 language tag inbound calls are pinned to; null → detected from the caller's country prefix per call"),
|
|
29
30
|
})
|
|
30
31
|
.passthrough();
|
|
31
32
|
export const messageSchema = z
|
|
@@ -6,6 +6,7 @@ const inputSchema = {
|
|
|
6
6
|
inboundInstruction: z.string().min(1).describe("System prompt for inbound calls to this number"),
|
|
7
7
|
explicitProgrammaticConsent: z.string().min(1).max(2000).describe("Required attestation (max 2000 chars) that the account holder consented to provisioning this number programmatically; stored on the number"),
|
|
8
8
|
inboundVoiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for inbound calls to this number; the default is female"),
|
|
9
|
+
inboundLanguage: z.string().optional().describe("BCP-47 language tag pinning inbound calls to this number to one language (e.g. es-ES); omitted → the language is detected from the caller's country prefix on each call (plus en-US)"),
|
|
9
10
|
areaCode: z.string().optional().describe("Preferred US area code; omitted → any available US number. Only US numbers can be provisioned at this time. Ignored for iMessage numbers"),
|
|
10
11
|
includeImessage: z.boolean().optional().describe('Provision an iMessage number (pay-as-you-go only; provisioned asynchronously — poll List Numbers until setupStatus is "ready")'),
|
|
11
12
|
};
|
|
@@ -23,6 +24,7 @@ export const purchaseNumberTool = {
|
|
|
23
24
|
inboundInstruction: args.inboundInstruction,
|
|
24
25
|
explicitProgrammaticConsent: args.explicitProgrammaticConsent,
|
|
25
26
|
inboundVoiceGender: args.inboundVoiceGender,
|
|
27
|
+
inboundLanguage: args.inboundLanguage,
|
|
26
28
|
areaCode: args.areaCode,
|
|
27
29
|
includeImessage: args.includeImessage,
|
|
28
30
|
}),
|
|
@@ -6,6 +6,7 @@ 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
8
|
inboundVoiceGender: z.enum(["male", "female"]).optional().describe("Voice gender for inbound calls to this number; the default is female"),
|
|
9
|
+
inboundLanguage: z.string().optional().describe("BCP-47 language tag pinning inbound calls to this number to one language (e.g. es-ES). Pass an empty string to clear it (reverts to detecting the language from the caller's country prefix per call)."),
|
|
9
10
|
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
11
|
maxCallDurationSeconds: z.number().int().positive().nullable().optional().describe("Call duration cap for this number, in seconds, applied as a hard ceiling to both inbound and outbound calls (the smallest of the per-number, account, and per-call caps wins). Pass null to clear the cap; omit to leave it unchanged."),
|
|
11
12
|
};
|
|
@@ -13,7 +14,7 @@ export const setNumberPropertiesTool = {
|
|
|
13
14
|
name: "set_number_properties",
|
|
14
15
|
config: {
|
|
15
16
|
title: "Set Number Properties",
|
|
16
|
-
description: "Update a phone number's properties: its inbound instruction (the system prompt for inbound calls) and/or its nickname. Provide at least one.",
|
|
17
|
+
description: "Update a phone number's properties: its inbound instruction (the system prompt for inbound calls), inbound voice gender, inbound language, and/or its nickname. Provide at least one.",
|
|
17
18
|
inputSchema,
|
|
18
19
|
outputSchema: { number: phoneNumberSchema },
|
|
19
20
|
annotations: { openWorldHint: true },
|
|
@@ -23,6 +24,7 @@ export const setNumberPropertiesTool = {
|
|
|
23
24
|
number: args.number,
|
|
24
25
|
inboundInstruction: args.inboundInstruction,
|
|
25
26
|
...(args.inboundVoiceGender !== undefined ? { inboundVoiceGender: args.inboundVoiceGender } : {}),
|
|
27
|
+
...(args.inboundLanguage !== undefined ? { inboundLanguage: args.inboundLanguage } : {}),
|
|
26
28
|
...(args.nickname !== undefined ? { nickname: args.nickname } : {}),
|
|
27
29
|
...(args.maxCallDurationSeconds !== undefined ? { maxCallDurationSeconds: args.maxCallDurationSeconds } : {}),
|
|
28
30
|
}),
|
package/package.json
CHANGED
package/skills.tar.gz
CHANGED
|
Binary file
|