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

@@ -7,7 +7,7 @@ CLAWDIS uses a JSON configuration file at `~/.clawdis/clawdis.json`.
```json ```json
{ {
"inbound": { "inbound": {
"allowFrom": ["+15551234567"], "allowFrom": ["+15555550123"],
"reply": { "reply": {
"mode": "command", "mode": "command",
"command": ["tau", "{{Body}}"] "command": ["tau", "{{Body}}"]
@@ -26,8 +26,8 @@ CLAWDIS uses a JSON configuration file at `~/.clawdis/clawdis.json`.
}, },
"inbound": { "inbound": {
"allowFrom": [ "allowFrom": [
"+15551234567", "+15555550123",
"+447511247203" "+447700900123"
], ],
"groupChat": { "groupChat": {
"requireMention": true, "requireMention": true,
@@ -80,7 +80,7 @@ CLAWDIS uses a JSON configuration file at `~/.clawdis/clawdis.json`.
Array of E.164 phone numbers allowed to trigger the AI. Use `["*"]` to allow everyone (dangerous!). Array of E.164 phone numbers allowed to trigger the AI. Use `["*"]` to allow everyone (dangerous!).
```json ```json
"allowFrom": ["+15551234567", "+447511247203"] "allowFrom": ["+15555550123", "+447700900123"]
``` ```
### `inbound.groupChat` ### `inbound.groupChat`

View File

@@ -11,7 +11,7 @@ Goal: let Clawd sit in WhatsApp groups, wake up only when pinged, and keep that
- Ephemeral/view-once: we unwrap those before extracting text/mentions, so pings inside them still trigger. - Ephemeral/view-once: we unwrap those before extracting text/mentions, so pings inside them still trigger.
- New session primer: on the first turn of a group session we now prepend a short blurb to the model like `You are replying inside the WhatsApp group "<subject>". Group members: +44..., +43..., … Address the specific sender noted in the message context.` If metadata isnt available we still tell the agent its a group chat. - New session primer: on the first turn of a group session we now prepend a short blurb to the model like `You are replying inside the WhatsApp group "<subject>". Group members: +44..., +43..., … Address the specific sender noted in the message context.` If metadata isnt available we still tell the agent its a group chat.
## Config for Clawd UK (+447511247203) ## Config for Clawd UK (+447700900123)
Add a `groupChat` block to `~/.clawdis/clawdis.json` so display-name pings work even when WhatsApp strips the visual `@` in the text body: Add a `groupChat` block to `~/.clawdis/clawdis.json` so display-name pings work even when WhatsApp strips the visual `@` in the text body:
```json5 ```json5
@@ -24,7 +24,7 @@ Add a `groupChat` block to `~/.clawdis/clawdis.json` so display-name pings work
"@?clawd", "@?clawd",
"@?clawd\\s*uk", "@?clawd\\s*uk",
"@?clawdbot", "@?clawdbot",
"\\+?447511247203" "\\+?447700900123"
] ]
} }
} }
@@ -36,7 +36,7 @@ Notes:
- WhatsApp still sends canonical mentions via `mentionedJids` when someone taps the contact, so the number fallback is rarely needed but is a good safety net. - WhatsApp still sends canonical mentions via `mentionedJids` when someone taps the contact, so the number fallback is rarely needed but is a good safety net.
## How to use ## How to use
1) Add Clawd UK (`+447511247203`) to the group. 1) Add Clawd UK (`+447700900123`) to the group.
2) Say `@clawd …` (or `@clawd uk`, `@clawdbot`, or include the number). Anyone in the group can trigger it. 2) Say `@clawd …` (or `@clawd uk`, `@clawdbot`, or include the number). Anyone in the group can trigger it.
3) The agent prompt will include recent group context plus the trailing `[from: …]` marker so it can address the right person. 3) The agent prompt will include recent group context plus the trailing `[from: …]` marker so it can address the right person.
4) Session-level directives (`/verbose on`, `/think:high`, `/new`) apply only to that groups session; your personal DM session remains independent. 4) Session-level directives (`/verbose on`, `/think:high`, `/new`) apply only to that groups session; your personal DM session remains independent.

View File

@@ -38,7 +38,7 @@ This is social engineering 101. Create distrust, encourage snooping.
```json ```json
{ {
"inbound": { "inbound": {
"allowFrom": ["+15551234567"] "allowFrom": ["+15555550123"]
} }
} }
``` ```

View File

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

View File

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

View File

@@ -3,7 +3,7 @@ import { assertProvider, normalizeE164, toWhatsappJid } from "./index.js";
describe("normalizeE164", () => { describe("normalizeE164", () => {
it("strips whatsapp prefix and whitespace", () => { 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", () => { it("adds plus when missing", () => {
@@ -13,7 +13,7 @@ describe("normalizeE164", () => {
describe("toWhatsappJid", () => { describe("toWhatsappJid", () => {
it("converts E164 to jid", () => { 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");
}); });
}); });