@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.
- package/README.md +1 -1
- package/dist/.setup/accounts-DJVOv1JI.mjs +107 -0
- package/dist/.setup/api-D3h9w6oz.mjs +3 -0
- package/dist/.setup/api-DdlGHKoX.mjs +11 -0
- package/dist/.setup/basic-cards-C8Qwh2X1.mjs +307 -0
- package/dist/{card-command-ty11OJNt.js → .setup/card-command-CWrkUiGY.mjs} +51 -23
- package/dist/{channel-D4i_K4fQ.js → .setup/channel-Du0PrvOH.mjs} +76 -66
- package/dist/.setup/channel.runtime-b3suPB-W.mjs +4 -0
- package/dist/.setup/flex-templates-BP6VHjzK.mjs +814 -0
- package/dist/{markdown-to-line-DMDQTMhx.js → .setup/markdown-to-line-o89GT1Qn.mjs} +252 -254
- package/dist/{monitor-DXEodYFJ.js → .setup/monitor-DpxjN6Ks.mjs} +491 -658
- package/dist/.setup/monitor.runtime-BS-cGD5Q.mjs +2 -0
- package/dist/.setup/outbound.runtime-BeNDuEIF.mjs +2 -0
- package/dist/{probe-CM03wo6r.js → .setup/probe-BslD77tJ.mjs} +9 -7
- package/dist/.setup/probe.runtime-YwWmWIlk.mjs +2 -0
- package/dist/{reply-payload-transform-D5-dHB8b.js → .setup/reply-payload-transform-CYQIy_x8.mjs} +204 -80
- package/dist/{setup-surface-DRQ7n0En.js → .setup/setup-surface-M1ivmZ-G.mjs} +143 -158
- package/dist/api.js +2 -11
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime-api.js +56 -15
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +2 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupCreateRoute.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupFailedType.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupJobFailedType.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupJobStatus.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupStatus.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBoxBorderWidth.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBoxCornerRadius.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBubble.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexIconSize.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexSpanSize.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexTextFontSize.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/numberOfMessagesResponse.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/postbackAction.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/subscriptionPeriodDemographic.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/version.d.ts +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/version.js +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/event.d.ts +1 -2
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/event.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.d.ts +0 -1
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.js +0 -1
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/models.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupCreateRoute.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupFailedType.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupJobFailedType.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupJobStatus.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/model/audienceGroupStatus.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexBoxBorderWidth.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexBoxCornerRadius.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexBubble.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexIconSize.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexSpanSize.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/flexTextFontSize.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/numberOfMessagesResponse.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/postbackAction.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/subscriptionPeriodDemographic.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/version.d.ts +1 -1
- package/node_modules/@line/bot-sdk/dist/version.js +1 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/event.d.ts +1 -2
- package/node_modules/@line/bot-sdk/dist/webhook/model/event.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/models.d.ts +0 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/models.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/models.js +0 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/models.js.map +1 -1
- package/node_modules/@line/bot-sdk/lib/insight/model/getNumberOfFollowersResponse.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/liff/model/liffScope.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupCreateRoute.ts +4 -1
- package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupFailedType.ts +2 -1
- package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupJobFailedType.ts +2 -1
- package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupJobStatus.ts +4 -1
- package/node_modules/@line/bot-sdk/lib/manage-audience/model/audienceGroupStatus.ts +6 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/botInfoResponse.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexBoxBorderWidth.ts +6 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexBoxCornerRadius.ts +7 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexBubble.ts +7 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexIconSize.ts +10 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexSpanSize.ts +10 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/flexTextFontSize.ts +10 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/getAggregationUnitNameListResponse.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/getFollowersResponse.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/getJoinedMembershipUsersResponse.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/issueLinkTokenResponse.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/numberOfMessagesResponse.ts +5 -2
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/postbackAction.ts +4 -1
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/subscriptionPeriodDemographic.ts +5 -1
- package/node_modules/@line/bot-sdk/lib/version.ts +1 -1
- package/node_modules/@line/bot-sdk/lib/webhook/.openapi-generator/FILES +0 -1
- package/node_modules/@line/bot-sdk/lib/webhook/model/event.ts +0 -2
- package/node_modules/@line/bot-sdk/lib/webhook/model/models.ts +0 -1
- package/node_modules/@line/bot-sdk/lib/webhook/model/stickerMessageContent.ts +1 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/README.md +1 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/fs/promises.d.ts +5 -16
- package/node_modules/@line/bot-sdk/node_modules/@types/node/package.json +3 -3
- package/node_modules/@line/bot-sdk/package.json +3 -3
- package/openclaw.plugin.json +75 -57
- package/package.json +6 -71
- package/dist/accounts-BqEVsDoB.js +0 -103
- package/dist/channel.runtime-BdhK8Xw7.js +0 -4
- package/dist/flex-templates-iKJsyCq-.js +0 -1339
- package/dist/monitor.runtime-CZquR7jI.js +0 -2
- package/dist/outbound.runtime-BS0IhU_M.js +0 -2
- package/dist/probe.runtime-D13ZtXsd.js +0 -2
- package/dist/quick-reply-fallback-D86FwAfr.js +0 -56
- package/dist/send-receipt-CY2ey8XH.js +0 -107
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.d.ts +0 -24
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.d.ts.map +0 -1
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.js +0 -14
- package/node_modules/@line/bot-sdk/dist/cjs/webhook/model/messageEditedEvent.js.map +0 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.d.ts +0 -24
- package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.d.ts.map +0 -1
- package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.js +0 -13
- package/node_modules/@line/bot-sdk/dist/webhook/model/messageEditedEvent.js.map +0 -1
- 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-
|
|
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 {
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...params.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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 } :
|
|
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 =
|
|
127
|
+
const lineDmPolicy = {
|
|
155
128
|
label: "LINE",
|
|
156
129
|
channel,
|
|
157
|
-
|
|
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
|
-
|
|
142
|
+
}).config.dmPolicy ?? "pairing",
|
|
143
|
+
setPolicy: (cfg, policy, accountId) => patchLineAccountConfig({
|
|
162
144
|
cfg,
|
|
163
|
-
accountId:
|
|
145
|
+
accountId: accountId ?? resolveDefaultLineAccountId(cfg),
|
|
164
146
|
enabled: true,
|
|
165
|
-
patch
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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: [
|
|
176
|
+
credentials: [{
|
|
246
177
|
inputKey: "token",
|
|
247
|
-
configKey: "channelAccessToken",
|
|
248
|
-
fileKey: "tokenFile",
|
|
249
178
|
providerHint: channel,
|
|
250
179
|
credentialLabel: t("wizard.line.channelAccessToken"),
|
|
251
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
282
|
+
export { lineSetupAdapter as n, hasLineCredentials as r, lineSetupWizard as t };
|
package/dist/api.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 "
|
|
1
|
+
import { t as linePlugin } from "./.setup/channel-Du0PrvOH.mjs";
|
|
2
2
|
export { linePlugin };
|
package/dist/contract-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as resolveLineAccount, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "
|
|
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("
|
|
7
|
+
const { registerLineCardCommand } = await import("./.setup/card-command-CWrkUiGY.mjs");
|
|
8
8
|
registerLineCardCommand({
|
|
9
9
|
...api,
|
|
10
10
|
registerCommand(command) {
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { i as resolveLineAccount, n as normalizeAccountId, r as resolveDefaultLineAccountId, t as listLineAccountIds } from "
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import {
|
|
5
|
-
import { A as
|
|
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 "
|
|
7
|
-
import { t as probeLineBot } from "
|
|
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 {
|
|
15
|
-
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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 "
|
|
1
|
+
import { n as lineSetupAdapter, t as lineSetupWizard } from "./.setup/setup-surface-M1ivmZ-G.mjs";
|
|
2
2
|
export { lineSetupAdapter, lineSetupWizard };
|
package/dist/setup-entry.js
CHANGED
|
@@ -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: "
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/api-D3h9w6oz.mjs", import.meta.url).href),
|
|
7
8
|
exportName: "lineSetupPlugin"
|
|
8
9
|
}
|
|
9
10
|
});
|
package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupCreateRoute.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupFailedType.d.ts.map
CHANGED
|
@@ -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,
|
|
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,
|
|
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"}
|
package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupJobStatus.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/model/audienceGroupStatus.d.ts.map
CHANGED
|
@@ -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,
|
|
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,
|
|
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"}
|
package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/flexBoxCornerRadius.d.ts.map
CHANGED
|
@@ -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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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"}
|