@gobing-ai/knowledge-kit 0.1.14 → 0.1.16
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 +2399 -177
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +60 -54
- package/plugins/generations/content-gen/src/storm.ts +94 -61
- package/plugins/generations/core-facts-gen/dist/index.js +3 -3
- package/plugins/generations/daily-article-gen/dist/index.js +3 -3
- package/plugins/generations/dailynews-gen/dist/index.js +73 -10
- package/plugins/generations/dailynews-gen/src/index.ts +23 -1
- package/plugins/generations/dailynews-gen/src/script-plan.ts +103 -5
- package/plugins/generations/episode-plan-gen/dist/index.js +3 -3
- package/plugins/generations/gemini-tts/dist/index.js +3 -3
- package/plugins/generations/image-gen/README.md +31 -10
- package/plugins/generations/image-gen/assets/sample/cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/dist/index.js +3 -3
- package/plugins/generations/image-gen/presets/formats/daily-news-podcast-cover.yaml +18 -0
- package/plugins/generations/image-gen/presets/styles/quasi-news-podcast.yaml +9 -0
- package/plugins/generations/news-report-gen/dist/index.js +3 -3
- package/plugins/generations/voice-gen/dist/index.js +3 -3
- package/plugins/generations/voxcpm-tts/dist/index.js +3 -3
- package/plugins/ingestions/aihot-ingest/dist/index.js +3 -3
- package/plugins/ingestions/horizon-ingest/dist/index.js +3 -3
- package/plugins/ingestions/last30days-ingest/dist/index.js +3 -3
- package/plugins/ingestions/web-search/dist/index.js +3 -3
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice-migration.json +12 -3
- package/plugins/kk/publish-presets/daily-ai-voice.json +11 -3
- package/plugins/kk/scripts/cover-compositor.ts +152 -0
- package/plugins/kk/scripts/daily-cover-mock.ts +164 -0
- package/plugins/kk/scripts/daily-scheduled-run.ts +192 -3
- package/plugins/kk/scripts/daily-stages.ts +599 -27
- package/plugins/kk/scripts/daily-triage-core.ts +451 -0
- package/plugins/kk/scripts/daily-triage.ts +74 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +51 -6
- package/plugins/kk/skills/content-judge/SKILL.md +5 -4
- package/plugins/kk/skills/content-judge/references/rubrics.md +14 -0
- package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +16 -10
- package/plugins/kk/skills/news-editorial/SKILL.md +122 -0
- package/plugins/kk/skills/news-editorial/references/selection.md +47 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +100 -0
- package/plugins/kk/skills/publish/SKILL.md +4 -4
- package/plugins/kk/skills/web-automation/SKILL.md +229 -77
- package/plugins/kk/skills/web-automation/references/browser-launch.md +127 -36
- package/plugins/kk/skills/wiki-authoring/SKILL.md +53 -0
- package/plugins/kk/skills/wiki-authoring/references/page-shapes.md +44 -0
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +4 -6
- package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +185 -224
- package/plugins/kk/workflows/kk-daily-publish3.yaml +16 -8
- package/plugins/kk/workflows/kk-daily-safety.yaml +32 -7
- package/plugins/publishings/bilibili-pub/dist/index.js +6 -4
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +3 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +6 -4
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +3 -1
- package/plugins/publishings/csdn-pub/dist/index.js +6 -4
- package/plugins/publishings/csdn-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/emdash-pub/dist/index.js +3 -3
- package/plugins/publishings/infoq-pub/dist/index.js +6 -4
- package/plugins/publishings/infoq-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/jike-pub/dist/index.js +6 -4
- package/plugins/publishings/jike-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/juejin-pub/dist/index.js +6 -4
- package/plugins/publishings/juejin-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/linkedin-pub/dist/index.js +6 -4
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/medium-pub/dist/index.js +3 -3
- package/plugins/publishings/podcast-pub/dist/index.js +148 -5
- package/plugins/publishings/podcast-pub/src/index.ts +71 -2
- package/plugins/publishings/podcast-pub/src/map.ts +3 -0
- package/plugins/publishings/podcast-pub/src/transcript.ts +195 -0
- package/plugins/publishings/qiita-pub/dist/index.js +3 -3
- package/plugins/publishings/shipinhao-pub/dist/index.js +227 -53
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +51 -2
- package/plugins/publishings/shipinhao-pub/plugin.json +2 -2
- package/plugins/publishings/shipinhao-pub/src/flow.ts +335 -79
- package/plugins/publishings/shipinhao-pub/src/index.ts +16 -8
- package/plugins/publishings/shipinhao-pub/src/profile-check.ts +1 -1
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +103 -5
- package/plugins/publishings/sspai-pub/dist/index.js +6 -4
- package/plugins/publishings/sspai-pub/dist/profile-check.js +3 -1
- package/plugins/publishings/substack-pub/dist/index.js +6 -4
- package/plugins/publishings/substack-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/surfdash-pub/dist/index.js +237 -14
- package/plugins/publishings/surfdash-pub/src/index.ts +127 -6
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +189 -0
- package/plugins/publishings/threads-pub/dist/index.js +3 -3
- package/plugins/publishings/wechatmp-pub/dist/index.js +62 -40
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +10 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +73 -37
- package/plugins/publishings/wechatmp-pub/src/page.ts +14 -0
- package/plugins/publishings/weibo-pub/dist/index.js +6 -4
- package/plugins/publishings/weibo-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/x-pub/dist/index.js +6 -4
- package/plugins/publishings/x-pub/dist/profile-check.js +6 -4
- package/plugins/publishings/xhs-pub/dist/index.js +562 -34
- package/plugins/publishings/xhs-pub/dist/profile-check.js +25 -4
- package/plugins/publishings/xhs-pub/src/errors.ts +45 -0
- package/plugins/publishings/xhs-pub/src/flow.ts +773 -45
- package/plugins/publishings/xhs-pub/src/page.ts +33 -0
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +6 -4
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +3 -1
- package/plugins/publishings/zenn-pub/dist/index.js +3 -3
- package/plugins/kk/scripts/daily-voice-style.zh.md +0 -70
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* shipinhao-pub — shipinhao (channels.weixin.qq.com)
|
|
2
|
+
* shipinhao-pub — shipinhao (channels.weixin.qq.com) publisher plugin surface (task 0296; four
|
|
3
|
+
* post kinds since 2026-11-10).
|
|
3
4
|
*
|
|
4
5
|
* This module is the manifest-facing plugin surface: the declared operation list, the pre-browser
|
|
5
|
-
* refusal ladder (operation → driver → publishStatus → format → title → body →
|
|
6
|
+
* refusal ladder (operation → driver → publishStatus → format → title → body → media file → cover
|
|
6
7
|
* → tags → original → unsupported fields — all refused before any browser opens),
|
|
7
8
|
* `getPublishTransport`, the `--in/--out` IO contract and the CLI `main`. The selectors and the
|
|
8
9
|
* vendor-grounded site predicates live in `src/selectors.ts`, the browser transport and flow in
|
|
9
10
|
* `src/flow.ts`, and the operator session CLI in `src/profile-check.ts`.
|
|
10
11
|
*
|
|
12
|
+
* Operations map one-to-one onto the 发布 page's post kinds (视频, 图文, 音乐, 音频):
|
|
13
|
+
* `shortVideo` (Grounded, vendor-port), `audio` (the first deliverable — the daily AI news
|
|
14
|
+
* episode mp3), `image` (图文) and `music`. The audio/image/music selectors are Provisional until
|
|
15
|
+
* the first logged-in live recon; everything fails closed.
|
|
16
|
+
*
|
|
11
17
|
* Evidence: the recovered extension adapter
|
|
12
18
|
* `.spur/run/yijianfa-source/platforms/shipinhao.js` (2817 lines) pins the field semantics cited
|
|
13
19
|
* throughout `src/selectors.ts` and `src/flow.ts` (root policy 514-545, upload 549-631, fields
|
|
@@ -26,14 +32,16 @@ import { type BrowserDriver, FakeBrowserTransport, type PublishTransport } from
|
|
|
26
32
|
import { createNodeFileSystem } from '@gobing-ai/ts-runtime';
|
|
27
33
|
import { echoError } from '@gobing-ai/ts-utils';
|
|
28
34
|
import { bounded, boundedDetail, errorMessage, fail, ShipinhaoBrowserTransport } from './flow';
|
|
29
|
-
import { SHP_TARGET } from './selectors';
|
|
35
|
+
import { SHP_OPERATION_NAMES, SHP_TARGET, type ShipinhaoOperationName } from './selectors';
|
|
30
36
|
|
|
31
37
|
/**
|
|
32
|
-
* Declared operations (ADR-029 dispatch):
|
|
33
|
-
* (`
|
|
38
|
+
* Declared operations (ADR-029 dispatch): one per 发布-page post kind — `shortVideo` (视频, the
|
|
39
|
+
* vendor-port), `audio` (音频), `image` (图文), `music` (音乐). The vendor adapter declares only
|
|
40
|
+
* the short-video kind (shipinhao.js:10,2802); the other three are Provisional fail-closed flows
|
|
41
|
+
* over the same stage rails, pending the first logged-in live recon.
|
|
34
42
|
*/
|
|
35
|
-
export const SHP_OPERATIONS =
|
|
36
|
-
export type ShipinhaoOperation =
|
|
43
|
+
export const SHP_OPERATIONS = SHP_OPERATION_NAMES;
|
|
44
|
+
export type ShipinhaoOperation = ShipinhaoOperationName;
|
|
37
45
|
|
|
38
46
|
/**
|
|
39
47
|
* Resolves the requested operation (`options.operation ?? content.metadata.operation ?? default`)
|
|
@@ -80,7 +88,7 @@ function resolveDriver(
|
|
|
80
88
|
* `KNOWLEDGE_KIT_PUBLISH_TRANSPORT=fake` (offline, no profile, no browser), otherwise the real
|
|
81
89
|
* shipinhao browser transport (`src/flow.ts`). API-only paths never load Playwright eagerly:
|
|
82
90
|
* the harness launcher imports Playwright dynamically at launch time only.
|
|
83
|
-
* @param operation - Resolved operation (`
|
|
91
|
+
* @param operation - Resolved operation (one of `SHP_OPERATIONS`).
|
|
84
92
|
* @param driver - Resolved driver; only `script` is declared.
|
|
85
93
|
* @returns The publish transport for this channel.
|
|
86
94
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* shipinhao profile-session capability (task 0296, Chunk A).
|
|
3
3
|
*
|
|
4
|
-
* `login` opens the Channels
|
|
4
|
+
* `login` opens the Channels dashboard (https://channels.weixin.qq.com/platform,
|
|
5
5
|
* see `src/selectors.ts`) in a headed browser and resolves only once the site readiness predicate
|
|
6
6
|
* passes; `check` reopens the profile (headlessly, unless the operator passes `--headed` or the
|
|
7
7
|
* config sets `checkHeadedOnly`) and reports `verified` or `refused`; `open` just brings the
|
|
@@ -24,11 +24,62 @@ import type { IsAuthenticatedPredicate } from '@gobing-ai/ts-browser-automation'
|
|
|
24
24
|
export const SHP_TARGET = 'shipinhao';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Fixed home entry (
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* Fixed home entry (recon-Grounded 2026-11-11): the Channels dashboard. Every direct
|
|
28
|
+
* `/platform/post/<kind>` URL redirects here for a logged-in session — the per-op direct-create
|
|
29
|
+
* URLs in the earlier Provisional table do not exist. The unified create surface lives at
|
|
30
|
+
* `/platform/post/create`, reached by clicking the dashboard entry button (see
|
|
31
|
+
* `SHP_CREATE_ENTRY_SELECTORS`); the publish flow performs that click-through after navigation.
|
|
30
32
|
*/
|
|
31
|
-
export const SHP_HOME_URL = 'https://channels.weixin.qq.com/platform
|
|
33
|
+
export const SHP_HOME_URL = 'https://channels.weixin.qq.com/platform';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The post kinds the 发布 page offers (视频, 图文, 音乐, 音频). Declared operation names are
|
|
37
|
+
* ASCII (`shortVideo` is the task 0296 freeze), one per platform post kind.
|
|
38
|
+
*/
|
|
39
|
+
export const SHP_OPERATION_NAMES = ['shortVideo', 'audio', 'image', 'music'] as const;
|
|
40
|
+
export type ShipinhaoOperationName = (typeof SHP_OPERATION_NAMES)[number];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Dashboard create-entry button (recon-Grounded 2026-11-11): the dashboard offers exactly the
|
|
44
|
+
* visible `发表视频` button; clicking it opens the unified `/platform/post/create` surface for
|
|
45
|
+
* every post kind — the kind is determined by the media file fed to the single intake input.
|
|
46
|
+
*/
|
|
47
|
+
export const SHP_CREATE_ENTRY_SELECTORS = ['button:text-is("发表视频")'] as const;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 添加描述 hard cap: the editor truncates any paste to exactly 100 plain-text characters
|
|
51
|
+
* (Grounded live probe 2026-11-11 — a 6054-char paste retained exactly 100). Topic tags count
|
|
52
|
+
* toward the same budget, so the body plain text is clipped to leave room for them.
|
|
53
|
+
*/
|
|
54
|
+
export const SHP_DESCRIPTION_MAX_CHARS = 100;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Draft-save confirm dialog (Grounded live probe 2026-11-11): with 定时发表 active, clicking
|
|
58
|
+
* 保存草稿 renders a dialog — "使用定时发表将无法保存草稿。若要保存草稿,需先取消定时发表。"
|
|
59
|
+
* with visible buttons 不保存 (abort) / 保存 (proceed); the save only proceeds after clicking the
|
|
60
|
+
* visible dialog's 保存. The vendor also ships this dialog as a permanently hidden 0×0 template,
|
|
61
|
+
* so the rail anchors from the button side and requires a rendered box; absence = normal no-op.
|
|
62
|
+
*/
|
|
63
|
+
export const SHP_DRAFT_CONFIRM_DIALOG_TEXT = '使用定时发表将无法保存草稿';
|
|
64
|
+
export const SHP_DRAFT_CONFIRM_PROCEED_LABEL = '保存';
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Per-operation creation entries: ALL operations share the dashboard entry and the unified
|
|
68
|
+
* `/platform/post/create` surface (recon-Grounded 2026-11-11 — the former per-kind
|
|
69
|
+
* `/platform/post/<kind>` URLs redirect to the dashboard; the kept map keeps the flow's
|
|
70
|
+
* per-operation seam while every entry is the same page).
|
|
71
|
+
*/
|
|
72
|
+
export const SHP_AUDIO_HOME_URL = SHP_HOME_URL;
|
|
73
|
+
export const SHP_IMAGE_HOME_URL = SHP_HOME_URL;
|
|
74
|
+
export const SHP_MUSIC_HOME_URL = SHP_HOME_URL;
|
|
75
|
+
|
|
76
|
+
/** Creation-page entry per declared operation (see {@link SHP_AUDIO_HOME_URL} for the caveat). */
|
|
77
|
+
export const SHP_HOME_URL_BY_OPERATION: Record<ShipinhaoOperationName, string> = {
|
|
78
|
+
shortVideo: SHP_HOME_URL,
|
|
79
|
+
audio: SHP_AUDIO_HOME_URL,
|
|
80
|
+
image: SHP_IMAGE_HOME_URL,
|
|
81
|
+
music: SHP_MUSIC_HOME_URL,
|
|
82
|
+
};
|
|
32
83
|
|
|
33
84
|
/**
|
|
34
85
|
* Login/passport redirect marker. **Provisional**: shipinhao.js never observes a redirect URL; it
|
|
@@ -116,6 +167,11 @@ export const SHP_COVER_SAVE_WAIT_MS = 60_000;
|
|
|
116
167
|
* shipinhao.js:2326). All fail closed when absent or ambiguous.
|
|
117
168
|
*/
|
|
118
169
|
export const SHP_VIDEO_SELECTORS = {
|
|
170
|
+
/**
|
|
171
|
+
* Dashboard entry button into the unified create surface (see
|
|
172
|
+
* {@link SHP_CREATE_ENTRY_SELECTORS}). Clicked once after navigation, before the form rails.
|
|
173
|
+
*/
|
|
174
|
+
createEntry: SHP_CREATE_ENTRY_SELECTORS,
|
|
119
175
|
/**
|
|
120
176
|
* Video file input candidates, vendor priority: accept-kind (shipinhao.js:549-555) → semantic
|
|
121
177
|
* upload region 上传视频/视频文件/选择视频 (shipinhao.js:565-568) → the single untyped
|
|
@@ -145,7 +201,11 @@ export const SHP_VIDEO_SELECTORS = {
|
|
|
145
201
|
coverEditEntry: ['div.cover-preview-wrap > div'],
|
|
146
202
|
/**
|
|
147
203
|
* Cover dialog container candidates (vendor `findCoverControl`, shipinhao.js:2144-2149): the
|
|
148
|
-
* flow requires the resolved dialog to hold an `input[type="file"]` before use.
|
|
204
|
+
* flow requires the resolved dialog to hold an `input[type="file"]` before use. **Grounded
|
|
205
|
+
* audio known-gap (live probe 2026-11-11)**: for AUDIO the container stays `visible:false` and
|
|
206
|
+
* the slot stays `primary-loading` (auto-cover processing), so the vendor's visible-dialog
|
|
207
|
+
* contract never materializes — a requested audio cover is a typed cover-attach failure, never
|
|
208
|
+
* a silent skip. Daily presets request no cover for shipinhao rows.
|
|
149
209
|
*/
|
|
150
210
|
coverDialog: [
|
|
151
211
|
'div.cover-control-wrap',
|
|
@@ -188,6 +248,41 @@ export const SHP_VIDEO_SELECTORS = {
|
|
|
188
248
|
/** Keys of the selector map, for typed probes. */
|
|
189
249
|
export type ShipinhaoVideoSelectorKey = keyof typeof SHP_VIDEO_SELECTORS;
|
|
190
250
|
|
|
251
|
+
/**
|
|
252
|
+
* The 音频 (audio-post) flow selectors: the video flow's rails (title, description editor,
|
|
253
|
+
* 声明原创 dialog, cover dialog, submit rail) reused verbatim plus the unified intake ladder.
|
|
254
|
+
* Recon-Grounded 2026-11-11: the create surface has ONE media intake (the video-accept input)
|
|
255
|
+
* and no audio-accept input exists — feeding the .mp3 to that input morphs the form into the
|
|
256
|
+
* audio post flow (title/description/cover/save rails all render post-upload). **Grounded.**
|
|
257
|
+
*/
|
|
258
|
+
export const SHP_AUDIO_SELECTORS = {
|
|
259
|
+
...SHP_VIDEO_SELECTORS,
|
|
260
|
+
audioInput: ['input[type="file"][accept*="video"]', 'input[type="file"]'] as readonly string[],
|
|
261
|
+
} as const;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The 音乐 (music-post) flow selectors: the audio flow's unified-intake ladder plus the cover
|
|
265
|
+
* rails (music posts carry their own cover). Same intake evidence as audio; the music-specific
|
|
266
|
+
* form rails stay **Provisional until live recon**, same fail-closed rule.
|
|
267
|
+
*/
|
|
268
|
+
export const SHP_MUSIC_SELECTORS: typeof SHP_AUDIO_SELECTORS = { ...SHP_AUDIO_SELECTORS };
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The 图文 (image-post) flow selectors: a multi-file image-input ladder plus the shared
|
|
272
|
+
* text/submit rails. No cover rails are read — the platform owns the 图文 cover from the images
|
|
273
|
+
* themselves, so the flow refuses an explicit cover for this operation instead of guessing a
|
|
274
|
+
* slot. **Provisional until live recon**, same fail-closed rule.
|
|
275
|
+
*/
|
|
276
|
+
export const SHP_IMAGE_SELECTORS = {
|
|
277
|
+
...SHP_VIDEO_SELECTORS,
|
|
278
|
+
imagesInput: [
|
|
279
|
+
'input[type="file"][multiple]',
|
|
280
|
+
'input[type="file"][accept*="image"]',
|
|
281
|
+
'section:has(input[type="file"]):has-text("上传图片") input[type="file"]',
|
|
282
|
+
'input[type="file"]',
|
|
283
|
+
] as readonly string[],
|
|
284
|
+
} as const;
|
|
285
|
+
|
|
191
286
|
/**
|
|
192
287
|
* Receipt-shaped URLs. **Provisional**: the vendor never reads a receipt (a clicked 发表 without
|
|
193
288
|
* a works record is `unknown`, shipinhao.js:2326), so these are the id-bearing works/record
|
|
@@ -198,6 +293,9 @@ export type ShipinhaoVideoSelectorKey = keyof typeof SHP_VIDEO_SELECTORS;
|
|
|
198
293
|
export const SHP_RECEIPT_URL_RES = [
|
|
199
294
|
/channels\.weixin\.qq\.com\/platform\/record\/detail\/[0-9a-zA-Z_-]+/,
|
|
200
295
|
/channels\.weixin\.qq\.com\/platform\/post\/video\/[0-9a-zA-Z_-]+/,
|
|
296
|
+
/channels\.weixin\.qq\.com\/platform\/post\/audio\/[0-9a-zA-Z_-]+/,
|
|
297
|
+
/channels\.weixin\.qq\.com\/platform\/post\/image\/[0-9a-zA-Z_-]+/,
|
|
298
|
+
/channels\.weixin\.qq\.com\/platform\/post\/music\/[0-9a-zA-Z_-]+/,
|
|
201
299
|
] as const;
|
|
202
300
|
|
|
203
301
|
/** Upload/processing ceiling for the video step (media ceiling — large local files, task 0296 freeze). */
|
|
@@ -19905,7 +19905,7 @@ var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
|
19905
19905
|
shortVideo: Object.freeze({
|
|
19906
19906
|
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
19907
19907
|
kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
19908
|
-
shipinhao: Object.freeze({ max:
|
|
19908
|
+
shipinhao: Object.freeze({ max: 100, unit: "unicode_code_points" })
|
|
19909
19909
|
})
|
|
19910
19910
|
})
|
|
19911
19911
|
});
|
|
@@ -20073,11 +20073,11 @@ var PluginManifestSchemaBase = looseObject({
|
|
|
20073
20073
|
});
|
|
20074
20074
|
var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
|
|
20075
20075
|
if (manifest.browserSession !== undefined) {
|
|
20076
|
-
if (manifest.kind !== "publish") {
|
|
20076
|
+
if (manifest.kind !== "publish" && manifest.kind !== "ingestion") {
|
|
20077
20077
|
ctx.addIssue({
|
|
20078
20078
|
code: "custom",
|
|
20079
20079
|
path: ["browserSession"],
|
|
20080
|
-
message: `browserSession requires kind "publish", not "${manifest.kind}"`
|
|
20080
|
+
message: `browserSession requires kind "publish" or "ingestion", not "${manifest.kind}"`
|
|
20081
20081
|
});
|
|
20082
20082
|
}
|
|
20083
20083
|
if (manifest.check === undefined) {
|
|
@@ -20707,10 +20707,12 @@ function sha256Hex(value) {
|
|
|
20707
20707
|
var DEFAULT_BOT_PROFILE_ROOT = join4(homedir4(), ".config", "kk", "browser-profiles");
|
|
20708
20708
|
class BotError extends Error {
|
|
20709
20709
|
code;
|
|
20710
|
-
|
|
20710
|
+
details;
|
|
20711
|
+
constructor(code, message, details = {}) {
|
|
20711
20712
|
super(message);
|
|
20712
20713
|
this.name = "BotError";
|
|
20713
20714
|
this.code = code;
|
|
20715
|
+
this.details = details;
|
|
20714
20716
|
}
|
|
20715
20717
|
}
|
|
20716
20718
|
// ../../packages/publish-harness/src/profile-dir.ts
|
|
@@ -20097,10 +20097,12 @@ function normalizeSessionIdentity(value) {
|
|
|
20097
20097
|
}
|
|
20098
20098
|
class BotError extends Error {
|
|
20099
20099
|
code;
|
|
20100
|
-
|
|
20100
|
+
details;
|
|
20101
|
+
constructor(code, message, details = {}) {
|
|
20101
20102
|
super(message);
|
|
20102
20103
|
this.name = "BotError";
|
|
20103
20104
|
this.code = code;
|
|
20105
|
+
this.details = details;
|
|
20104
20106
|
}
|
|
20105
20107
|
}
|
|
20106
20108
|
// ../../packages/publish-harness/src/index.ts
|
|
@@ -19905,7 +19905,7 @@ var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
|
19905
19905
|
shortVideo: Object.freeze({
|
|
19906
19906
|
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
19907
19907
|
kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
19908
|
-
shipinhao: Object.freeze({ max:
|
|
19908
|
+
shipinhao: Object.freeze({ max: 100, unit: "unicode_code_points" })
|
|
19909
19909
|
})
|
|
19910
19910
|
})
|
|
19911
19911
|
});
|
|
@@ -20073,11 +20073,11 @@ var PluginManifestSchemaBase = looseObject({
|
|
|
20073
20073
|
});
|
|
20074
20074
|
var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
|
|
20075
20075
|
if (manifest.browserSession !== undefined) {
|
|
20076
|
-
if (manifest.kind !== "publish") {
|
|
20076
|
+
if (manifest.kind !== "publish" && manifest.kind !== "ingestion") {
|
|
20077
20077
|
ctx.addIssue({
|
|
20078
20078
|
code: "custom",
|
|
20079
20079
|
path: ["browserSession"],
|
|
20080
|
-
message: `browserSession requires kind "publish", not "${manifest.kind}"`
|
|
20080
|
+
message: `browserSession requires kind "publish" or "ingestion", not "${manifest.kind}"`
|
|
20081
20081
|
});
|
|
20082
20082
|
}
|
|
20083
20083
|
if (manifest.check === undefined) {
|
|
@@ -20701,10 +20701,12 @@ function sha256Hex(value) {
|
|
|
20701
20701
|
var DEFAULT_BOT_PROFILE_ROOT = join4(homedir4(), ".config", "kk", "browser-profiles");
|
|
20702
20702
|
class BotError extends Error {
|
|
20703
20703
|
code;
|
|
20704
|
-
|
|
20704
|
+
details;
|
|
20705
|
+
constructor(code, message, details = {}) {
|
|
20705
20706
|
super(message);
|
|
20706
20707
|
this.name = "BotError";
|
|
20707
20708
|
this.code = code;
|
|
20709
|
+
this.details = details;
|
|
20708
20710
|
}
|
|
20709
20711
|
}
|
|
20710
20712
|
// ../../packages/publish-harness/src/profile-dir.ts
|
|
@@ -20369,10 +20369,12 @@ function normalizeSessionIdentity(value) {
|
|
|
20369
20369
|
}
|
|
20370
20370
|
class BotError extends Error {
|
|
20371
20371
|
code;
|
|
20372
|
-
|
|
20372
|
+
details;
|
|
20373
|
+
constructor(code, message, details = {}) {
|
|
20373
20374
|
super(message);
|
|
20374
20375
|
this.name = "BotError";
|
|
20375
20376
|
this.code = code;
|
|
20377
|
+
this.details = details;
|
|
20376
20378
|
}
|
|
20377
20379
|
}
|
|
20378
20380
|
// ../../packages/publish-harness/src/index.ts
|
|
@@ -20780,7 +20782,7 @@ var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
|
20780
20782
|
shortVideo: Object.freeze({
|
|
20781
20783
|
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
20782
20784
|
kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
20783
|
-
shipinhao: Object.freeze({ max:
|
|
20785
|
+
shipinhao: Object.freeze({ max: 100, unit: "unicode_code_points" })
|
|
20784
20786
|
})
|
|
20785
20787
|
})
|
|
20786
20788
|
});
|
|
@@ -20948,11 +20950,11 @@ var PluginManifestSchemaBase = looseObject({
|
|
|
20948
20950
|
});
|
|
20949
20951
|
var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
|
|
20950
20952
|
if (manifest.browserSession !== undefined) {
|
|
20951
|
-
if (manifest.kind !== "publish") {
|
|
20953
|
+
if (manifest.kind !== "publish" && manifest.kind !== "ingestion") {
|
|
20952
20954
|
ctx.addIssue({
|
|
20953
20955
|
code: "custom",
|
|
20954
20956
|
path: ["browserSession"],
|
|
20955
|
-
message: `browserSession requires kind "publish", not "${manifest.kind}"`
|
|
20957
|
+
message: `browserSession requires kind "publish" or "ingestion", not "${manifest.kind}"`
|
|
20956
20958
|
});
|
|
20957
20959
|
}
|
|
20958
20960
|
if (manifest.check === undefined) {
|