@openclaw/line 2026.7.2-beta.4 → 2026.7.2-beta.5

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/README.md CHANGED
@@ -5,7 +5,7 @@ Official OpenClaw channel plugin for LINE Bot API chats.
5
5
  Install from OpenClaw:
6
6
 
7
7
  ```bash
8
- openclaw plugin add @openclaw/line
8
+ openclaw plugins install @openclaw/line
9
9
  ```
10
10
 
11
11
  Configure LINE channel credentials in OpenClaw, then connect the bot to the chats where agents should receive and send messages.
@@ -1,7 +1,9 @@
1
+ import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
1
2
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
2
- import { resolveAccountEntry } from "openclaw/plugin-sdk/account-resolution";
3
+ import { resolveAccountEntry, resolveListedDefaultAccountId } from "openclaw/plugin-sdk/account-resolution";
3
4
  import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
4
5
  //#region extensions/line/src/accounts.ts
6
+ const { resolveAccountConfig: resolveMergedLineAccountConfig } = createAccountListHelpers("line", { omitKeys: ["defaultAccount"] });
5
7
  function readCredentialFile(filePath, configPath) {
6
8
  return tryReadSecretFileSync(filePath, "LINE credential file", { rejectSymlink: true }, { configPath });
7
9
  }
@@ -125,11 +127,7 @@ function resolveLineAccount(params) {
125
127
  baseConfig: lineConfig,
126
128
  accountConfig
127
129
  });
128
- const { accounts: _ignoredAccounts, defaultAccount: _ignoredDefaultAccount, ...lineBase } = lineConfig ?? {};
129
- const mergedConfig = {
130
- ...lineBase,
131
- ...accountConfig
132
- };
130
+ const mergedConfig = resolveMergedLineAccountConfig(cfg, accountId);
133
131
  const baseEnabled = lineConfig?.enabled !== false;
134
132
  const accountEnabled = accountConfig?.enabled !== false;
135
133
  const enabled = baseEnabled && accountEnabled;
@@ -156,11 +154,11 @@ function listLineAccountIds(cfg) {
156
154
  return Array.from(ids);
157
155
  }
158
156
  function resolveDefaultLineAccountId(cfg) {
159
- const preferred = normalizeOptionalAccountId((cfg.channels?.line)?.defaultAccount);
160
- if (preferred && listLineAccountIds(cfg).some((accountId) => normalizeAccountId(accountId) === preferred)) return preferred;
161
- const ids = listLineAccountIds(cfg);
162
- if (ids.includes(DEFAULT_ACCOUNT_ID)) return DEFAULT_ACCOUNT_ID;
163
- return ids[0] ?? DEFAULT_ACCOUNT_ID;
157
+ return resolveListedDefaultAccountId({
158
+ accountIds: listLineAccountIds(cfg),
159
+ configuredDefaultAccountId: normalizeOptionalAccountId((cfg.channels?.line)?.defaultAccount),
160
+ normalizeListedAccountId: normalizeAccountId
161
+ });
164
162
  }
