@openclaw/line 2026.7.2-beta.7 → 2026.7.34

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.
Files changed (117) hide show
  1. package/README.md +1 -1
  2. package/dist/.setup/accounts-DJVOv1JI.mjs +107 -0
  3. package/dist/.setup/api-D3h9w6oz.mjs +3 -0
  4. package/dist/.setup/api-DdlGHKoX.mjs +11 -0
  5. package/dist/.setup/basic-cards-C8Qwh2X1.mjs +307 -0
  6. package/dist/{card-command-ty11OJNt.js → .setup/card-command-CWrkUiGY.mjs} +51 -23
  7. package/dist/{channel-D4i_K4fQ.js → .setup/channel-Du0PrvOH.mjs} +76 -66
  8. package/dist/.setup/channel.runtime-b3suPB-W.mjs +4 -0
  9. package/dist/.setup/flex-templates-BP6VHjzK.mjs +814 -0
  10. package/dist/{markdown-to-line-DMDQTMhx.js → .setup/markdown-to-line-o89GT1Qn.mjs} +252 -254
  11. package/dist/{monitor-DXEodYFJ.js → .setup/monitor-DpxjN6Ks.mjs} +491 -658
  12. package/dist/.setup/monitor.runtime-BS-cGD5Q.mjs +2 -0
  13. package/dist/.setup/outbound.runtime-BeNDuEIF.mjs +2 -0
  14. package/dist/{probe-CM03wo6r.js → .setup/probe-BslD77tJ.mjs} +9 -7
  15. package/dist/.setup/probe.runtime-YwWmWIlk.mjs +2 -0
  16. package/dist/{reply-payload-transform-D5-dHB8b.js → .setup/reply-payload-transform-CYQIy_x8.mjs} +204 -80
  17. package/dist/{setup-surface-DRQ7n0En.js → .setup/setup-surface-M1ivmZ-G.mjs} +143 -158
  18. package/dist/api.js +2 -11
  19. package/dist/channel-plugin-api.js +1 -1
  20. package/dist/contract-api.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/runtime-api.js +56 -15
  23. package/dist/setup-api.js +1 -1
  24. package/dist/setup-entry.js +2 -1
  25. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupCreateRoute.d.ts.map +1 -1
  26. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupFailedType.d.ts.map +1 -1
  27. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupJobFailedType.d.ts.map +1 -1
  28. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupJobStatus.d.ts.map +1 -1
  29. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupStatus.d.ts.map +1 -1
  30. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBoxBorderWidth.d.ts.map +1 -1
  31. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBoxCornerRadius.d.ts.map +1 -1
  32. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBubble.d.ts.map +1 -1
  33. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexIconSize.d.ts.map +1 -1
  34. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexSpanSize.d.ts.map +1 -1
  35. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexTextFontSize.d.ts.map +1 -1
  36. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/numberOfMessagesResponse.d.ts.map +1 -1
  37. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/postbackAction.d.ts.map +1 -1
  38. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/subscriptionPeriodDemographic.d.ts.map +1 -1
  39. package/node_modules/@line/bot-sdk/dist/cjs/version.d.ts +1 -1
  40. package/node_modules/@line/bot-sdk/dist/cjs/version.js +1 -1
  41. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/event.d.ts +1 -2
  42. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/event.d.ts.map +1 -1
  43. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.d.ts +0 -1
  44. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.d.ts.map +1 -1
  45. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.js +0 -1
  46. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.js.map +1 -1
  47. package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupCreateRoute.d.ts.map +1 -1
  48. package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupFailedType.d.ts.map +1 -1
  49. package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupJobFailedType.d.ts.map +1 -1
  50. package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupJobStatus.d.ts.map +1 -1
  51. package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupStatus.d.ts.map +1 -1
  52. package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexBoxBorderWidth.d.ts.map +1 -1
  53. package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexBoxCornerRadius.d.ts.map +1 -1
  54. package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexBubble.d.ts.map +1 -1
  55. package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexIconSize.d.ts.map +1 -1
  56. package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexSpanSize.d.ts.map +1 -1
  57. package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexTextFontSize.d.ts.map +1 -1
  58. package/node_modules/@line/bot-sdk/dist/messaging-api/model/numberOfMessagesResponse.d.ts.map +1 -1
  59. package/node_modules/@line/bot-sdk/dist/messaging-api/model/postbackAction.d.ts.map +1 -1
  60. package/node_modules/@line/bot-sdk/dist/messaging-api/model/subscriptionPeriodDemographic.d.ts.map +1 -1
  61. package/node_modules/@line/bot-sdk/dist/version.d.ts +1 -1
  62. package/node_modules/@line/bot-sdk/dist/version.js +1 -1
  63. package/node_modules/@line/bot-sdk/dist/webhook/model/event.d.ts +1 -2
  64. package/node_modules/@line/bot-sdk/dist/webhook/model/event.d.ts.map +1 -1
  65. package/node_modules/@line/bot-sdk/dist/webhook/model/models.d.ts +0 -1
  66. package/node_modules/@line/bot-sdk/dist/webhook/model/models.d.ts.map +1 -1
  67. package/node_modules/@line/bot-sdk/dist/webhook/model/models.js +0 -1
  68. package/node_modules/@line/bot-sdk/dist/webhook/model/models.js.map +1 -1
  69. package/node_modules/@line/bot-sdk/lib/insight/model/getNumberOfFollowersResponse.ts +1 -1
  70. package/node_modules/@line/bot-sdk/lib/liff/model/liffScope.ts +1 -1
  71. package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupCreateRoute.ts +4 -1
  72. package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupFailedType.ts +2 -1
  73. package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupJobFailedType.ts +2 -1
  74. package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupJobStatus.ts +4 -1
  75. package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupStatus.ts +6 -1
  76. package/node_modules/@line/bot-sdk/lib/messaging-api/model/botInfoResponse.ts +1 -1
  77. package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexBoxBorderWidth.ts +6 -1
  78. package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexBoxCornerRadius.ts +7 -1
  79. package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexBubble.ts +7 -1
  80. package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexIconSize.ts +10 -1
  81. package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexSpanSize.ts +10 -1
  82. package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexTextFontSize.ts +10 -1
  83. package/node_modules/@line/bot-sdk/lib/messaging-api/model/getAggregationUnitNameListResponse.ts +1 -1
  84. package/node_modules/@line/bot-sdk/lib/messaging-api/model/getFollowersResponse.ts +1 -1
  85. package/node_modules/@line/bot-sdk/lib/messaging-api/model/getJoinedMembershipUsersResponse.ts +1 -1
  86. package/node_modules/@line/bot-sdk/lib/messaging-api/model/issueLinkTokenResponse.ts +1 -1
  87. package/node_modules/@line/bot-sdk/lib/messaging-api/model/numberOfMessagesResponse.ts +5 -2
  88. package/node_modules/@line/bot-sdk/lib/messaging-api/model/postbackAction.ts +4 -1
  89. package/node_modules/@line/bot-sdk/lib/messaging-api/model/subscriptionPeriodDemographic.ts +5 -1
  90. package/node_modules/@line/bot-sdk/lib/version.ts +1 -1
  91. package/node_modules/@line/bot-sdk/lib/webhook/.openapi-generator/FILES +0 -1
  92. package/node_modules/@line/bot-sdk/lib/webhook/model/event.ts +0 -2
  93. package/node_modules/@line/bot-sdk/lib/webhook/model/models.ts +0 -1
  94. package/node_modules/@line/bot-sdk/lib/webhook/model/stickerMessageContent.ts +1 -1
  95. package/node_modules/@line/bot-sdk/node_modules/@types/node/README.md +1 -1
  96. package/node_modules/@line/bot-sdk/node_modules/@types/node/fs/promises.d.ts +5 -16
  97. package/node_modules/@line/bot-sdk/node_modules/@types/node/package.json +3 -3
  98. package/node_modules/@line/bot-sdk/package.json +3 -3
  99. package/openclaw.plugin.json +75 -57
  100. package/package.json +6 -71
  101. package/dist/accounts-BqEVsDoB.js +0 -103
  102. package/dist/channel.runtime-BdhK8Xw7.js +0 -4
  103. package/dist/flex-templates-iKJsyCq-.js +0 -1339
  104. package/dist/monitor.runtime-CZquR7jI.js +0 -2
  105. package/dist/outbound.runtime-BS0IhU_M.js +0 -2
  106. package/dist/probe.runtime-D13ZtXsd.js +0 -2
  107. package/dist/quick-reply-fallback-D86FwAfr.js +0 -56
  108. package/dist/send-receipt-CY2ey8XH.js +0 -107
  109. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.d.ts +0 -24
  110. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.d.ts.map +0 -1
  111. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.js +0 -14
  112. package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.js.map +0 -1
  113. package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.d.ts +0 -24
  114. package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.d.ts.map +0 -1
  115. package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.js +0 -13
  116. package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.js.map +0 -1
  117. package/node_modules/@line/bot-sdk/lib/webhook/model/messageEditedEvent.ts +0 -32
