diff --git a/docs/configuration.md b/docs/configuration.md index 071c0ee32..ef586bbe7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -7,7 +7,7 @@ CLAWDIS uses a JSON configuration file at `~/.clawdis/clawdis.json`. ```json { "inbound": { - "allowFrom": ["+15551234567"], + "allowFrom": ["+15555550123"], "reply": { "mode": "command", "command": ["tau", "{{Body}}"] @@ -26,8 +26,8 @@ CLAWDIS uses a JSON configuration file at `~/.clawdis/clawdis.json`. }, "inbound": { "allowFrom": [ - "+15551234567", - "+447511247203" + "+15555550123", + "+447700900123" ], "groupChat": { "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!). ```json -"allowFrom": ["+15551234567", "+447511247203"] +"allowFrom": ["+15555550123", "+447700900123"] ``` ### `inbound.groupChat` diff --git a/docs/group-messages.md b/docs/group-messages.md index d2ce3bc23..8fcc8029d 100644 --- a/docs/group-messages.md +++ b/docs/group-messages.md @@ -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. - 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 "". Group members: +44..., +43..., … Address the specific sender noted in the message context.` If metadata isn’t available we still tell the agent it’s 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: ```json5 @@ -24,7 +24,7 @@ Add a `groupChat` block to `~/.clawdis/clawdis.json` so display-name pings work "@?clawd", "@?clawd\\s*uk", "@?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. ## 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. 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 group’s session; your personal DM session remains independent. diff --git a/docs/security.md b/docs/security.md index 8ddb9ead5..26d2a8cdd 100644 --- a/docs/security.md +++ b/docs/security.md @@ -38,7 +38,7 @@ This is social engineering 101. Create distrust, encourage snooping. ```json { "inbound": { - "allowFrom": ["+15551234567"] + "allowFrom": ["+15555550123"] } } ``` diff --git a/src/cli/program.ts b/src/cli/program.ts index ec867fb96..afec504d7 100644 --- a/src/cli/program.ts +++ b/src/cli/program.ts @@ -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 ", - "Recipient number in E.164 (e.g. +15551234567)", + "Recipient number in E.164 (e.g. +15555550123)", ) .requiredOption("-m, --message ", "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) => { diff --git a/src/commands/sessions.test.ts b/src/commands/sessions.test.ts index 6c6245b73..9985189dd 100644 --- a/src/commands/sessions.test.ts +++ b/src/commands/sessions.test.ts @@ -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"); diff --git a/src/index.test.ts b/src/index.test.ts index d952581a5..79ac604d4 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -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"); }); });