@gravity-rail/cli 0.5.1 → 0.7.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/README.md +28 -0
- package/dist/account-verify-phone-4LRJZT5I.js +36 -0
- package/dist/account-verify-phone-4LRJZT5I.js.map +1 -0
- package/dist/chunk-3EO4COHB.js +14202 -0
- package/dist/chunk-3EO4COHB.js.map +1 -0
- package/dist/chunk-QVG4L6BE.js +2199 -0
- package/dist/chunk-QVG4L6BE.js.map +1 -0
- package/dist/concierge-ZOG7YFWQ.js +6 -0
- package/dist/concierge-ZOG7YFWQ.js.map +1 -0
- package/dist/gr.js +7183 -22914
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +52 -11
- package/dist/lib.js +599 -11
- package/dist/lib.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -161,6 +161,13 @@ cat member.json | gr members update -w $WORKSPACE --id 42 --allow-write
|
|
|
161
161
|
| `calendars` | Scheduling — calendars, events, event types, availability, Google sync |
|
|
162
162
|
| `qualifications` | Skills evaluation — requirements, submissions, scoring |
|
|
163
163
|
|
|
164
|
+
### Global (no workspace)
|
|
165
|
+
|
|
166
|
+
| Domain | Description |
|
|
167
|
+
|---|---|
|
|
168
|
+
| `concierge` | Global Concierge — interactive chat, PSTN `--call`, SMS `--sms` |
|
|
169
|
+
| `account verify-phone` | Verify your account phone (required before concierge outbound) |
|
|
170
|
+
|
|
164
171
|
### Communication
|
|
165
172
|
|
|
166
173
|
| Domain | Description |
|
|
@@ -295,6 +302,27 @@ gr workflows list -w $WORKSPACE -o json | jq '.[] | {name, task_count: (.tasks |
|
|
|
295
302
|
gr operator-groups list -w $WORKSPACE -o json | jq '.[].name'
|
|
296
303
|
```
|
|
297
304
|
|
|
305
|
+
### Concierge setup over your phone (PSTN / SMS)
|
|
306
|
+
|
|
307
|
+
Outbound concierge modes ring or text **your verified account phone only** — no destination argument. Verify once, then initiate:
|
|
308
|
+
|
|
309
|
+
```sh
|
|
310
|
+
# One-time: OTP SMS + TCPA notice (writes Account.phone + phone_verified_at)
|
|
311
|
+
gr account verify-phone --allow-write
|
|
312
|
+
# Optional: pass E.164 inline instead of the prompt
|
|
313
|
+
gr account verify-phone --phone +15551234567 --allow-write
|
|
314
|
+
|
|
315
|
+
# Server originates call; CLI exits when Twilio returns callSid
|
|
316
|
+
gr concierge chat --call --allow-write
|
|
317
|
+
|
|
318
|
+
# Server sends opening SMS; CLI exits when messageSid is returned
|
|
319
|
+
gr concierge chat --sms --allow-write
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
`--call` and `--sms` are mutually exclusive. They cannot be combined with `--voice` or `--realtime` on the same `gr concierge chat` invocation. (`gr concierge --call` / `--sms` are equivalent shorthand.)
|
|
323
|
+
|
|
324
|
+
If the API returns **412** `account_phone_unverified`, run `gr account verify-phone` first.
|
|
325
|
+
|
|
298
326
|
## Related
|
|
299
327
|
|
|
300
328
|
- [`@gravity-rail/sdk`](https://www.npmjs.com/package/@gravity-rail/sdk) — TypeScript SDK for programmatic access (500+ methods, full type safety)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { requireAuth, startAccountPhoneVerify, confirmAccountPhoneVerify } from './chunk-3EO4COHB.js';
|
|
3
|
+
import './chunk-XRBVAFCB.js';
|
|
4
|
+
import * as readline from 'readline/promises';
|
|
5
|
+
import { stdout, stdin } from 'process';
|
|
6
|
+
|
|
7
|
+
var TCPA_NOTICE = "By verifying you agree to receive calls and SMS from Gravity Rail at this number.";
|
|
8
|
+
async function accountVerifyPhoneCommand(hctx) {
|
|
9
|
+
const ctx = requireAuth(hctx.ctx);
|
|
10
|
+
const phoneArg = typeof hctx.args.phone === "string" ? hctx.args.phone : void 0;
|
|
11
|
+
process.stderr.write(`${TCPA_NOTICE}
|
|
12
|
+
`);
|
|
13
|
+
const phone = phoneArg ?? await promptLine("Phone number (E.164, e.g. +15551234567): ");
|
|
14
|
+
if (!phone.trim()) {
|
|
15
|
+
throw new Error("Phone number is required");
|
|
16
|
+
}
|
|
17
|
+
await startAccountPhoneVerify(ctx, phone.trim());
|
|
18
|
+
process.stderr.write("Verification code sent via SMS.\n");
|
|
19
|
+
const code = await promptLine("Enter 6-digit code: ");
|
|
20
|
+
await confirmAccountPhoneVerify(ctx, code.trim());
|
|
21
|
+
process.stderr.write(
|
|
22
|
+
"Phone verified. You can use `gr concierge chat --call` or `gr concierge chat --sms`.\n"
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
async function promptLine(question) {
|
|
26
|
+
const rl = readline.createInterface({ input: stdin, output: stdout });
|
|
27
|
+
try {
|
|
28
|
+
return await rl.question(question) ?? "";
|
|
29
|
+
} finally {
|
|
30
|
+
rl.close();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { accountVerifyPhoneCommand };
|
|
35
|
+
//# sourceMappingURL=account-verify-phone-4LRJZT5I.js.map
|
|
36
|
+
//# sourceMappingURL=account-verify-phone-4LRJZT5I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/account-verify-phone.ts"],"names":["input","output"],"mappings":";;;;;;AAUA,IAAM,WAAA,GACH,mFAAA;AAEH,eAAsB,0BAA0B,IAAA,EAA4C;AACzF,EAAA,MAAM,GAAA,GAAM,WAAA,CAAY,IAAA,CAAK,GAAG,CAAA;AAChC,EAAA,MAAM,QAAA,GAAW,OAAO,IAAA,CAAK,IAAA,CAAK,UAAU,QAAA,GAAW,IAAA,CAAK,KAAK,KAAA,GAAQ,MAAA;AAEzE,EAAA,OAAA,CAAQ,MAAA,CAAO,KAAA,CAAM,CAAA,EAAG,WAAW;AAAA,CAAI,CAAA;AAEvC,EAAA,MAAM,KAAA,GAAQ,QAAA,IAAa,MAAM,UAAA,CAAW,2CAA2C,CAAA;AACvF,EAAA,IAAI,CAAC,KAAA,CAAM,IAAA,EAAK,EAAG;AAChB,IAAA,MAAM,IAAI,MAAM,0BAA0B,CAAA;AAAA,EAC7C;AAEA,EAAA,MAAM,uBAAA,CAAwB,GAAA,EAAK,KAAA,CAAM,IAAA,EAAM,CAAA;AAC/C,EAAA,OAAA,CAAQ,MAAA,CAAO,MAAM,mCAAmC,CAAA;AAExD,EAAA,MAAM,IAAA,GAAO,MAAM,UAAA,CAAW,sBAAsB,CAAA;AACpD,EAAA,MAAM,yBAAA,CAA0B,GAAA,EAAK,IAAA,CAAK,IAAA,EAAM,CAAA;AAChD,EAAA,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IACZ;AAAA,GACH;AACH;AAEA,eAAe,WAAW,QAAA,EAAmC;AAC1D,EAAA,MAAM,EAAA,GAAc,QAAA,CAAA,eAAA,CAAgB,SAAEA,KAAA,UAAOC,QAAQ,CAAA;AACrD,EAAA,IAAI;AACD,IAAA,OAAQ,MAAM,EAAA,CAAG,QAAA,CAAS,QAAQ,CAAA,IAAM,EAAA;AAAA,EAC3C,CAAA,SAAE;AACC,IAAA,EAAA,CAAG,KAAA,EAAM;AAAA,EACZ;AACH","file":"account-verify-phone-4LRJZT5I.js","sourcesContent":["/**\n * `gr account verify-phone` — verify account phone for concierge PSTN/SMS.\n */\n\nimport * as readline from 'node:readline/promises';\nimport { stdin as input, stdout as output } from 'node:process';\nimport { confirmAccountPhoneVerify, startAccountPhoneVerify } from '../lib/concierge-api';\nimport { requireAuth } from '../lib/context';\nimport type { CommandHandlerContext } from '../lib/types';\n\nconst TCPA_NOTICE =\n 'By verifying you agree to receive calls and SMS from Gravity Rail at this number.';\n\nexport async function accountVerifyPhoneCommand(hctx: CommandHandlerContext): Promise<void> {\n const ctx = requireAuth(hctx.ctx);\n const phoneArg = typeof hctx.args.phone === 'string' ? hctx.args.phone : undefined;\n\n process.stderr.write(`${TCPA_NOTICE}\\n`);\n\n const phone = phoneArg ?? (await promptLine('Phone number (E.164, e.g. +15551234567): '));\n if (!phone.trim()) {\n throw new Error('Phone number is required');\n }\n\n await startAccountPhoneVerify(ctx, phone.trim());\n process.stderr.write('Verification code sent via SMS.\\n');\n\n const code = await promptLine('Enter 6-digit code: ');\n await confirmAccountPhoneVerify(ctx, code.trim());\n process.stderr.write(\n 'Phone verified. You can use `gr concierge chat --call` or `gr concierge chat --sms`.\\n'\n );\n}\n\nasync function promptLine(question: string): Promise<string> {\n const rl = readline.createInterface({ input, output });\n try {\n return (await rl.question(question)) ?? '';\n } finally {\n rl.close();\n }\n}\n"]}
|