@openclaw/line 2026.9.2 → 2026.9.3

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,5 +1,5 @@
1
- import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-BJvELOIg.js";
2
- import { r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-CDlgkTKi.js";
1
+ import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-DKU9GRRC.js";
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 = {
5
5
  id: "line",
@@ -1,8 +1,8 @@
1
1
  import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BBEFMYbY.js";
2
2
  import { t as hasLineCredentials } from "./account-helpers-BSUyZwLm.js";
3
- import { _ as LineChannelConfigSchema, a as renderLineCard, d as resolveExactLineGroupConfigKey, h as getLineRuntime, n as createLineQuickReply, o as renderLinePresentation, p as resolveLineGroupLookupIds, r as lineMessageActions, t as LINE_PRESENTATION_CAPABILITIES, u as buildLineQuickReplyFallbackText } from "./rich-messages-DY1AGKAJ.js";
3
+ import { _ as LineChannelConfigSchema, a as renderLineCard, d as resolveExactLineGroupConfigKey, h as getLineRuntime, n as createLineQuickReply, o as renderLinePresentation, p as resolveLineGroupLookupIds, r as lineMessageActions, t as LINE_PRESENTATION_CAPABILITIES, u as buildLineQuickReplyFallbackText } from "./rich-messages-HS8pNeOa.js";
4
4
  import { s as createLineSendReceipt, t as explainLineRefusal, w as buildLineMediaMessage } from "./send-retry-ChpfJ-LM.js";
5
- import { r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-CDlgkTKi.js";
5
+ import { r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-DiXO4x5f.js";
6
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
7
7
  import { buildDmGroupAccountAllowlistAdapter, createFlatAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
8
8
  import { buildChannelOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
@@ -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-C90LL-P3.js"));
123
+ const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-Bgm3Hcfu.js"));
124
124
  const lineGatewayAdapter = {
125
125
  startAccount: async (ctx) => {
126
126
  const account = ctx.account;
@@ -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-CZOszXXj.js"));
480
+ const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Bq6dsWOi.js"));
481
481
  const lineSecurityAdapter = createRestrictSendersChannelSecurity({
482
482
  channelKey: "line",
483
483
  resolveDmPolicy: (account) => account.config.dmPolicy,
@@ -613,8 +613,11 @@ const linePlugin = createChatChannelPlugin({
613
613
  idLabel: "lineUserId",
614
614
  message: "OpenClaw: your access has been approved.",
615
615
  normalizeAllowEntry: createPairingPrefixStripper(/^line:(?:user:)?/i),
616
- notify: async ({ cfg, id, message }) => {
617
- const account = (getLineRuntime().channel.line?.resolveLineAccount ?? resolveLineAccount)({ cfg });
616
+ notify: async ({ cfg, id, message, accountId }) => {
617
+ const account = (getLineRuntime().channel.line?.resolveLineAccount ?? resolveLineAccount)({
618
+ cfg,
619
+ accountId
620
+ });
618
621
  if (!account.channelAccessToken) throw new Error("LINE channel access token not configured");
619
622
  await (getLineRuntime().channel.line?.pushMessageLine ?? (await loadLineChannelRuntime()).pushMessageLine)(id, message, {
620
623
  cfg,
@@ -1,2 +1,2 @@
1
- import { t as linePlugin } from "./channel-BJvELOIg.js";
1
+ import { t as linePlugin } from "./channel-DKU9GRRC.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-m9h5osFz.js";
2
+ import { t as monitorLineProvider } from "./monitor-Bp2VIzkG.js";
3
3
  import { _ as showLoadingAnimation, d as pushMessageLine } from "./send-CQQxpxPp.js";
4
4
  export { monitorLineProvider, probeLineBot, pushMessageLine, showLoadingAnimation };
@@ -1,5 +1,5 @@
1
1
  import { i as resolveLineAccount, r as resolveDefaultLineAccountId } from "./accounts-BBEFMYbY.js";
2
- import { f as resolveLineGroupConfigEntry, h as getLineRuntime, i as prepareLineReplyPayload, n as createLineQuickReply, u as buildLineQuickReplyFallbackText } from "./rich-messages-DY1AGKAJ.js";
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
5
  import { i as processLineMessage, o as buildTemplateMessageFromPayload } from "./markdown-to-line-B-sj-7II.js";
@@ -0,0 +1,2 @@
1
+ import { t as monitorLineProvider } from "./monitor-Bp2VIzkG.js";
2
+ export { monitorLineProvider };
@@ -8,7 +8,7 @@ import { DmPolicySchema, GroupPolicySchema, buildChannelConfigSchema, buildGroup
8
8
  import { requireChannelOpenAllowFrom } from "openclaw/plugin-sdk/extension-shared";
9
9
  import { z } from "zod";
10
10
  import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
11
- import { adaptMessagePresentationForChannel, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
11
+ import { normalizeMessagePresentation, renderMessagePresentationFallbackText, renderPresentationForDelivery, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
12
12
  import { Type } from "typebox";
13
13
  //#region extensions/line/src/config-schema.ts
14
14
  const ThreadBindingsSchema = z.object({
@@ -639,32 +639,22 @@ function renderLinePresentation(payload, presentation) {
639
639
  * replies the plugin delivers itself reach delivery with the controls still
640
640
  * portable. Preparing them here keeps both LINE delivery paths on one rendering.
641
641
  */
642
- function prepareLineReplyPayload(payload) {
643
- const presentation = normalizeMessagePresentation(payload.presentation);
644
- if (!presentation) return payload;
645
- const { presentation: _presentation, presentationTextMode, ...rest } = payload;
646
- const usesFallbackText = presentationTextMode === "fallback" && Boolean(rest.text?.trim());
647
- const rendered = renderLinePresentation(usesFallbackText ? {
648
- ...rest,
649
- text: void 0
650
- } : rest, adaptMessagePresentationForChannel({
651
- presentation,
652
- capabilities: LINE_PRESENTATION_CAPABILITIES
653
- }));
654
- if (rendered) {
655
- const renderedLine = isRecord(rendered.channelData?.line) ? rendered.channelData.line : {};
656
- return usesFallbackText && renderedLine.flexMessage === void 0 ? {
657
- ...rendered,
658
- text: rest.text
659
- } : rendered;
660
- }
661
- return {
662
- ...rest,
663
- text: usesFallbackText ? rest.text ?? renderMessagePresentationFallbackText({ presentation }) : renderMessagePresentationFallbackText({
664
- text: rest.text,
665
- presentation
666
- })
667
- };
642
+ async function prepareLineReplyPayload(payload) {
643
+ if (!normalizeMessagePresentation(payload.presentation)) return payload;
644
+ const usesFallbackText = payload.presentationTextMode === "fallback" && Boolean(payload.text?.trim());
645
+ return renderPresentationForDelivery({
646
+ presentationCapabilities: LINE_PRESENTATION_CAPABILITIES,
647
+ renderPresentation: (adapted) => {
648
+ const rendered = renderLinePresentation(adapted, adapted.presentation);
649
+ return rendered && usesFallbackText && rendered.channelData.line.flexMessage === void 0 ? {
650
+ ...rendered,
651
+ text: payload.text
652
+ } : rendered;
653
+ }
654
+ }, {
655
+ ...payload,
656
+ presentationTextMode: usesFallbackText ? "fallback" : void 0
657
+ });
668
658
  }
669
659
  const toSlug = (value) => normalizeLowercaseStringOrEmpty(value).replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "device";
670
660
  const lineActionData = (action, device) => `line.action=${encodeURIComponent(action)}&line.device=${encodeURIComponent(device)}`;
@@ -1,7 +1,7 @@
1
1
  import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BBEFMYbY.js";
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-DY1AGKAJ.js";
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-m9h5osFz.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
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";
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";
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as lineSetupAdapter, t as lineSetupWizard } from "./setup-surface-CDlgkTKi.js";
1
+ import { n as lineSetupAdapter, t as lineSetupWizard } from "./setup-surface-DiXO4x5f.js";
2
2
  export { lineSetupAdapter, lineSetupWizard };
@@ -26,7 +26,15 @@ function isLineConfigured(cfg, accountId) {
26
26
  accountId
27
27
  }));
28
28
  }
29
+ const accountCredentialKeys = [
30
+ "channelAccessToken",
31
+ "channelSecret",
32
+ "tokenFile",
33
+ "secretFile"
34
+ ];
29
35
  const lineSetupAdapter = {
36
+ singleAccountKeysToMove: accountCredentialKeys,
37
+ namedAccountPromotionKeys: accountCredentialKeys,
30
38
  resolveAccountId: ({ accountId }) => normalizeAccountId(accountId),
31
39
  applyAccountName: ({ cfg, accountId, name }) => patchLineAccountConfig({
32
40
  cfg,
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "id": "line",
3
3
  "doctorContract": {
4
- "stateMigrations": true
4
+ "stateMigrations": [
5
+ {
6
+ "id": "line-pre-drain-spool-rows"
7
+ }
8
+ ]
5
9
  },
6
10
  "name": "LINE",
7
11
  "description": "OpenClaw LINE channel plugin for LINE Bot API chats.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/line",
3
- "version": "2026.9.2",
3
+ "version": "2026.9.3",
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.2"
16
+ "openclaw": ">=2026.9.3"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -25,6 +25,9 @@
25
25
  "./index.ts"
26
26
  ],
27
27
  "setupEntry": "./dist/setup-entry.js",
28
+ "setupFeatures": {
29
+ "configPromotion": true
30
+ },
28
31
  "channel": {
29
32
  "id": "line",
30
33
  "configuredState": {
@@ -112,10 +115,10 @@
112
115
  "minHostVersion": ">=2026.4.10"
113
116
  },
114
117
  "compat": {
115
- "pluginApi": ">=2026.9.2"
118
+ "pluginApi": ">=2026.9.3"
116
119
  },
117
120
  "build": {
118
- "openclawVersion": "2026.9.2"
121
+ "openclawVersion": "2026.9.3"
119
122
  },
120
123
  "release": {
121
124
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorLineProvider } from "./monitor-m9h5osFz.js";
2
- export { monitorLineProvider };