@openclaw/line 2026.6.11 → 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.
@@ -56,7 +56,7 @@ function resolveLineAccount(params) {
56
56
  const accountId = normalizeAccountId(params.accountId ?? resolveDefaultLineAccountId(cfg));
57
57
  const lineConfig = cfg.channels?.line;
58
58
  const accounts = lineConfig?.accounts;
59
- const accountConfig = accountId !== DEFAULT_ACCOUNT_ID ? resolveAccountEntry(accounts, accountId) : void 0;
59
+ const accountConfig = resolveAccountEntry(accounts, accountId);
60
60
  const { token, tokenSource } = resolveToken({
61
61
  accountId,
62
62
  baseConfig: lineConfig,
@@ -72,7 +72,9 @@ function resolveLineAccount(params) {
72
72
  ...lineBase,
73
73
  ...accountConfig
74
74
  };
75
- const enabled = accountConfig?.enabled ?? (accountId === DEFAULT_ACCOUNT_ID ? lineConfig?.enabled ?? true : false);
75
+ const baseEnabled = lineConfig?.enabled !== false;
76
+ const accountEnabled = accountConfig?.enabled !== false;
77
+ const enabled = baseEnabled && accountEnabled;
76
78
  return {
77
79
  accountId,
78
80
  name: accountConfig?.name ?? (accountId === DEFAULT_ACCOUNT_ID ? lineConfig?.name : void 0),
package/dist/api.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-DnBQa9Fv.js";
2
- import { n as lineSetupAdapter, t as lineSetupWizard } from "./setup-surface-CvTRDCEq.js";
1
+ import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-DwbohZPO.js";
2
+ import { n as lineSetupAdapter, t as lineSetupWizard } from "./setup-surface-Bc36YSS3.js";
3
3
  //#region extensions/line/src/channel.setup.ts
4
4
  const lineSetupPlugin = {
5
5
  id: "line",
@@ -1,5 +1,4 @@
1
- import { r as createReceiptCard } from "./schedule-cards-Bq74H30B.js";
2
- import { a as createListCard, i as createInfoCard, r as createImageCard, t as createActionCard } from "./basic-cards-B1eTkw-f.js";
1
+ import { c as uriAction, d as createReceiptCard, f as createActionCard, g as createListCard, h as createInfoCard, m as createImageCard, o as messageAction, s as postbackAction } from "./flex-templates-DPBtqQ8R.js";
3
2
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
4
3
  //#region extensions/line/src/card-command.ts
5
4
  const CARD_USAGE = `Usage: /card <type> "title" "body" [options]
@@ -33,28 +32,15 @@ function parseActions(actionsStr) {
33
32
  const actionData = data || label;
34
33
  if (actionData.startsWith("http://") || actionData.startsWith("https://")) results.push({
35
34
  label,
36
- action: {
37
- type: "uri",
38
- label: label.slice(0, 20),
39
- uri: actionData
40
- }
35
+ action: uriAction(label, actionData)
41
36
  });
42
37
  else if (actionData.includes("=")) results.push({
43
38
  label,
44
- action: {
45
- type: "postback",
46
- label: label.slice(0, 20),
47
- data: actionData.slice(0, 300),
48
- displayText: label
49
- }
39
+ action: postbackAction(label, actionData, label)
50
40
  });
51
41
  else results.push({
52
42
  label,
53
- action: {
54
- type: "message",
55
- label: label.slice(0, 20),
56
- text: actionData
57
- }
43
+ action: messageAction(label, actionData)
58
44
  });
59
45
  }
60
46
  return results;
@@ -1,6 +1,6 @@
1
- import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-B-K3yrdP.js";
2
- import { n as lineSetupAdapter, r as hasLineCredentials, t as lineSetupWizard } from "./setup-surface-CvTRDCEq.js";
3
- import { c as resolveLineOutboundMedia, f as LineChannelConfigSchema, m as resolveExactLineGroupConfigKey, n as parseLineDirectives, o as createLineSendReceipt, s as buildLineQuickReplyFallbackText, t as hasLineDirectives, u as getLineRuntime } from "./reply-payload-transform-DZ8-37Ot.js";
1
+ import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-DJVOv1JI.js";
2
+ import { n as lineSetupAdapter, r as hasLineCredentials, t as lineSetupWizard } from "./setup-surface-Bc36YSS3.js";
3
+ import { a as resolveLineOutboundMedia, d as resolveExactLineGroupConfigKey, i as buildLineQuickReplyFallbackText, l as LineChannelConfigSchema, n as parseLineDirectives, r as createLineSendReceipt, s as getLineRuntime, t as hasLineDirectives } from "./reply-payload-transform-BwF-zq0G.js";
4
4
  import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
5
5
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
6
6
  import { createRestrictSendersChannelSecurity, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
@@ -106,8 +106,8 @@ const lineChannelPluginCommon = {
106
106
  };
107
107
  //#endregion
108
108
  //#region extensions/line/src/gateway.ts
109
- const loadLineProbeRuntime$1 = createLazyRuntimeModule(() => import("./probe.runtime-DH_jgr7u.js"));
110
- const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-CGCy-kYV.js"));
109
+ const loadLineProbeRuntime$1 = createLazyRuntimeModule(() => import("./probe.runtime-CRhVGqwl.js"));
110
+ const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-DX5NxULi.js"));
111
111
  const lineGatewayAdapter = {
112
112
  startAccount: async (ctx) => {
113
113
  const account = ctx.account;
@@ -211,7 +211,7 @@ function resolveLineGroupRequireMention(params) {
211
211
  }
212
212
  //#endregion
213
213
  //#region extensions/line/src/outbound.ts
214
- const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-Cx3rgMAH.js"));
214
+ const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-BKmUJlZB.js"));
215
215
  function isLineUserTarget(target) {
216
216
  const normalized = target.trim().replace(/^line:(group|room|user):/i, "").replace(/^line:/i, "");
217
217
  return /^U/i.test(normalized);
@@ -507,7 +507,7 @@ const lineMessageAdapter = defineChannelMessageAdapter({
507
507
  });
508
508
  //#endregion
509
509
  //#region extensions/line/src/status.ts
510
- const loadLineProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-DH_jgr7u.js"));
510
+ const loadLineProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-CRhVGqwl.js"));
511
511
  const collectLineStatusIssues = createDependentCredentialStatusIssueCollector({
512
512
  channel: "line",
513
513
  dependencySourceKey: "tokenSource",
@@ -532,7 +532,7 @@ const lineStatusAdapter = createComputedAccountStatusAdapter({
532
532
  });
533
533
  //#endregion
534
534
  //#region extensions/line/src/channel.ts
535
- const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-C-kKPoMb.js"));
535
+ const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Cs_zbikE.js"));
536
536
  const lineSecurityAdapter = createRestrictSendersChannelSecurity({
537
537
  channelKey: "line",
538
538
  resolveDmPolicy: (account) => account.config.dmPolicy,
@@ -1,2 +1,2 @@
1
- import { t as linePlugin } from "./channel-DnBQa9Fv.js";
1
+ import { t as linePlugin } from "./channel-DwbohZPO.js";
2
2
  export { linePlugin };
@@ -0,0 +1,4 @@
1
+ import { t as monitorLineProvider } from "./monitor-BEsUjORi.js";
2
+ import { t as probeLineBot } from "./probe-BslD77tJ.js";
3
+ import { S as pushMessageLine } from "./markdown-to-line-BBM3V8-S.js";
4
+ export { monitorLineProvider, probeLineBot, pushMessageLine };
@@ -1,2 +1,2 @@
1
- import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-B-K3yrdP.js";
1
+ import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-DJVOv1JI.js";
2
2
  export { listLineAccountIds, resolveDefaultLineAccountId, resolveLineAccount };