165
163
  function normalizeAccountId$1(accountId) {
166
164
  return normalizeAccountId(accountId);
package/dist/api.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-CNcv74n2.js";
2
- import { n as lineSetupAdapter, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-Bili5gWy.js";
1
+ import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-CTaWrzfl.js";
2
+ import { n as lineSetupAdapter, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-BHQOSD8R.js";
3
3
  //#region extensions/line/src/channel.setup.ts
4
4
  const lineSetupPlugin = {
5
5
  id: "line",
@@ -1,5 +1,4 @@
1
- import { a as messageAction, o as postbackAction, s as uriAction, u as createReceiptCard } from "./flex-templates-KiKaVYgi.js";
2
- import { a as createListCard, i as createInfoCard, r as createImageCard, t as createActionCard } from "./basic-cards-Rb-Ow7LN.js";
1
+ import { _ as postbackAction, d as createListCard, l as createImageCard, m as messageAction, o as createReceiptCard, s as createActionCard, u as createInfoCard, v as uriAction } from "./flex-templates-DVy_wog4.js";
3
2
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
4
3
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
5
4
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
@@ -1,7 +1,7 @@
1
- import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BUBOoW5Q.js";
2
- import { i as hasLineCredentials, n as lineSetupAdapter, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-Bili5gWy.js";
1
+ import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-CSH5sk8U.js";
2
+ import { i as hasLineCredentials, n as lineSetupAdapter, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-BHQOSD8R.js";
3
3
  import { i as resolveExactLineGroupConfigKey, n as getLineRuntime, t as buildLineQuickReplyFallbackText } from "./quick-reply-fallback-D86FwAfr.js";
4
- import { n as parseLineDirectives, r as LineChannelConfigSchema, t as hasLineDirectives } from "./reply-payload-transform-d57WYHFm.js";
4
+ import { n as parseLineDirectives, r as LineChannelConfigSchema, t as hasLineDirectives } from "./reply-payload-transform-BRM2fRvK.js";
5
5
  import { i as resolveLineOutboundMedia, n as buildLineMediaMessage, r as hasLineSpecificMediaOptions, t as createLineSendReceipt } from "./send-receipt-CY2ey8XH.js";
6
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
7
7
  import { buildDmGroupAccountAllowlistAdapter, createFlatAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
@@ -9,8 +9,8 @@ import { buildChannelOutboundSessionRoute, createChatChannelPlugin } from "openc
9
9
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
10
10
  import { buildChannelGroupsScopeTree, createRestrictSendersChannelSecurity, resolveScopeRequireMention } from "openclaw/plugin-sdk/channel-policy";
11
11
  import { createEmptyChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
12
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
13
12
  import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
13
+ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
14
14
  import { createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
15
15
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
16
16
  import { clearAccountEntryFields } from "openclaw/plugin-sdk/core";
@@ -117,8 +117,8 @@ const lineChannelPluginCommon = {
117
117
  };
118
118
  //#endregion
119
119
  //#region extensions/line/src/gateway.ts
120
- const loadLineProbeRuntime$1 = createLazyRuntimeModule(() => import("./probe.runtime-CRhVGqwl.js"));
121
- const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-DKj4FHkA.js"));
120
+ const loadLineProbeRuntime$1 = createLazyRuntimeModule(() => import("./probe.runtime-D13ZtXsd.js"));
121
+ const loadLineMonitorRuntime = createLazyRuntimeModule(() => import("./monitor.runtime-B8xjVqev.js"));
122
122
  const lineGatewayAdapter = {
123
123
  startAccount: async (ctx) => {
124
124
  const account = ctx.account;
@@ -233,7 +233,7 @@ function inferLineTargetChatType(target) {
233
233
  }
234
234
  //#endregion
235
235
  //#region extensions/line/src/outbound.ts
236
- const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-DRyoVa81.js"));
236
+ const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-eHl7NNHu.js"));
237
237
  const LINE_FLEX_ALT_TEXT_LIMIT = 1500;
238
238
  const lineOutboundAdapter = {
239
239
  deliveryMode: "direct",
@@ -503,7 +503,7 @@ const lineMessageAdapter = defineChannelMessageAdapter({
503
503
  });
504
504
  //#endregion
505
505
  //#region extensions/line/src/status.ts
506
- const loadLineProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-CRhVGqwl.js"));
506
+ const loadLineProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-D13ZtXsd.js"));
507
507
  const collectLineStatusIssues = createDependentCredentialStatusIssueCollector({
508
508
  channel: "line",
509
509
  dependencySourceKey: "tokenSource",
@@ -531,7 +531,7 @@ const lineStatusAdapter = createComputedAccountStatusAdapter({
531
531
  });
532
532
  //#endregion
533
533
  //#region extensions/line/src/channel.ts
534
- const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BBCZvRa_.js"));
534
+ const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-D4Paci2y.js"));
535
535
  const lineSecurityAdapter = createRestrictSendersChannelSecurity({
536
536
  channelKey: "line",
537
537
  resolveDmPolicy: (account) => account.config.dmPolicy,
@@ -1,2 +1,2 @@
1
- import { t as linePlugin } from "./channel-CNcv74n2.js";
1
+ import { t as linePlugin } from "./channel-CTaWrzfl.js";
2
2
  export { linePlugin };
@@ -0,0 +1,4 @@
1
+ import { v as pushMessageLine } from "./markdown-to-line-Dn00k1bq.js";
2
+ import { t as monitorLineProvider } from "./monitor-DzFU5UPV.js";
3
+ import { t as probeLineBot } from "./probe-CM03wo6r.js";
4
+ export { monitorLineProvider, probeLineBot, pushMessageLine };
@@ -1,2 +1,2 @@
1
- import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BUBOoW5Q.js";
1
+ import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-CSH5sk8U.js";
2
2
  export { listLineAccountIds, resolveDefaultLineAccountId, resolveLineAccount };