botmux 2.16.0 → 2.16.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/im/lark/md-card.d.ts +22 -15
- package/dist/im/lark/md-card.d.ts.map +1 -1
- package/dist/im/lark/md-card.js +159 -66
- package/dist/im/lark/md-card.js.map +1 -1
- package/package.json +3 -1
|
@@ -6,25 +6,32 @@
|
|
|
6
6
|
* path renders identically in the Lark thread — same chrome, same markdown
|
|
7
7
|
* rendering, same table widget.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Implementation note: parsing is delegated to `markdown-it` (CommonMark +
|
|
10
|
+
* GFM tables) instead of hand-rolled regex. The previous regex-based fence
|
|
11
|
+
* splitter mis-fired on two real cases observed in production:
|
|
12
|
+
* 1. Code fences directly adjacent to a prose line (no blank line) — Feishu's
|
|
13
|
+
* markdown widget needs blank lines around fences, and the old splitter
|
|
14
|
+
* didn't enforce them, so fences leaked through as literal `\`\`\`` text.
|
|
15
|
+
* 2. Nested 3-backtick fences — the non-greedy regex closed the outer fence
|
|
16
|
+
* at the first inner one, garbling everything after it.
|
|
17
|
+
* markdown-it tokenizes correctly per CommonMark and gives us blank-line
|
|
18
|
+
* normalization for free. For nested fences users should use 4+ backticks for
|
|
19
|
+
* the outer block (CommonMark spec).
|
|
12
20
|
*/
|
|
13
|
-
/** Feishu card markdown element doesn't render ATX headings → promote to bold. */
|
|
14
|
-
export declare function transformHeadings(md: string): string;
|
|
15
|
-
/** Parse a contiguous pipe-table block into a Feishu card v2 `table` element. */
|
|
16
|
-
export declare function parseTableBlock(block: string): any | null;
|
|
17
21
|
/**
|
|
18
22
|
* Split markdown into card v2 body elements:
|
|
19
|
-
* 1.
|
|
20
|
-
*
|
|
21
|
-
* 2.
|
|
22
|
-
* 3.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* 1. Pipe tables → native `table` widget (Feishu's markdown widget can't
|
|
24
|
+
* render them as a grid).
|
|
25
|
+
* 2. Headings → bold (Feishu's markdown widget doesn't render ATX `#`).
|
|
26
|
+
* 3. Code fences → re-emitted with the original backtick run, joined with
|
|
27
|
+
* blank lines on either side (Feishu's widget needs them to recognise the
|
|
28
|
+
* fence).
|
|
29
|
+
* 4. Everything else → original source slice, glued by blank lines.
|
|
30
|
+
*
|
|
31
|
+
* All non-table blocks are merged into a single `markdown` element to keep
|
|
32
|
+
* card element counts modest.
|
|
26
33
|
*/
|
|
27
|
-
export declare function buildCardBodyElements(
|
|
34
|
+
export declare function buildCardBodyElements(input: string): any[];
|
|
28
35
|
/**
|
|
29
36
|
* Heuristic: does `text` contain markdown syntax that renders badly as plain
|
|
30
37
|
* text in Feishu (code fences, headings, lists, bold, inline code, links,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-card.d.ts","sourceRoot":"","sources":["../../../src/im/lark/md-card.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"md-card.d.ts","sourceRoot":"","sources":["../../../src/im/lark/md-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAyFH;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,CAwE1D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAcjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAe9E"}
|
package/dist/im/lark/md-card.js
CHANGED
|
@@ -6,40 +6,85 @@
|
|
|
6
6
|
* path renders identically in the Lark thread — same chrome, same markdown
|
|
7
7
|
* rendering, same table widget.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* Implementation note: parsing is delegated to `markdown-it` (CommonMark +
|
|
10
|
+
* GFM tables) instead of hand-rolled regex. The previous regex-based fence
|
|
11
|
+
* splitter mis-fired on two real cases observed in production:
|
|
12
|
+
* 1. Code fences directly adjacent to a prose line (no blank line) — Feishu's
|
|
13
|
+
* markdown widget needs blank lines around fences, and the old splitter
|
|
14
|
+
* didn't enforce them, so fences leaked through as literal `\`\`\`` text.
|
|
15
|
+
* 2. Nested 3-backtick fences — the non-greedy regex closed the outer fence
|
|
16
|
+
* at the first inner one, garbling everything after it.
|
|
17
|
+
* markdown-it tokenizes correctly per CommonMark and gives us blank-line
|
|
18
|
+
* normalization for free. For nested fences users should use 4+ backticks for
|
|
19
|
+
* the outer block (CommonMark spec).
|
|
12
20
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
import MarkdownIt from 'markdown-it';
|
|
22
|
+
const md = new MarkdownIt({ html: false, linkify: false, breaks: false });
|
|
23
|
+
/** Build a Feishu native `table` element from a `table_open … table_close` token slice. */
|
|
24
|
+
function buildTableFromTokens(tokens) {
|
|
25
|
+
const headerCells = [];
|
|
26
|
+
const bodyRows = [];
|
|
27
|
+
let inHead = false;
|
|
28
|
+
let inBody = false;
|
|
29
|
+
let currentRow = null;
|
|
30
|
+
let inCell = false;
|
|
31
|
+
for (const t of tokens) {
|
|
32
|
+
switch (t.type) {
|
|
33
|
+
case 'thead_open':
|
|
34
|
+
inHead = true;
|
|
35
|
+
break;
|
|
36
|
+
case 'thead_close':
|
|
37
|
+
inHead = false;
|
|
38
|
+
break;
|
|
39
|
+
case 'tbody_open':
|
|
40
|
+
inBody = true;
|
|
41
|
+
break;
|
|
42
|
+
case 'tbody_close':
|
|
43
|
+
inBody = false;
|
|
44
|
+
break;
|
|
45
|
+
case 'tr_open':
|
|
46
|
+
currentRow = [];
|
|
47
|
+
break;
|
|
48
|
+
case 'tr_close':
|
|
49
|
+
if (inBody && currentRow)
|
|
50
|
+
bodyRows.push(currentRow);
|
|
51
|
+
currentRow = null;
|
|
52
|
+
break;
|
|
53
|
+
case 'th_open':
|
|
54
|
+
case 'td_open':
|
|
55
|
+
inCell = true;
|
|
56
|
+
break;
|
|
57
|
+
case 'th_close':
|
|
58
|
+
case 'td_close':
|
|
59
|
+
inCell = false;
|
|
60
|
+
break;
|
|
61
|
+
case 'inline':
|
|
62
|
+
if (inCell) {
|
|
63
|
+
if (inHead)
|
|
64
|
+
headerCells.push(t.content);
|
|
65
|
+
else if (currentRow)
|
|
66
|
+
currentRow.push(t.content);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (headerCells.length === 0)
|
|
27
72
|
return null;
|
|
28
|
-
const columns =
|
|
73
|
+
const columns = headerCells.map((h, i) => ({
|
|
29
74
|
name: `c${i}`,
|
|
30
75
|
display_name: h || ' ',
|
|
31
76
|
data_type: 'lark_md',
|
|
32
77
|
width: 'auto',
|
|
33
78
|
}));
|
|
34
|
-
const
|
|
79
|
+
const rows = bodyRows.map(r => {
|
|
35
80
|
const o = {};
|
|
36
|
-
for (let i = 0; i <
|
|
81
|
+
for (let i = 0; i < headerCells.length; i++)
|
|
37
82
|
o[`c${i}`] = r[i] ?? '';
|
|
38
83
|
return o;
|
|
39
84
|
});
|
|
40
85
|
return {
|
|
41
86
|
tag: 'table',
|
|
42
|
-
page_size: Math.min(10, Math.max(1,
|
|
87
|
+
page_size: Math.min(10, Math.max(1, rows.length || 1)),
|
|
43
88
|
row_height: 'low',
|
|
44
89
|
header_style: {
|
|
45
90
|
text_align: 'left',
|
|
@@ -50,62 +95,110 @@ export function parseTableBlock(block) {
|
|
|
50
95
|
lines: 1,
|
|
51
96
|
},
|
|
52
97
|
columns,
|
|
53
|
-
rows
|
|
98
|
+
rows,
|
|
54
99
|
};
|
|
55
100
|
}
|
|
101
|
+
function sliceLines(lines, map) {
|
|
102
|
+
return lines.slice(map[0], map[1]).join('\n');
|
|
103
|
+
}
|
|
104
|
+
/** Find index of the matching close token at the same nesting depth. */
|
|
105
|
+
function findMatchingClose(tokens, openIdx) {
|
|
106
|
+
const open = tokens[openIdx];
|
|
107
|
+
const close = open.type.replace(/_open$/, '_close');
|
|
108
|
+
let depth = 1;
|
|
109
|
+
for (let j = openIdx + 1; j < tokens.length; j++) {
|
|
110
|
+
if (tokens[j].type === open.type)
|
|
111
|
+
depth++;
|
|
112
|
+
else if (tokens[j].type === close) {
|
|
113
|
+
depth--;
|
|
114
|
+
if (depth === 0)
|
|
115
|
+
return j;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return tokens.length - 1;
|
|
119
|
+
}
|
|
56
120
|
/**
|
|
57
121
|
* Split markdown into card v2 body elements:
|
|
58
|
-
* 1.
|
|
59
|
-
*
|
|
60
|
-
* 2.
|
|
61
|
-
* 3.
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
122
|
+
* 1. Pipe tables → native `table` widget (Feishu's markdown widget can't
|
|
123
|
+
* render them as a grid).
|
|
124
|
+
* 2. Headings → bold (Feishu's markdown widget doesn't render ATX `#`).
|
|
125
|
+
* 3. Code fences → re-emitted with the original backtick run, joined with
|
|
126
|
+
* blank lines on either side (Feishu's widget needs them to recognise the
|
|
127
|
+
* fence).
|
|
128
|
+
* 4. Everything else → original source slice, glued by blank lines.
|
|
129
|
+
*
|
|
130
|
+
* All non-table blocks are merged into a single `markdown` element to keep
|
|
131
|
+
* card element counts modest.
|
|
65
132
|
*/
|
|
66
|
-
export function buildCardBodyElements(
|
|
133
|
+
export function buildCardBodyElements(input) {
|
|
134
|
+
if (!input)
|
|
135
|
+
return [];
|
|
136
|
+
const tokens = md.parse(input, {});
|
|
137
|
+
const lines = input.split('\n');
|
|
67
138
|
const elements = [];
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
elements.push({ tag: 'markdown', content:
|
|
73
|
-
|
|
139
|
+
const buf = [];
|
|
140
|
+
const flushBuf = () => {
|
|
141
|
+
const text = buf.join('\n\n').replace(/\n{3,}/g, '\n\n').trim();
|
|
142
|
+
if (text)
|
|
143
|
+
elements.push({ tag: 'markdown', content: text });
|
|
144
|
+
buf.length = 0;
|
|
74
145
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
while ((fm = fenceRe.exec(md)) !== null) {
|
|
81
|
-
if (fm.index > fCursor)
|
|
82
|
-
segments.push({ type: 'prose', text: md.slice(fCursor, fm.index) });
|
|
83
|
-
segments.push({ type: 'code', text: fm[0] });
|
|
84
|
-
fCursor = fm.index + fm[0].length;
|
|
85
|
-
}
|
|
86
|
-
if (fCursor < md.length)
|
|
87
|
-
segments.push({ type: 'prose', text: md.slice(fCursor) });
|
|
88
|
-
for (const seg of segments) {
|
|
89
|
-
if (seg.type === 'code') {
|
|
90
|
-
buffer += (buffer && !buffer.endsWith('\n') ? '\n' : '') + seg.text + '\n';
|
|
146
|
+
let i = 0;
|
|
147
|
+
while (i < tokens.length) {
|
|
148
|
+
const t = tokens[i];
|
|
149
|
+
if (t.level !== 0) {
|
|
150
|
+
i++;
|
|
91
151
|
continue;
|
|
92
152
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
153
|
+
if (t.type === 'table_open') {
|
|
154
|
+
flushBuf();
|
|
155
|
+
const j = findMatchingClose(tokens, i);
|
|
156
|
+
const tableEl = buildTableFromTokens(tokens.slice(i, j + 1));
|
|
157
|
+
if (tableEl)
|
|
158
|
+
elements.push(tableEl);
|
|
159
|
+
else if (t.map)
|
|
160
|
+
buf.push(sliceLines(lines, t.map));
|
|
161
|
+
i = j + 1;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (t.type === 'heading_open') {
|
|
165
|
+
const inline = tokens[i + 1];
|
|
166
|
+
const text = (inline?.content ?? '').replace(/^#{1,6}\s+/, '').trim();
|
|
167
|
+
if (text)
|
|
168
|
+
buf.push(`**${text}**`);
|
|
169
|
+
i += 3; // heading_open, inline, heading_close
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (t.type === 'fence' || t.type === 'code_block') {
|
|
173
|
+
const fence = t.markup || '```';
|
|
174
|
+
const info = (t.info || '').trim();
|
|
175
|
+
const content = t.content.replace(/\n+$/, '');
|
|
176
|
+
buf.push(`${fence}${info}\n${content}\n${fence}`);
|
|
177
|
+
i++;
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (t.type === 'hr') {
|
|
181
|
+
buf.push('---');
|
|
182
|
+
i++;
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (t.type === 'html_block') {
|
|
186
|
+
if (t.map)
|
|
187
|
+
buf.push(sliceLines(lines, t.map));
|
|
188
|
+
i++;
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
// Generic open token (paragraph_open, bullet_list_open, ordered_list_open,
|
|
192
|
+
// blockquote_open, …): slice source by the open-token's line map and skip
|
|
193
|
+
// to the matching close.
|
|
194
|
+
if (t.type.endsWith('_open') && t.map) {
|
|
195
|
+
buf.push(sliceLines(lines, t.map));
|
|
196
|
+
i = findMatchingClose(tokens, i) + 1;
|
|
197
|
+
continue;
|
|
105
198
|
}
|
|
106
|
-
|
|
199
|
+
i++;
|
|
107
200
|
}
|
|
108
|
-
|
|
201
|
+
flushBuf();
|
|
109
202
|
return elements;
|
|
110
203
|
}
|
|
111
204
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-card.js","sourceRoot":"","sources":["../../../src/im/lark/md-card.ts"],"names":[],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AAW,CAAC,IAAI,CAAC,cAAc,eAAe,QAAQ,CAAC,CAAC;IAC7E,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC;QACZ,GAAG,EAAE,UAAU;QACf,SAAS,EAAE,mBAAmB;QAC9B,OAAO,EAAE,sBAAsB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS;KAChE,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;QAC9B,IAAI,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE;KAC1C,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "botmux",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"description": "Bridge between IM platforms and AI coding CLIs — one topic, one CLI session with live streaming",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index-daemon.js",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@xterm/headless": "^6.0.0",
|
|
39
39
|
"croner": "^10.0.1",
|
|
40
40
|
"dotenv": "^17.3.1",
|
|
41
|
+
"markdown-it": "^14.1.1",
|
|
41
42
|
"node-pty": "^1.1.0",
|
|
42
43
|
"pm2": "^6.0.0",
|
|
43
44
|
"ws": "^8.19.0",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@midscene/web": "^1.7.6",
|
|
48
49
|
"@playwright/test": "^1.58.2",
|
|
50
|
+
"@types/markdown-it": "^14.1.2",
|
|
49
51
|
"@types/node": "^20.0.0",
|
|
50
52
|
"@types/ws": "^8.18.1",
|
|
51
53
|
"esbuild": "^0.28.0",
|