@openclaw/sms 2026.8.1-beta.2 → 2026.9.1-beta.1

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.
@@ -1527,7 +1527,13 @@ const resolveSmsDmPolicy = createScopedDmSecurityResolver({
1527
1527
  approveHint: "openclaw pairing approve sms <code>",
1528
1528
  normalizeEntry: normalizeSmsAllowFrom
1529
1529
  });
1530
- const collectSmsSecurityWarnings = createConditionalWarningCollector((account) => account.dangerouslyDisableSignatureValidation && "- SMS: Twilio signature validation is disabled. Only use this for local testing.", (account) => account.dmPolicy === "open" && account.allowFrom.includes("*") && "- SMS: dmPolicy=\"open\" allows any phone number to message the bot.");
1530
+ const collectSmsSecurityWarnings = createConditionalWarningCollector((account) => account.dangerouslyDisableSignatureValidation && "- SMS: Twilio signature validation is disabled. Only use this for local testing.");
1531
+ const collectSmsOpenDmFindings = createConditionalWarningCollector.findings({
1532
+ collectWarnings: createConditionalWarningCollector((account) => account.dmPolicy === "open" && account.allowFrom.includes("*") && "- SMS: dmPolicy=\"open\" allows any phone number to message the bot."),
1533
+ checkId: "channels.sms.dm.open",
1534
+ severity: "critical",
1535
+ title: "SMS security warning"
1536
+ });
1531
1537
  function smsSetupPatch(input) {
1532
1538
  const patch = {};
1533
1539
  for (const key of [
@@ -1886,7 +1892,7 @@ const smsPlugin = createChatChannelPlugin({
1886
1892
  } },
1887
1893
  security: {
1888
1894
  resolveDmPolicy: resolveSmsDmPolicy,
1889
- collectWarnings: ({ account }) => collectSmsSecurityWarnings(account)
1895
+ collectWarnings: ({ account }) => [...collectSmsSecurityWarnings(account), ...collectSmsOpenDmFindings(account)]
1890
1896
  },
1891
1897
  outbound: {
1892
1898
  deliveryMode: "gateway",
@@ -0,0 +1,26 @@
1
+ import { DEFAULT_ACCOUNT_ID, hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-core";
2
+ //#region extensions/sms/configured-state.ts
3
+ function hasConfiguredSmsAccount(account, env) {
4
+ const hasAccount = hasConfiguredAccountValue(account?.accountSid ?? env.TWILIO_ACCOUNT_SID);
5
+ const hasToken = hasConfiguredAccountValue(account?.authToken ?? env.TWILIO_AUTH_TOKEN);
6
+ const fromNumber = [env.TWILIO_PHONE_NUMBER, env.TWILIO_SMS_FROM].find((value) => hasConfiguredAccountValue(value));
7
+ const hasSender = hasConfiguredAccountValue(account?.fromNumber ?? fromNumber) || hasConfiguredAccountValue(account?.messagingServiceSid ?? env.TWILIO_MESSAGING_SERVICE_SID);
8
+ return hasAccount && hasToken && hasSender;
9
+ }
10
+ /** Require a complete Twilio identity and sender, scoped to each enabled account. */
11
+ function hasConfiguredSmsChannelState(params) {
12
+ const channel = params.cfg.channels?.sms;
13
+ if (channel?.enabled === false) return false;
14
+ const defaultAccount = channel?.accounts?.[DEFAULT_ACCOUNT_ID];
15
+ const { accounts: _accounts, defaultAccount: _defaultAccount, ...defaults } = channel ?? {};
16
+ if (defaultAccount?.enabled !== false && hasConfiguredSmsAccount(defaultAccount ? {
17
+ ...defaults,
18
+ ...defaultAccount
19
+ } : channel, params.env ?? process.env)) return true;
20
+ return Object.entries(channel?.accounts ?? {}).some(([accountId, account]) => accountId !== DEFAULT_ACCOUNT_ID && account.enabled !== false && hasConfiguredSmsAccount({
21
+ ...defaults,
22
+ ...account
23
+ }, {}));
24
+ }
25
+ //#endregion
26
+ export { hasConfiguredSmsChannelState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/sms",
3
- "version": "2026.8.1-beta.2",
3
+ "version": "2026.9.1-beta.1",
4
4
  "description": "OpenClaw SMS/MMS channel plugin for Twilio messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,12 +23,11 @@
23
23
  "TWILIO_AUTH_TOKEN",
24
24
  "TWILIO_PHONE_NUMBER",
25
25
  "TWILIO_SMS_FROM",
26
- "TWILIO_MESSAGING_SERVICE_SID",
27
- "SMS_PUBLIC_WEBHOOK_URL",
28
- "SMS_WEBHOOK_PATH",
29
- "SMS_ALLOWED_USERS"
26
+ "TWILIO_MESSAGING_SERVICE_SID"
30
27
  ]
31
- }
28
+ },
29
+ "specifier": "./dist/configured-state.js",
30
+ "exportName": "hasConfiguredSmsChannelState"
32
31
  },
33
32
  "label": "SMS",
34
33
  "selectionLabel": "SMS (Twilio)",
@@ -124,10 +123,10 @@
124
123
  }
125
124
  },
126
125
  "compat": {
127
- "pluginApi": ">=2026.8.1-beta.2"
126
+ "pluginApi": ">=2026.9.1-beta.1"
128
127
  },
129
128
  "build": {
130
- "openclawVersion": "2026.8.1-beta.2",
129
+ "openclawVersion": "2026.9.1-beta.1",
131
130
  "bundledDist": false
132
131
  },
133
132
  "install": {
@@ -151,7 +150,7 @@
151
150
  "README.md"
152
151
  ],
153
152
  "peerDependencies": {
154
- "openclaw": ">=2026.8.1-beta.2"
153
+ "openclaw": ">=2026.9.1-beta.1"
155
154
  },
156
155
  "peerDependenciesMeta": {
157
156
  "openclaw": {