Docs: swap to obviously fake phone numbers

This commit is contained in:
Peter Steinberger
2025-12-07 04:42:58 +00:00
parent fdc0b283d7
commit 67c67dd86d
6 changed files with 22 additions and 22 deletions

View File

@@ -72,7 +72,7 @@ export function buildProgram() {
"Link personal WhatsApp Web and show QR + connection logs.",
],
[
'clawdis send --to +15551234567 --message "Hi" --json',
'clawdis send --to +15555550123 --message "Hi" --json',
"Send via your web session and print JSON result.",
],
[
@@ -88,7 +88,7 @@ export function buildProgram() {
"Show web session health and recent session recipients.",
],
[
'clawdis agent --to +15551234567 --message "Run summary" --deliver',
'clawdis agent --to +15555550123 --message "Run summary" --deliver',
"Talk directly to the agent using the same session handling; optionally send the reply.",
],
] as const;
@@ -137,7 +137,7 @@ export function buildProgram() {
.description("Send a WhatsApp message (web provider)")
.requiredOption(
"-t, --to <number>",
"Recipient number in E.164 (e.g. +15551234567)",
"Recipient number in E.164 (e.g. +15555550123)",
)
.requiredOption("-m, --message <text>", "Message body")
.option(
@@ -151,10 +151,10 @@ export function buildProgram() {
"after",
`
Examples:
clawdis send --to +15551234567 --message "Hi"
clawdis send --to +15551234567 --message "Hi" --media photo.jpg
clawdis send --to +15551234567 --message "Hi" --dry-run # print payload only
clawdis send --to +15551234567 --message "Hi" --json # machine-readable result`,
clawdis send --to +15555550123 --message "Hi"
clawdis send --to +15555550123 --message "Hi" --media photo.jpg
clawdis send --to +15555550123 --message "Hi" --dry-run # print payload only
clawdis send --to +15555550123 --message "Hi" --json # machine-readable result`,
)
.action(async (opts) => {
setVerbose(Boolean(opts.verbose));
@@ -197,10 +197,10 @@ Examples:
"after",
`
Examples:
clawdis agent --to +15551234567 --message "status update"
clawdis agent --to +15555550123 --message "status update"
clawdis agent --session-id 1234 --message "Summarize inbox" --thinking medium
clawdis agent --to +15551234567 --message "Trace logs" --verbose on --json
clawdis agent --to +15551234567 --message "Summon reply" --deliver
clawdis agent --to +15555550123 --message "Trace logs" --verbose on --json
clawdis agent --to +15555550123 --message "Summon reply" --deliver
`,
)
.action(async (opts) => {

View File

@@ -56,7 +56,7 @@ describe("sessionsCommand", () => {
it("renders a tabular view with token percentages", async () => {
const store = writeStore({
"+15551234567": {
"+15555550123": {
sessionId: "abc123",
updatedAt: Date.now() - 45 * 60_000,
inputTokens: 1200,
@@ -73,7 +73,7 @@ describe("sessionsCommand", () => {
const tableHeader = logs.find((line) => line.includes("Tokens (ctx %"));
expect(tableHeader).toBeTruthy();
const row = logs.find((line) => line.includes("+15551234567")) ?? "";
const row = logs.find((line) => line.includes("+15555550123")) ?? "";
expect(row).toContain("2.0k/32k (6%)");
expect(row).toContain("45m ago");
expect(row).toContain("pi:opus");

View File

@@ -3,7 +3,7 @@ import { assertProvider, normalizeE164, toWhatsappJid } from "./index.js";
describe("normalizeE164", () => {
it("strips whatsapp prefix and whitespace", () => {
expect(normalizeE164("whatsapp:+1 555 123 4567")).toBe("+15551234567");
expect(normalizeE164("whatsapp:+1 555 555 0123")).toBe("+15555550123");
});
it("adds plus when missing", () => {
@@ -13,7 +13,7 @@ describe("normalizeE164", () => {
describe("toWhatsappJid", () => {
it("converts E164 to jid", () => {
expect(toWhatsappJid("+1 555 123 4567")).toBe("15551234567@s.whatsapp.net");
expect(toWhatsappJid("+1 555 555 0123")).toBe("15555550123@s.whatsapp.net");
});
});