@openclaw/line 2026.10.10-beta.4 → 2026.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{accounts-DOiM8-y3.mjs → accounts-Dm_NoU7R.mjs} +1 -2
- package/dist/.setup/{api-CO1TnHKG.mjs → api-Bz8QPCGD.mjs} +3 -4
- package/dist/.setup/api-EJnP_1cJ.mjs +3 -0
- package/dist/.setup/{card-command-BMLk4YKh.mjs → card-command-XYkg1XvG.mjs} +3 -4
- package/dist/.setup/{channel-CybGPFDZ.mjs → channel-ezTshIoC.mjs} +24 -39
- package/dist/.setup/{channel.runtime-IdkB6yvc.mjs → channel.runtime-4w8EffJb.mjs} +3 -3
- package/dist/.setup/{monitor-2NNRm8hi.mjs → monitor-BBEBldZu.mjs} +35 -62
- package/dist/.setup/monitor.runtime-BWIgUqzC.mjs +1 -0
- package/dist/.setup/{outbound.runtime-BJL2119X.mjs → outbound.runtime-BSuF2lax.mjs} +2 -2
- package/dist/.setup/probe.runtime-a-fC57xd.mjs +1 -0
- package/dist/.setup/{runtime-V7yh9OeC.mjs → runtime-C9ldw-V4.mjs} +1 -2
- package/dist/.setup/{send-g4gFsc9W.mjs → send-B8TYfTO_.mjs} +5 -8
- package/dist/.setup/{send-retry-Dzbkz5wG.mjs → send-retry-gHsCgBlf.mjs} +13 -25
- package/dist/.setup/{setup-surface-CYd8oqzt.mjs → setup-surface-DvbBjHFi.mjs} +5 -9
- package/dist/.setup/{template-messages-COcdie6C.mjs → template-messages-CdpQxqqb.mjs} +5 -9
- package/dist/.setup/{webhook-spool-contract-msjTl60Q.mjs → webhook-spool-contract-COhQK5XQ.mjs} +1 -2
- package/dist/.source-module-urls/2c97352967966b7ab9f67f528eb25c098b6fe10ea0e4616ffae3851ed839d81e.json +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +3 -5
- package/dist/index.js +2 -3
- package/dist/runtime-api.js +1 -1
- package/dist/secret-contract-api.js +1 -2
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +2 -3
- package/package.json +4 -4
- package/dist/.setup/api-DPxiB9eZ.mjs +0 -3
- package/dist/.setup/monitor.runtime-DaSymO_N.mjs +0 -1
- package/dist/.setup/probe.runtime-DaGwztSg.mjs +0 -1
|
@@ -2,7 +2,7 @@ import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
|
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { resolveAccountEntry, resolveListedDefaultAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/line/src/accounts.ts
|
|
6
6
|
const { resolveAccountConfig: resolveMergedLineAccountConfig } = createAccountListHelpers("line", { omitKeys: ["defaultAccount"] });
|
|
7
7
|
function resolveLineCredential(params) {
|
|
8
8
|
const { accountId, baseConfig, accountConfig, credentialKey, fileKey, envKey } = params;
|
|
@@ -97,5 +97,4 @@ function resolveDefaultLineAccountId(cfg) {
|
|
|
97
97
|
normalizeListedAccountId: normalizeAccountId
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
//#endregion
|
|
101
100
|
export { resolveDefaultLineAccountId as n, resolveLineAccount as r, listLineAccountIds as t };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { l as lineChannelPluginCommon } from "./channel-
|
|
2
|
-
import { r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-
|
|
3
|
-
|
|
1
|
+
import { l as lineChannelPluginCommon } from "./channel-ezTshIoC.mjs";
|
|
2
|
+
import { r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-DvbBjHFi.mjs";
|
|
3
|
+
// extensions/line/src/channel.setup.ts
|
|
4
4
|
const lineSetupPlugin = {
|
|
5
5
|
id: "line",
|
|
6
6
|
...lineChannelPluginCommon,
|
|
7
7
|
setupWizard: lineSetupWizard,
|
|
8
8
|
setupContract: lineSetupContract
|
|
9
9
|
};
|
|
10
|
-
//#endregion
|
|
11
10
|
export { lineSetupPlugin as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as createImageCard, f as createInfoCard, l as createReceiptCard, p as createListCard, u as createActionCard } from "./send-retry-
|
|
2
|
-
import { t as createFlexMessage } from "./send-
|
|
1
|
+
import { d as createImageCard, f as createInfoCard, l as createReceiptCard, p as createListCard, u as createActionCard } from "./send-retry-gHsCgBlf.mjs";
|
|
2
|
+
import { t as createFlexMessage } from "./send-B8TYfTO_.mjs";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/line/src/card-command.ts
|
|
6
6
|
const CARD_USAGE = `Usage: /card <type> "title" "body" [options]
|
|
7
7
|
|
|
8
8
|
Types:
|
|
@@ -231,5 +231,4 @@ async function handleLineCardCommand(argsInput) {
|
|
|
231
231
|
return { text: `Error creating card: ${String(err)}` };
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
//#endregion
|
|
235
234
|
export { handleLineCardCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as resolveDefaultLineAccountId, r as resolveLineAccount, t as listLineAccountIds } from "./accounts-
|
|
2
|
-
import { a as normalizeLineAllowEntry, i as hasLineCredentials, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-
|
|
3
|
-
import { t as getLineRuntime } from "./runtime-
|
|
4
|
-
import { A as resolveLineQuoteToken, C as fitsLineFlexBubble, E as canCarryLineQuoteToken, M as buildLineMediaMessage, N as inferLineTargetChatType, P as normalizeLineMessagingTarget, _ as createCardTitle, b as postbackAction, c as createEventCard, g as createCardBubble, h as cardText, k as reportLineQuoteCarrierMissing, m as cardBox, s as createAgendaCard, t as explainLineRefusal, u as createActionCard, v as messageAction, x as truncateLineActionLabel } from "./send-retry-
|
|
1
|
+
import { n as resolveDefaultLineAccountId, r as resolveLineAccount, t as listLineAccountIds } from "./accounts-Dm_NoU7R.mjs";
|
|
2
|
+
import { a as normalizeLineAllowEntry, i as hasLineCredentials, r as lineSetupContract, t as lineSetupWizard } from "./setup-surface-DvbBjHFi.mjs";
|
|
3
|
+
import { t as getLineRuntime } from "./runtime-C9ldw-V4.mjs";
|
|
4
|
+
import { A as resolveLineQuoteToken, C as fitsLineFlexBubble, E as canCarryLineQuoteToken, M as buildLineMediaMessage, N as inferLineTargetChatType, P as normalizeLineMessagingTarget, _ as createCardTitle, b as postbackAction, c as createEventCard, g as createCardBubble, h as cardText, k as reportLineQuoteCarrierMissing, m as cardBox, s as createAgendaCard, t as explainLineRefusal, u as createActionCard, v as messageAction, x as truncateLineActionLabel } from "./send-retry-gHsCgBlf.mjs";
|
|
5
5
|
import { buildDmGroupAccountAllowlistAdapter, createFlatAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
6
6
|
import { buildChannelOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
7
7
|
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
@@ -26,7 +26,7 @@ import { resolveAskUserQuestionOptionIndex, resolveAskUserQuestionOptionIndices,
|
|
|
26
26
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
27
27
|
import { normalizeMessagePresentation, renderMessagePresentationFallbackText, renderPresentationForDelivery, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
28
28
|
import { Type } from "typebox";
|
|
29
|
-
|
|
29
|
+
// extensions/line/src/bindings.ts
|
|
30
30
|
function normalizeLineConversationId(raw) {
|
|
31
31
|
const trimmed = raw?.trim() ?? "";
|
|
32
32
|
if (!trimmed) return null;
|
|
@@ -56,8 +56,7 @@ const lineBindingsAdapter = {
|
|
|
56
56
|
resolveCommandConversation: resolveLineCommandConversation,
|
|
57
57
|
resolveInboundConversation: resolveLineInboundConversation
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
//#region extensions/line/src/config-adapter.ts
|
|
59
|
+
// extensions/line/src/config-adapter.ts
|
|
61
60
|
const lineConfigAdapter = createScopedChannelConfigAdapter({
|
|
62
61
|
sectionKey: "line",
|
|
63
62
|
listAccountIds: listLineAccountIds,
|
|
@@ -76,8 +75,7 @@ const lineConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
76
75
|
resolveAllowFrom: (account) => account.config.allowFrom,
|
|
77
76
|
formatAllowFrom: (allowFrom) => normalizeStringEntries(allowFrom).map(normalizeLineAllowEntry)
|
|
78
77
|
});
|
|
79
|
-
|
|
80
|
-
//#region extensions/line/src/config-schema.ts
|
|
78
|
+
// extensions/line/src/config-schema.ts
|
|
81
79
|
const ThreadBindingsSchema = z.object({
|
|
82
80
|
enabled: z.boolean().optional(),
|
|
83
81
|
idleHours: z.number().optional(),
|
|
@@ -168,8 +166,7 @@ const lineChannelPluginCommon = {
|
|
|
168
166
|
})
|
|
169
167
|
}
|
|
170
168
|
};
|
|
171
|
-
|
|
172
|
-
//#region extensions/line/src/group-keys.ts
|
|
169
|
+
// extensions/line/src/group-keys.ts
|
|
173
170
|
function resolveLineGroupLookupIds(groupId) {
|
|
174
171
|
const normalized = groupId?.trim();
|
|
175
172
|
if (!normalized) return [];
|
|
@@ -200,8 +197,7 @@ function resolveExactLineGroupConfigKey(params) {
|
|
|
200
197
|
if (!groups) return;
|
|
201
198
|
return resolveLineGroupLookupIds(params.groupId).find((candidate) => Object.hasOwn(groups, candidate));
|
|
202
199
|
}
|
|
203
|
-
|
|
204
|
-
//#region extensions/line/src/doctor.ts
|
|
200
|
+
// extensions/line/src/doctor.ts
|
|
205
201
|
const GROUP_DEFAULTS_KEY = "*";
|
|
206
202
|
function classifyAllowFrom(values) {
|
|
207
203
|
const entries = Array.isArray(values) ? values.map(normalizeLineAllowEntry).filter(Boolean) : [];
|
|
@@ -306,8 +302,7 @@ const lineDoctor = {
|
|
|
306
302
|
return covered || referenceBacked.length > 0;
|
|
307
303
|
}
|
|
308
304
|
};
|
|
309
|
-
|
|
310
|
-
//#region extensions/line/src/status.ts
|
|
305
|
+
// extensions/line/src/status.ts
|
|
311
306
|
const collectLineCredentialIssues = createDependentCredentialStatusIssueCollector({
|
|
312
307
|
channel: "line",
|
|
313
308
|
dependencySourceKey: "tokenSource",
|
|
@@ -362,7 +357,7 @@ const lineStatusAdapter = createComputedAccountStatusAdapter({
|
|
|
362
357
|
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),
|
|
363
358
|
collectStatusIssues: (accounts) => [...collectLineCredentialIssues(accounts), ...collectLineWebhookIssues(accounts)],
|
|
364
359
|
buildChannelSummary: ({ snapshot }) => buildTokenChannelStatusSummary(snapshot),
|
|
365
|
-
probeAccount: async ({ account, timeoutMs }) => await (await import("./probe.runtime-
|
|
360
|
+
probeAccount: async ({ account, timeoutMs }) => await (await import("./probe.runtime-a-fC57xd.mjs")).probeLineBot(account.channelAccessToken, timeoutMs),
|
|
366
361
|
resolveAccountSnapshot: ({ account, probe }) => ({
|
|
367
362
|
accountId: account.accountId,
|
|
368
363
|
name: account.name,
|
|
@@ -378,8 +373,7 @@ const lineStatusAdapter = createComputedAccountStatusAdapter({
|
|
|
378
373
|
}
|
|
379
374
|
})
|
|
380
375
|
});
|
|
381
|
-
|
|
382
|
-
//#region extensions/line/src/gateway.ts
|
|
376
|
+
// extensions/line/src/gateway.ts
|
|
383
377
|
const lineGatewayAdapter = {
|
|
384
378
|
startAccount: async (ctx) => {
|
|
385
379
|
const account = ctx.account;
|
|
@@ -394,7 +388,7 @@ const lineGatewayAdapter = {
|
|
|
394
388
|
statusSink({ lifecycle: "starting" });
|
|
395
389
|
let lineBotLabel = "";
|
|
396
390
|
try {
|
|
397
|
-
const probe = await (await import("./probe.runtime-
|
|
391
|
+
const probe = await (await import("./probe.runtime-a-fC57xd.mjs")).probeLineBot(token, 2500);
|
|
398
392
|
const displayName = probe.ok ? probe.bot?.displayName?.trim() : null;
|
|
399
393
|
if (displayName) lineBotLabel = ` (${displayName})`;
|
|
400
394
|
const delivery = describeLineWebhookDelivery({ webhook: probe.ok ? probe.webhook : void 0 });
|
|
@@ -403,7 +397,7 @@ const lineGatewayAdapter = {
|
|
|
403
397
|
if (getLineRuntime().logging.shouldLogVerbose()) ctx.log?.debug?.(`[${account.accountId}] bot check failed: ${String(err)}`);
|
|
404
398
|
}
|
|
405
399
|
ctx.log?.info(`[${account.accountId}] starting LINE provider${lineBotLabel}`);
|
|
406
|
-
const { monitorLineProvider } = await import("./monitor.runtime-
|
|
400
|
+
const { monitorLineProvider } = await import("./monitor.runtime-BWIgUqzC.mjs");
|
|
407
401
|
return await monitorLineProvider({
|
|
408
402
|
channelAccessToken: token,
|
|
409
403
|
channelSecret: secret,
|
|
@@ -445,8 +439,7 @@ const lineGatewayAdapter = {
|
|
|
445
439
|
};
|
|
446
440
|
}
|
|
447
441
|
};
|
|
448
|
-
|
|
449
|
-
//#region extensions/line/src/group-policy.ts
|
|
442
|
+
// extensions/line/src/group-policy.ts
|
|
450
443
|
function resolveLineGroupRequireMention(params) {
|
|
451
444
|
const tree = buildChannelGroupsScopeTree(params.cfg, "line", params.accountId);
|
|
452
445
|
const matchedKey = resolveExactLineGroupConfigKey({
|
|
@@ -458,15 +451,13 @@ function resolveLineGroupRequireMention(params) {
|
|
|
458
451
|
path: matchedKey ? [matchedKey] : []
|
|
459
452
|
});
|
|
460
453
|
}
|
|
461
|
-
|
|
462
|
-
//#region extensions/line/src/quick-reply-fallback.ts
|
|
454
|
+
// extensions/line/src/quick-reply-fallback.ts
|
|
463
455
|
function buildLineQuickReplyFallbackText(labels) {
|
|
464
456
|
const normalized = normalizeStringEntries(labels).slice(0, 13);
|
|
465
457
|
if (normalized.length === 0) return "Choose an option.";
|
|
466
458
|
return `Options:\n${normalized.map((label) => `- ${label}`).join("\n")}`;
|
|
467
459
|
}
|
|
468
|
-
|
|
469
|
-
//#region extensions/line/src/flex-templates/media-control-cards.ts
|
|
460
|
+
// extensions/line/src/flex-templates/media-control-cards.ts
|
|
470
461
|
function createControlButton(label, data, style = "secondary") {
|
|
471
462
|
return {
|
|
472
463
|
type: "button",
|
|
@@ -652,8 +643,7 @@ function createDeviceControlCard(params) {
|
|
|
652
643
|
}
|
|
653
644
|
return bubble;
|
|
654
645
|
}
|
|
655
|
-
|
|
656
|
-
//#region extensions/line/src/question-postback.ts
|
|
646
|
+
// extensions/line/src/question-postback.ts
|
|
657
647
|
const QUESTION_ID_PARAM = "line.question";
|
|
658
648
|
const OPTION_INDEX_PARAM = "line.option";
|
|
659
649
|
const POSTBACK_DATA_MAX_BYTES = 300;
|
|
@@ -710,8 +700,7 @@ async function resolveLineQuestionPostback(params) {
|
|
|
710
700
|
return { status: "failed" };
|
|
711
701
|
}
|
|
712
702
|
}
|
|
713
|
-
|
|
714
|
-
//#region extensions/line/src/rich-message-schema.ts
|
|
703
|
+
// extensions/line/src/rich-message-schema.ts
|
|
715
704
|
const nonempty = () => Type.String({ minLength: 1 });
|
|
716
705
|
const closed = (properties) => Type.Object(properties, { additionalProperties: false });
|
|
717
706
|
const lineCardSchema = Type.Union([
|
|
@@ -782,8 +771,7 @@ const lineChannelDataSchema = Type.Optional(closed({ line: closed({
|
|
|
782
771
|
durationMs: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
783
772
|
trackingId: Type.Optional(nonempty())
|
|
784
773
|
}) }));
|
|
785
|
-
|
|
786
|
-
//#region extensions/line/src/rich-messages.ts
|
|
774
|
+
// extensions/line/src/rich-messages.ts
|
|
787
775
|
const lineMessageActions = {
|
|
788
776
|
describeMessageTool: ({ cfg, accountId }) => {
|
|
789
777
|
const account = resolveLineAccount({
|
|
@@ -1041,9 +1029,8 @@ function createLineQuickReply(items) {
|
|
|
1041
1029
|
action: item.action.type === "command" ? messageAction(item.label, item.action.command) : postbackAction(item.label, item.action.value, item.label)
|
|
1042
1030
|
})) };
|
|
1043
1031
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-BJL2119X.mjs"));
|
|
1032
|
+
// extensions/line/src/outbound.ts
|
|
1033
|
+
const loadLineOutboundRuntime = createLazyRuntimeModule(() => import("./outbound.runtime-BSuF2lax.mjs"));
|
|
1047
1034
|
function quotedOption(quoteToken) {
|
|
1048
1035
|
return quoteToken ? { quoteToken } : {};
|
|
1049
1036
|
}
|
|
@@ -1293,9 +1280,8 @@ const lineMessageAdapter = createChannelMessageAdapterFromOutbound({
|
|
|
1293
1280
|
supportedAckPolicies: ["after_receive_record"]
|
|
1294
1281
|
}
|
|
1295
1282
|
});
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-IdkB6yvc.mjs"));
|
|
1283
|
+
// extensions/line/src/channel.ts
|
|
1284
|
+
const loadLineChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-4w8EffJb.mjs"));
|
|
1299
1285
|
const lineSecurityAdapter = createRestrictSendersChannelSecurity({
|
|
1300
1286
|
channelKey: "line",
|
|
1301
1287
|
resolveDmPolicy: (account) => account.config.dmPolicy,
|
|
@@ -1457,5 +1443,4 @@ const linePlugin = createChatChannelPlugin({
|
|
|
1457
1443
|
} },
|
|
1458
1444
|
outbound: lineOutboundAdapter
|
|
1459
1445
|
});
|
|
1460
|
-
//#endregion
|
|
1461
1446
|
export { parseLineQuestionPostbackData as a, resolveLineGroupConfigEntry as c, isLineQuestionPostbackData as i, lineChannelPluginCommon as l, createLineQuickReply as n, resolveLineQuestionPostback as o, prepareLineReplyPayload as r, buildLineQuickReplyFallbackText as s, linePlugin as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as probeLineBot } from "./send-retry-
|
|
2
|
-
import { l as pushMessageLine, m as showLoadingAnimation } from "./send-
|
|
3
|
-
import { t as monitorLineProvider } from "./monitor-
|
|
1
|
+
import { a as probeLineBot } from "./send-retry-gHsCgBlf.mjs";
|
|
2
|
+
import { l as pushMessageLine, m as showLoadingAnimation } from "./send-B8TYfTO_.mjs";
|
|
3
|
+
import { t as monitorLineProvider } from "./monitor-BBEBldZu.mjs";
|
|
4
4
|
export { monitorLineProvider, probeLineBot, pushMessageLine, showLoadingAnimation };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./accounts-
|
|
2
|
-
import { a as parseLineQuestionPostbackData, c as resolveLineGroupConfigEntry, i as isLineQuestionPostbackData, n as createLineQuickReply, o as resolveLineQuestionPostback, r as prepareLineReplyPayload, s as buildLineQuickReplyFallbackText } from "./channel-
|
|
3
|
-
import { a as normalizeLineAllowEntry } from "./setup-surface-
|
|
4
|
-
import { t as getLineRuntime } from "./runtime-
|
|
5
|
-
import { A as resolveLineQuoteToken, D as readLineQuoteToken, E as canCarryLineQuoteToken, M as buildLineMediaMessage, O as recordLineQuoteToken, T as applyLineQuoteToken, k as reportLineQuoteCarrierMissing, n as findLineHttpError, r as resolveLineNonDispatchRetryable, t as explainLineRefusal } from "./send-retry-
|
|
6
|
-
import { a as laneKeyFor, i as eventIdFor, n as LINE_WEBHOOK_SPOOL_INVALID_PAYLOAD_MESSAGE, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./webhook-spool-contract-
|
|
7
|
-
import { a as getUserDisplayName, h as quotesLineBotMessage, i as getLineGroupName, l as pushMessageLine, m as showLoadingAnimation, n as createLocationMessage, o as getUserProfile, p as replyMessageLine, t as createFlexMessage, u as pushMessagesLine } from "./send-
|
|
8
|
-
import { n as processLineMessage, t as buildTemplateMessageFromPayload } from "./template-messages-
|
|
1
|
+
import { n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./accounts-Dm_NoU7R.mjs";
|
|
2
|
+
import { a as parseLineQuestionPostbackData, c as resolveLineGroupConfigEntry, i as isLineQuestionPostbackData, n as createLineQuickReply, o as resolveLineQuestionPostback, r as prepareLineReplyPayload, s as buildLineQuickReplyFallbackText } from "./channel-ezTshIoC.mjs";
|
|
3
|
+
import { a as normalizeLineAllowEntry } from "./setup-surface-DvbBjHFi.mjs";
|
|
4
|
+
import { t as getLineRuntime } from "./runtime-C9ldw-V4.mjs";
|
|
5
|
+
import { A as resolveLineQuoteToken, D as readLineQuoteToken, E as canCarryLineQuoteToken, M as buildLineMediaMessage, O as recordLineQuoteToken, T as applyLineQuoteToken, k as reportLineQuoteCarrierMissing, n as findLineHttpError, r as resolveLineNonDispatchRetryable, t as explainLineRefusal } from "./send-retry-gHsCgBlf.mjs";
|
|
6
|
+
import { a as laneKeyFor, i as eventIdFor, n as LINE_WEBHOOK_SPOOL_INVALID_PAYLOAD_MESSAGE, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./webhook-spool-contract-COhQK5XQ.mjs";
|
|
7
|
+
import { a as getUserDisplayName, h as quotesLineBotMessage, i as getLineGroupName, l as pushMessageLine, m as showLoadingAnimation, n as createLocationMessage, o as getUserProfile, p as replyMessageLine, t as createFlexMessage, u as pushMessagesLine } from "./send-B8TYfTO_.mjs";
|
|
8
|
+
import { n as processLineMessage, t as buildTemplateMessageFromPayload } from "./template-messages-CdpQxqqb.mjs";
|
|
9
9
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
10
10
|
import { resolveChannelGroupsConfigPath } from "openclaw/plugin-sdk/channel-policy";
|
|
11
11
|
import { normalizeOptionalString, normalizeStringEntries, readNonEmptyStringPreservingWhitespace } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -44,7 +44,7 @@ import { saveMediaStream } from "openclaw/plugin-sdk/media-store";
|
|
|
44
44
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
45
45
|
import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
46
46
|
import { safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
|
|
47
|
-
|
|
47
|
+
// extensions/line/src/auto-reply-delivery.ts
|
|
48
48
|
function toLineDeliveryError(error) {
|
|
49
49
|
return error instanceof Error ? error : new Error("LINE message send failed", { cause: error });
|
|
50
50
|
}
|
|
@@ -228,8 +228,7 @@ async function deliverLineAutoReply(params) {
|
|
|
228
228
|
visibleReplySent
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
|
-
|
|
232
|
-
//#region extensions/line/src/mentions.ts
|
|
231
|
+
// extensions/line/src/mentions.ts
|
|
233
232
|
function getLineMentionees(message) {
|
|
234
233
|
return message.type === "text" ? message.mention?.mentionees ?? [] : [];
|
|
235
234
|
}
|
|
@@ -266,8 +265,7 @@ function resolveLineMentionStrippedText(message) {
|
|
|
266
265
|
}
|
|
267
266
|
return `${stripped}${text.slice(cursor)}`.trim();
|
|
268
267
|
}
|
|
269
|
-
|
|
270
|
-
//#region extensions/line/src/bot-message-context.ts
|
|
268
|
+
// extensions/line/src/bot-message-context.ts
|
|
271
269
|
function getLineSourceInfo(source) {
|
|
272
270
|
if (!source) return {
|
|
273
271
|
userId: void 0,
|
|
@@ -643,8 +641,7 @@ async function buildLinePostbackContext(params) {
|
|
|
643
641
|
verboseLog: { kind: "postback" }
|
|
644
642
|
});
|
|
645
643
|
}
|
|
646
|
-
|
|
647
|
-
//#region extensions/line/src/download.ts
|
|
644
|
+
// extensions/line/src/download.ts
|
|
648
645
|
const CONTENT_READY_MAX_ATTEMPTS = 6;
|
|
649
646
|
const CONTENT_READY_BASE_DELAY_MS = 500;
|
|
650
647
|
const CONTENT_READY_MAX_DELAY_MS = 4e3;
|
|
@@ -748,8 +745,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10485
|
|
|
748
745
|
clearTimeout(deadline);
|
|
749
746
|
}
|
|
750
747
|
}
|
|
751
|
-
|
|
752
|
-
//#region extensions/line/src/group-history.ts
|
|
748
|
+
// extensions/line/src/group-history.ts
|
|
753
749
|
const reservedEntries = /* @__PURE__ */ new WeakSet();
|
|
754
750
|
function reserveLineGroupHistory(historyMap, historyKey, limit) {
|
|
755
751
|
if (!historyMap || !historyKey || limit <= 0) return {
|
|
@@ -783,8 +779,7 @@ function reserveLineGroupHistory(historyMap, historyKey, limit) {
|
|
|
783
779
|
}
|
|
784
780
|
};
|
|
785
781
|
}
|
|
786
|
-
|
|
787
|
-
//#region extensions/line/src/bot-handlers.ts
|
|
782
|
+
// extensions/line/src/bot-handlers.ts
|
|
788
783
|
const LINE_DOWNLOADABLE_MESSAGE_TYPES = /* @__PURE__ */ new Set([
|
|
789
784
|
"image",
|
|
790
785
|
"video",
|
|
@@ -1252,8 +1247,7 @@ async function handleLineWebhookEvents(events, context) {
|
|
|
1252
1247
|
throw toErrorObject(err, "Non-Error thrown");
|
|
1253
1248
|
}
|
|
1254
1249
|
}
|
|
1255
|
-
|
|
1256
|
-
//#region extensions/line/src/inbound-image-set.ts
|
|
1250
|
+
// extensions/line/src/inbound-image-set.ts
|
|
1257
1251
|
const IMAGE_SET_FLUSH_DELAY_MS = 4e3;
|
|
1258
1252
|
function orderedParts(pending) {
|
|
1259
1253
|
return [...pending.parts.values()].toSorted((left, right) => (left.index ?? Number.MAX_SAFE_INTEGER) - (right.index ?? Number.MAX_SAFE_INTEGER) || left.arrivedAt - right.arrivedAt);
|
|
@@ -1344,8 +1338,7 @@ function createLineImageSetIngressBuffer() {
|
|
|
1344
1338
|
isBusy: (laneKey) => laneChain.has(laneKey)
|
|
1345
1339
|
};
|
|
1346
1340
|
}
|
|
1347
|
-
|
|
1348
|
-
//#region extensions/line/src/webhook-spool.ts
|
|
1341
|
+
// extensions/line/src/webhook-spool.ts
|
|
1349
1342
|
const LINE_WEBHOOK_DRAIN_INTERVAL_MS = 500;
|
|
1350
1343
|
const LINE_WEBHOOK_MAX_CONCURRENT_DELIVERIES = 8;
|
|
1351
1344
|
const LINE_WEBHOOK_DRAIN_SCAN_LIMIT = 100;
|
|
@@ -1585,8 +1578,7 @@ function createLineWebhookSpool(options) {
|
|
|
1585
1578
|
}
|
|
1586
1579
|
};
|
|
1587
1580
|
}
|
|
1588
|
-
|
|
1589
|
-
//#region extensions/line/src/bot.ts
|
|
1581
|
+
// extensions/line/src/bot.ts
|
|
1590
1582
|
const DEFAULT_MEDIA_MAX_MB = 10;
|
|
1591
1583
|
function createLineBot(opts) {
|
|
1592
1584
|
const { runtime, config: startupConfig } = opts;
|
|
@@ -1631,8 +1623,7 @@ function createLineBot(opts) {
|
|
|
1631
1623
|
stop: spool.stop
|
|
1632
1624
|
};
|
|
1633
1625
|
}
|
|
1634
|
-
|
|
1635
|
-
//#region extensions/line/src/monitor-durable.ts
|
|
1626
|
+
// extensions/line/src/monitor-durable.ts
|
|
1636
1627
|
function resolveLineDurableReplyOptions(params) {
|
|
1637
1628
|
if (params.infoKind !== "final") return false;
|
|
1638
1629
|
if (params.replyToken && !params.replyTokenUsed) return false;
|
|
@@ -1642,14 +1633,12 @@ function resolveLineDurableReplyOptions(params) {
|
|
|
1642
1633
|
if (reply.hasMedia || !reply.hasText) return false;
|
|
1643
1634
|
return { to: params.to };
|
|
1644
1635
|
}
|
|
1645
|
-
|
|
1646
|
-
//#region extensions/line/src/signature.ts
|
|
1636
|
+
// extensions/line/src/signature.ts
|
|
1647
1637
|
function validateLineSignature(body, signature, channelSecret) {
|
|
1648
1638
|
const hash = crypto.createHmac("SHA256", channelSecret).update(body).digest("base64");
|
|
1649
1639
|
return safeEqualSecret(signature, hash);
|
|
1650
1640
|
}
|
|
1651
|
-
|
|
1652
|
-
//#region extensions/line/src/webhook-node.ts
|
|
1641
|
+
// extensions/line/src/webhook-node.ts
|
|
1653
1642
|
const LINE_WEBHOOK_PREAUTH_MAX_BODY_BYTES = 65536;
|
|
1654
1643
|
const LINE_WEBHOOK_PREAUTH_BODY_TIMEOUT_MS = 5e3;
|
|
1655
1644
|
async function readLineWebhookRequestBody(req, maxBytes, timeoutMs) {
|
|
@@ -1738,8 +1727,7 @@ function createLineNodeWebhookHandler(params) {
|
|
|
1738
1727
|
}
|
|
1739
1728
|
};
|
|
1740
1729
|
}
|
|
1741
|
-
|
|
1742
|
-
//#region extensions/line/src/webhook-utils.ts
|
|
1730
|
+
// extensions/line/src/webhook-utils.ts
|
|
1743
1731
|
/** Route the gateway serves when an account configures no `webhookPath`. */
|
|
1744
1732
|
const LINE_DEFAULT_WEBHOOK_PATH = "/line/webhook";
|
|
1745
1733
|
/** The route this account's monitor serves, which is the one an operator has to register
|
|
@@ -1752,22 +1740,9 @@ function resolveLineWebhookPath(webhookPath) {
|
|
|
1752
1740
|
defaultPath: LINE_DEFAULT_WEBHOOK_PATH
|
|
1753
1741
|
}) ?? LINE_DEFAULT_WEBHOOK_PATH;
|
|
1754
1742
|
}
|
|
1755
|
-
|
|
1756
|
-
//#region extensions/line/src/monitor.ts
|
|
1743
|
+
// extensions/line/src/monitor.ts
|
|
1757
1744
|
const lineWebhookInFlightLimiter = createWebhookInFlightLimiter();
|
|
1758
1745
|
const lineWebhookTargets = /* @__PURE__ */ new Map();
|
|
1759
|
-
function startLineLoadingKeepalive(params) {
|
|
1760
|
-
const trigger = () => {
|
|
1761
|
-
showLoadingAnimation(params.userId, {
|
|
1762
|
-
cfg: params.cfg,
|
|
1763
|
-
accountId: params.accountId,
|
|
1764
|
-
loadingSeconds: 20
|
|
1765
|
-
}).catch(() => {});
|
|
1766
|
-
};
|
|
1767
|
-
trigger();
|
|
1768
|
-
const timer = setInterval(trigger, 18e3);
|
|
1769
|
-
return () => clearInterval(timer);
|
|
1770
|
-
}
|
|
1771
1746
|
async function monitorLineProvider(opts) {
|
|
1772
1747
|
const { channelAccessToken, channelSecret, accountId, config, runtime, buildContext, abortSignal, webhookPath, statusSink } = opts;
|
|
1773
1748
|
const resolvedAccountId = accountId ?? resolveDefaultLineAccountId(config);
|
|
@@ -1783,11 +1758,17 @@ async function monitorLineProvider(opts) {
|
|
|
1783
1758
|
onMessage: async (ctx, deliveryControl) => {
|
|
1784
1759
|
const { ctxPayload, replyToken, route } = ctx;
|
|
1785
1760
|
const turnConfig = deliveryControl.cfg;
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1761
|
+
const userId = ctx.isGroup ? void 0 : ctx.userId;
|
|
1762
|
+
const replyPipeline = userId ? { typing: {
|
|
1763
|
+
start: () => showLoadingAnimation(userId, {
|
|
1764
|
+
cfg: turnConfig,
|
|
1765
|
+
accountId: ctx.accountId,
|
|
1766
|
+
loadingSeconds: 20
|
|
1767
|
+
}),
|
|
1768
|
+
keepaliveIntervalMs: 18e3,
|
|
1769
|
+
maxDurationMs: 0,
|
|
1770
|
+
onStartError: () => {}
|
|
1771
|
+
} } : {};
|
|
1791
1772
|
logVerbose(`line: received message from ${ctxPayload.SenderName ?? ctx.userId ?? ctxPayload.From} (${ctxPayload.From})`);
|
|
1792
1773
|
let replyTokenUsed = false;
|
|
1793
1774
|
let turnAdopted = false;
|
|
@@ -1833,7 +1814,7 @@ async function monitorLineProvider(opts) {
|
|
|
1833
1814
|
},
|
|
1834
1815
|
ctxPayload,
|
|
1835
1816
|
record: ctx.turn.record,
|
|
1836
|
-
replyPipeline
|
|
1817
|
+
replyPipeline,
|
|
1837
1818
|
dispatcherOptions: { humanDelay: resolveHumanDelayConfig(turnConfig, route.agentId) },
|
|
1838
1819
|
...replyOptions ? { replyOptions } : {},
|
|
1839
1820
|
delivery: {
|
|
@@ -1846,14 +1827,9 @@ async function monitorLineProvider(opts) {
|
|
|
1846
1827
|
replyTokenUsed
|
|
1847
1828
|
}),
|
|
1848
1829
|
deliver: async (payload) => {
|
|
1849
|
-
const lineData = payload.channelData?.line ?? {};
|
|
1850
|
-
if (ctx.userId && !ctx.isGroup) showLoadingAnimation(ctx.userId, {
|
|
1851
|
-
cfg: turnConfig,
|
|
1852
|
-
accountId: ctx.accountId
|
|
1853
|
-
}).catch(() => {});
|
|
1854
1830
|
const deliveryResult = await deliverLineAutoReply({
|
|
1855
1831
|
payload,
|
|
1856
|
-
lineData,
|
|
1832
|
+
lineData: payload.channelData?.line ?? {},
|
|
1857
1833
|
to: ctxPayload.From,
|
|
1858
1834
|
replyToken,
|
|
1859
1835
|
replyTokenUsed,
|
|
@@ -1881,8 +1857,6 @@ async function monitorLineProvider(opts) {
|
|
|
1881
1857
|
runtime.error?.(danger(`line: auto-reply failed: ${String(err)}`));
|
|
1882
1858
|
if (turnAdopted || replyTokenUsed) throw new LineWebhookTerminalDeliveryError("LINE delivery failed after consuming the event reply token.", { cause: err });
|
|
1883
1859
|
throw err;
|
|
1884
|
-
} finally {
|
|
1885
|
-
stopLoading?.();
|
|
1886
1860
|
}
|
|
1887
1861
|
}
|
|
1888
1862
|
});
|
|
@@ -1962,5 +1936,4 @@ async function monitorLineProvider(opts) {
|
|
|
1962
1936
|
}
|
|
1963
1937
|
};
|
|
1964
1938
|
}
|
|
1965
|
-
//#endregion
|
|
1966
1939
|
export { monitorLineProvider as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as monitorLineProvider } from "./monitor-BBEBldZu.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as pushLocationMessage, d as pushTemplateMessage, f as pushTextMessageWithQuickReplies, l as pushMessageLine, n as createLocationMessage, r as createQuickReplyItems, s as pushFlexMessage, t as createFlexMessage, u as pushMessagesLine } from "./send-
|
|
2
|
-
import { n as processLineMessage, t as buildTemplateMessageFromPayload } from "./template-messages-
|
|
1
|
+
import { c as pushLocationMessage, d as pushTemplateMessage, f as pushTextMessageWithQuickReplies, l as pushMessageLine, n as createLocationMessage, r as createQuickReplyItems, s as pushFlexMessage, t as createFlexMessage, u as pushMessagesLine } from "./send-B8TYfTO_.mjs";
|
|
2
|
+
import { n as processLineMessage, t as buildTemplateMessageFromPayload } from "./template-messages-CdpQxqqb.mjs";
|
|
3
3
|
export { buildTemplateMessageFromPayload, createFlexMessage, createLocationMessage, createQuickReplyItems, processLineMessage, pushFlexMessage, pushLocationMessage, pushMessageLine, pushMessagesLine, pushTemplateMessage, pushTextMessageWithQuickReplies };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as probeLineBot } from "./send-retry-gHsCgBlf.mjs";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/line/src/runtime.ts
|
|
3
3
|
const { setRuntime: setLineRuntime, getRuntime: getLineRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "line",
|
|
5
5
|
errorMessage: "LINE runtime not initialized - plugin not registered"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { setLineRuntime as n, getLineRuntime as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as resolveLineAccount } from "./accounts-
|
|
2
|
-
import { M as buildLineMediaMessage, T as applyLineQuoteToken, i as runLinePushWithRetries, j as withoutLineQuoteTokens, n as findLineHttpError, o as resolveLineChannelAccessToken, v as messageAction, y as normalizeLineMessage } from "./send-retry-
|
|
1
|
+
import { r as resolveLineAccount } from "./accounts-Dm_NoU7R.mjs";
|
|
2
|
+
import { M as buildLineMediaMessage, T as applyLineQuoteToken, i as runLinePushWithRetries, j as withoutLineQuoteTokens, n as findLineHttpError, o as resolveLineChannelAccessToken, v as messageAction, y as normalizeLineMessage } from "./send-retry-gHsCgBlf.mjs";
|
|
3
3
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
4
|
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
5
5
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
@@ -15,7 +15,7 @@ import { captureEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
|
15
15
|
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
16
16
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
17
17
|
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
18
|
-
|
|
18
|
+
// extensions/line/src/outbound-message-log.ts
|
|
19
19
|
const RECENT_SENT_LIMIT = 500;
|
|
20
20
|
const recentSentByAccount = /* @__PURE__ */ new Map();
|
|
21
21
|
function recentSentFor(accountId) {
|
|
@@ -36,8 +36,7 @@ function recordLineSentMessages(accountId, messageIds) {
|
|
|
36
36
|
function quotesLineBotMessage(accountId, quotedMessageId) {
|
|
37
37
|
return recentSentByAccount.get(accountId)?.peek(quotedMessageId) ?? false;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
//#region extensions/line/src/send-receipt.ts
|
|
39
|
+
// extensions/line/src/send-receipt.ts
|
|
41
40
|
function createLineSendReceipt(params) {
|
|
42
41
|
const messageIds = (params.messageIds ?? [params.messageId]).map((messageId) => messageId.trim()).filter(Boolean);
|
|
43
42
|
const chatId = params.chatId.trim();
|
|
@@ -53,8 +52,7 @@ function createLineSendReceipt(params) {
|
|
|
53
52
|
kind: params.kind ?? "unknown"
|
|
54
53
|
});
|
|
55
54
|
}
|
|
56
|
-
|
|
57
|
-
//#region extensions/line/src/send.ts
|
|
55
|
+
// extensions/line/src/send.ts
|
|
58
56
|
const profileCache = {
|
|
59
57
|
values: /* @__PURE__ */ new Map(),
|
|
60
58
|
pending: /* @__PURE__ */ new Map()
|
|
@@ -400,5 +398,4 @@ async function getLineGroupName(groupId, opts) {
|
|
|
400
398
|
return;
|
|
401
399
|
}
|
|
402
400
|
}
|
|
403
|
-
//#endregion
|
|
404
401
|
export { getUserDisplayName as a, pushLocationMessage as c, pushTemplateMessage as d, pushTextMessageWithQuickReplies as f, quotesLineBotMessage as h, getLineGroupName as i, pushMessageLine as l, showLoadingAnimation as m, createLocationMessage as n, getUserProfile as o, replyMessageLine as p, createQuickReplyItems as r, pushFlexMessage as s, createFlexMessage as t, pushMessagesLine as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./accounts-
|
|
1
|
+
import { n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./accounts-Dm_NoU7R.mjs";
|
|
2
2
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -11,7 +11,7 @@ import { HTTPFetchError } from "@line/bot-sdk";
|
|
|
11
11
|
import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner } from "openclaw/plugin-sdk/retry-runtime";
|
|
12
12
|
import { assertOkOrThrowHttpError, createProviderOperationDeadline, createProviderOperationTimeoutResolver, fetchWithTimeout, readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
13
13
|
import { fetchWithRuntimeDispatcherOrMockedGlobal } from "openclaw/plugin-sdk/runtime-fetch";
|
|
14
|
-
|
|
14
|
+
// extensions/line/src/messaging-target.ts
|
|
15
15
|
function normalizeLineMessagingTarget(target) {
|
|
16
16
|
const trimmed = target.trim();
|
|
17
17
|
if (!trimmed) return;
|
|
@@ -23,13 +23,11 @@ function inferLineTargetChatType(target) {
|
|
|
23
23
|
if (/^U[a-f0-9]{32}$/i.test(normalized)) return "direct";
|
|
24
24
|
return /^[CR][a-f0-9]{32}$/i.test(normalized) ? "group" : void 0;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
//#region extensions/line/src/media-url.ts
|
|
26
|
+
// extensions/line/src/media-url.ts
|
|
28
27
|
function isHttpsUrl(value) {
|
|
29
28
|
return typeof value === "string" && URL.parse(value)?.protocol === "https:";
|
|
30
29
|
}
|
|
31
|
-
|
|
32
|
-
//#region extensions/line/src/outbound-media.ts
|
|
30
|
+
// extensions/line/src/outbound-media.ts
|
|
33
31
|
const LINE_OUTBOUND_MEDIA_SSRF_POLICY = { allowPrivateNetwork: false };
|
|
34
32
|
async function validateLineMediaUrl(url) {
|
|
35
33
|
const parsed = URL.parse(url);
|
|
@@ -112,8 +110,7 @@ async function buildLineMediaMessage(mediaUrl, opts, target) {
|
|
|
112
110
|
};
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
//#region extensions/line/src/quote-tokens.ts
|
|
113
|
+
// extensions/line/src/quote-tokens.ts
|
|
117
114
|
const QUOTE_TOKEN_LIMIT = 500;
|
|
118
115
|
const quoteTokensByAccount = /* @__PURE__ */ new Map();
|
|
119
116
|
function quoteTokenKey(chatId, messageId) {
|
|
@@ -186,8 +183,7 @@ function withoutLineQuoteTokens(messages) {
|
|
|
186
183
|
quoteToken: void 0
|
|
187
184
|
} : message);
|
|
188
185
|
}
|
|
189
|
-
|
|
190
|
-
//#region extensions/line/src/flex-templates/message.ts
|
|
186
|
+
// extensions/line/src/flex-templates/message.ts
|
|
191
187
|
const LINE_FLEX_BUBBLE_MAX_BYTES = 3e4;
|
|
192
188
|
const LINE_FLEX_CAROUSEL_MAX_BYTES = 5e4;
|
|
193
189
|
function fitsLineFlexBubble(bubble) {
|
|
@@ -200,8 +196,7 @@ function toFlexMessage(altText, contents) {
|
|
|
200
196
|
contents
|
|
201
197
|
};
|
|
202
198
|
}
|
|
203
|
-
|
|
204
|
-
//#region extensions/line/src/actions.ts
|
|
199
|
+
// extensions/line/src/actions.ts
|
|
205
200
|
const LINE_ACTION_LABEL_LIMIT = 20;
|
|
206
201
|
const LINE_ACTION_DATA_LIMIT = 300;
|
|
207
202
|
const LINE_ACTION_URI_LIMIT = 1e3;
|
|
@@ -513,8 +508,7 @@ function postbackAction(label, data, displayText) {
|
|
|
513
508
|
displayText
|
|
514
509
|
});
|
|
515
510
|
}
|
|
516
|
-
|
|
517
|
-
//#region extensions/line/src/flex-templates/common.ts
|
|
511
|
+
// extensions/line/src/flex-templates/common.ts
|
|
518
512
|
function cardText(text, style) {
|
|
519
513
|
return {
|
|
520
514
|
type: "text",
|
|
@@ -575,8 +569,7 @@ function createCardBubble(bodyContents, footer) {
|
|
|
575
569
|
});
|
|
576
570
|
return bubble;
|
|
577
571
|
}
|
|
578
|
-
|
|
579
|
-
//#region extensions/line/src/flex-templates/basic-cards.ts
|
|
572
|
+
// extensions/line/src/flex-templates/basic-cards.ts
|
|
580
573
|
function createInfoCard(title, body, footer) {
|
|
581
574
|
return createCardBubble([cardBox("horizontal", [cardBox("vertical", [], {
|
|
582
575
|
width: "4px",
|
|
@@ -669,8 +662,7 @@ function createActionCard(title, body, actions, options) {
|
|
|
669
662
|
};
|
|
670
663
|
return bubble;
|
|
671
664
|
}
|
|
672
|
-
|
|
673
|
-
//#region extensions/line/src/flex-templates/schedule-cards.ts
|
|
665
|
+
// extensions/line/src/flex-templates/schedule-cards.ts
|
|
674
666
|
function buildTitleSubtitleHeader(params) {
|
|
675
667
|
const { title, subtitle } = params;
|
|
676
668
|
const headerContents = [createCardTitle(title)];
|
|
@@ -846,15 +838,13 @@ function createAgendaCard(params) {
|
|
|
846
838
|
});
|
|
847
839
|
return createCardBubble([...buildCardHeaderSections(headerContents), cardBox("vertical", eventItems, { paddingTop: "xl" })], footer);
|
|
848
840
|
}
|
|
849
|
-
|
|
850
|
-
//#region extensions/line/src/channel-access-token.ts
|
|
841
|
+
// extensions/line/src/channel-access-token.ts
|
|
851
842
|
function resolveLineChannelAccessToken(explicit, params) {
|
|
852
843
|
if (explicit?.trim()) return explicit.trim();
|
|
853
844
|
if (!params.channelAccessToken) throw new Error(params.tokenStatus === "configured_unavailable" ? `LINE channel access token is configured but unavailable for account "${params.accountId}" (check the configured tokenFile).` : `LINE channel access token missing for account "${params.accountId}" (set channels.line.channelAccessToken or LINE_CHANNEL_ACCESS_TOKEN).`);
|
|
854
845
|
return params.channelAccessToken.trim();
|
|
855
846
|
}
|
|
856
|
-
|
|
857
|
-
//#region extensions/line/src/probe.ts
|
|
847
|
+
// extensions/line/src/probe.ts
|
|
858
848
|
const LINE_QUOTA_TIMEOUT_MS = 2e3;
|
|
859
849
|
const LINE_JSON_MAX_BYTES = 16384;
|
|
860
850
|
function createLineApiReader(channelAccessToken, timeoutMs) {
|
|
@@ -942,8 +932,7 @@ async function probeLineBot(channelAccessToken, timeoutMs = 5e3) {
|
|
|
942
932
|
error: formatErrorMessage(error)
|
|
943
933
|
}));
|
|
944
934
|
}
|
|
945
|
-
|
|
946
|
-
//#region extensions/line/src/send-retry.ts
|
|
935
|
+
// extensions/line/src/send-retry.ts
|
|
947
936
|
/** The LINE HTTP response carried by an error graph, when the request reached LINE. */
|
|
948
937
|
function findLineHttpError(error) {
|
|
949
938
|
return collectErrorGraphCandidates(error, (candidate) => [candidate.cause, candidate.error]).find((candidate) => candidate instanceof HTTPFetchError);
|
|
@@ -1004,5 +993,4 @@ async function explainLineRefusal(params) {
|
|
|
1004
993
|
reason: exhausted ? `LINE refused the push: ${quota.used}/${quota.limit} monthly messages used. Check the account allowance or plan before retrying.` : params.error instanceof Error ? params.error.message : "LINE rejected the message"
|
|
1005
994
|
};
|
|
1006
995
|
}
|
|
1007
|
-
//#endregion
|
|
1008
996
|
export { resolveLineQuoteToken as A, fitsLineFlexBubble as C, readLineQuoteToken as D, canCarryLineQuoteToken as E, buildLineMediaMessage as M, inferLineTargetChatType as N, recordLineQuoteToken as O, normalizeLineMessagingTarget as P, uriAction as S, applyLineQuoteToken as T, createCardTitle as _, probeLineBot as a, postbackAction as b, createEventCard as c, createImageCard as d, createInfoCard as f, createCardBubble as g, cardText as h, runLinePushWithRetries as i, withoutLineQuoteTokens as j, reportLineQuoteCarrierMissing as k, createReceiptCard as l, cardBox as m, findLineHttpError as n, resolveLineChannelAccessToken as o, createListCard as p, resolveLineNonDispatchRetryable as r, createAgendaCard as s, explainLineRefusal as t, createActionCard as u, messageAction as v, toFlexMessage as w, truncateLineActionLabel as x, normalizeLineMessage as y };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { n as resolveDefaultLineAccountId, r as resolveLineAccount, t as listLineAccountIds } from "./accounts-
|
|
1
|
+
import { n as resolveDefaultLineAccountId, r as resolveLineAccount, t as listLineAccountIds } from "./accounts-Dm_NoU7R.mjs";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
5
5
|
import { createAllowFromSection, createPromptParsedAllowFromForAccount, createSetupInputPresenceValidator, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, parseSetupEntriesWithParser, patchScopedAccountConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
6
6
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
7
|
-
|
|
7
|
+
// extensions/line/src/bot-access.ts
|
|
8
8
|
function normalizeLineAllowEntry(value) {
|
|
9
9
|
return String(value).trim().replace(/^line:(?:user:)?/i, "");
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
//#region extensions/line/src/account-helpers.ts
|
|
11
|
+
// extensions/line/src/account-helpers.ts
|
|
13
12
|
function hasLineCredentials(account) {
|
|
14
13
|
if (account.tokenStatus && account.signingSecretStatus) return account.tokenStatus !== "missing" && account.signingSecretStatus !== "missing";
|
|
15
14
|
return Boolean(account.channelAccessToken?.trim() && account.channelSecret?.trim());
|
|
@@ -19,8 +18,7 @@ function parseLineAllowFromId(raw) {
|
|
|
19
18
|
if (!/^U[a-f0-9]{32}$/i.test(trimmed)) return null;
|
|
20
19
|
return trimmed;
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
//#region extensions/line/src/setup-core.ts
|
|
21
|
+
// extensions/line/src/setup-core.ts
|
|
24
22
|
function patchLineAccountConfig(params) {
|
|
25
23
|
return patchScopedAccountConfig({
|
|
26
24
|
cfg: params.cfg,
|
|
@@ -163,8 +161,7 @@ const lineSetupContract = defineChannelSetupContract({
|
|
|
163
161
|
},
|
|
164
162
|
legacyAdapter: lineSetupAdapter
|
|
165
163
|
});
|
|
166
|
-
|
|
167
|
-
//#region extensions/line/src/setup-surface.ts
|
|
164
|
+
// extensions/line/src/setup-surface.ts
|
|
168
165
|
const t = createSetupTranslator();
|
|
169
166
|
const channel = "line";
|
|
170
167
|
const LINE_SETUP_HELP_LINES = [
|
|
@@ -326,5 +323,4 @@ const lineSetupWizard = {
|
|
|
326
323
|
},
|
|
327
324
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
328
325
|
};
|
|
329
|
-
//#endregion
|
|
330
326
|
export { normalizeLineAllowEntry as a, hasLineCredentials as i, lineSetupAdapter as n, lineSetupContract as r, lineSetupWizard as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as fitsLineFlexBubble, S as uriAction, b as postbackAction, h as cardText, l as createReceiptCard, m as cardBox, v as messageAction, w as toFlexMessage } from "./send-retry-
|
|
1
|
+
import { C as fitsLineFlexBubble, S as uriAction, b as postbackAction, h as cardText, l as createReceiptCard, m as cardBox, v as messageAction, w as toFlexMessage } from "./send-retry-gHsCgBlf.mjs";
|
|
2
2
|
import { markdownToIRWithMeta, stripMarkdown } from "openclaw/plugin-sdk/text-chunking";
|
|
3
3
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/line/src/markdown-to-line.ts
|
|
5
5
|
const LINE_MARKDOWN_OPTIONS = {
|
|
6
6
|
assistantTranscriptRoleHeaders: true,
|
|
7
7
|
autolink: false,
|
|
@@ -303,8 +303,7 @@ function processLineMessage(text) {
|
|
|
303
303
|
projectPlainText(ir, codeSpans, plainTextInsertions, (segment) => segments.push(segment));
|
|
304
304
|
return segments;
|
|
305
305
|
}
|
|
306
|
-
|
|
307
|
-
//#region packages/normalization-core/src/utf16-slice.ts
|
|
306
|
+
// packages/normalization-core/src/utf16-slice.ts
|
|
308
307
|
function isHighSurrogate(codeUnit) {
|
|
309
308
|
return codeUnit >= 55296 && codeUnit <= 56319;
|
|
310
309
|
}
|
|
@@ -317,8 +316,7 @@ function avoidTrailingHighSurrogateBreak(text, start, end) {
|
|
|
317
316
|
const adjusted = end - 1;
|
|
318
317
|
return adjusted > start ? adjusted : end + 1;
|
|
319
318
|
}
|
|
320
|
-
|
|
321
|
-
//#region packages/normalization-core/src/grapheme.ts
|
|
319
|
+
// packages/normalization-core/src/grapheme.ts
|
|
322
320
|
let graphemeSegmenter;
|
|
323
321
|
function getGraphemeSegmenter() {
|
|
324
322
|
graphemeSegmenter ??= new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -342,8 +340,7 @@ function findGraphemeChunkEnd(text, start, maxEnd, preferredEnd = maxEnd, allowP
|
|
|
342
340
|
if (end <= start && preferred < hardEnd) end = hardEnd === text.length ? hardEnd : segments.containing(hardEnd)?.index ?? hardEnd;
|
|
343
341
|
return end > start ? end : allowPartial ? avoidTrailingHighSurrogateBreak(text, start, hardEnd) : start;
|
|
344
342
|
}
|
|
345
|
-
|
|
346
|
-
//#region extensions/line/src/template-messages.ts
|
|
343
|
+
// extensions/line/src/template-messages.ts
|
|
347
344
|
const COMPACT_TEMPLATE_TEXT_LIMIT = 60;
|
|
348
345
|
const TEMPLATE_ALT_TEXT_LIMIT = 1500;
|
|
349
346
|
function buildTemplatePayloadAction(action) {
|
|
@@ -434,5 +431,4 @@ function buildTemplateMessageFromPayload(payload) {
|
|
|
434
431
|
default: return null;
|
|
435
432
|
}
|
|
436
433
|
}
|
|
437
|
-
//#endregion
|
|
438
434
|
export { processLineMessage as n, buildTemplateMessageFromPayload as t };
|
package/dist/.setup/{webhook-spool-contract-msjTl60Q.mjs → webhook-spool-contract-COhQK5XQ.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord, normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/line/src/webhook-spool-contract.ts
|
|
3
3
|
/** Message the canonical decoder attaches when it rejects a spool payload. The
|
|
4
4
|
* upgrade migration matches this signature to recover rows the pre-fix decoder
|
|
5
5
|
* dead-lettered; the identity fence writes a different message on purpose. */
|
|
@@ -52,5 +52,4 @@ function laneKeyFor(event, eventId) {
|
|
|
52
52
|
}
|
|
53
53
|
return eventId;
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { laneKeyFor as a, eventIdFor as i, LINE_WEBHOOK_SPOOL_INVALID_PAYLOAD_MESSAGE as n, legacyEventIdFor as o, LineWebhookPayloadError as r, LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/line/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/line/channel-plugin-api.ts"},{"output":"contract-api.js","source":"extensions/line/contract-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/line/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/line/index.ts"},{"output":"runtime-api.js","source":"extensions/line/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/line/secret-contract-api.ts"},{"output":"setup-api.js","source":"extensions/line/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/line/setup-entry.ts"}],"chunks":[{"output":".setup/accounts-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/line/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/line/channel-plugin-api.ts"},{"output":"contract-api.js","source":"extensions/line/contract-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/line/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/line/index.ts"},{"output":"runtime-api.js","source":"extensions/line/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/line/secret-contract-api.ts"},{"output":"setup-api.js","source":"extensions/line/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/line/setup-entry.ts"}],"chunks":[{"output":".setup/accounts-Dm_NoU7R.mjs","sha256":"fbb3c981ee38eddff00d1f154e26a072649d43bb8648fad0e9318725f3c28b97","facadeSource":null,"sources":["extensions/line/src/accounts.ts"]},{"output":".setup/api-Bz8QPCGD.mjs","sha256":"7ad61a6b9f91f0610b86ce6ef3e304f84e75daf826c855fc84bcd22264051101","facadeSource":null,"sources":["extensions/line/src/channel.setup.ts"]},{"output":".setup/api-EJnP_1cJ.mjs","sha256":"819f65d462c012a7689f4b516734b5c76b20282be415e3d438ca709f3d8efd84","facadeSource":"extensions/line/api.ts","sources":[]},{"output":".setup/card-command-XYkg1XvG.mjs","sha256":"2a8c27498899c9ebc50a7958b422eb10da3f4877980dc5c43346efd6a97a66f0","facadeSource":"extensions/line/src/card-command.ts","sources":["extensions/line/src/card-command.ts"]},{"output":".setup/channel-ezTshIoC.mjs","sha256":"cceaca8a8d3a1b95fb4180b825ca8820f0e0088dbca4d71a785f24923ca61630","facadeSource":null,"sources":["extensions/line/src/bindings.ts","extensions/line/src/channel-shared.ts","extensions/line/src/channel.ts","extensions/line/src/config-adapter.ts","extensions/line/src/config-schema.ts","extensions/line/src/doctor.ts","extensions/line/src/flex-templates/media-control-cards.ts","extensions/line/src/gateway.ts","extensions/line/src/group-keys.ts","extensions/line/src/group-policy.ts","extensions/line/src/outbound.ts","extensions/line/src/question-postback.ts","extensions/line/src/quick-reply-fallback.ts","extensions/line/src/rich-message-schema.ts","extensions/line/src/rich-messages.ts","extensions/line/src/status.ts"]},{"output":".setup/channel.runtime-4w8EffJb.mjs","sha256":"70a51b2c757d30907ad7d69122f9baf24dbde07fdd89754b7b8950cce8e5adfc","facadeSource":"extensions/line/src/channel.runtime.ts","sources":[]},{"output":".setup/monitor-BBEBldZu.mjs","sha256":"a574c685ca9513184eb5c09f6965bf6b496c4677b78cae565206221ad2eb1918","facadeSource":null,"sources":["extensions/line/src/auto-reply-delivery.ts","extensions/line/src/bot-handlers.ts","extensions/line/src/bot-message-context.ts","extensions/line/src/bot.ts","extensions/line/src/download.ts","extensions/line/src/group-history.ts","extensions/line/src/inbound-image-set.ts","extensions/line/src/mentions.ts","extensions/line/src/monitor-durable.ts","extensions/line/src/monitor.ts","extensions/line/src/signature.ts","extensions/line/src/webhook-node.ts","extensions/line/src/webhook-spool.ts","extensions/line/src/webhook-utils.ts"]},{"output":".setup/monitor.runtime-BWIgUqzC.mjs","sha256":"6cea535525c8c47a4be4b18f8e809a7a9c163d73b5178a124c3fe558aec75777","facadeSource":"extensions/line/src/monitor.runtime.ts","sources":[]},{"output":".setup/outbound.runtime-BSuF2lax.mjs","sha256":"6fea9ad32f374e0eecc97e6ca72d80b5530c24e97a885da52ef56d16956653a3","facadeSource":"extensions/line/src/outbound.runtime.ts","sources":[]},{"output":".setup/probe.runtime-a-fC57xd.mjs","sha256":"c05a3f5d17d6f7e68abc5f5015ad60ae5a254ac460be3d355d2e2635665df1c8","facadeSource":"extensions/line/src/probe.runtime.ts","sources":[]},{"output":".setup/runtime-C9ldw-V4.mjs","sha256":"ac1144683eff8dc37f71e7b26f00dd5f692e4c35b6ac4a14d11ba81603dc0414","facadeSource":null,"sources":["extensions/line/src/runtime.ts"]},{"output":".setup/send-B8TYfTO_.mjs","sha256":"4d48dfc005c90f50dd694a5f67a15fcc9520cf413cda455ed3a2ef63cc91dbb4","facadeSource":null,"sources":["extensions/line/src/outbound-message-log.ts","extensions/line/src/send-receipt.ts","extensions/line/src/send.ts"]},{"output":".setup/send-retry-gHsCgBlf.mjs","sha256":"55869880e8b8124dbb0334ac33482a540680228af3f8e07133768b1e230dcc90","facadeSource":null,"sources":["extensions/line/src/actions.ts","extensions/line/src/channel-access-token.ts","extensions/line/src/flex-templates/basic-cards.ts","extensions/line/src/flex-templates/common.ts","extensions/line/src/flex-templates/message.ts","extensions/line/src/flex-templates/schedule-cards.ts","extensions/line/src/media-url.ts","extensions/line/src/messaging-target.ts","extensions/line/src/outbound-media.ts","extensions/line/src/probe.ts","extensions/line/src/quote-tokens.ts","extensions/line/src/send-retry.ts"]},{"output":".setup/setup-surface-DvbBjHFi.mjs","sha256":"9d8e2bdd72c9e37a53b10784ca83e0257e8ce7da2f40f8fb279132babf872430","facadeSource":null,"sources":["extensions/line/src/account-helpers.ts","extensions/line/src/bot-access.ts","extensions/line/src/setup-core.ts","extensions/line/src/setup-surface.ts"]},{"output":".setup/template-messages-CdpQxqqb.mjs","sha256":"5013ce983e996590d5139e8af0a1d0ab67cb6e05f91e6222a4abdc951270da1a","facadeSource":null,"sources":["extensions/line/src/markdown-to-line.ts","extensions/line/src/template-messages.ts","packages/normalization-core/src/grapheme.ts","packages/normalization-core/src/utf16-slice.ts"]},{"output":".setup/webhook-spool-contract-COhQK5XQ.mjs","sha256":"c5980d6b5431bd7ffab5f3c3351ac3aa3c7d477f1aec4244e1f3d8b01d704743","facadeSource":null,"sources":["extensions/line/src/webhook-spool-contract.ts"]},{"output":"api.js","sha256":"a4dc3180e42747929caf43becba07519803071bb5daa72808f53f5d62e1ec88d","facadeSource":"extensions/line/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"22762b9ef623f041c64267484707a3c566e6203c40af8c28f23cc7e33fcf8c0b","facadeSource":"extensions/line/channel-plugin-api.ts","sources":[]},{"output":"contract-api.js","sha256":"88215026ff1655afd96c12893f7d2efdbcfacd9b21c5029e1653de305c208773","facadeSource":"extensions/line/contract-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"b2a81a30a6916fb455359235cda708e562012af8b9bb052414ac7f132f888894","facadeSource":"extensions/line/doctor-contract-api.ts","sources":["extensions/line/doctor-contract-api.ts","extensions/line/src/webhook-spool-migration.ts"]},{"output":"index.js","sha256":"7bde3bfdb3c7961eff5ddfefbb82f35d1f1a84509b37f933022c760b579284c9","facadeSource":"extensions/line/index.ts","sources":["extensions/line/index.ts"]},{"output":"runtime-api.js","sha256":"e37fbce0148c490628ce5edc25492212c1a2d3a7c3f084353a5ee49972159886","facadeSource":"extensions/line/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"4824eb0315431709e20d35bb056c00eae3498212e57bda4dd9cdbb24f3db07c4","facadeSource":"extensions/line/secret-contract-api.ts","sources":["extensions/line/secret-contract-api.ts"]},{"output":"setup-api.js","sha256":"730732424bb98bbceaca6d6e982a03e799f30200b1413fc0bd82aef62865b256","facadeSource":"extensions/line/setup-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"4c6552ee9c8ab50c637103f21110ca61218de9b8150d84666faf25ae08aed076","facadeSource":"extensions/line/setup-entry.ts","sources":["extensions/line/setup-entry.ts"]}],"unrenderedSources":["extensions/line/api.ts","extensions/line/channel-plugin-api.ts","extensions/line/contract-api.ts","extensions/line/runtime-api.ts","extensions/line/setup-api.ts","extensions/line/src/channel.runtime.ts","extensions/line/src/monitor.runtime.ts","extensions/line/src/outbound.runtime.ts","extensions/line/src/probe.runtime.ts","src/plugin-sdk/text-grapheme.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as linePlugin } from "./.setup/channel-
|
|
2
|
-
import { t as lineSetupPlugin } from "./.setup/api-
|
|
1
|
+
import { t as linePlugin } from "./.setup/channel-ezTshIoC.mjs";
|
|
2
|
+
import { t as lineSetupPlugin } from "./.setup/api-Bz8QPCGD.mjs";
|
|
3
3
|
export { linePlugin, lineSetupPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as linePlugin } from "./.setup/channel-
|
|
1
|
+
export { t as linePlugin } from "./.setup/channel-ezTshIoC.mjs";
|
package/dist/contract-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as listLineAccountIds, n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./.setup/accounts-
|
|
1
|
+
export { t as listLineAccountIds, n as resolveDefaultLineAccountId, r as resolveLineAccount } from "./.setup/accounts-Dm_NoU7R.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as laneKeyFor, i as eventIdFor, o as legacyEventIdFor, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./.setup/webhook-spool-contract-
|
|
1
|
+
import { a as laneKeyFor, i as eventIdFor, o as legacyEventIdFor, r as LineWebhookPayloadError, t as LINE_WEBHOOK_SPOOL_INVALID_EVENT_REASON } from "./.setup/webhook-spool-contract-COhQK5XQ.mjs";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/line/src/webhook-spool-migration.ts
|
|
5
5
|
/** Pre-drain (#109655) rows stored the event object under `event` instead of the
|
|
6
6
|
* canonical serialized `rawEvent`; anything else is not a migratable row. */
|
|
7
7
|
function parseLegacySpoolPayload(payload) {
|
|
@@ -90,8 +90,7 @@ async function migrateLineLegacySpoolRows(queue) {
|
|
|
90
90
|
}
|
|
91
91
|
return result;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
//#region extensions/line/doctor-contract-api.ts
|
|
93
|
+
// extensions/line/doctor-contract-api.ts
|
|
95
94
|
const LINE_CHANNEL_ID = "line";
|
|
96
95
|
/** Pre-drain rows can outlive the account config that admitted them, so the sweep
|
|
97
96
|
* enumerates accounts from the host's queue lane instead of the config; a host
|
|
@@ -138,5 +137,4 @@ const stateMigrations = [{
|
|
|
138
137
|
};
|
|
139
138
|
}
|
|
140
139
|
}];
|
|
141
|
-
//#endregion
|
|
142
140
|
export { stateMigrations };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
// extensions/line/index.ts
|
|
3
3
|
var line_default = defineBundledChannelEntry({
|
|
4
4
|
id: "line",
|
|
5
5
|
name: "LINE",
|
|
@@ -21,11 +21,10 @@ var line_default = defineBundledChannelEntry({
|
|
|
21
21
|
acceptsArgs: true,
|
|
22
22
|
requireAuth: false,
|
|
23
23
|
async handler(ctx) {
|
|
24
|
-
const { handleLineCardCommand } = await import("./.setup/card-command-
|
|
24
|
+
const { handleLineCardCommand } = await import("./.setup/card-command-XYkg1XvG.mjs");
|
|
25
25
|
return await handleLineCardCommand(ctx.args);
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
//#endregion
|
|
31
30
|
export { line_default as default };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as setLineRuntime } from "./.setup/runtime-
|
|
1
|
+
export { n as setLineRuntime } from "./.setup/runtime-C9ldw-V4.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/line/secret-contract-api.ts
|
|
2
2
|
const secretTargetRegistryEntries = [];
|
|
3
3
|
function collectRuntimeConfigAssignments() {}
|
|
4
|
-
//#endregion
|
|
5
4
|
export { collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
package/dist/setup-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as lineSetupAdapter, t as lineSetupWizard } from "./.setup/setup-surface-
|
|
1
|
+
export { n as lineSetupAdapter, t as lineSetupWizard } from "./.setup/setup-surface-DvbBjHFi.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
// extensions/line/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/api-EJnP_1cJ.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "lineSetupPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { setup_entry_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/line",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
4
4
|
"description": "OpenClaw LINE channel plugin for LINE Bot API chats.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"zod": "4.6.5"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.10.10
|
|
16
|
+
"openclaw": ">=2026.10.10"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
"minHostVersion": ">=2026.4.10"
|
|
123
123
|
},
|
|
124
124
|
"compat": {
|
|
125
|
-
"pluginApi": ">=2026.10.10
|
|
125
|
+
"pluginApi": ">=2026.10.10"
|
|
126
126
|
},
|
|
127
127
|
"build": {
|
|
128
|
-
"openclawVersion": "2026.10.10
|
|
128
|
+
"openclawVersion": "2026.10.10"
|
|
129
129
|
},
|
|
130
130
|
"release": {
|
|
131
131
|
"publishToClawHub": true,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as monitorLineProvider } from "./monitor-2NNRm8hi.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { a as probeLineBot } from "./send-retry-Dzbkz5wG.mjs";
|