@getdial/cli 0.37.0 → 0.37.2
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.
|
@@ -116,7 +116,7 @@ function reportPendingPhone(result, json) {
|
|
|
116
116
|
action: "ask_user",
|
|
117
117
|
kind: "phone_number_required",
|
|
118
118
|
question: "What phone number should this Dial account be registered to?",
|
|
119
|
-
rationale: "Creating a Dial account requires a verified phone number as well as a verified email. Dial texts a 6-digit code to the number, and the user reads it back.
|
|
119
|
+
rationale: "Creating a Dial account requires a verified phone number as well as a verified email. Dial texts a 6-digit code to the number, and the user reads it back. It should be a number the user keeps, it must be able to receive SMS, and a Dial number cannot be used.",
|
|
120
120
|
presentation: "Ask for the number in international form including the country code. Don't invent one, and don't reuse a Dial number.",
|
|
121
121
|
useStructuredToolIfAvailable: true,
|
|
122
122
|
onAnswer: REGISTER_NUMBER_COMMAND,
|
|
@@ -134,8 +134,7 @@ function reportPendingPhone(result, json) {
|
|
|
134
134
|
console.log(``);
|
|
135
135
|
console.log(` ${REGISTER_NUMBER_COMMAND}`);
|
|
136
136
|
console.log(``);
|
|
137
|
-
console.log(`
|
|
138
|
-
console.log(`Dial account — so use one the user keeps. A Dial number can't be used here.`);
|
|
137
|
+
console.log(`Use a number the user keeps. A Dial number can't be used here.`);
|
|
139
138
|
console.log(``);
|
|
140
139
|
console.log(`Dial texts a 6-digit code to it; then run:`);
|
|
141
140
|
console.log(``);
|
|
@@ -2,6 +2,14 @@ import { chmodSync, mkdirSync, readFileSync, renameSync, statSync, unlinkSync, w
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { logger } from "./log.js";
|
|
4
4
|
const CHMOD_UNSUPPORTED_CODES = new Set(["ENOTSUP", "EOPNOTSUPP", "EPERM"]);
|
|
5
|
+
/**
|
|
6
|
+
* Windows has no POSIX permission bits: Node synthesizes mode 0o666 (or 0o444
|
|
7
|
+
* for read-only files) regardless of the file's ACL, and chmod can only toggle
|
|
8
|
+
* the read-only flag. Enforcing `secure` there would reject every file we just
|
|
9
|
+
* wrote ourselves, so access control falls to the ACL on the per-user state
|
|
10
|
+
* directory instead.
|
|
11
|
+
*/
|
|
12
|
+
const hasPosixModes = () => process.platform !== "win32";
|
|
5
13
|
function ensureDir(dir) {
|
|
6
14
|
mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
7
15
|
try {
|
|
@@ -41,7 +49,7 @@ export function defineVersionedFile(opts) {
|
|
|
41
49
|
/** v0 is the legacy unversioned `<base>.json`. */
|
|
42
50
|
const filePath = (version) => join(opts.dir(), version === 0 ? `${opts.base}.json` : `${opts.base}.v${version}.json`);
|
|
43
51
|
function parseAt(path) {
|
|
44
|
-
if (opts.secure) {
|
|
52
|
+
if (opts.secure && hasPosixModes()) {
|
|
45
53
|
const fileMode = statSync(path).mode & 0o777;
|
|
46
54
|
if (fileMode & 0o077) {
|
|
47
55
|
throw new Error(`${path} has insecure permissions (mode ${fileMode.toString(8)})`);
|
|
@@ -17,9 +17,8 @@ export const authRegisterNumberTool = {
|
|
|
17
17
|
title: "Auth Register Number",
|
|
18
18
|
description: "Text a 6-digit verification code to the phone number that will own the account. Required to " +
|
|
19
19
|
"CREATE an account (never needed to sign in), and only valid after auth_verify_otp reported " +
|
|
20
|
-
"that a phone number is still required.
|
|
21
|
-
"
|
|
22
|
-
"auth_verify_otp using number: true.",
|
|
20
|
+
"that a phone number is still required. It should be a number the user keeps. Submit the " +
|
|
21
|
+
"texted code with auth_verify_otp using number: true.",
|
|
23
22
|
inputSchema,
|
|
24
23
|
outputSchema: {
|
|
25
24
|
registrationId: z.string(),
|
|
@@ -121,7 +121,7 @@ export const authVerifyOtpTool = {
|
|
|
121
121
|
email: r.email,
|
|
122
122
|
skills: r.skills,
|
|
123
123
|
nextTool: "auth_register_number",
|
|
124
|
-
note: "The email is verified, but creating an account also requires a verified phone number. ASK THE USER for a phone number that can receive SMS, then call auth_register_number with it. No API key has been issued yet.
|
|
124
|
+
note: "The email is verified, but creating an account also requires a verified phone number. ASK THE USER for a phone number that can receive SMS, then call auth_register_number with it. No API key has been issued yet. It should be a number the user keeps, and a Dial number cannot be used.",
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
// Never surface the raw API key to the model; it's saved to disk for the CLI to read.
|
package/package.json
CHANGED
package/skills.tar.gz
CHANGED
|
Binary file
|