@openclaw/sms 2026.6.11-beta.2 → 2026.7.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.
- package/dist/channel-plugin-api.js +14 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
|
@@ -6,7 +6,7 @@ import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, w
|
|
|
6
6
|
import { createConditionalWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
7
7
|
import { createEmptyChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
8
8
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
-
import { chunkTextForOutbound, stripMarkdown } from "openclaw/plugin-sdk/text-chunking";
|
|
9
|
+
import { chunkTextForOutbound, sanitizeAssistantVisibleText, stripMarkdown } from "openclaw/plugin-sdk/text-chunking";
|
|
10
10
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, listCombinedAccountIds, resolveAccountEntry, resolveListedDefaultAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
11
11
|
import { parseStrictInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
12
12
|
import { buildSecretInputSchema, hasConfiguredSecretInput, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
@@ -457,7 +457,12 @@ function parseTwilioMessagingService(record) {
|
|
|
457
457
|
}
|
|
458
458
|
function parseTwilioListPayload(text, key, parseEntry) {
|
|
459
459
|
if (!text.trim()) return [];
|
|
460
|
-
|
|
460
|
+
let parsed;
|
|
461
|
+
try {
|
|
462
|
+
parsed = JSON.parse(text);
|
|
463
|
+
} catch {
|
|
464
|
+
return [];
|
|
465
|
+
}
|
|
461
466
|
if (!parsed || typeof parsed !== "object") return [];
|
|
462
467
|
const items = parsed[key];
|
|
463
468
|
if (!Array.isArray(items)) return [];
|
|
@@ -485,7 +490,12 @@ async function retrieveTwilioMessagingService(params) {
|
|
|
485
490
|
timeoutMs: params.timeoutMs
|
|
486
491
|
});
|
|
487
492
|
if (!response.ok) throw new TwilioSmsApiError(response.status, response.text, "messaging-service lookup");
|
|
488
|
-
|
|
493
|
+
let parsed;
|
|
494
|
+
try {
|
|
495
|
+
parsed = JSON.parse(response.text);
|
|
496
|
+
} catch {
|
|
497
|
+
throw new Error("Twilio Messaging Service lookup returned malformed JSON.");
|
|
498
|
+
}
|
|
489
499
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("Twilio Messaging Service lookup returned malformed JSON.");
|
|
490
500
|
return parseTwilioMessagingService(parsed);
|
|
491
501
|
}
|
|
@@ -538,7 +548,7 @@ async function sendSmsViaTwilio(params) {
|
|
|
538
548
|
//#endregion
|
|
539
549
|
//#region extensions/sms/src/send.ts
|
|
540
550
|
function toSmsPlainText(text) {
|
|
541
|
-
return stripMarkdown(text.replace(/```[^\n]*\n?([\s\S]*?)```/g, (_match, body) => body.trim()).replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, (_match, label, url) => {
|
|
551
|
+
return stripMarkdown(sanitizeAssistantVisibleText(text).replace(/```[^\n]*\n?([\s\S]*?)```/g, (_match, body) => body.trim()).replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, (_match, label, url) => {
|
|
542
552
|
const cleanLabel = label.trim();
|
|
543
553
|
const cleanUrl = url.trim();
|
|
544
554
|
return cleanLabel && cleanLabel !== cleanUrl ? `${cleanLabel} (${cleanUrl})` : cleanUrl;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/sms",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/sms",
|
|
9
|
-
"version": "2026.
|
|
9
|
+
"version": "2026.7.1-beta.1",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"zod": "4.4.3"
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/sms",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.7.1-beta.1",
|
|
4
4
|
"description": "OpenClaw SMS channel plugin for Twilio text messages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"quickstartAllowFrom": true
|
|
27
27
|
},
|
|
28
28
|
"compat": {
|
|
29
|
-
"pluginApi": ">=2026.
|
|
29
|
+
"pluginApi": ">=2026.7.1-beta.1"
|
|
30
30
|
},
|
|
31
31
|
"build": {
|
|
32
|
-
"openclawVersion": "2026.
|
|
32
|
+
"openclawVersion": "2026.7.1-beta.1",
|
|
33
33
|
"bundledDist": false
|
|
34
34
|
},
|
|
35
35
|
"install": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"README.md"
|
|
55
55
|
],
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"openclaw": ">=2026.
|
|
57
|
+
"openclaw": ">=2026.7.1-beta.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
60
|
"openclaw": {
|