@openclaw/line 2026.9.3 → 2026.9.4

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-DKU9GRRC.js";
1
+ import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-C2D8vUmv.js";
2
2
  import { r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-DiXO4x5f.js";
3
3
  //#region extensions/line/src/channel.setup.ts
4
4
  const lineSetupPlugin = {
@@ -120,7 +120,7 @@ const lineChannelPluginCommon = {
120
120
  //#endregion
121
121
  //#region extensions/line/src/gateway.ts
122
122
  const loadLineProbeRuntime$1 = createLazyRuntimeModule(() => import("./probe.runtime-CbtMgU4s.js"));
123
- const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-Bgm3Hcfu.js"));
123
+ const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-BJ0XI3qK.js"));
124
124
  const lineGatewayAdapter = {
125
125
  startAccount: async (ctx) => {
126
126
  const account = ctx.account;
@@ -211,7 +211,7 @@ function inferLineTargetChatType(target) {
211
211
  }
212
212
  //#endregion
213
213
  //#region extensions/line/src/outbound.ts
214
- const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-CGqyJ-Ug.js"));
214
+ const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-Cpp7NAmT.js"));
215
215
  const lineOutboundAdapter = {
216
216
  deliveryMode: "direct",
217
217
  chunker: (text, limit) => getLineRuntime().channel.text.chunkMarkdownText(text, limit),
@@ -477,7 +477,7 @@ const lineStatusAdapter = createComputedAccountStatusAdapter({
477
477
  });
478
478
  //#endregion
479
479
  //#region extensions/line/src/channel.ts
480
- const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Bq6dsWOi.js"));
480
+ const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-CYHw3gcp.js"));
481
481
  const lineSecurityAdapter = createRestrictSendersChannelSecurity({
482
482
  channelKey: "line",
483
483
  resolveDmPolicy: (account) => account.config.dmPolicy,
@@ -1,2 +1,2 @@
1
- import { t as linePlugin } from "./channel-DKU9GRRC.js";
1
+ import { t as linePlugin } from "./channel-C2D8vUmv.js";
2
2
  export { linePlugin };
@@ -1,4 +1,4 @@
1
1
  import { a as probeLineBot } from "./send-retry-ChpfJ-LM.js";
2
- import { t as monitorLineProvider } from "./monitor-Bp2VIzkG.js";
2
+ import { t as monitorLineProvider } from "./monitor-2lOtBpg-.js";
3
3
  import { _ as showLoadingAnimation, d as pushMessageLine } from "./send-CQQxpxPp.js";
4
4
  export { monitorLineProvider, probeLineBot, pushMessageLine, showLoadingAnimation };
@@ -163,14 +163,6 @@ function parseLineMarkdown(text, tableMode = "block") {
163
163
  tableMode
164
164
  });
165
165
  }
166
- function toMarkdownTable(table) {
167
- return {
168
- headers: table.headers,
169
- rows: table.rows,
170
- headerCells: table.headerCells,
171
- rowCells: table.rowCells
172
- };
173
- }
174
166
  function codeBlockSpans(ir) {
175
167
  return ir.styles.filter((span) => span.style === "code_block");
176
168
  }
@@ -343,14 +335,29 @@ function renderTableCell(cell, fallback) {
343
335
  hasMarkup
344
336
  };
345
337
  }
346
- function plainTableCell(text) {
347
- return parseLineMarkdown(text, "off").ir;
348
- }
349
- /** Convert a markdown table to a LINE Flex Message bubble. */
338
+ /** Convert a table to a Flex bubble when its rows fit the layout. */
350
339
  function convertTableToFlexBubble(table) {
351
- const headerCells = (table.headerCells ?? table.headers.map(plainTableCell)).map((cell) => renderTableCell(cell, "-"));
352
- const rowCells = (table.rowCells ?? table.rows.map((row) => row.map(plainTableCell))).map((row) => row.map((cell) => renderTableCell(cell, "-")));
353
- const hasInlineMarkup = headerCells.some((cell) => cell.hasMarkup) || rowCells.some((row) => row.some((cell) => cell.hasMarkup));
340
+ const requiresPlainCells = table.rowCells.length > 10;
341
+ if (requiresPlainCells && (table.headers.length !== 2 || table.rowCells.length > 12)) return;
342
+ let hasInlineMarkup = false;
343
+ const renderCells = (cells) => {
344
+ const rendered = [];
345
+ for (const cell of cells) {
346
+ const prepared = renderTableCell(cell, "-");
347
+ if (requiresPlainCells && prepared.hasMarkup) return;
348
+ hasInlineMarkup ||= prepared.hasMarkup;
349
+ rendered.push(prepared);
350
+ }
351
+ return rendered;
352
+ };
353
+ const headerCells = renderCells(table.headerCells);
354
+ if (!headerCells) return;
355
+ const rowCells = [];
356
+ for (const row of table.rowCells) {
357
+ const cells = renderCells(row);
358
+ if (!cells) return;
359
+ rowCells.push(cells);
360
+ }
354
361
  if (table.headers.length === 2 && !hasInlineMarkup) return createReceiptCard({
355
362
  title: headerCells.map((cell) => cell.text).join(" / "),
356
363
  items: rowCells.map((row) => ({
@@ -383,7 +390,7 @@ function convertTableToFlexBubble(table) {
383
390
  type: "separator",
384
391
  margin: "sm"
385
392
  },
386
- ...rowCells.slice(0, 10).map((row, rowIndex) => ({
393
+ ...rowCells.map((row, rowIndex) => ({
387
394
  type: "box",
388
395
  layout: "horizontal",
389
396
  contents: table.headers.map((_, colIndex) => {
@@ -448,7 +455,7 @@ function processLineMessage(text) {
448
455
  const codeSpans = codeBlockSpans(ir);
449
456
  const plainTextInsertions = [];
450
457
  for (const table of tables) {
451
- const bubble = table.rowCells.length > 10 && (table.headers.length !== 2 || table.rowCells.length > 12 || [table.headerCells, ...table.rowCells].some((cells) => cells.some((cell) => renderTableCell(cell, "-").hasMarkup))) ? void 0 : convertTableToFlexBubble(toMarkdownTable(table));
458
+ const bubble = convertTableToFlexBubble(table);
452
459
  if (!bubble || !fitsLineFlexBubble(bubble)) {
453
460
  plainTextInsertions.push({
454
461
  position: table.placeholderOffset,
@@ -490,4 +497,4 @@ function hasMarkdownToConvert(text) {
490
497
  return tables.length > 0 || ir.styles.length > 0 || ir.links.length > 0 || /<\/?u>/i.test(ir.text) || ir.text !== text.trimEnd();
491
498
  }
492
499
  //#endregion
493
- export { stripMarkdown$1 as a, createCarouselColumn as c, processLineMessage as i, createConfirmTemplate as l, convertTableToFlexBubble as n, buildTemplateMessageFromPayload as o, hasMarkdownToConvert as r, createButtonTemplate as s, convertCodeBlockToFlexBubble as t, createTemplateCarousel as u };
500
+ export { buildTemplateMessageFromPayload as a, createConfirmTemplate as c, stripMarkdown$1 as i, createTemplateCarousel as l, hasMarkdownToConvert as n, createButtonTemplate as o, processLineMessage as r, createCarouselColumn as s, convertCodeBlockToFlexBubble as t };
@@ -2,7 +2,7 @@ import { i as resolveLineAccount, r as resolveDefaultLineAccountId } from "./acc
2
2
  import { f as resolveLineGroupConfigEntry, h as getLineRuntime, i as prepareLineReplyPayload, n as createLineQuickReply, u as buildLineQuickReplyFallbackText } from "./rich-messages-HS8pNeOa.js";
3
3
  import { n as findLineHttpError, r as resolveLineNonDispatchRetryable, t as explainLineRefusal, w as buildLineMediaMessage } from "./send-retry-ChpfJ-LM.js";
4
4
  import { a as eventIdFor, n as LINE_WEBHOOK_SPOOL_INVALID_PAYLOAD_MESSAGE, o as laneKeyFor, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./webhook-spool-contract-1rY8OJw8.js";
5
- import { i as processLineMessage, o as buildTemplateMessageFromPayload } from "./markdown-to-line-B-sj-7II.js";
5
+ import { a as buildTemplateMessageFromPayload, r as processLineMessage } from "./markdown-to-line-DR3sFH6H.js";
6
6
  import { _ as showLoadingAnimation, a as getLineGroupName, d as pushMessageLine, f as pushMessagesLine, h as replyMessageLine, n as createLocationMessage, o as getUserDisplayName, s as getUserProfile, t as createFlexMessage, v as quotesLineBotMessage } from "./send-CQQxpxPp.js";
7
7
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
8
8
  import { resolveChannelGroupsConfigPath } from "openclaw/plugin-sdk/channel-policy";
@@ -0,0 +1,2 @@
1
+ import { t as monitorLineProvider } from "./monitor-2lOtBpg-.js";
2
+ export { monitorLineProvider };
@@ -1,3 +1,3 @@
1
- import { i as processLineMessage, o as buildTemplateMessageFromPayload } from "./markdown-to-line-B-sj-7II.js";
1
+ import { a as buildTemplateMessageFromPayload, r as processLineMessage } from "./markdown-to-line-DR3sFH6H.js";
2
2
  import { c as pushFlexMessage, d as pushMessageLine, f as pushMessagesLine, g as sendMessageLine, m as pushTextMessageWithQuickReplies, n as createLocationMessage, p as pushTemplateMessage, r as createQuickReplyItems, t as createFlexMessage, u as pushLocationMessage } from "./send-CQQxpxPp.js";
3
3
  export { buildTemplateMessageFromPayload, createFlexMessage, createLocationMessage, createQuickReplyItems, processLineMessage, pushFlexMessage, pushLocationMessage, pushMessageLine, pushMessagesLine, pushTemplateMessage, pushTextMessageWithQuickReplies, sendMessageLine };
@@ -1,8 +1,8 @@
1
1
  import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BBEFMYbY.js";
2
2
  import { _ as LineChannelConfigSchema, c as createDeviceControlCard, d as resolveExactLineGroupConfigKey, f as resolveLineGroupConfigEntry, g as setLineRuntime, l as createMediaPlayerCard, m as resolveLineGroupsConfig, p as resolveLineGroupLookupIds, s as createAppleTvRemoteCard, v as LineConfigSchema } from "./rich-messages-HS8pNeOa.js";
3
3
  import { C as toFlexMessage, D as createVideoMessage, E as createImageMessage, T as createAudioMessage, a as probeLineBot, c as createAgendaCard, d as createActionCard, f as createImageCard, g as messageAction, h as datetimePickerAction, l as createEventCard, m as createListCard, o as resolveLineChannelAccessToken, p as createInfoCard, u as createReceiptCard, x as uriAction, y as postbackAction } from "./send-retry-ChpfJ-LM.js";
4
- 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-Bp2VIzkG.js";
5
- import { a as stripMarkdown, c as createCarouselColumn, i as processLineMessage, l as createConfirmTemplate, n as convertTableToFlexBubble, o as buildTemplateMessageFromPayload, r as hasMarkdownToConvert, s as createButtonTemplate, t as convertCodeBlockToFlexBubble, u as createTemplateCarousel } from "./markdown-to-line-B-sj-7II.js";
4
+ 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-2lOtBpg-.js";
5
+ import { a as buildTemplateMessageFromPayload, c as createConfirmTemplate, i as stripMarkdown, l as createTemplateCarousel, n as hasMarkdownToConvert, o as createButtonTemplate, r as processLineMessage, s as createCarouselColumn, t as convertCodeBlockToFlexBubble } from "./markdown-to-line-DR3sFH6H.js";
6
6
  import { _ as showLoadingAnimation, c as pushFlexMessage, d as pushMessageLine, f as pushMessagesLine, g as sendMessageLine, h as replyMessageLine, i as createTextMessageWithQuickReplies, l as pushImageMessage, m as pushTextMessageWithQuickReplies, n as createLocationMessage, o as getUserDisplayName, p as pushTemplateMessage, r as createQuickReplyItems, s as getUserProfile, t as createFlexMessage, u as pushLocationMessage } from "./send-CQQxpxPp.js";
7
7
  import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
8
8
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -257,4 +257,4 @@ function createDefaultMenuConfig() {
257
257
  };
258
258
  }
259
259
  //#endregion
260
- export { DEFAULT_ACCOUNT_ID, LineChannelConfigSchema, LineConfigSchema, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, buildTemplateMessageFromPayload, buildTokenChannelStatusSummary, cancelDefaultRichMenu, clearAccountEntryFields, convertCodeBlockToFlexBubble, convertTableToFlexBubble, createActionCard, createAgendaCard, createAppleTvRemoteCard, createAudioMessage, createButtonTemplate, createCarouselColumn, createConfirmTemplate, createDefaultMenuConfig, createDeviceControlCard, createEventCard, createFlexMessage, createGridLayout, createImageCard, createImageMessage, createInfoCard, createLineNodeWebhookHandler, createLineWebhookMiddleware, createListCard, createLocationMessage, createMediaPlayerCard, createQuickReplyItems, createReceiptCard, createRichMenu, createRichMenuAlias, createTemplateCarousel, createTextMessageWithQuickReplies, createVideoMessage, datetimePickerAction, deleteRichMenu, deleteRichMenuAlias, downloadLineMedia, firstDefined, formatDocsLink, getDefaultRichMenuId, getRichMenu, getRichMenuIdOfUser, getRichMenuList, getUserDisplayName, getUserProfile, hasMarkdownToConvert, listLineAccountIds, messageAction, monitorLineProvider, normalizeAccountId, normalizeAllowFrom, parseLineWebhookBody, postbackAction, probeLineBot, processLineMessage, pushFlexMessage, pushImageMessage, pushLocationMessage, pushMessageLine, pushMessagesLine, pushTemplateMessage, pushTextMessageWithQuickReplies, readLineWebhookRequestBody, replyMessageLine, resolveDefaultLineAccountId, resolveExactLineGroupConfigKey, resolveLineAccount, resolveLineChannelAccessToken, resolveLineGroupConfigEntry, resolveLineGroupLookupIds, resolveLineGroupsConfig, sendMessageLine, setDefaultRichMenu, setLineRuntime, setSetupChannelEnabled, showLoadingAnimation, splitSetupEntries, startLineWebhook, stripMarkdown, toFlexMessage, uploadRichMenuImage, uriAction, validateLineSignature };
260
+ export { DEFAULT_ACCOUNT_ID, LineChannelConfigSchema, LineConfigSchema, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, buildTemplateMessageFromPayload, buildTokenChannelStatusSummary, cancelDefaultRichMenu, clearAccountEntryFields, convertCodeBlockToFlexBubble, createActionCard, createAgendaCard, createAppleTvRemoteCard, createAudioMessage, createButtonTemplate, createCarouselColumn, createConfirmTemplate, createDefaultMenuConfig, createDeviceControlCard, createEventCard, createFlexMessage, createGridLayout, createImageCard, createImageMessage, createInfoCard, createLineNodeWebhookHandler, createLineWebhookMiddleware, createListCard, createLocationMessage, createMediaPlayerCard, createQuickReplyItems, createReceiptCard, createRichMenu, createRichMenuAlias, createTemplateCarousel, createTextMessageWithQuickReplies, createVideoMessage, datetimePickerAction, deleteRichMenu, deleteRichMenuAlias, downloadLineMedia, firstDefined, formatDocsLink, getDefaultRichMenuId, getRichMenu, getRichMenuIdOfUser, getRichMenuList, getUserDisplayName, getUserProfile, hasMarkdownToConvert, listLineAccountIds, messageAction, monitorLineProvider, normalizeAccountId, normalizeAllowFrom, parseLineWebhookBody, postbackAction, probeLineBot, processLineMessage, pushFlexMessage, pushImageMessage, pushLocationMessage, pushMessageLine, pushMessagesLine, pushTemplateMessage, pushTextMessageWithQuickReplies, readLineWebhookRequestBody, replyMessageLine, resolveDefaultLineAccountId, resolveExactLineGroupConfigKey, resolveLineAccount, resolveLineChannelAccessToken, resolveLineGroupConfigEntry, resolveLineGroupLookupIds, resolveLineGroupsConfig, sendMessageLine, setDefaultRichMenu, setLineRuntime, setSetupChannelEnabled, showLoadingAnimation, splitSetupEntries, startLineWebhook, stripMarkdown, toFlexMessage, uploadRichMenuImage, uriAction, validateLineSignature };
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "id": "line",
3
+ "categories": [
4
+ "channels"
5
+ ],
3
6
  "doctorContract": {
4
7
  "stateMigrations": [
5
8
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/line",
3
- "version": "2026.9.3",
3
+ "version": "2026.9.4",
4
4
  "description": "OpenClaw LINE channel plugin for LINE Bot API chats.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.9.3"
16
+ "openclaw": ">=2026.9.4"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -115,10 +115,10 @@
115
115
  "minHostVersion": ">=2026.4.10"
116
116
  },
117
117
  "compat": {
118
- "pluginApi": ">=2026.9.3"
118
+ "pluginApi": ">=2026.9.4"
119
119
  },
120
120
  "build": {
121
- "openclawVersion": "2026.9.3"
121
+ "openclawVersion": "2026.9.4"
122
122
  },
123
123
  "release": {
124
124
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorLineProvider } from "./monitor-Bp2VIzkG.js";
2
- export { monitorLineProvider };