@openclaw/line 2026.5.12-beta.8 → 2026.5.14-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/api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-qjV9OG1s.js";
1
+ import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-Bf5i9X7p.js";
2
2
  import { n as lineSetupAdapter, t as lineSetupWizard } from "./setup-surface-BGjkWr_B.js";
3
3
  //#region extensions/line/src/channel.setup.ts
4
4
  const lineSetupPlugin = {
@@ -108,7 +108,7 @@ const lineChannelPluginCommon = {
108
108
  //#endregion
109
109
  //#region extensions/line/src/gateway.ts
110
110
  const loadLineProbeRuntime$1 = createLazyRuntimeModule(() => import("./probe.runtime-XkNsM6LR.js"));
111
- const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-Cfi3VjQz.js"));
111
+ const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-C0J3cWLH.js"));
112
112
  const lineGatewayAdapter = {
113
113
  startAccount: async (ctx) => {
114
114
  const account = ctx.account;
@@ -533,7 +533,7 @@ const lineStatusAdapter = createComputedAccountStatusAdapter({
533
533
  });
534
534
  //#endregion
535
535
  //#region extensions/line/src/channel.ts
536
- const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-DZEOuAhp.js"));
536
+ const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Bj6SGPEZ.js"));
537
537
  const lineSecurityAdapter = createRestrictSendersChannelSecurity({
538
538
  channelKey: "line",
539
539
  resolveDmPolicy: (account) => account.config.dmPolicy,
@@ -1,2 +1,2 @@
1
- import { t as linePlugin } from "./channel-qjV9OG1s.js";
1
+ import { t as linePlugin } from "./channel-Bf5i9X7p.js";
2
2
  export { linePlugin };
@@ -1,4 +1,4 @@
1
1
  import { S as pushMessageLine } from "./markdown-to-line-CrXM4Bcw.js";
2
- import { t as monitorLineProvider } from "./monitor-CnqIZXPx.js";
2
+ import { t as monitorLineProvider } from "./monitor-kPDKy2FH.js";
3
3
  import { t as probeLineBot } from "./probe-Cla0gZ0b.js";
4
4
  export { monitorLineProvider, probeLineBot, pushMessageLine };
@@ -4,10 +4,10 @@ import { A as buildTemplateMessageFromPayload, C as pushMessagesLine, E as reply
4
4
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
5
5
  import { createMessageReceiveContext, hasFinalChannelTurnDispatch } from "openclaw/plugin-sdk/channel-message";
6
6
  import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
7
- import { lowercasePreservingWhitespace, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
7
+ import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { firstDefined } from "openclaw/plugin-sdk/allow-from";
9
9
  import { messagingApi } from "@line/bot-sdk";
10
- import { saveMediaBuffer } from "openclaw/plugin-sdk/media-store";
10
+ import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
11
11
  import { createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, waitForAbortSignal } from "openclaw/plugin-sdk/runtime-env";
12
12
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
13
13
  import { chunkMarkdownText } from "openclaw/plugin-sdk/reply-runtime";
@@ -41,47 +41,15 @@ const normalizeAllowFrom = (list) => {
41
41
  };
42
42
  //#endregion
43
43
  //#region extensions/line/src/download.ts
44
- const AUDIO_BRANDS = new Set([
45
- "m4a ",
46
- "m4b ",
47
- "m4p ",
48
- "m4r ",
49
- "f4a ",
50
- "f4b "
51
- ]);
52
44
  async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 * 1024 * 1024) {
53
- const response = await new messagingApi.MessagingApiBlobClient({ channelAccessToken }).getMessageContent(messageId);
54
- const chunks = [];
55
- let totalSize = 0;
56
- for await (const chunk of response) {
57
- totalSize += chunk.length;
58
- if (totalSize > maxBytes) throw new Error(`Media exceeds ${Math.round(maxBytes / (1024 * 1024))}MB limit`);
59
- chunks.push(chunk);
60
- }
61
- const buffer = Buffer.concat(chunks);
62
- const saved = await saveMediaBuffer(buffer, detectContentType(buffer), "inbound", maxBytes);
63
- logVerbose(`line: persisted media ${messageId} to ${saved.path} (${buffer.length} bytes)`);
45
+ const saved = await saveMediaStream(await new messagingApi.MessagingApiBlobClient({ channelAccessToken }).getMessageContent(messageId), void 0, "inbound", maxBytes);
46
+ logVerbose(`line: persisted media ${messageId} to ${saved.path} (${saved.size} bytes)`);
64
47
  return {
65
48
  path: saved.path,
66
49
  contentType: saved.contentType,
67
- size: buffer.length
50
+ size: saved.size
68
51
  };
69
52
  }
70
- function detectContentType(buffer) {
71
- const hasFtypBox = buffer.length >= 12 && buffer[4] === 102 && buffer[5] === 116 && buffer[6] === 121 && buffer[7] === 112;
72
- if (buffer.length >= 2) {
73
- if (buffer[0] === 255 && buffer[1] === 216) return "image/jpeg";
74
- if (buffer[0] === 137 && buffer[1] === 80 && buffer[2] === 78 && buffer[3] === 71) return "image/png";
75
- if (buffer[0] === 71 && buffer[1] === 73 && buffer[2] === 70) return "image/gif";
76
- if (buffer[0] === 82 && buffer[1] === 73 && buffer[2] === 70 && buffer[3] === 70 && buffer[8] === 87 && buffer[9] === 69 && buffer[10] === 66 && buffer[11] === 80) return "image/webp";
77
- if (hasFtypBox) {
78
- const majorBrand = lowercasePreservingWhitespace(buffer.toString("ascii", 8, 12));
79
- if (AUDIO_BRANDS.has(majorBrand)) return "audio/mp4";
80
- return "video/mp4";
81
- }
82
- }
83
- return "application/octet-stream";
84
- }
85
53
  //#endregion
86
54
  //#region extensions/line/src/auto-reply-delivery.ts
87
55
  async function deliverLineAutoReply(params) {
@@ -0,0 +1,2 @@
1
+ import { t as monitorLineProvider } from "./monitor-kPDKy2FH.js";
2
+ export { monitorLineProvider };
@@ -4,7 +4,7 @@ import { a as createMediaPlayerCard, i as createDeviceControlCard, n as parseLin
4
4
  import { n as createEventCard, r as createReceiptCard, t as createAgendaCard } from "./schedule-cards-BwQChTdM.js";
5
5
  import { a as createListCard, i as createInfoCard, n as createCarousel, o as createNotificationBubble, r as createImageCard, t as createActionCard } from "./basic-cards-7DTG6E-A.js";
6
6
  import { A as buildTemplateMessageFromPayload, B as createYesNoConfirm, C as pushMessagesLine, D as sendMessageLine, E as replyMessageLine, F as createImageCarousel, G as toFlexMessage, H as messageAction, I as createImageCarouselColumn, L as createLinkMenu, M as createButtonTemplate, N as createCarouselColumn, O as showLoadingAnimation, P as createConfirmTemplate, R as createProductCarousel, S as pushMessageLine, T as pushTextMessageWithQuickReplies, U as postbackAction, V as datetimePickerAction, W as uriAction, _ as getUserDisplayName, a as extractLinks, b as pushImageMessage, c as processLineMessage, d as createFlexMessage, f as createImageMessage, g as createVideoMessage, h as createTextMessageWithQuickReplies, i as extractCodeBlocks, j as createButtonMenu, k as resolveLineChannelAccessToken, l as stripMarkdown, m as createQuickReplyItems, n as convertLinksToFlexBubble, o as extractMarkdownTables, p as createLocationMessage, r as convertTableToFlexBubble, s as hasMarkdownToConvert, t as convertCodeBlockToFlexBubble, u as createAudioMessage, v as getUserProfile, w as pushTemplateMessage, x as pushLocationMessage, y as pushFlexMessage, z as createTemplateCarousel } from "./markdown-to-line-CrXM4Bcw.js";
7
- import { a as validateLineSignature, c as normalizeAllowFrom, i as parseLineWebhookBody, n as createLineNodeWebhookHandler, o as downloadLineMedia, r as readLineWebhookRequestBody, s as firstDefined, t as monitorLineProvider } from "./monitor-CnqIZXPx.js";
7
+ import { a as validateLineSignature, c as normalizeAllowFrom, i as parseLineWebhookBody, n as createLineNodeWebhookHandler, o as downloadLineMedia, r as readLineWebhookRequestBody, s as firstDefined, t as monitorLineProvider } from "./monitor-kPDKy2FH.js";
8
8
  import { t as probeLineBot } from "./probe-Cla0gZ0b.js";
9
9
  import { clearAccountEntryFields } from "openclaw/plugin-sdk/core";
10
10
  import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/line",
3
- "version": "2026.5.12-beta.8",
3
+ "version": "2026.5.14-beta.1",
4
4
  "description": "OpenClaw LINE channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "openclaw": "workspace:*"
17
17
  },
18
18
  "peerDependencies": {
19
- "openclaw": ">=2026.5.12-beta.8"
19
+ "openclaw": ">=2026.5.14-beta.1"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "openclaw": {
@@ -46,10 +46,10 @@
46
46
  "minHostVersion": ">=2026.4.10"
47
47
  },
48
48
  "compat": {
49
- "pluginApi": ">=2026.5.12-beta.8"
49
+ "pluginApi": ">=2026.5.14-beta.1"
50
50
  },
51
51
  "build": {
52
- "openclawVersion": "2026.5.12-beta.8"
52
+ "openclawVersion": "2026.5.14-beta.1"
53
53
  },
54
54
  "release": {
55
55
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorLineProvider } from "./monitor-CnqIZXPx.js";
2
- export { monitorLineProvider };