@openclaw/line 2026.8.1-beta.3 → 2026.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-helpers-BSUyZwLm.js +12 -0
- package/dist/api.js +2 -2
- package/dist/{card-command-CyDSm-OU.js → card-command-BywtX77U.js} +66 -29
- package/dist/{channel-DmoKZXmG.js → channel-DpMgRaxl.js} +52 -349
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel.runtime-Bty5U_1N.js +4 -0
- package/dist/doctor-contract-api.js +141 -0
- package/dist/index.js +1 -1
- package/dist/{markdown-to-line-rEaras_0.js → markdown-to-line-CG9Jy22s.js} +29 -25
- package/dist/{monitor-BYXS_B6r.js → monitor-Ch6TIatG.js} +261 -166
- package/dist/monitor.runtime-Czc3NxNV.js +2 -0
- package/dist/outbound.runtime-CyleVzFR.js +3 -0
- package/dist/probe.runtime-DTxBWvKz.js +2 -0
- package/dist/rich-messages-t_zRL24p.js +760 -0
- package/dist/runtime-api.js +10 -11
- package/dist/{send-BJCeiiOB.js → send-B-K2B6au.js} +138 -104
- package/dist/{send-receipt-DKZzgHMO.js → send-retry-CUvrarfE.js} +137 -413
- package/dist/setup-api.js +1 -1
- package/dist/{setup-surface-W0Dbgu58.js → setup-surface-DSJ92oJ5.js} +24 -17
- package/dist/webhook-spool-contract-CNe2h1I2.js +58 -0
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/openclaw.plugin.json +26 -2
- package/package.json +6 -6
- package/dist/channel.runtime-qrUV6wPE.js +0 -4
- package/dist/config-schema-Be3azjB_.js +0 -47
- package/dist/monitor.runtime-B2z_5ugU.js +0 -2
- package/dist/outbound.runtime-DDTeqaBW.js +0 -3
- package/dist/probe.runtime-D13ZtXsd.js +0 -2
- package/dist/quick-reply-fallback-D86FwAfr.js +0 -56
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
- package/dist/{probe-CM03wo6r.js → probe-4gc_YQ2L.js} +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
|
4
4
|
function createLineCardCommandLoader(api) {
|
|
5
5
|
return createLazyRuntimeModule(async () => {
|
|
6
6
|
let registered = null;
|
|
7
|
-
const { registerLineCardCommand } = await import("./card-command-
|
|
7
|
+
const { registerLineCardCommand } = await import("./card-command-BywtX77U.js");
|
|
8
8
|
registerLineCardCommand({
|
|
9
9
|
...api,
|
|
10
10
|
registerCommand(command) {
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as postbackAction, m as normalizeLineAction, p as messageAction, s as createReceiptCard, v as uriAction } from "./send-retry-CUvrarfE.js";
|
|
2
2
|
import { markdownToIRWithMeta, stripMarkdown, stripMarkdown as stripMarkdown$1 } from "openclaw/plugin-sdk/text-chunking";
|
|
3
3
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
|
-
//#region extensions/line/src/flex-templates/message.ts
|
|
5
|
-
/**
|
|
6
|
-
* Wrap a FlexContainer in a FlexMessage
|
|
7
|
-
*/
|
|
8
|
-
function toFlexMessage(altText, contents) {
|
|
9
|
-
return {
|
|
10
|
-
type: "flex",
|
|
11
|
-
altText,
|
|
12
|
-
contents
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
4
|
//#region extensions/line/src/template-messages.ts
|
|
17
5
|
const COMPACT_TEMPLATE_TEXT_LIMIT = 60;
|
|
18
6
|
const TEMPLATE_ALT_TEXT_LIMIT = 1500;
|
|
@@ -157,6 +145,18 @@ function buildTemplateMessageFromPayload(payload) {
|
|
|
157
145
|
}
|
|
158
146
|
}
|
|
159
147
|
//#endregion
|
|
148
|
+
//#region extensions/line/src/flex-templates/message.ts
|
|
149
|
+
/**
|
|
150
|
+
* Wrap a FlexContainer in a FlexMessage
|
|
151
|
+
*/
|
|
152
|
+
function toFlexMessage(altText, contents) {
|
|
153
|
+
return {
|
|
154
|
+
type: "flex",
|
|
155
|
+
altText,
|
|
156
|
+
contents
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
160
|
//#region extensions/line/src/markdown-to-line.ts
|
|
161
161
|
const LINE_MARKDOWN_OPTIONS = {
|
|
162
162
|
assistantTranscriptRoleHeaders: true,
|
|
@@ -169,6 +169,7 @@ const LINE_MARKDOWN_OPTIONS = {
|
|
|
169
169
|
};
|
|
170
170
|
const TRANSCRIPT_ROLE_PREFIX = "[assistant-authored transcript] ";
|
|
171
171
|
const LINE_FLEX_BUBBLE_MAX_BYTES = 3e4;
|
|
172
|
+
const LINE_FLEX_CODE_CARD_MAX_CHARS = 2e3;
|
|
172
173
|
function parseLineMarkdown(text, tableMode = "block") {
|
|
173
174
|
return markdownToIRWithMeta(text, {
|
|
174
175
|
...LINE_MARKDOWN_OPTIONS,
|
|
@@ -420,7 +421,7 @@ function convertTableToFlexBubble(table) {
|
|
|
420
421
|
/** Convert a code block to a LINE Flex Message bubble. */
|
|
421
422
|
function convertCodeBlockToFlexBubble(block) {
|
|
422
423
|
const titleText = block.language ? `Code (${block.language})` : "Code";
|
|
423
|
-
const displayCode = block.code.length >
|
|
424
|
+
const displayCode = block.code.length > LINE_FLEX_CODE_CARD_MAX_CHARS ? `${truncateUtf16Safe(block.code, LINE_FLEX_CODE_CARD_MAX_CHARS)}\n...` : block.code;
|
|
424
425
|
return {
|
|
425
426
|
type: "bubble",
|
|
426
427
|
body: {
|
|
@@ -455,13 +456,10 @@ function convertCodeBlockToFlexBubble(block) {
|
|
|
455
456
|
function processLineMessage(text) {
|
|
456
457
|
const { ir, tables } = parseLineMarkdown(text);
|
|
457
458
|
const codeSpans = codeBlockSpans(ir);
|
|
458
|
-
const flexMessages = [];
|
|
459
459
|
const plainTextInsertions = [];
|
|
460
|
-
let hasOversizedTable = false;
|
|
461
460
|
for (const table of tables) {
|
|
462
461
|
const bubble = table.rowCells.length > 10 && (table.headers.length !== 2 || table.rowCells.length > 12 || [table.headerCells, ...table.rowCells].some((cells) => cells.some((cell) => renderTableCell(cell, "-").hasMarkup))) ? void 0 : convertTableToFlexBubble(toMarkdownTable(table));
|
|
463
462
|
if (!bubble || Buffer.byteLength(JSON.stringify(bubble), "utf8") > LINE_FLEX_BUBBLE_MAX_BYTES) {
|
|
464
|
-
hasOversizedTable = true;
|
|
465
463
|
plainTextInsertions.push({
|
|
466
464
|
position: table.placeholderOffset,
|
|
467
465
|
text: `\n\n${formatOversizedTableAsBullets(table)}\n\n`
|
|
@@ -469,25 +467,31 @@ function processLineMessage(text) {
|
|
|
469
467
|
continue;
|
|
470
468
|
}
|
|
471
469
|
const message = toFlexMessage("Table", bubble);
|
|
472
|
-
flexMessages.push(message);
|
|
473
470
|
plainTextInsertions.push({
|
|
474
471
|
position: table.placeholderOffset,
|
|
475
472
|
message
|
|
476
473
|
});
|
|
477
474
|
}
|
|
478
475
|
for (const span of codeSpans) {
|
|
479
|
-
const
|
|
480
|
-
|
|
476
|
+
const block = toCodeBlock(ir, span);
|
|
477
|
+
if (!block.code.trim()) continue;
|
|
478
|
+
if (block.code.length > LINE_FLEX_CODE_CARD_MAX_CHARS) {
|
|
479
|
+
plainTextInsertions.push({
|
|
480
|
+
position: span.start,
|
|
481
|
+
text: `\n\n${block.code}\n\n`
|
|
482
|
+
});
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
481
485
|
plainTextInsertions.push({
|
|
482
486
|
position: span.start,
|
|
483
|
-
message
|
|
487
|
+
message: toFlexMessage("Code", convertCodeBlockToFlexBubble(block))
|
|
484
488
|
});
|
|
485
489
|
}
|
|
486
490
|
const segments = [];
|
|
487
491
|
return {
|
|
488
|
-
text: projectPlainText(ir, codeSpans, plainTextInsertions,
|
|
489
|
-
flexMessages,
|
|
490
|
-
...
|
|
492
|
+
text: projectPlainText(ir, codeSpans, plainTextInsertions, (segment) => segments.push(segment)),
|
|
493
|
+
flexMessages: segments.flatMap((segment) => segment.type === "flex" ? [segment.message] : []),
|
|
494
|
+
...plainTextInsertions.length > 0 ? { segments } : {}
|
|
491
495
|
};
|
|
492
496
|
}
|
|
493
497
|
/** Check if text contains markdown that needs conversion. */
|
|
@@ -496,4 +500,4 @@ function hasMarkdownToConvert(text) {
|
|
|
496
500
|
return tables.length > 0 || ir.styles.length > 0 || ir.links.length > 0 || /<\/?u>/i.test(ir.text) || ir.text !== text.trimEnd();
|
|
497
501
|
}
|
|
498
502
|
//#endregion
|
|
499
|
-
export { stripMarkdown$1 as a,
|
|
503
|
+
export { stripMarkdown$1 as a, createButtonTemplate as c, createTemplateCarousel as d, processLineMessage as i, createCarouselColumn as l, convertTableToFlexBubble as n, toFlexMessage as o, hasMarkdownToConvert as r, buildTemplateMessageFromPayload as s, convertCodeBlockToFlexBubble as t, createConfirmTemplate as u };
|