@openclaw/sms 2026.8.1-beta.3 → 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.
@@ -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.3",
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.3"
126
+ "pluginApi": ">=2026.9.1-beta.1"
128
127
  },
129
128
  "build": {
130
- "openclawVersion": "2026.8.1-beta.3",
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.3"
153
+ "openclaw": ">=2026.9.1-beta.1"
155
154
  },
156
155
  "peerDependenciesMeta": {
157
156
  "openclaw": {