@gobing-ai/knowledge-kit 0.1.22 → 0.1.24
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/.claude-plugin/marketplace.json +1 -1
- package/dist/index.js +282 -147
- package/package.json +5 -5
- package/plugins/generations/content-gen/dist/index.js +9 -9
- package/plugins/generations/core-facts-gen/dist/index.js +12 -12
- package/plugins/generations/daily-article-gen/dist/index.js +12 -12
- package/plugins/generations/dailynews-gen/dist/index.js +11 -11
- package/plugins/generations/dailynews-gen/src/script-plan.ts +2 -2
- package/plugins/generations/episode-plan-gen/dist/index.js +12 -12
- package/plugins/generations/gemini-tts/dist/index.js +56 -16
- package/plugins/generations/gemini-tts/src/gemini-client.ts +34 -6
- package/plugins/generations/image-gen/dist/index.js +9 -9
- package/plugins/generations/music-gen/README.md +2 -2
- package/plugins/generations/music-gen/dist/index.js +62 -26
- package/plugins/generations/music-gen/presets/formats/song.yaml +6 -1
- package/plugins/generations/music-gen/presets/themes/synthwave.yaml +6 -1
- package/plugins/generations/music-gen/src/adapter/instance.ts +34 -11
- package/plugins/generations/music-gen/src/presets.ts +36 -3
- package/plugins/generations/news-report-gen/dist/index.js +12 -12
- package/plugins/generations/omni-voice-gen/uv.toml +5 -0
- package/plugins/generations/vibe-voice-tts/README.md +64 -0
- package/plugins/generations/vibe-voice-tts/dist/index.js +14259 -0
- package/plugins/generations/vibe-voice-tts/package.json +16 -0
- package/plugins/generations/vibe-voice-tts/plugin.json +6 -0
- package/plugins/generations/vibe-voice-tts/profiles.json +10 -0
- package/plugins/generations/vibe-voice-tts/pyproject.toml +9 -0
- package/plugins/generations/vibe-voice-tts/python/worker.py +566 -0
- package/plugins/generations/vibe-voice-tts/src/index.ts +88 -0
- package/plugins/generations/vibe-voice-tts/src/vibevoice-client.ts +828 -0
- package/plugins/generations/vibe-voice-tts/tsconfig.json +8 -0
- package/plugins/generations/vibe-voice-tts/uv.lock +1767 -0
- package/plugins/generations/vibe-voice-tts/uv.toml +4 -0
- package/plugins/generations/voice-gen/dist/index.js +40 -10
- package/plugins/generations/voice-gen/src/voicebox-client.ts +50 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +90 -18
- package/plugins/generations/voxcpm-tts/python/worker.py +9 -0
- package/plugins/generations/voxcpm-tts/src/index.ts +41 -0
- package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +32 -11
- package/plugins/generations/voxcpm-tts/uv.toml +5 -0
- package/plugins/ingestions/aihot-ingest/dist/index.js +12 -12
- package/plugins/ingestions/horizon-ingest/dist/index.js +12 -12
- package/plugins/ingestions/karakeep-local/dist/index.js +13 -13
- package/plugins/ingestions/last30days-ingest/dist/index.js +12 -12
- package/plugins/ingestions/web-search/dist/index.js +10 -10
- package/plugins/kk/README.md +21 -0
- package/plugins/kk/decisions/kk-safety.yaml +5 -2
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice.json +16 -16
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +12 -1
- package/plugins/kk/scripts/cover-compositor.ts +104 -26
- package/plugins/kk/scripts/daily-stages.ts +481 -63
- package/plugins/kk/scripts/kk-workflow-stages.ts +218 -17
- package/plugins/kk/scripts/safety-artifact-check.ts +28 -5
- package/plugins/kk/scripts/series-names.ts +16 -3
- package/plugins/kk/skills/news-editorial/SKILL.md +1 -1
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +3 -3
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +4 -3
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +6 -5
- package/plugins/kk/workflows/kk-daily-safety.yaml +12 -10
- package/plugins/kk/workflows/kk-music.yaml +20 -16
- package/plugins/kk/workflows/kk-news-generate.yaml +26 -3
- package/plugins/kk/workflows/kk-publish.yaml +4 -1
- package/plugins/publishings/bilibili-pub/dist/index.js +22 -22
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/cnblogs-pub/dist/index.js +22 -22
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/csdn-pub/dist/index.js +22 -22
- package/plugins/publishings/csdn-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/emdash-pub/dist/index.js +9 -9
- package/plugins/publishings/infoq-pub/dist/index.js +22 -22
- package/plugins/publishings/infoq-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/jike-pub/dist/index.js +22 -22
- package/plugins/publishings/jike-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/juejin-pub/dist/index.js +22 -22
- package/plugins/publishings/juejin-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/linkedin-pub/dist/index.js +133 -33
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +27 -22
- package/plugins/publishings/linkedin-pub/src/index.ts +192 -18
- package/plugins/publishings/medium-pub/dist/index.js +9 -9
- package/plugins/publishings/podcast-pub/dist/index.js +240 -37
- package/plugins/publishings/podcast-pub/src/index.ts +154 -3
- package/plugins/publishings/podcast-pub/src/seo.ts +25 -8
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +93 -23
- package/plugins/publishings/podcast-pub/src/show-notes.ts +26 -6
- package/plugins/publishings/qiita-pub/dist/index.js +9 -9
- package/plugins/publishings/shipinhao-pub/dist/index.js +23 -23
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +23 -23
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +2 -1
- package/plugins/publishings/sspai-pub/dist/index.js +22 -22
- package/plugins/publishings/sspai-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/substack-pub/dist/index.js +22 -22
- package/plugins/publishings/substack-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/surfdash-pub/dist/index.js +207 -95
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +30 -1
- package/plugins/publishings/surfdash-pub/src/index.ts +101 -76
- package/plugins/publishings/surfdash-pub/src/media-upload.ts +83 -0
- package/plugins/publishings/surfdash-pub/src/patch.ts +49 -26
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +12 -4
- package/plugins/publishings/threads-pub/dist/index.js +83 -27
- package/plugins/publishings/threads-pub/dist/profile-check.js +34 -23
- package/plugins/publishings/threads-pub/src/post-rail.ts +121 -4
- package/plugins/publishings/wechatmp-pub/dist/index.js +274 -98
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +27 -23
- package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +87 -53
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +117 -13
- package/plugins/publishings/wechatmp-pub/src/flow.ts +183 -43
- package/plugins/publishings/wechatmp-pub/src/modes.ts +30 -12
- package/plugins/publishings/weibo-pub/dist/index.js +22 -22
- package/plugins/publishings/weibo-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/x-pub/dist/index.js +113 -32
- package/plugins/publishings/x-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/x-pub/src/post-rail.ts +155 -20
- package/plugins/publishings/xhs-pub/dist/index.js +22 -22
- package/plugins/publishings/xhs-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +22 -22
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +22 -22
- package/plugins/publishings/zenn-pub/dist/index.js +9 -9
|
@@ -671,7 +671,7 @@ export function buildSeoDescription(input: {
|
|
|
671
671
|
minutes?: number;
|
|
672
672
|
clauses: string[];
|
|
673
673
|
extraSentences: string[];
|
|
674
|
-
}): { description: string; short: boolean } {
|
|
674
|
+
}): { description: string; short: boolean; empty: boolean } {
|
|
675
675
|
const head = descriptionHead(input.config, input.date, input.minutes);
|
|
676
676
|
const render = (parts: string[]): string => (parts.length === 0 ? head : `${head}${parts.join(';')}。`);
|
|
677
677
|
const picked: string[] = [];
|
|
@@ -684,9 +684,21 @@ export function buildSeoDescription(input: {
|
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
686
|
pushWhile(input.clauses);
|
|
687
|
+
if (picked.length === 0 && input.clauses.length > 0) {
|
|
688
|
+
const first = cleanClause(input.clauses[0] ?? '');
|
|
689
|
+
const room = input.config.descriptionMax - codePointLength(`${head}。`);
|
|
690
|
+
if (first.length > 0 && room > 0) {
|
|
691
|
+
const cut = cutAtBoundary(first, room);
|
|
692
|
+
if (cut.length > 0) picked.push(cut);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
687
695
|
if (codePointLength(render(picked)) < input.config.descriptionMin) pushWhile(input.extraSentences);
|
|
688
696
|
const description = render(picked);
|
|
689
|
-
return {
|
|
697
|
+
return {
|
|
698
|
+
description,
|
|
699
|
+
short: codePointLength(description) < input.config.descriptionMin,
|
|
700
|
+
empty: picked.length === 0,
|
|
701
|
+
};
|
|
690
702
|
}
|
|
691
703
|
|
|
692
704
|
function descriptionInputs(
|
|
@@ -694,7 +706,7 @@ function descriptionInputs(
|
|
|
694
706
|
config: PodcastSeoConfig,
|
|
695
707
|
date: string | undefined,
|
|
696
708
|
minutes: number | undefined,
|
|
697
|
-
): { description: string; short: boolean } {
|
|
709
|
+
): { description: string; short: boolean; empty: boolean } {
|
|
698
710
|
const podcast = podcastOf(metadata);
|
|
699
711
|
const plan = planItemsFromMetadata(metadata);
|
|
700
712
|
const summary = stringList(podcast.summaryClauses);
|
|
@@ -882,12 +894,17 @@ export function prepareEpisodeFields(
|
|
|
882
894
|
const seoTitle = mustSanitize(fitted.seo, config.titleSanitize, 'seo.title');
|
|
883
895
|
if (!seoTitle.ok) return seoTitle;
|
|
884
896
|
const described = descriptionInputs(metadata, config, date, minutes);
|
|
885
|
-
if (described.
|
|
886
|
-
warnings.push(
|
|
887
|
-
|
|
888
|
-
|
|
897
|
+
if (described.empty) {
|
|
898
|
+
warnings.push(`${WARN_PREFIX} seo.description skipped: no summary clauses available`);
|
|
899
|
+
seo = { title: seoTitle.value };
|
|
900
|
+
} else {
|
|
901
|
+
if (described.short) {
|
|
902
|
+
warnings.push(
|
|
903
|
+
`${WARN_PREFIX} seo.description is ${codePointLength(described.description)} code points, under the ${config.descriptionMin} minimum; left unpadded`,
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
seo = { title: seoTitle.value, description: described.description };
|
|
889
907
|
}
|
|
890
|
-
seo = { title: seoTitle.value, description: described.description };
|
|
891
908
|
}
|
|
892
909
|
let slug: string | undefined;
|
|
893
910
|
if (config.slugMode === 'pattern') {
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import type { Doc } from '@gobing-ai/kk-core';
|
|
21
|
-
import { computeAudioOffsets, escapeHtml, formatOffset, itemBrief, sourceLabelFor } from './show-notes';
|
|
21
|
+
import { computeAudioOffsets, escapeHtml, formatOffset, itemBrief, sourceLabelFor, TIMELINE_STYLE } from './show-notes';
|
|
22
22
|
|
|
23
23
|
/** Placeholder paragraph {@link applyArticleReceipt} rewrites once the article receipt exists. */
|
|
24
|
-
const ARTICLE_PLACEHOLDER = '<p class="kk-tl-more">完整图文版:待文章发布回执</p>';
|
|
24
|
+
export const ARTICLE_PLACEHOLDER = '<p class="kk-tl-more">完整图文版:待文章发布回执</p>';
|
|
25
25
|
|
|
26
26
|
/** The exact `<style>` block {@link renderCardsRegion} emits (reused by the marker validator). */
|
|
27
27
|
export const CARDS_STYLE = `<style>
|
|
28
|
-
.kk-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin:
|
|
29
|
-
.kk-card{margin:0;border:1px solid rgba(128,128,128,.25);border-radius:10px;overflow:hidden}
|
|
28
|
+
.kk-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin:1.25em 0 0}
|
|
29
|
+
.kk-card{margin:0;border:1px solid var(--mf-border,rgba(128,128,128,.25));border-radius:10px;overflow:hidden;background:var(--mf-surface,transparent)}
|
|
30
30
|
.kk-card img{display:block;width:100%;height:auto}
|
|
31
|
-
.kk-card figcaption{padding:8px 10px;font-size:.9em;color
|
|
32
|
-
.kk-card-n{font-weight:700;color
|
|
31
|
+
.kk-card figcaption{padding:8px 10px;font-size:.9em;color:var(--mf-muted,#444)}
|
|
32
|
+
.kk-card-n{font-weight:700;color:var(--mf-accent,#0969da);margin-right:6px}
|
|
33
33
|
@media (max-width:420px){.kk-cards{grid-template-columns:1fr}}
|
|
34
34
|
</style>`;
|
|
35
35
|
|
|
@@ -41,6 +41,8 @@ export interface PlannedCard {
|
|
|
41
41
|
alt: string;
|
|
42
42
|
/** Hosted image URL from the upload receipt, or `''` when no asset is available. */
|
|
43
43
|
imageUrl: string;
|
|
44
|
+
/** Optional rendered local PNG/image path for upload during episode publish. */
|
|
45
|
+
imagePath?: string;
|
|
44
46
|
/** Plain-text degradation: the card's copy (or its source point). */
|
|
45
47
|
text: string;
|
|
46
48
|
}
|
|
@@ -101,7 +103,15 @@ export function planCards(raw: unknown): { cards: PlannedCard[]; diagnostics: Ca
|
|
|
101
103
|
const copy = textOf(card.copy);
|
|
102
104
|
const sourcePoint = textOf(card.sourcePoint);
|
|
103
105
|
const alt = textOf(card.alt) || copy || sourcePoint || `本期卡片 ${index}`;
|
|
104
|
-
|
|
106
|
+
const rawImagePath = textOf(card.imagePath);
|
|
107
|
+
const imagePath = textOf(card.status) === 'rendered' && rawImagePath !== '' ? rawImagePath : undefined;
|
|
108
|
+
cards.push({
|
|
109
|
+
index,
|
|
110
|
+
alt,
|
|
111
|
+
imageUrl: uploadStatus === 'failed' ? '' : url,
|
|
112
|
+
...(imagePath !== undefined ? { imagePath } : {}),
|
|
113
|
+
text: copy || sourcePoint || alt,
|
|
114
|
+
});
|
|
105
115
|
});
|
|
106
116
|
return { cards, diagnostics };
|
|
107
117
|
}
|
|
@@ -176,6 +186,7 @@ export function renderBriefShowNotes(input: BriefShowNotesInput): { markdown: st
|
|
|
176
186
|
`<!--kk:timeline-->
|
|
177
187
|
<div class="kk-tl">${rows}
|
|
178
188
|
</div>
|
|
189
|
+
${TIMELINE_STYLE}
|
|
179
190
|
${articleEntry}
|
|
180
191
|
<!--/kk:timeline-->`,
|
|
181
192
|
'',
|
|
@@ -186,8 +197,22 @@ ${articleEntry}
|
|
|
186
197
|
return { markdown: lines.join('\n'), diagnostics };
|
|
187
198
|
}
|
|
188
199
|
|
|
200
|
+
/** Formats `<base>/<locale>/posts/<slug>` from a published surfdash `postPath`. Returns `''` if invalid. */
|
|
201
|
+
export function articleUrlFromPostPath(postPath: string, articleBaseUrl = 'https://surfing.salty.vip'): string {
|
|
202
|
+
const trimmed = postPath.trim();
|
|
203
|
+
if (trimmed === '') return '';
|
|
204
|
+
const segments = trimmed.split(/[\\/]/).filter((s) => s.length > 0);
|
|
205
|
+
// `<…>/posts/<locale>/<slug>/index.md` — the slug is the path segment before the file.
|
|
206
|
+
const slug = segments.length >= 2 ? (segments[segments.length - 2] ?? '') : '';
|
|
207
|
+
if (slug === '' || slug === 'posts') return '';
|
|
208
|
+
const locale = segments.find((s) => ['zh', 'en', 'ja'].includes(s)) ?? 'zh';
|
|
209
|
+
// surfdash serves `en` at the root; zh/ja carry the locale prefix (surfdash/src/lib/seo.ts).
|
|
210
|
+
const prefix = locale === 'en' ? '' : `/${locale}`;
|
|
211
|
+
return `${articleBaseUrl.replace(/\/+$/, '')}${prefix}/posts/${slug}`;
|
|
212
|
+
}
|
|
213
|
+
|
|
189
214
|
/** The hosted article slug a publish receipt proves, or `''` when the receipt proves nothing. */
|
|
190
|
-
function
|
|
215
|
+
function receiptArticleUrl(receipt: unknown, articleBaseUrl = 'https://surfing.salty.vip'): string {
|
|
191
216
|
const entries = Array.isArray(receipt)
|
|
192
217
|
? receipt
|
|
193
218
|
: receipt !== null && typeof receipt === 'object' && Array.isArray((receipt as { targets?: unknown }).targets)
|
|
@@ -205,15 +230,67 @@ function receiptSlug(receipt: unknown): string {
|
|
|
205
230
|
: record;
|
|
206
231
|
const postPath = textOf(metadata.postPath);
|
|
207
232
|
if (postPath === '') continue;
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
const slug = segments.length >= 2 ? (segments[segments.length - 2] ?? '') : '';
|
|
211
|
-
if (slug !== '' && slug !== 'posts')
|
|
212
|
-
return `${slug}\u0000${segments.find((s) => ['zh', 'en', 'ja'].includes(s)) ?? 'zh'}`;
|
|
233
|
+
const url = articleUrlFromPostPath(postPath, articleBaseUrl);
|
|
234
|
+
if (url !== '') return url;
|
|
213
235
|
}
|
|
214
236
|
return '';
|
|
215
237
|
}
|
|
216
238
|
|
|
239
|
+
/** Renders the `<p class="kk-tl-more">` paragraph linking to the full illustrated article. */
|
|
240
|
+
export function renderArticleLinkParagraph(articleUrl: string): string {
|
|
241
|
+
return `<p class="kk-tl-more">完整图文版:<a href="${escapeHtml(articleUrl.trim())}" target="_blank" rel="noopener">本期完整文章</a></p>`;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Strips unresolved {@link ARTICLE_PLACEHOLDER} before public microfeed publish so listeners do
|
|
246
|
+
* not see an internal placeholder string when article publish hasn't landed yet.
|
|
247
|
+
*/
|
|
248
|
+
export function stripArticlePlaceholderHtml(html: string): string {
|
|
249
|
+
if (!html.includes(ARTICLE_PLACEHOLDER)) return html;
|
|
250
|
+
return html
|
|
251
|
+
.replace(ARTICLE_PLACEHOLDER, '')
|
|
252
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
253
|
+
.trim();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Inserts or replaces the `完整图文版` link inside published microfeed `content_html`, placing it
|
|
258
|
+
* before the `.kk-cards` block (or at the end when there are no cards). Idempotent once linked.
|
|
259
|
+
*/
|
|
260
|
+
export function upsertArticleLinkHtml(html: string, articleUrl: string): { html: string; changed: boolean } {
|
|
261
|
+
if (!isHttpUrl(articleUrl)) return { html, changed: false };
|
|
262
|
+
const cleanUrl = articleUrl.trim();
|
|
263
|
+
const linkParagraph = renderArticleLinkParagraph(cleanUrl);
|
|
264
|
+
if (html.includes(escapeHtml(cleanUrl)) && /完整图文版/.test(html)) {
|
|
265
|
+
return { html, changed: false };
|
|
266
|
+
}
|
|
267
|
+
if (html.includes(ARTICLE_PLACEHOLDER)) {
|
|
268
|
+
return { html: html.replace(ARTICLE_PLACEHOLDER, linkParagraph), changed: true };
|
|
269
|
+
}
|
|
270
|
+
const existingPattern = /<p class="kk-tl-more">完整图文版:[\s\S]*?<\/p>/;
|
|
271
|
+
if (existingPattern.test(html)) {
|
|
272
|
+
return { html: html.replace(existingPattern, linkParagraph), changed: true };
|
|
273
|
+
}
|
|
274
|
+
// Insert right before the card block `<style>` (when present) or `<div class="kk-cards">` so
|
|
275
|
+
// it appears right under the timeline, matching renderBriefShowNotes.
|
|
276
|
+
const cardsStyleIdx = html.indexOf(CARDS_STYLE);
|
|
277
|
+
const cardsDivIdx = html.indexOf('<div class="kk-cards">');
|
|
278
|
+
const anchor = cardsStyleIdx >= 0 ? cardsStyleIdx : cardsDivIdx;
|
|
279
|
+
if (anchor >= 0) {
|
|
280
|
+
const before = html.slice(0, anchor).replace(/\s*$/, '');
|
|
281
|
+
const after = html.slice(anchor).replace(/^\s*/, '');
|
|
282
|
+
return {
|
|
283
|
+
html: before === '' ? `${linkParagraph}\n${after}` : `${before}\n${linkParagraph}\n${after}`,
|
|
284
|
+
changed: true,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
const trimmed = html.trim();
|
|
288
|
+
return {
|
|
289
|
+
html: trimmed === '' ? linkParagraph : `${trimmed}\n${linkParagraph}`,
|
|
290
|
+
changed: true,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
217
294
|
/**
|
|
218
295
|
* Enriches already-rendered notes with the article link **once a real receipt exists**: the
|
|
219
296
|
* placeholder paragraph is replaced by the linked one derived from the receipt's `postPath`
|
|
@@ -224,17 +301,10 @@ export function applyArticleReceipt(
|
|
|
224
301
|
receipt: unknown,
|
|
225
302
|
articleBaseUrl = 'https://surfing.salty.vip',
|
|
226
303
|
): { markdown: string; enriched: boolean } {
|
|
227
|
-
const
|
|
228
|
-
if (
|
|
229
|
-
const [slug = '', locale = 'zh'] = proven.split('\u0000');
|
|
230
|
-
// surfdash serves `en` at the root; zh/ja carry the locale prefix (surfdash/src/lib/seo.ts).
|
|
231
|
-
const prefix = locale === 'en' ? '' : `/${locale}`;
|
|
232
|
-
const url = `${articleBaseUrl.replace(/\/+$/, '')}${prefix}/posts/${slug}`;
|
|
304
|
+
const url = receiptArticleUrl(receipt, articleBaseUrl);
|
|
305
|
+
if (url === '' || !markdown.includes(ARTICLE_PLACEHOLDER)) return { markdown, enriched: false };
|
|
233
306
|
return {
|
|
234
|
-
markdown: markdown.replace(
|
|
235
|
-
ARTICLE_PLACEHOLDER,
|
|
236
|
-
`<p class="kk-tl-more">完整图文版:<a href="${escapeHtml(url)}" target="_blank" rel="noopener">本期完整文章</a></p>`,
|
|
237
|
-
),
|
|
307
|
+
markdown: markdown.replace(ARTICLE_PLACEHOLDER, renderArticleLinkParagraph(url)),
|
|
238
308
|
enriched: true,
|
|
239
309
|
};
|
|
240
310
|
}
|
|
@@ -106,8 +106,8 @@ export function computeAudioOffsets(
|
|
|
106
106
|
|
|
107
107
|
const isHttpUrl = (u: string): boolean => /^https?:\/\//i.test(u.trim());
|
|
108
108
|
|
|
109
|
-
/**
|
|
110
|
-
const
|
|
109
|
+
/** Previous `<style>` block accepted for backward compatibility in {@link isGeneratedTimeline}. */
|
|
110
|
+
const LEGACY_TIMELINE_STYLE = `<style>
|
|
111
111
|
.kk-tl{margin:1em 0}
|
|
112
112
|
.kk-tl-row{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid rgba(128,128,128,.25)}
|
|
113
113
|
.kk-tl-t{flex:0 0 56px;font-variant-numeric:tabular-nums;font-weight:700;color:#0969da}
|
|
@@ -117,11 +117,31 @@ const TIMELINE_STYLE = `<style>
|
|
|
117
117
|
</style>`;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
120
|
+
* The exact vertical-axis `<style>` block emitted by {@link renderTimelineHtml} and
|
|
121
|
+
* {@link renderBriefShowNotes}; reused by the marker validator. Left column holds time offsets,
|
|
122
|
+
* the center border + node dot draws the vertical axis, and the right column holds story summary.
|
|
123
|
+
*/
|
|
124
|
+
export const TIMELINE_STYLE = `<style>
|
|
125
|
+
.kk-tl{margin:1.25em 0;padding:0}
|
|
126
|
+
.kk-tl-row{display:flex;align-items:stretch;gap:0}
|
|
127
|
+
.kk-tl-t{flex:0 0 58px;padding:2px 14px 18px 0;text-align:right;font-variant-numeric:tabular-nums;font-weight:700;font-size:.92em;line-height:1.5;color:var(--mf-accent,#e34b4b)}
|
|
128
|
+
.kk-tl-body{position:relative;flex:1;min-width:0;padding:0 0 18px 18px;border-left:2px solid var(--mf-border,rgba(128,128,128,.35))}
|
|
129
|
+
.kk-tl-row:last-child .kk-tl-body{border-left-color:transparent;padding-bottom:4px}
|
|
130
|
+
.kk-tl-body::before{content:"";position:absolute;left:-6px;top:.42em;width:10px;height:10px;border-radius:50%;background:var(--mf-accent,#e34b4b);box-shadow:0 0 0 3px var(--mf-background,#fff)}
|
|
131
|
+
.kk-tl-title{font-weight:600;line-height:1.5}
|
|
132
|
+
.kk-tl-title a,.kk-tl-src{font-weight:400;font-size:.86em;margin-left:6px;color:var(--mf-muted,#666)}
|
|
133
|
+
.kk-tl-brief{margin:5px 0 0;color:var(--mf-muted,#666);font-size:.94em;line-height:1.65}
|
|
134
|
+
.kk-tl-more{margin:1.1em 0 0;font-size:.95em}
|
|
135
|
+
@media (max-width:480px){.kk-tl-t{flex:0 0 46px;padding-right:10px;font-size:.86em}.kk-tl-body{padding-left:14px}}
|
|
136
|
+
</style>`;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Tags {@link renderTimelineHtml} / {@link renderBriefShowNotes} can emit: `div`/`p`/`a`/`span`
|
|
140
|
+
* carrying only the exact class, href, target, and rel attributes they produce. Anything else inside
|
|
141
|
+
* a marker block is attacker-supplied.
|
|
122
142
|
*/
|
|
123
143
|
const TIMELINE_TAG =
|
|
124
|
-
/^<\/?(?:div|p|a)(?:\s+(?:class="kk-tl(?:-[a-z]+)?"|href="https?:\/\/[^"<>\s]*"|target="_blank"|rel="noopener"))*\s*>$/;
|
|
144
|
+
/^<\/?(?:div|p|a|span)(?:\s+(?:class="kk-tl(?:-[a-z]+)?"|href="https?:\/\/[^"<>\s]*"|target="_blank"|rel="noopener"))*\s*>$/;
|
|
125
145
|
|
|
126
146
|
/**
|
|
127
147
|
* A marker block is trusted only if it is markup {@link renderTimelineHtml} could have produced.
|
|
@@ -130,7 +150,7 @@ const TIMELINE_TAG =
|
|
|
130
150
|
* and any leftover stray `<` means the block is not well-formed generator output.
|
|
131
151
|
*/
|
|
132
152
|
function isGeneratedTimeline(block: string): boolean {
|
|
133
|
-
const rest = block.replace(TIMELINE_STYLE, '');
|
|
153
|
+
const rest = block.replace(TIMELINE_STYLE, '').replace(LEGACY_TIMELINE_STYLE, '');
|
|
134
154
|
if (rest.includes('<style') || rest.includes('<!--')) return false;
|
|
135
155
|
return (rest.match(/<[^>]*>/g) ?? []).every((tag) => TIMELINE_TAG.test(tag)) && !/<(?![^>]*>)/.test(rest);
|
|
136
156
|
}
|
|
@@ -4813,7 +4813,7 @@ var init_zod = __esm(() => {
|
|
|
4813
4813
|
init_external();
|
|
4814
4814
|
});
|
|
4815
4815
|
|
|
4816
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4816
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4817
4817
|
var ErrorCode;
|
|
4818
4818
|
var init_errors3 = __esm(() => {
|
|
4819
4819
|
ErrorCode = {
|
|
@@ -4824,7 +4824,7 @@ var init_errors3 = __esm(() => {
|
|
|
4824
4824
|
};
|
|
4825
4825
|
});
|
|
4826
4826
|
|
|
4827
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4827
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4828
4828
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4829
4829
|
var init_api_response = __esm(() => {
|
|
4830
4830
|
init_errors3();
|
|
@@ -4847,13 +4847,13 @@ var init_api_response = __esm(() => {
|
|
|
4847
4847
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4848
4848
|
});
|
|
4849
4849
|
|
|
4850
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4850
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4851
4851
|
var init_cursor = () => {};
|
|
4852
4852
|
|
|
4853
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4853
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4854
4854
|
var init_event_severity = () => {};
|
|
4855
4855
|
|
|
4856
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4856
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4857
4857
|
function processStream(name) {
|
|
4858
4858
|
const proc = globalThis.process;
|
|
4859
4859
|
const stream = proc?.[name];
|
|
@@ -4871,7 +4871,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4871
4871
|
}
|
|
4872
4872
|
var defaultStderrTarget;
|
|
4873
4873
|
|
|
4874
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4874
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4875
4875
|
var init_dist = __esm(() => {
|
|
4876
4876
|
init_api_response();
|
|
4877
4877
|
init_cursor();
|
|
@@ -11869,7 +11869,7 @@ var init_dist2 = __esm(() => {
|
|
|
11869
11869
|
$visitAsync = visit.visitAsync;
|
|
11870
11870
|
});
|
|
11871
11871
|
|
|
11872
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11872
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11873
11873
|
var configSchema;
|
|
11874
11874
|
var init_config = __esm(() => {
|
|
11875
11875
|
init_dist2();
|
|
@@ -11893,7 +11893,7 @@ var init_config = __esm(() => {
|
|
|
11893
11893
|
});
|
|
11894
11894
|
});
|
|
11895
11895
|
|
|
11896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11896
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11897
11897
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11898
11898
|
import { dirname, resolve as resolvePath } from "path";
|
|
11899
11899
|
function createNodeFileSystem(root, paths) {
|
|
@@ -12248,7 +12248,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12248
12248
|
});
|
|
12249
12249
|
}
|
|
12250
12250
|
});
|
|
12251
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
12251
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12252
12252
|
init_file_system_node();
|
|
12253
12253
|
init_config();
|
|
12254
12254
|
|
|
@@ -4845,7 +4845,7 @@ var init_zod = __esm(() => {
|
|
|
4845
4845
|
init_external();
|
|
4846
4846
|
});
|
|
4847
4847
|
|
|
4848
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4848
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4849
4849
|
var ErrorCode;
|
|
4850
4850
|
var init_errors3 = __esm(() => {
|
|
4851
4851
|
ErrorCode = {
|
|
@@ -4856,7 +4856,7 @@ var init_errors3 = __esm(() => {
|
|
|
4856
4856
|
};
|
|
4857
4857
|
});
|
|
4858
4858
|
|
|
4859
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4859
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4860
4860
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4861
4861
|
var init_api_response = __esm(() => {
|
|
4862
4862
|
init_errors3();
|
|
@@ -4879,10 +4879,10 @@ var init_api_response = __esm(() => {
|
|
|
4879
4879
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4880
4880
|
});
|
|
4881
4881
|
|
|
4882
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4882
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4883
4883
|
var init_cursor = () => {};
|
|
4884
4884
|
|
|
4885
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4885
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/env.js
|
|
4886
4886
|
function getEnvVar(name, fallback) {
|
|
4887
4887
|
const raw = process.env[name];
|
|
4888
4888
|
return raw === undefined ? fallback : raw;
|
|
@@ -4891,10 +4891,10 @@ function getEnvVars() {
|
|
|
4891
4891
|
return process.env;
|
|
4892
4892
|
}
|
|
4893
4893
|
|
|
4894
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4894
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4895
4895
|
var init_event_severity = () => {};
|
|
4896
4896
|
|
|
4897
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4897
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/object.js
|
|
4898
4898
|
function isPlainObject2(value) {
|
|
4899
4899
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4900
4900
|
}
|
|
@@ -4912,7 +4912,7 @@ function deepMerge(target, source) {
|
|
|
4912
4912
|
return result;
|
|
4913
4913
|
}
|
|
4914
4914
|
|
|
4915
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4915
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4916
4916
|
function processStream(name) {
|
|
4917
4917
|
const proc = globalThis.process;
|
|
4918
4918
|
const stream = proc?.[name];
|
|
@@ -4930,7 +4930,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4930
4930
|
}
|
|
4931
4931
|
var defaultStderrTarget;
|
|
4932
4932
|
|
|
4933
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4933
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4934
4934
|
var init_dist = __esm(() => {
|
|
4935
4935
|
init_api_response();
|
|
4936
4936
|
init_cursor();
|
|
@@ -11928,7 +11928,7 @@ var init_dist2 = __esm(() => {
|
|
|
11928
11928
|
$visitAsync = visit.visitAsync;
|
|
11929
11929
|
});
|
|
11930
11930
|
|
|
11931
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11931
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11932
11932
|
function getProcessEnv() {
|
|
11933
11933
|
return getEnvVars();
|
|
11934
11934
|
}
|
|
@@ -12006,7 +12006,7 @@ var init_config = __esm(() => {
|
|
|
12006
12006
|
};
|
|
12007
12007
|
});
|
|
12008
12008
|
|
|
12009
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
12009
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
12010
12010
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
12011
12011
|
import { dirname, resolve as resolvePath } from "path";
|
|
12012
12012
|
function createNodeFileSystem(root, paths) {
|
|
@@ -12093,7 +12093,7 @@ function findProjectRoot(startDir) {
|
|
|
12093
12093
|
}
|
|
12094
12094
|
var init_file_system_node = () => {};
|
|
12095
12095
|
|
|
12096
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
12096
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
|
|
12097
12097
|
var DbModuleNotInstalledError;
|
|
12098
12098
|
var init_db_errors = __esm(() => {
|
|
12099
12099
|
DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
|
|
@@ -19304,7 +19304,7 @@ var init_execa = __esm(() => {
|
|
|
19304
19304
|
} = getIpcExport());
|
|
19305
19305
|
});
|
|
19306
19306
|
|
|
19307
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19307
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
|
|
19308
19308
|
function resolveDeadline(optionTimeout, defaultTimeout) {
|
|
19309
19309
|
if (optionTimeout === null)
|
|
19310
19310
|
return null;
|
|
@@ -19396,7 +19396,7 @@ function ownProcessGroupLifecycle(ownership) {
|
|
|
19396
19396
|
}
|
|
19397
19397
|
var MAX_TIMEOUT_MS = 2147483647, DEFAULT_KILL_GRACE_MS = 5000, GROUP_POLL_INTERVAL_MS = 25, GROUP_KILL_PATIENCE_MS = 2000;
|
|
19398
19398
|
|
|
19399
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19399
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
|
|
19400
19400
|
import { isatty } from "tty";
|
|
19401
19401
|
function processEventSeverity(reason, exitCode) {
|
|
19402
19402
|
if (reason === "error")
|
|
@@ -19768,7 +19768,7 @@ var init_process_executor = __esm(() => {
|
|
|
19768
19768
|
init_config();
|
|
19769
19769
|
});
|
|
19770
19770
|
|
|
19771
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19771
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
19772
19772
|
function getNodeFileSystem() {
|
|
19773
19773
|
if (!_nodeFileSystem)
|
|
19774
19774
|
_nodeFileSystem = createNodeFileSystem();
|
|
@@ -20096,11 +20096,11 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
20096
20096
|
});
|
|
20097
20097
|
}
|
|
20098
20098
|
});
|
|
20099
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
20099
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
20100
20100
|
init_file_system_node();
|
|
20101
20101
|
init_config();
|
|
20102
20102
|
|
|
20103
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
20103
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
20104
20104
|
function normalizeSeparators(path) {
|
|
20105
20105
|
return path.replaceAll("\\", "/");
|
|
20106
20106
|
}
|
|
@@ -20158,7 +20158,7 @@ function getProcessCwd() {
|
|
|
20158
20158
|
return globalThis.process?.cwd?.() ?? "/";
|
|
20159
20159
|
}
|
|
20160
20160
|
|
|
20161
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
20161
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
20162
20162
|
init_runtime_node_bun();
|
|
20163
20163
|
|
|
20164
20164
|
// ../../packages/kk-core/src/render-md.ts
|
|
@@ -20236,7 +20236,7 @@ init_dist();
|
|
|
20236
20236
|
// ../../packages/publish-harness/src/browser.ts
|
|
20237
20237
|
import { join as join5, resolve as resolve5 } from "path";
|
|
20238
20238
|
|
|
20239
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20239
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
20240
20240
|
class BrowserAutomationError extends Error {
|
|
20241
20241
|
constructor(message, options) {
|
|
20242
20242
|
super(message, options);
|
|
@@ -20285,10 +20285,10 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
20285
20285
|
this.name = "OperationAbortedError";
|
|
20286
20286
|
}
|
|
20287
20287
|
}
|
|
20288
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20288
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20289
20289
|
import { mkdir } from "fs/promises";
|
|
20290
20290
|
|
|
20291
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20291
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
20292
20292
|
function resolveProfileDir(profileDir) {
|
|
20293
20293
|
if (profileDir.trim() === "") {
|
|
20294
20294
|
throw new InvalidProfileDirError;
|
|
@@ -20300,7 +20300,7 @@ function resolveProfileDir(profileDir) {
|
|
|
20300
20300
|
return resolved;
|
|
20301
20301
|
}
|
|
20302
20302
|
|
|
20303
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20303
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20304
20304
|
var PROFILE_DIR_MODE = 448;
|
|
20305
20305
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
20306
20306
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20351,7 +20351,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20351
20351
|
};
|
|
20352
20352
|
}
|
|
20353
20353
|
|
|
20354
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20354
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20355
20355
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
20356
20356
|
var POLL_INTERVAL_MS = 250;
|
|
20357
20357
|
var defaultLauncher;
|
|
@@ -20973,7 +20973,7 @@ var SHP_HOME_URL_BY_OPERATION = {
|
|
|
20973
20973
|
image: SHP_IMAGE_HOME_URL,
|
|
20974
20974
|
music: SHP_MUSIC_HOME_URL
|
|
20975
20975
|
};
|
|
20976
|
-
var SHP_LOGIN_URL_RE = /(open\.weixin\.qq\.com|channels\.weixin\.qq\.com\/platform\/(login|scan))/;
|
|
20976
|
+
var SHP_LOGIN_URL_RE = /(open\.weixin\.qq\.com|channels\.weixin\.qq\.com\/(?:platform\/(?:login|scan)|login(?:\.html)?)(?:[/?#]|$))/;
|
|
20977
20977
|
var ROOT_SNAPSHOT_SCRIPT = `(() => { // kk-shp-root-snapshot
|
|
20978
20978
|
const wujieApp = document.querySelector('wujie-app');
|
|
20979
20979
|
const shadow = wujieApp === null || wujieApp === undefined ? null : (wujieApp.shadowRoot ?? null);
|