@@ -1,11 +1,8 @@
1
- import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BqEVsDoB.js";
1
+ import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-DJVOv1JI.mjs";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
- import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
4
- import { DEFAULT_ACCOUNT_ID, createAllowFromSection, createPromptParsedAllowFromForAccount, createSetupInputPresenceValidator, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, parseSetupEntriesWithParser, patchScopedAccountConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
5
- import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
3
+ import { DEFAULT_ACCOUNT_ID, createAllowFromSection, createSetupInputPresenceValidator, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
6
4
  //#region extensions/line/src/account-helpers.ts
7
5
  function hasLineCredentials(account) {
8
- if (account.tokenStatus && account.signingSecretStatus) return account.tokenStatus !== "missing" && account.signingSecretStatus !== "missing";
9
6
  return Boolean(account.channelAccessToken?.trim() && account.channelSecret?.trim());
10
7
  }
11
8
  function parseLineAllowFromId(raw) {
@@ -16,19 +13,44 @@ function parseLineAllowFromId(raw) {
16
13
  //#endregion
17
14
  //#region extensions/line/src/setup-core.ts
18
15
  function patchLineAccountConfig(params) {
19
- return patchScopedAccountConfig({
20
- cfg: params.cfg,
21
- channelKey: "line",
22
- accountId: params.accountId,
23
- patch: params.patch,
24
- accountPatch: {
25
- ...params.enabled ? { enabled: true } : {},
26
- ...params.patch
27
- },
28
- ...params.clearFields ? { clearFields: params.clearFields } : {},
29
- ensureChannelEnabled: Boolean(params.enabled),
30
- ensureAccountEnabled: false
31
- });
16
+ const accountId = normalizeAccountId(params.accountId);
17
+ const lineConfig = params.cfg.channels?.line ?? {};
18
+ const clearFields = params.clearFields ?? [];
19
+ if (accountId === DEFAULT_ACCOUNT_ID) {
20
+ const nextLine = { ...lineConfig };
21
+ for (const field of clearFields) delete nextLine[field];
22
+ return {
23
+ ...params.cfg,
24
+ channels: {
25
+ ...params.cfg.channels,
26
+ line: {
27
+ ...nextLine,
28
+ ...params.enabled ? { enabled: true } : {},
29
+ ...params.patch
30
+ }
31
+ }
32
+ };
33
+ }
34
+ const nextAccount = { ...lineConfig.accounts?.[accountId] };
35
+ for (const field of clearFields) delete nextAccount[field];
36
+ return {
37
+ ...params.cfg,
38
+ channels: {
39
+ ...params.cfg.channels,
40
+ line: {
41
+ ...lineConfig,
42
+ ...params.enabled ? { enabled: true } : {},
43
+ accounts: {
44
+ ...lineConfig.accounts,
45
+ [accountId]: {
46
+ ...nextAccount,
47
+ ...params.enabled ? { enabled: true } : {},
48
+ ...params.patch
49
+ }
50
+ }
51
+ }
52
+ }
53
+ };
32
54
  }
33
55
  function isLineConfigured(cfg, accountId) {
34
56
  return hasLineCredentials(resolveLineAccount({
@@ -46,11 +68,7 @@ const lineSetupAdapter = {
46
68
  validateInput: createSetupInputPresenceValidator({
47
69
  defaultAccountOnlyEnvError: "LINE_CHANNEL_ACCESS_TOKEN can only be used for the default account.",
48
70
  whenNotUseEnv: [{
49
- someOf: [
50
- "channelAccessToken",
51
- "token",
52
- "tokenFile"
53
- ],
71
+ someOf: ["channelAccessToken", "tokenFile"],
54
72
  message: "LINE requires channelAccessToken or --token-file (or --use-env)."
55
73
  }, {
56
74
  someOf: ["channelSecret", "secretFile"],
@@ -59,78 +77,33 @@ const lineSetupAdapter = {
59
77
  }),
60
78
  applyAccountConfig: ({ cfg, accountId, input }) => {
61
79
  const typedInput = input;
62
- const accessToken = typedInput.channelAccessToken ?? typedInput.token;
63
80
  const normalizedAccountId = normalizeAccountId(accountId);
64
- const useEnv = normalizedAccountId === DEFAULT_ACCOUNT_ID && Boolean(typedInput.useEnv);
65
- return patchLineAccountConfig({
81
+ if (normalizedAccountId === DEFAULT_ACCOUNT_ID) return patchLineAccountConfig({
66
82
  cfg,
67
83
  accountId: normalizedAccountId,
68
84
  enabled: true,
69
- clearFields: useEnv ? [
85
+ clearFields: typedInput.useEnv ? [
70
86
  "channelAccessToken",
71
87
  "channelSecret",
72
88
  "tokenFile",
73
89
  "secretFile"
74
90
  ] : void 0,
75
- patch: useEnv ? {} : {
76
- ...typedInput.tokenFile ? { tokenFile: typedInput.tokenFile } : accessToken ? { channelAccessToken: accessToken } : {},
91
+ patch: typedInput.useEnv ? {} : {
92
+ ...typedInput.tokenFile ? { tokenFile: typedInput.tokenFile } : typedInput.channelAccessToken ? { channelAccessToken: typedInput.channelAccessToken } : {},
93
+ ...typedInput.secretFile ? { secretFile: typedInput.secretFile } : typedInput.channelSecret ? { channelSecret: typedInput.channelSecret } : {}
94
+ }
95
+ });
96
+ return patchLineAccountConfig({
97
+ cfg,
98
+ accountId: normalizedAccountId,
99
+ enabled: true,
100
+ patch: {
101
+ ...typedInput.tokenFile ? { tokenFile: typedInput.tokenFile } : typedInput.channelAccessToken ? { channelAccessToken: typedInput.channelAccessToken } : {},
77
102
  ...typedInput.secretFile ? { secretFile: typedInput.secretFile } : typedInput.channelSecret ? { channelSecret: typedInput.channelSecret } : {}
78
103
  }
79
104
  });
80
105
  }
81
106
  };
82
- const lineSetupContract = defineChannelSetupContract({
83
- fields: {
84
- channelAccessToken: {
85
- kind: "string",
86
- sensitive: true,
87
- cli: {
88
- flags: "--channel-access-token <token>",
89
- description: "LINE channel access token"
90
- }
91
- },
92
- token: {
93
- kind: "string",
94
- sensitive: true,
95
- cli: {
96
- flags: "--token <token>",
97
- description: "LINE channel access token (alias)"
98
- }
99
- },
100
- channelSecret: {
101
- kind: "string",
102
- sensitive: true,
103
- cli: {
104
- flags: "--channel-secret <secret>",
105
- description: "LINE channel secret"
106
- }
107
- },
108
- tokenFile: {
109
- kind: "string",
110
- sensitive: true,
111
- cli: {
112
- flags: "--token-file <path>",
113
- description: "LINE access token file"
114
- }
115
- },
116
- secretFile: {
117
- kind: "string",
118
- sensitive: true,
119
- cli: {
120
- flags: "--secret-file <path>",
121
- description: "LINE channel secret file"
122
- }
123
- },
124
- useEnv: {
125
- kind: "boolean",
126
- cli: {
127
- flags: "--use-env",
128
- description: "Use LINE environment credentials"
129
- }
130
- }
131
- },
132
- legacyAdapter: lineSetupAdapter
133
- });
134
107
  //#endregion
135
108
  //#region extensions/line/src/setup-surface.ts
136
109
  const t = createSetupTranslator();
@@ -151,78 +124,36 @@ const LINE_ALLOW_FROM_HELP_LINES = [
151
124
  t("wizard.line.multipleEntries"),
152
125
  t("wizard.channels.docs", { link: formatDocsLink("/channels/line", "channels/line") })
153
126
  ];
154
- const lineDmPolicy = createChannelDmPolicy({
127
+ const lineDmPolicy = {
155
128
  label: "LINE",
156
129
  channel,
157
- resolveAccount: (cfg, accountId) => resolveLineAccount({
130
+ policyKey: "channels.line.dmPolicy",
131
+ allowFromKey: "channels.line.allowFrom",
132
+ resolveConfigKeys: (cfg, accountId) => (accountId ?? resolveDefaultLineAccountId(cfg)) !== DEFAULT_ACCOUNT_ID ? {
133
+ policyKey: `channels.line.accounts.${accountId ?? resolveDefaultLineAccountId(cfg)}.dmPolicy`,
134
+ allowFromKey: `channels.line.accounts.${accountId ?? resolveDefaultLineAccountId(cfg)}.allowFrom`
135
+ } : {
136
+ policyKey: "channels.line.dmPolicy",
137
+ allowFromKey: "channels.line.allowFrom"
138
+ },
139
+ getCurrent: (cfg, accountId) => resolveLineAccount({
158
140
  cfg,
159
141
  accountId: accountId ?? resolveDefaultLineAccountId(cfg)
160
- }),
161
- applyPatch: ({ cfg, account, patch }) => patchLineAccountConfig({
142
+ }).config.dmPolicy ?? "pairing",
143
+ setPolicy: (cfg, policy, accountId) => patchLineAccountConfig({
162
144
  cfg,
163
- accountId: account.accountId,
145
+ accountId: accountId ?? resolveDefaultLineAccountId(cfg),
164
146
  enabled: true,
165
- patch,
166
- clearFields: patch.dmPolicy === "pairing" || patch.dmPolicy === "disabled" ? ["allowFrom"] : void 0
167
- }),
168
- promptAllowFrom: createPromptParsedAllowFromForAccount({
169
- defaultAccountId: resolveDefaultLineAccountId,
170
- noteTitle: t("wizard.line.allowlistTitle"),
171
- noteLines: LINE_ALLOW_FROM_HELP_LINES,
172
- message: t("wizard.line.allowFromPrompt"),
173
- placeholder: "U1234567890abcdef1234567890abcdef",
174
- parseEntries: (raw) => parseSetupEntriesWithParser(raw, (entry) => {
175
- const id = parseLineAllowFromId(entry);
176
- return id ? { value: id } : { error: t("wizard.line.allowFromInvalid") };
177
- }),
178
- getExistingAllowFrom: ({ cfg, accountId }) => resolveLineAccount({
179
- cfg,
180
- accountId
181
- }).config.allowFrom ?? [],
182
- applyAllowFrom: ({ cfg, accountId, allowFrom }) => patchLineAccountConfig({
183
- cfg,
184
- accountId,
185
- enabled: true,
186
- patch: { allowFrom }
187
- })
147
+ patch: policy === "open" ? {
148
+ dmPolicy: "open",
149
+ allowFrom: mergeAllowFromEntries(resolveLineAccount({
150
+ cfg,
151
+ accountId: accountId ?? resolveDefaultLineAccountId(cfg)
152
+ }).config.allowFrom, ["*"])
153
+ } : { dmPolicy: policy },
154
+ clearFields: policy === "pairing" || policy === "disabled" ? ["allowFrom"] : void 0
188
155
  })
189
- });
190
- function createLineTokenCredential(params) {
191
- return defineTokenCredential({
192
- inputKey: params.inputKey,
193
- configKey: params.configKey,
194
- configuredFields: [params.configKey, params.fileKey],
195
- providerHint: params.providerHint,
196
- credentialLabel: params.credentialLabel,
197
- preferredEnvVar: params.envVar,
198
- helpTitle: t("wizard.line.messagingApiTitle"),
199
- helpLines: LINE_SETUP_HELP_LINES,
200
- envPrompt: params.envPrompt,
201
- keepPrompt: params.keepPrompt,
202
- inputPrompt: params.inputPrompt,
203
- allowEnv: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID,
204
- resolveAccount: ({ cfg, accountId }) => resolveLineAccount({
205
- cfg,
206
- accountId
207
- }),
208
- accountConfigured: (account) => Boolean(normalizeOptionalString(account.channelAccessToken) && normalizeOptionalString(account.channelSecret)),
209
- hasConfiguredValue: (account) => Boolean(normalizeOptionalString(account.config[params.configKey]) ?? normalizeOptionalString(account.config[params.fileKey])),
210
- resolvedValue: (account) => normalizeOptionalString(account[params.configKey]),
211
- envValue: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID ? normalizeOptionalString(process.env[params.envVar]) : void 0,
212
- patchAccount: ({ cfg, accountId, patch, clearFields }) => patchLineAccountConfig({
213
- cfg,
214
- accountId,
215
- enabled: true,
216
- clearFields,
217
- patch
218
- }),
219
- useEnv: { clearFields: [params.configKey, params.fileKey] },
220
- set: {
221
- clearFields: [params.fileKey],
222
- value: "resolved"
223
- }
224
- });
225
- }
156
+ };
226
157
  const lineSetupWizard = {
227
158
  channel,
228
159
  status: createStandardChannelSetupStatus({
@@ -242,27 +173,81 @@ const lineSetupWizard = {
242
173
  lines: LINE_SETUP_HELP_LINES,
243
174
  shouldShow: ({ cfg, accountId }) => !isLineConfigured(cfg, accountId ?? resolveDefaultLineAccountId(cfg))
244
175
  },
245
- credentials: [createLineTokenCredential({
176
+ credentials: [{
246
177
  inputKey: "token",
247
- configKey: "channelAccessToken",
248
- fileKey: "tokenFile",
249
178
  providerHint: channel,
250
179
  credentialLabel: t("wizard.line.channelAccessToken"),
251
- envVar: "LINE_CHANNEL_ACCESS_TOKEN",
180
+ preferredEnvVar: "LINE_CHANNEL_ACCESS_TOKEN",
181
+ helpTitle: t("wizard.line.messagingApiTitle"),
182
+ helpLines: LINE_SETUP_HELP_LINES,
252
183
  envPrompt: t("wizard.line.tokenEnvPrompt"),
253
184
  keepPrompt: t("wizard.line.tokenKeepPrompt"),
254
- inputPrompt: t("wizard.line.tokenInputPrompt")
255
- }), createLineTokenCredential({
185
+ inputPrompt: t("wizard.line.tokenInputPrompt"),
186
+ allowEnv: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID,
187
+ inspect: ({ cfg, accountId }) => {
188
+ const resolved = resolveLineAccount({
189
+ cfg,
190
+ accountId
191
+ });
192
+ return {
193
+ accountConfigured: Boolean(normalizeOptionalString(resolved.channelAccessToken) && normalizeOptionalString(resolved.channelSecret)),
194
+ hasConfiguredValue: Boolean(normalizeOptionalString(resolved.config.channelAccessToken) ?? normalizeOptionalString(resolved.config.tokenFile)),
195
+ resolvedValue: normalizeOptionalString(resolved.channelAccessToken),
196
+ envValue: accountId === DEFAULT_ACCOUNT_ID ? normalizeOptionalString(process.env.LINE_CHANNEL_ACCESS_TOKEN) : void 0
197
+ };
198
+ },
199
+ applyUseEnv: ({ cfg, accountId }) => patchLineAccountConfig({
200
+ cfg,
201
+ accountId,
202
+ enabled: true,
203
+ clearFields: ["channelAccessToken", "tokenFile"],
204
+ patch: {}
205
+ }),
206
+ applySet: ({ cfg, accountId, resolvedValue }) => patchLineAccountConfig({
207
+ cfg,
208
+ accountId,
209
+ enabled: true,
210
+ clearFields: ["tokenFile"],
211
+ patch: { channelAccessToken: resolvedValue }
212
+ })
213
+ }, {
256
214
  inputKey: "password",
257
- configKey: "channelSecret",
258
- fileKey: "secretFile",
259
215
  providerHint: "line-secret",
260
216
  credentialLabel: t("wizard.line.channelSecret"),
261
- envVar: "LINE_CHANNEL_SECRET",
217
+ preferredEnvVar: "LINE_CHANNEL_SECRET",
218
+ helpTitle: t("wizard.line.messagingApiTitle"),
219
+ helpLines: LINE_SETUP_HELP_LINES,
262
220
  envPrompt: t("wizard.line.secretEnvPrompt"),
263
221
  keepPrompt: t("wizard.line.secretKeepPrompt"),
264
- inputPrompt: t("wizard.line.secretInputPrompt")
265
- })],
222
+ inputPrompt: t("wizard.line.secretInputPrompt"),
223
+ allowEnv: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID,
224
+ inspect: ({ cfg, accountId }) => {
225
+ const resolved = resolveLineAccount({
226
+ cfg,
227
+ accountId
228
+ });
229
+ return {
230
+ accountConfigured: Boolean(normalizeOptionalString(resolved.channelAccessToken) && normalizeOptionalString(resolved.channelSecret)),
231
+ hasConfiguredValue: Boolean(normalizeOptionalString(resolved.config.channelSecret) ?? normalizeOptionalString(resolved.config.secretFile)),
232
+ resolvedValue: normalizeOptionalString(resolved.channelSecret),
233
+ envValue: accountId === DEFAULT_ACCOUNT_ID ? normalizeOptionalString(process.env.LINE_CHANNEL_SECRET) : void 0
234
+ };
235
+ },
236
+ applyUseEnv: ({ cfg, accountId }) => patchLineAccountConfig({
237
+ cfg,
238
+ accountId,
239
+ enabled: true,
240
+ clearFields: ["channelSecret", "secretFile"],
241
+ patch: {}
242
+ }),
243
+ applySet: ({ cfg, accountId, resolvedValue }) => patchLineAccountConfig({
244
+ cfg,
245
+ accountId,
246
+ enabled: true,
247
+ clearFields: ["secretFile"],
248
+ patch: { channelSecret: resolvedValue }
249
+ })
250
+ }],
266
251
  allowFrom: createAllowFromSection({
267
252
  helpTitle: t("wizard.line.allowlistTitle"),
268
253
  helpLines: LINE_ALLOW_FROM_HELP_LINES,
@@ -294,4 +279,4 @@ const lineSetupWizard = {
294
279
  disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
295
280
  };
296
281
  //#endregion
297
- export { hasLineCredentials as i, lineSetupAdapter as n, lineSetupContract as r, lineSetupWizard as t };
282
+ export { lineSetupAdapter as n, hasLineCredentials as r, lineSetupWizard as t };
package/dist/api.js CHANGED
@@ -1,12 +1,3 @@
1
- import { n as lineChannelPluginCommon, t as linePlugin } from "./channel-D4i_K4fQ.js";
2
- import { n as lineSetupAdapter, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-DRQ7n0En.js";
3
- //#region extensions/line/src/channel.setup.ts
4
- const lineSetupPlugin = {
5
- id: "line",
6
- ...lineChannelPluginCommon,
7
- setupWizard: lineSetupWizard,
8
- setup: lineSetupAdapter,
9
- setupContract: lineSetupContract
10
- };
11
- //#endregion
1
+ import { t as linePlugin } from "./.setup/channel-Du0PrvOH.mjs";
2
+ import { t as lineSetupPlugin } from "./.setup/api-DdlGHKoX.mjs";
12
3
  export { linePlugin, lineSetupPlugin };
@@ -1,2 +1,2 @@
1
- import { t as linePlugin } from "./channel-D4i_K4fQ.js";
1
+ import { t as linePlugin } from "./.setup/channel-Du0PrvOH.mjs";
2
2
  export { linePlugin };
@@ -1,2 +1,2 @@
1
- import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BqEVsDoB.js";
1
+ import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./.setup/accounts-DJVOv1JI.mjs";
2
2
  export { listLineAccountIds, resolveDefaultLineAccountId, resolveLineAccount };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
4
4
  function createLineCardCommandLoader(api) {
5
5
  return createLazyRuntimeModule(async () => {
6
6
  let registered = null;
7
- const { registerLineCardCommand } = await import("./card-command-ty11OJNt.js");
7
+ const { registerLineCardCommand } = await import("./.setup/card-command-CWrkUiGY.mjs");
8
8
  registerLineCardCommand({
9
9
  ...api,
10
10
  registerCommand(command) {
@@ -1,22 +1,22 @@
1
- import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./accounts-BqEVsDoB.js";
2
- import { a as resolveLineGroupConfigEntry, i as resolveExactLineGroupConfigKey, o as resolveLineGroupLookupIds, r as setLineRuntime, s as resolveLineGroupsConfig } from "./quick-reply-fallback-D86FwAfr.js";
3
- import { i as LineConfigSchema, n as parseLineDirectives, r as LineChannelConfigSchema, t as hasLineDirectives } from "./reply-payload-transform-D5-dHB8b.js";
4
- import { _ as postbackAction, a as createEventCard, c as createCarousel, d as createListCard, f as createNotificationBubble, i as createAgendaCard, l as createImageCard, m as messageAction, n as createDeviceControlCard, o as createReceiptCard, p as datetimePickerAction, r as createMediaPlayerCard, s as createActionCard, t as createAppleTvRemoteCard, u as createInfoCard, v as uriAction } from "./flex-templates-iKJsyCq-.js";
5
- import { A as createConfirmTemplate, C as sendMessageLine, D as createButtonMenu, E as buildTemplateMessageFromPayload, F as createTemplateCarousel, I as createYesNoConfirm, L as toFlexMessage, M as createImageCarouselColumn, N as createLinkMenu, O as createButtonTemplate, P as createProductCarousel, S as replyMessageLine, T as resolveLineChannelAccessToken, _ as pushLocationMessage, a as stripMarkdown, b as pushTemplateMessage, c as createImageMessage, d as createTextMessageWithQuickReplies, f as createVideoMessage, g as pushImageMessage, h as pushFlexMessage, i as processLineMessage, j as createImageCarousel, k as createCarouselColumn, l as createLocationMessage, m as getUserProfile, n as convertTableToFlexBubble, o as createAudioMessage, p as getUserDisplayName, r as hasMarkdownToConvert, s as createFlexMessage, t as convertCodeBlockToFlexBubble, u as createQuickReplyItems, v as pushMessageLine, w as showLoadingAnimation, x as pushTextMessageWithQuickReplies, y as pushMessagesLine } from "./markdown-to-line-DMDQTMhx.js";
6
- 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-DXEodYFJ.js";
7
- import { t as probeLineBot } from "./probe-CM03wo6r.js";
1
+ import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "./.setup/accounts-DJVOv1JI.mjs";
2
+ import { c as setLineRuntime, d as resolveExactLineGroupConfigKey, f as resolveLineGroupConfigEntry, l as LineChannelConfigSchema, m as resolveLineGroupsConfig, n as parseLineDirectives, p as resolveLineGroupLookupIds, t as hasLineDirectives, u as LineConfigSchema } from "./.setup/reply-payload-transform-CYQIy_x8.mjs";
3
+ import { a as messageAction, c as createAgendaCard, i as datetimePickerAction, l as createEventCard, n as createDeviceControlCard, o as postbackAction, r as createMediaPlayerCard, s as uriAction, t as createAppleTvRemoteCard, u as createReceiptCard } from "./.setup/flex-templates-BP6VHjzK.mjs";
4
+ import { a as createListCard, i as createInfoCard, n as createCarousel, o as createNotificationBubble, r as createImageCard, t as createActionCard } from "./.setup/basic-cards-C8Qwh2X1.mjs";
5
+ import { A as buildTemplateMessageFromPayload, B as createYesNoConfirm, C as pushMessagesLine, D as sendMessageLine, E as replyMessageLine, F as createImageCarousel, 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, V as toFlexMessage, _ 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 "./.setup/markdown-to-line-o89GT1Qn.mjs";
6
+ 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 "./.setup/monitor-DpxjN6Ks.mjs";
7
+ import { t as probeLineBot } from "./.setup/probe-BslD77tJ.mjs";
8
8
  import { clearAccountEntryFields } from "openclaw/plugin-sdk/core";
9
9
  import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
10
+ import { createMessageReceiveContext } from "openclaw/plugin-sdk/channel-outbound";
10
11
  import { DEFAULT_ACCOUNT_ID, formatDocsLink, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
11
12
  import { buildComputedAccountStatusSnapshot, buildTokenChannelStatusSummary } from "openclaw/plugin-sdk/status-helpers";
12
- import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
13
13
  import { messagingApi } from "@line/bot-sdk";
14
- import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
15
- import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
14
+ import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
15
+ import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/agent-media-payload";
16
16
  import { mimeTypeFromFilePath } from "openclaw/plugin-sdk/media-mime";
17
17
  import { loadWebMediaRaw } from "openclaw/plugin-sdk/web-media";
18
18
  //#region extensions/line/src/webhook.ts
19
- const LINE_WEBHOOK_MAX_RAW_BODY_BYTES = 64 * 1024;
19
+ const LINE_WEBHOOK_MAX_RAW_BODY_BYTES = 65536;
20
20
  function readRawBody(req) {
21
21
  const rawBody = req.rawBody ?? (typeof req.body === "string" || Buffer.isBuffer(req.body) ? req.body : null);
22
22
  if (!rawBody) return null;
@@ -26,9 +26,13 @@ function parseWebhookBody(rawBody) {
26
26
  if (!rawBody) return null;
27
27
  return parseLineWebhookBody(rawBody);
28
28
  }
29
+ function logLineWebhookDispatchError(runtime, err) {
30
+ runtime?.error?.(danger(`line webhook dispatch failed: ${String(err)}`));
31
+ }
29
32
  function createLineWebhookMiddleware(options) {
30
33
  const { channelSecret, onEvents, runtime } = options;
31
34
  return async (req, res, _next) => {
35
+ let receiveContext;
32
36
  try {
33
37
  const signature = req.headers["x-line-signature"];
34
38
  if (!signature || typeof signature !== "string") {
@@ -54,13 +58,23 @@ function createLineWebhookMiddleware(options) {
54
58
  res.status(400).json({ error: "Invalid webhook payload" });
55
59
  return;
56
60
  }
61
+ receiveContext = createMessageReceiveContext({
62
+ id: `${Date.now()}:line:webhook`,
63
+ channel: "line",
64
+ message: body,
65
+ ackPolicy: "after_receive_record",
66
+ onAck: () => {
67
+ res.status(200).json({ status: "ok" });
68
+ }
69
+ });
70
+ if (receiveContext.shouldAckAfter("receive_record")) await receiveContext.ack();
57
71
  if (body.events && body.events.length > 0) {
58
72
  logVerbose(`line: received ${body.events.length} webhook events`);
59
- await onEvents(body);
73
+ Promise.resolve().then(() => onEvents(body)).catch((err) => logLineWebhookDispatchError(runtime, err));
60
74
  }
61
- res.status(200).json({ status: "ok" });
62
75
  } catch (err) {
63
- runtime?.error?.(danger(`line webhook error: ${formatErrorMessage(err)}`));
76
+ await receiveContext?.nack(err);
77
+ runtime?.error?.(danger(`line webhook error: ${String(err)}`));
64
78
  if (!res.headersSent) res.status(500).json({ error: "Internal server error" });
65
79
  }
66
80
  };
@@ -79,6 +93,7 @@ function startLineWebhook(options) {
79
93
  }
80
94
  //#endregion
81
95
  //#region extensions/line/src/rich-menu.ts
96
+ const USER_BATCH_SIZE = 500;
82
97
  const graphemeSegmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
83
98
  function getClient(opts) {
84
99
  const account = resolveLineAccount({
@@ -96,6 +111,11 @@ function getBlobClient(opts) {
96
111
  const token = resolveLineChannelAccessToken(opts.channelAccessToken, account);
97
112
  return new messagingApi.MessagingApiBlobClient({ channelAccessToken: token });
98
113
  }
114
+ function chunkUserIds(userIds) {
115
+ const batches = [];
116
+ for (let i = 0; i < userIds.length; i += USER_BATCH_SIZE) batches.push(userIds.slice(i, i + USER_BATCH_SIZE));
117
+ return batches;
118
+ }
99
119
  function truncateGraphemes(input, maxLength) {
100
120
  let result = "";
101
121
  let count = 0;
@@ -144,6 +164,27 @@ async function getDefaultRichMenuId(opts) {
144
164
  return null;
145
165
  }
146
166
  }
167
+ async function linkRichMenuToUser(userId, richMenuId, opts) {
168
+ await getClient(opts).linkRichMenuIdToUser(userId, richMenuId);
169
+ if (opts.verbose) logVerbose(`line: linked rich menu ${richMenuId} to user ${userId}`);
170
+ }
171
+ async function linkRichMenuToUsers(userIds, richMenuId, opts) {
172
+ const client = getClient(opts);
173
+ for (const batch of chunkUserIds(userIds)) await client.linkRichMenuIdToUsers({
174
+ richMenuId,
175
+ userIds: batch
176
+ });
177
+ if (opts.verbose) logVerbose(`line: linked rich menu ${richMenuId} to ${userIds.length} users`);
178
+ }
179
+ async function unlinkRichMenuFromUser(userId, opts) {
180
+ await getClient(opts).unlinkRichMenuIdFromUser(userId);
181
+ if (opts.verbose) logVerbose(`line: unlinked rich menu from user ${userId}`);
182
+ }
183
+ async function unlinkRichMenuFromUsers(userIds, opts) {
184
+ const client = getClient(opts);
185
+ for (const batch of chunkUserIds(userIds)) await client.unlinkRichMenuIdFromUsers({ userIds: batch });
186
+ if (opts.verbose) logVerbose(`line: unlinked rich menu from ${userIds.length} users`);
187
+ }
147
188
  async function getRichMenuIdOfUser(userId, opts) {
148
189
  const client = getClient(opts);
149
190
  try {
@@ -258,4 +299,4 @@ function createDefaultMenuConfig() {
258
299
  };
259
300
  }
260
301
  //#endregion
261
- export { DEFAULT_ACCOUNT_ID, LineChannelConfigSchema, LineConfigSchema, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, buildTemplateMessageFromPayload, buildTokenChannelStatusSummary, cancelDefaultRichMenu, clearAccountEntryFields, convertCodeBlockToFlexBubble, convertTableToFlexBubble, createActionCard, createAgendaCard, createAppleTvRemoteCard, createAudioMessage, createButtonMenu, createButtonTemplate, createCarousel, createCarouselColumn, createConfirmTemplate, createDefaultMenuConfig, createDeviceControlCard, createEventCard, createFlexMessage, createGridLayout, createImageCard, createImageCarousel, createImageCarouselColumn, createImageMessage, createInfoCard, createLineNodeWebhookHandler, createLineWebhookMiddleware, createLinkMenu, createListCard, createLocationMessage, createMediaPlayerCard, createNotificationBubble, createProductCarousel, createQuickReplyItems, createReceiptCard, createRichMenu, createRichMenuAlias, createTemplateCarousel, createTextMessageWithQuickReplies, createVideoMessage, createYesNoConfirm, datetimePickerAction, deleteRichMenu, deleteRichMenuAlias, downloadLineMedia, firstDefined, formatDocsLink, getDefaultRichMenuId, getRichMenu, getRichMenuIdOfUser, getRichMenuList, getUserDisplayName, getUserProfile, hasLineDirectives, hasMarkdownToConvert, listLineAccountIds, messageAction, monitorLineProvider, normalizeAccountId, normalizeAllowFrom, parseLineDirectives, 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 };
302
+ export { DEFAULT_ACCOUNT_ID, LineChannelConfigSchema, LineConfigSchema, buildChannelConfigSchema, buildComputedAccountStatusSnapshot, buildTemplateMessageFromPayload, buildTokenChannelStatusSummary, cancelDefaultRichMenu, clearAccountEntryFields, convertCodeBlockToFlexBubble, convertLinksToFlexBubble, convertTableToFlexBubble, createActionCard, createAgendaCard, createAppleTvRemoteCard, createAudioMessage, createButtonMenu, createButtonTemplate, createCarousel, createCarouselColumn, createConfirmTemplate, createDefaultMenuConfig, createDeviceControlCard, createEventCard, createFlexMessage, createGridLayout, createImageCard, createImageCarousel, createImageCarouselColumn, createImageMessage, createInfoCard, createLineNodeWebhookHandler, createLineWebhookMiddleware, createLinkMenu, createListCard, createLocationMessage, createMediaPlayerCard, createNotificationBubble, createProductCarousel, createQuickReplyItems, createReceiptCard, createRichMenu, createRichMenuAlias, createTemplateCarousel, createTextMessageWithQuickReplies, createVideoMessage, createYesNoConfirm, datetimePickerAction, deleteRichMenu, deleteRichMenuAlias, downloadLineMedia, extractCodeBlocks, extractLinks, extractMarkdownTables, firstDefined, formatDocsLink, getDefaultRichMenuId, getRichMenu, getRichMenuIdOfUser, getRichMenuList, getUserDisplayName, getUserProfile, hasLineDirectives, hasMarkdownToConvert, linkRichMenuToUser, linkRichMenuToUsers, listLineAccountIds, messageAction, monitorLineProvider, normalizeAccountId, normalizeAllowFrom, parseLineDirectives, 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, unlinkRichMenuFromUser, unlinkRichMenuFromUsers, uploadRichMenuImage, uriAction, validateLineSignature };
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as lineSetupAdapter, t as lineSetupWizard } from "./setup-surface-DRQ7n0En.js";
1
+ import { n as lineSetupAdapter, t as lineSetupWizard } from "./.setup/setup-surface-M1ivmZ-G.mjs";
2
2
  export { lineSetupAdapter, lineSetupWizard };
@@ -1,9 +1,10 @@
1
1
  import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ import { fileURLToPath } from "node:url";
2
3
  //#region extensions/line/setup-entry.ts
3
4
  var setup_entry_default = defineBundledChannelSetupEntry({
4
5
  importMetaUrl: import.meta.url,
5
6
  plugin: {
6
- specifier: "./api.js",
7
+ specifier: fileURLToPath(new URL(".setup/api-D3h9w6oz.mjs", import.meta.url).href),
7
8
  exportName: "lineSetupPlugin"
8
9
  }
9
10
  });
@@ -1 +1 @@
1
- {"version":3,"file":"audienceGroupCreateRoute.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupCreateRoute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAClC,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"audienceGroupCreateRoute.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupCreateRoute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC,YAAY,GACZ,eAAe,GACf,UAAU,GACV,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audienceGroupFailedType.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupFailedType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GACjC,sCAAsC,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"audienceGroupFailedType.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupFailedType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,sCAAsC,GACtC,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audienceGroupJobFailedType.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupJobFailedType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,0BAA0B,GACpC,gBAAgB,GAAG,sCAAsC,CAAC"}
1
+ {"version":3,"file":"audienceGroupJobFailedType.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupJobFailedType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,gBAAgB,GAChB,sCAAsC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audienceGroupJobStatus.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupJobStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAChC,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"audienceGroupJobStatus.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupJobStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audienceGroupStatus.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC7B,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"audienceGroupStatus.d.ts","sourceRoot":"","sources":["../../../../lib/manage-audience/model/audienceGroupStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,aAAa,GACb,OAAO,GACP,QAAQ,GACR,SAAS,GACT,UAAU,GACV,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flexBoxBorderWidth.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexBoxBorderWidth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC5B,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"flexBoxBorderWidth.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexBoxBorderWidth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flexBoxCornerRadius.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexBoxCornerRadius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC7B,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"flexBoxCornerRadius.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexBoxCornerRadius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flexBubble.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexBubble.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG;IAC3C,IAAI,EAAE,QAAQ,CAAC;IAEf,SAAS,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC;IACrC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,UAAU,CAAC;IAC1B,KAAY,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1C,KAAY,QAAQ,GAClB,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClE"}
1
+ {"version":3,"file":"flexBubble.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexBubble.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG;IAC3C,IAAI,EAAE,QAAQ,CAAC;IAEf,SAAS,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC;IACrC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,UAAU,CAAC;IAC1B,KAAY,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1C,KAAY,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,MAAM,CAAC;CACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"flexIconSize.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexIconSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GACtB,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"flexIconSize.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexIconSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flexSpanSize.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexSpanSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GACtB,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"flexSpanSize.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexSpanSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"flexTextFontSize.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexTextFontSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAC1B,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"flexTextFontSize.d.ts","sourceRoot":"","sources":["../../../../lib/messaging-api/model/flexTextFontSize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC"}