@gobing-ai/knowledge-kit 0.0.37 → 0.1.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/.claude-plugin/marketplace.json +1 -1
- package/dist/board/collect/index.css +654 -16
- package/dist/board/collect/index.js +191 -64
- package/dist/board/daily-voice/index.css +679 -12
- package/dist/board/daily-voice/index.js +185 -66
- package/dist/board/itc/index.css +679 -13
- package/dist/board/itc/index.js +188 -66
- package/dist/index.js +2864 -139
- package/package.json +3 -2
- package/plugins/generations/content-gen/dist/index.js +158 -12
- package/plugins/generations/core-facts-gen/dist/index.js +158 -12
- package/plugins/generations/daily-article-gen/dist/index.js +158 -12
- package/plugins/generations/dailynews-gen/dist/index.js +158 -12
- package/plugins/generations/episode-plan-gen/dist/index.js +158 -12
- package/plugins/generations/gemini-tts/README.md +4 -3
- package/plugins/generations/gemini-tts/dist/index.js +158 -12
- package/plugins/generations/image-gen/dist/index.js +158 -12
- package/plugins/generations/news-report-gen/dist/index.js +158 -12
- package/plugins/generations/omni-voice-gen/README.md +15 -4
- package/plugins/generations/omni-voice-gen/profiles.json +1 -2
- package/plugins/generations/voice-gen/dist/index.js +158 -12
- package/plugins/generations/voxcpm-tts/README.md +21 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +173 -13
- package/plugins/generations/voxcpm-tts/scripts/audit-speaker-consistency.py +109 -0
- package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +28 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +158 -12
- package/plugins/ingestions/horizon-ingest/dist/index.js +158 -12
- package/plugins/ingestions/last30days-ingest/dist/index.js +158 -12
- package/plugins/ingestions/web-search/dist/index.js +158 -12
- package/plugins/kk/commands/workflow-run.md +56 -18
- package/plugins/kk/decisions/kk-itc.yaml +46 -0
- package/plugins/kk/decisions/kk-seo-keyword.yaml +57 -0
- package/plugins/kk/decisions/kk-seo-page.yaml +230 -0
- package/plugins/kk/decisions/kk-seo-pair.yaml +21 -0
- package/plugins/kk/decisions/kk-seo-site.yaml +90 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/chinese-article.json +14 -0
- package/plugins/kk/publish-presets/technical-article.json +14 -0
- package/plugins/kk/references/smart-seo-attribution.md +85 -0
- package/plugins/kk/scripts/daily-stages.ts +42 -2
- package/plugins/kk/scripts/itc-stages.ts +25 -118
- package/plugins/kk/scripts/kk-workflow-stages.ts +38 -1
- package/plugins/kk/scripts/seo-decisions.ts +491 -0
- package/plugins/kk/scripts/seo-enrich.ts +728 -0
- package/plugins/kk/scripts/seo-facts.ts +610 -0
- package/plugins/kk/scripts/seo-fetch.ts +766 -0
- package/plugins/kk/scripts/seo-report.ts +460 -0
- package/plugins/kk/scripts/seo-rules.ts +1882 -0
- package/plugins/kk/scripts/seo-stages.ts +1044 -0
- package/plugins/kk/skills/article-adapt/SKILL.md +2 -2
- package/plugins/kk/skills/smart-seo/SKILL.md +183 -0
- package/plugins/kk/skills/smart-seo/references/method.md +126 -0
- package/plugins/kk/skills/smart-seo/references/narrative.md +125 -0
- package/plugins/kk/skills/smart-seo/references/operations.md +209 -0
- package/plugins/kk/skills/smart-seo/references/seo-geo-sources.md +90 -0
- package/plugins/kk/workflows/feature-verification.yaml +28 -24
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +85 -17
- package/plugins/kk/workflows/kk-itc-author.yaml +406 -0
- package/plugins/kk/workflows/kk-itc.yaml +208 -682
- package/plugins/kk/workflows/kk-smart-seo.yaml +251 -0
- package/plugins/publishings/bilibili-pub/dist/index.js +21782 -0
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +20410 -0
- package/plugins/publishings/bilibili-pub/package.json +20 -0
- package/plugins/publishings/bilibili-pub/plugin.json +12 -0
- package/plugins/publishings/bilibili-pub/src/flow.ts +1296 -0
- package/plugins/publishings/bilibili-pub/src/index.ts +139 -0
- package/plugins/publishings/bilibili-pub/src/profile-check.ts +19 -0
- package/plugins/publishings/bilibili-pub/src/selectors.ts +222 -0
- package/plugins/publishings/bilibili-pub/tsconfig.json +4 -0
- package/plugins/publishings/cnblogs-pub/dist/index.js +21383 -0
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +20412 -0
- package/plugins/publishings/cnblogs-pub/package.json +19 -0
- package/plugins/publishings/cnblogs-pub/plugin.json +12 -0
- package/plugins/publishings/cnblogs-pub/src/flow.ts +708 -0
- package/plugins/publishings/cnblogs-pub/src/index.ts +172 -0
- package/plugins/publishings/cnblogs-pub/src/profile-check.ts +24 -0
- package/plugins/publishings/cnblogs-pub/src/selectors.ts +104 -0
- package/plugins/publishings/cnblogs-pub/tsconfig.json +4 -0
- package/plugins/publishings/csdn-pub/dist/index.js +21552 -0
- package/plugins/publishings/csdn-pub/dist/profile-check.js +20963 -0
- package/plugins/publishings/csdn-pub/package.json +19 -0
- package/plugins/publishings/csdn-pub/plugin.json +12 -0
- package/plugins/publishings/csdn-pub/src/index.ts +1178 -0
- package/plugins/publishings/csdn-pub/src/profile-check.ts +23 -0
- package/plugins/publishings/csdn-pub/tsconfig.json +4 -0
- package/plugins/publishings/emdash-pub/dist/index.js +158 -12
- package/plugins/publishings/emdash-pub/plugin.json +22 -1
- package/plugins/publishings/infoq-pub/dist/index.js +160 -12
- package/plugins/publishings/infoq-pub/dist/profile-check.js +160 -12
- package/plugins/publishings/infoq-pub/plugin.json +21 -0
- package/plugins/publishings/jike-pub/dist/index.js +21379 -0
- package/plugins/publishings/jike-pub/dist/profile-check.js +20951 -0
- package/plugins/publishings/jike-pub/package.json +19 -0
- package/plugins/publishings/jike-pub/plugin.json +12 -0
- package/plugins/publishings/jike-pub/src/index.ts +800 -0
- package/plugins/publishings/jike-pub/src/profile-check.ts +21 -0
- package/plugins/publishings/jike-pub/tsconfig.json +4 -0
- package/plugins/publishings/juejin-pub/dist/index.js +160 -12
- package/plugins/publishings/juejin-pub/dist/profile-check.js +160 -12
- package/plugins/publishings/juejin-pub/plugin.json +21 -0
- package/plugins/publishings/medium-pub/dist/index.js +158 -12
- package/plugins/publishings/medium-pub/plugin.json +22 -1
- package/plugins/publishings/podcast-pub/dist/index.js +158 -12
- package/plugins/publishings/qiita-pub/dist/index.js +158 -12
- package/plugins/publishings/qiita-pub/plugin.json +24 -1
- package/plugins/publishings/shipinhao-pub/dist/index.js +21715 -0
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +20431 -0
- package/plugins/publishings/shipinhao-pub/package.json +19 -0
- package/plugins/publishings/shipinhao-pub/plugin.json +12 -0
- package/plugins/publishings/shipinhao-pub/src/flow.ts +1323 -0
- package/plugins/publishings/shipinhao-pub/src/index.ts +173 -0
- package/plugins/publishings/shipinhao-pub/src/profile-check.ts +25 -0
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +241 -0
- package/plugins/publishings/shipinhao-pub/tsconfig.json +4 -0
- package/plugins/publishings/sspai-pub/dist/index.js +21371 -0
- package/plugins/publishings/sspai-pub/dist/profile-check.js +20414 -0
- package/plugins/publishings/sspai-pub/package.json +19 -0
- package/plugins/publishings/sspai-pub/plugin.json +12 -0
- package/plugins/publishings/sspai-pub/src/flow.ts +624 -0
- package/plugins/publishings/sspai-pub/src/index.ts +167 -0
- package/plugins/publishings/sspai-pub/src/profile-check.ts +25 -0
- package/plugins/publishings/sspai-pub/src/selectors.ts +122 -0
- package/plugins/publishings/sspai-pub/tsconfig.json +4 -0
- package/plugins/publishings/substack-pub/dist/index.js +160 -12
- package/plugins/publishings/substack-pub/dist/profile-check.js +160 -12
- package/plugins/publishings/substack-pub/plugin.json +21 -0
- package/plugins/publishings/surfdash-pub/dist/index.js +158 -12
- package/plugins/publishings/surfdash-pub/plugin.json +22 -1
- package/plugins/publishings/threads-pub/dist/index.js +158 -12
- package/plugins/publishings/wechatmp-pub/dist/index.js +1669 -502
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +204 -21
- package/plugins/publishings/wechatmp-pub/plugin.json +32 -0
- package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +540 -0
- package/plugins/publishings/wechatmp-pub/src/cgi-media.ts +380 -0
- package/plugins/publishings/wechatmp-pub/src/cgi.ts +485 -0
- package/plugins/publishings/wechatmp-pub/src/flow.ts +104 -0
- package/plugins/publishings/weibo-pub/dist/index.js +160 -12
- package/plugins/publishings/weibo-pub/dist/profile-check.js +160 -12
- package/plugins/publishings/weibo-pub/plugin.json +35 -0
- package/plugins/publishings/x-pub/dist/index.js +160 -12
- package/plugins/publishings/x-pub/dist/profile-check.js +160 -12
- package/plugins/publishings/x-pub/plugin.json +40 -0
- package/plugins/publishings/xhs-pub/dist/index.js +160 -12
- package/plugins/publishings/xhs-pub/dist/profile-check.js +160 -12
- package/plugins/publishings/xhs-pub/plugin.json +37 -0
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +21491 -0
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +20417 -0
- package/plugins/publishings/xiaoyuzhou-pub/package.json +19 -0
- package/plugins/publishings/xiaoyuzhou-pub/plugin.json +12 -0
- package/plugins/publishings/xiaoyuzhou-pub/src/flow.ts +826 -0
- package/plugins/publishings/xiaoyuzhou-pub/src/index.ts +174 -0
- package/plugins/publishings/xiaoyuzhou-pub/src/profile-check.ts +26 -0
- package/plugins/publishings/xiaoyuzhou-pub/src/selectors.ts +125 -0
- package/plugins/publishings/xiaoyuzhou-pub/tsconfig.json +4 -0
- package/plugins/publishings/zenn-pub/dist/index.js +158 -12
- package/plugins/publishings/zenn-pub/plugin.json +22 -1
- package/plugins/generations/omni-voice-gen/voices/robin-news.wav +0 -0
|
@@ -11985,6 +11985,83 @@ import { homedir } from "os";
|
|
|
11985
11985
|
import { dirname as dirname2, join } from "path";
|
|
11986
11986
|
import { parseArgs } from "util";
|
|
11987
11987
|
|
|
11988
|
+
// ../../packages/kk-core/src/content-limits.ts
|
|
11989
|
+
var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
11990
|
+
schemaVersion: 5,
|
|
11991
|
+
tagLimits: Object.freeze({
|
|
11992
|
+
default: 7,
|
|
11993
|
+
imageText: Object.freeze({
|
|
11994
|
+
instagram: 5,
|
|
11995
|
+
douyin: 5,
|
|
11996
|
+
kuaishou: 4,
|
|
11997
|
+
weixin: 1,
|
|
11998
|
+
xiaohongshu: 10
|
|
11999
|
+
}),
|
|
12000
|
+
shortVideo: Object.freeze({
|
|
12001
|
+
douyin: 5,
|
|
12002
|
+
kuaishou: 4,
|
|
12003
|
+
xiaohongshu: 10,
|
|
12004
|
+
bilibili: 10,
|
|
12005
|
+
zhihu: 5,
|
|
12006
|
+
tiktok: 20,
|
|
12007
|
+
youtube: 60
|
|
12008
|
+
})
|
|
12009
|
+
}),
|
|
12010
|
+
titleCapabilities: Object.freeze({
|
|
12011
|
+
dynamic: Object.freeze({
|
|
12012
|
+
bilibili: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12013
|
+
zhihu: Object.freeze({ max: 50, unit: "utf16_code_units" }),
|
|
12014
|
+
douban: Object.freeze({ max: 70, unit: "utf16_code_units" }),
|
|
12015
|
+
x: null,
|
|
12016
|
+
threads: null,
|
|
12017
|
+
weibo: null,
|
|
12018
|
+
jike: null,
|
|
12019
|
+
zsxq: null,
|
|
12020
|
+
toutiao: null,
|
|
12021
|
+
juejin: null
|
|
12022
|
+
}),
|
|
12023
|
+
imageText: Object.freeze({
|
|
12024
|
+
xiaohongshu: Object.freeze({ max: 20, unit: "xiaohongshu_title_weighted" }),
|
|
12025
|
+
weixin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12026
|
+
douyin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12027
|
+
shipinhao: Object.freeze({ max: 22, unit: "utf16_code_units" }),
|
|
12028
|
+
reddit: Object.freeze({ max: 300, unit: "utf16_code_units" })
|
|
12029
|
+
}),
|
|
12030
|
+
article: Object.freeze({
|
|
12031
|
+
juejin: Object.freeze({ max: 100, unit: "utf16_code_units" }),
|
|
12032
|
+
csdn: Object.freeze({ max: 100, unit: "utf16_code_units" }),
|
|
12033
|
+
cnblogs: Object.freeze({ max: 128, unit: "utf16_code_units" }),
|
|
12034
|
+
weibo: Object.freeze({ max: 30, unit: "utf16_code_units" }),
|
|
12035
|
+
sspai: Object.freeze({ max: 80, unit: "utf16_code_units" })
|
|
12036
|
+
}),
|
|
12037
|
+
shortVideo: Object.freeze({
|
|
12038
|
+
shipinhao: Object.freeze({ max: 16, unit: "utf16_code_units" }),
|
|
12039
|
+
douyin: Object.freeze({ max: 30, unit: "utf16_code_units" }),
|
|
12040
|
+
bilibili: Object.freeze({ max: 80, unit: "utf16_code_units" })
|
|
12041
|
+
})
|
|
12042
|
+
}),
|
|
12043
|
+
bodyCapabilities: Object.freeze({
|
|
12044
|
+
dynamic: Object.freeze({
|
|
12045
|
+
threads: Object.freeze({ max: 500, unit: "unicode_code_points", behavior: "split_thread" }),
|
|
12046
|
+
x: Object.freeze({ max: 280, unit: "weighted", behavior: "split_thread" }),
|
|
12047
|
+
weibo: Object.freeze({ max: 2000, unit: "unicode_code_points" }),
|
|
12048
|
+
jike: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12049
|
+
}),
|
|
12050
|
+
imageText: Object.freeze({
|
|
12051
|
+
xiaohongshu: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12052
|
+
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12053
|
+
}),
|
|
12054
|
+
article: Object.freeze({
|
|
12055
|
+
wechatmp: Object.freeze({ max: 50000, unit: "unicode_code_points" }),
|
|
12056
|
+
juejin: Object.freeze({ max: 50000, unit: "unicode_code_points" })
|
|
12057
|
+
}),
|
|
12058
|
+
shortVideo: Object.freeze({
|
|
12059
|
+
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12060
|
+
kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12061
|
+
shipinhao: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12062
|
+
})
|
|
12063
|
+
})
|
|
12064
|
+
});
|
|
11988
12065
|
// ../../packages/kk-core/src/kinds.ts
|
|
11989
12066
|
init_zod();
|
|
11990
12067
|
|
|
@@ -12075,6 +12152,67 @@ var BrowserSessionDescriptorSchema = object({
|
|
|
12075
12152
|
}
|
|
12076
12153
|
}).optional()
|
|
12077
12154
|
}).strict();
|
|
12155
|
+
var ContentCountUnitSchema = _enum([
|
|
12156
|
+
"utf16_code_units",
|
|
12157
|
+
"unicode_code_points",
|
|
12158
|
+
"weighted",
|
|
12159
|
+
"xiaohongshu_title_weighted"
|
|
12160
|
+
]);
|
|
12161
|
+
var LimitEntrySchema = object({
|
|
12162
|
+
max: number2().int().positive(),
|
|
12163
|
+
unit: ContentCountUnitSchema
|
|
12164
|
+
}).strict();
|
|
12165
|
+
var PublishingProfileLimitsSchema = object({
|
|
12166
|
+
title: LimitEntrySchema.optional(),
|
|
12167
|
+
body: LimitEntrySchema.optional()
|
|
12168
|
+
}).strict();
|
|
12169
|
+
var PublishingProfileRequiresSchema = object({
|
|
12170
|
+
cover: boolean2().optional(),
|
|
12171
|
+
orderedImages: boolean2().optional()
|
|
12172
|
+
}).strict();
|
|
12173
|
+
var PublishingProfileModeBindingSchema = object({
|
|
12174
|
+
metadata: record(string2(), unknown())
|
|
12175
|
+
}).strict();
|
|
12176
|
+
var PublishingProfileModesSchema = object({
|
|
12177
|
+
draft: PublishingProfileModeBindingSchema.optional(),
|
|
12178
|
+
live: PublishingProfileModeBindingSchema.optional()
|
|
12179
|
+
}).strict().superRefine((modes, ctx) => {
|
|
12180
|
+
if (modes.draft === undefined && modes.live === undefined) {
|
|
12181
|
+
ctx.addIssue({
|
|
12182
|
+
code: "custom",
|
|
12183
|
+
message: 'modes must define at least one of "draft" or "live"'
|
|
12184
|
+
});
|
|
12185
|
+
}
|
|
12186
|
+
});
|
|
12187
|
+
var PublishingProfileSchema = object({
|
|
12188
|
+
format: string2().min(1),
|
|
12189
|
+
locale: string2().regex(/^(source|[a-z]{2,3}(-[A-Za-z0-9]+)*)$/, {
|
|
12190
|
+
message: 'locale must be "source" or a valid language tag'
|
|
12191
|
+
}),
|
|
12192
|
+
limits: PublishingProfileLimitsSchema.optional(),
|
|
12193
|
+
requires: PublishingProfileRequiresSchema.optional(),
|
|
12194
|
+
modes: PublishingProfileModesSchema
|
|
12195
|
+
}).strict();
|
|
12196
|
+
var PublishingCapabilitiesSchema = object({
|
|
12197
|
+
defaultProfile: string2().min(1),
|
|
12198
|
+
profiles: record(string2().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/), PublishingProfileSchema)
|
|
12199
|
+
}).strict().superRefine((data, ctx) => {
|
|
12200
|
+
const keys = Object.keys(data.profiles);
|
|
12201
|
+
if (keys.length === 0) {
|
|
12202
|
+
ctx.addIssue({
|
|
12203
|
+
code: "custom",
|
|
12204
|
+
path: ["profiles"],
|
|
12205
|
+
message: "profiles record must be nonempty"
|
|
12206
|
+
});
|
|
12207
|
+
}
|
|
12208
|
+
if (!(data.defaultProfile in data.profiles)) {
|
|
12209
|
+
ctx.addIssue({
|
|
12210
|
+
code: "custom",
|
|
12211
|
+
path: ["defaultProfile"],
|
|
12212
|
+
message: `defaultProfile "${data.defaultProfile}" must reference a declared profile`
|
|
12213
|
+
});
|
|
12214
|
+
}
|
|
12215
|
+
});
|
|
12078
12216
|
var PluginManifestSchemaBase = looseObject({
|
|
12079
12217
|
name: string2().min(1),
|
|
12080
12218
|
kind: PluginKindSchema,
|
|
@@ -12083,23 +12221,31 @@ var PluginManifestSchemaBase = looseObject({
|
|
|
12083
12221
|
version: string2().optional(),
|
|
12084
12222
|
description: string2().optional(),
|
|
12085
12223
|
operations: record(string2(), PluginOperationSchema).optional(),
|
|
12086
|
-
browserSession: BrowserSessionDescriptorSchema.optional()
|
|
12224
|
+
browserSession: BrowserSessionDescriptorSchema.optional(),
|
|
12225
|
+
publishing: PublishingCapabilitiesSchema.optional()
|
|
12087
12226
|
});
|
|
12088
12227
|
var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
|
|
12089
|
-
if (manifest.browserSession
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
}
|
|
12228
|
+
if (manifest.browserSession !== undefined) {
|
|
12229
|
+
if (manifest.kind !== "publish") {
|
|
12230
|
+
ctx.addIssue({
|
|
12231
|
+
code: "custom",
|
|
12232
|
+
path: ["browserSession"],
|
|
12233
|
+
message: `browserSession requires kind "publish", not "${manifest.kind}"`
|
|
12234
|
+
});
|
|
12235
|
+
}
|
|
12236
|
+
if (manifest.check === undefined) {
|
|
12237
|
+
ctx.addIssue({
|
|
12238
|
+
code: "custom",
|
|
12239
|
+
path: ["browserSession"],
|
|
12240
|
+
message: "browserSession requires a check probe entry that owns the session routines"
|
|
12241
|
+
});
|
|
12242
|
+
}
|
|
12097
12243
|
}
|
|
12098
|
-
if (manifest.
|
|
12244
|
+
if (manifest.publishing !== undefined && manifest.kind !== "publish") {
|
|
12099
12245
|
ctx.addIssue({
|
|
12100
12246
|
code: "custom",
|
|
12101
|
-
path: ["
|
|
12102
|
-
message:
|
|
12247
|
+
path: ["publishing"],
|
|
12248
|
+
message: `publishing requires kind "publish", not "${manifest.kind}"`
|
|
12103
12249
|
});
|
|
12104
12250
|
}
|
|
12105
12251
|
});
|
|
@@ -11986,6 +11986,83 @@ import { homedir } from "os";
|
|
|
11986
11986
|
import { dirname as dirname2, join } from "path";
|
|
11987
11987
|
import { parseArgs } from "util";
|
|
11988
11988
|
|
|
11989
|
+
// ../../packages/kk-core/src/content-limits.ts
|
|
11990
|
+
var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
11991
|
+
schemaVersion: 5,
|
|
11992
|
+
tagLimits: Object.freeze({
|
|
11993
|
+
default: 7,
|
|
11994
|
+
imageText: Object.freeze({
|
|
11995
|
+
instagram: 5,
|
|
11996
|
+
douyin: 5,
|
|
11997
|
+
kuaishou: 4,
|
|
11998
|
+
weixin: 1,
|
|
11999
|
+
xiaohongshu: 10
|
|
12000
|
+
}),
|
|
12001
|
+
shortVideo: Object.freeze({
|
|
12002
|
+
douyin: 5,
|
|
12003
|
+
kuaishou: 4,
|
|
12004
|
+
xiaohongshu: 10,
|
|
12005
|
+
bilibili: 10,
|
|
12006
|
+
zhihu: 5,
|
|
12007
|
+
tiktok: 20,
|
|
12008
|
+
youtube: 60
|
|
12009
|
+
})
|
|
12010
|
+
}),
|
|
12011
|
+
titleCapabilities: Object.freeze({
|
|
12012
|
+
dynamic: Object.freeze({
|
|
12013
|
+
bilibili: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12014
|
+
zhihu: Object.freeze({ max: 50, unit: "utf16_code_units" }),
|
|
12015
|
+
douban: Object.freeze({ max: 70, unit: "utf16_code_units" }),
|
|
12016
|
+
x: null,
|
|
12017
|
+
threads: null,
|
|
12018
|
+
weibo: null,
|
|
12019
|
+
jike: null,
|
|
12020
|
+
zsxq: null,
|
|
12021
|
+
toutiao: null,
|
|
12022
|
+
juejin: null
|
|
12023
|
+
}),
|
|
12024
|
+
imageText: Object.freeze({
|
|
12025
|
+
xiaohongshu: Object.freeze({ max: 20, unit: "xiaohongshu_title_weighted" }),
|
|
12026
|
+
weixin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12027
|
+
douyin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12028
|
+
shipinhao: Object.freeze({ max: 22, unit: "utf16_code_units" }),
|
|
12029
|
+
reddit: Object.freeze({ max: 300, unit: "utf16_code_units" })
|
|
12030
|
+
}),
|
|
12031
|
+
article: Object.freeze({
|
|
12032
|
+
juejin: Object.freeze({ max: 100, unit: "utf16_code_units" }),
|
|
12033
|
+
csdn: Object.freeze({ max: 100, unit: "utf16_code_units" }),
|
|
12034
|
+
cnblogs: Object.freeze({ max: 128, unit: "utf16_code_units" }),
|
|
12035
|
+
weibo: Object.freeze({ max: 30, unit: "utf16_code_units" }),
|
|
12036
|
+
sspai: Object.freeze({ max: 80, unit: "utf16_code_units" })
|
|
12037
|
+
}),
|
|
12038
|
+
shortVideo: Object.freeze({
|
|
12039
|
+
shipinhao: Object.freeze({ max: 16, unit: "utf16_code_units" }),
|
|
12040
|
+
douyin: Object.freeze({ max: 30, unit: "utf16_code_units" }),
|
|
12041
|
+
bilibili: Object.freeze({ max: 80, unit: "utf16_code_units" })
|
|
12042
|
+
})
|
|
12043
|
+
}),
|
|
12044
|
+
bodyCapabilities: Object.freeze({
|
|
12045
|
+
dynamic: Object.freeze({
|
|
12046
|
+
threads: Object.freeze({ max: 500, unit: "unicode_code_points", behavior: "split_thread" }),
|
|
12047
|
+
x: Object.freeze({ max: 280, unit: "weighted", behavior: "split_thread" }),
|
|
12048
|
+
weibo: Object.freeze({ max: 2000, unit: "unicode_code_points" }),
|
|
12049
|
+
jike: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12050
|
+
}),
|
|
12051
|
+
imageText: Object.freeze({
|
|
12052
|
+
xiaohongshu: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12053
|
+
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12054
|
+
}),
|
|
12055
|
+
article: Object.freeze({
|
|
12056
|
+
wechatmp: Object.freeze({ max: 50000, unit: "unicode_code_points" }),
|
|
12057
|
+
juejin: Object.freeze({ max: 50000, unit: "unicode_code_points" })
|
|
12058
|
+
}),
|
|
12059
|
+
shortVideo: Object.freeze({
|
|
12060
|
+
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12061
|
+
kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12062
|
+
shipinhao: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12063
|
+
})
|
|
12064
|
+
})
|
|
12065
|
+
});
|
|
11989
12066
|
// ../../packages/kk-core/src/kinds.ts
|
|
11990
12067
|
init_zod();
|
|
11991
12068
|
|
|
@@ -12076,6 +12153,67 @@ var BrowserSessionDescriptorSchema = object({
|
|
|
12076
12153
|
}
|
|
12077
12154
|
}).optional()
|
|
12078
12155
|
}).strict();
|
|
12156
|
+
var ContentCountUnitSchema = _enum([
|
|
12157
|
+
"utf16_code_units",
|
|
12158
|
+
"unicode_code_points",
|
|
12159
|
+
"weighted",
|
|
12160
|
+
"xiaohongshu_title_weighted"
|
|
12161
|
+
]);
|
|
12162
|
+
var LimitEntrySchema = object({
|
|
12163
|
+
max: number2().int().positive(),
|
|
12164
|
+
unit: ContentCountUnitSchema
|
|
12165
|
+
}).strict();
|
|
12166
|
+
var PublishingProfileLimitsSchema = object({
|
|
12167
|
+
title: LimitEntrySchema.optional(),
|
|
12168
|
+
body: LimitEntrySchema.optional()
|
|
12169
|
+
}).strict();
|
|
12170
|
+
var PublishingProfileRequiresSchema = object({
|
|
12171
|
+
cover: boolean2().optional(),
|
|
12172
|
+
orderedImages: boolean2().optional()
|
|
12173
|
+
}).strict();
|
|
12174
|
+
var PublishingProfileModeBindingSchema = object({
|
|
12175
|
+
metadata: record(string2(), unknown())
|
|
12176
|
+
}).strict();
|
|
12177
|
+
var PublishingProfileModesSchema = object({
|
|
12178
|
+
draft: PublishingProfileModeBindingSchema.optional(),
|
|
12179
|
+
live: PublishingProfileModeBindingSchema.optional()
|
|
12180
|
+
}).strict().superRefine((modes, ctx) => {
|
|
12181
|
+
if (modes.draft === undefined && modes.live === undefined) {
|
|
12182
|
+
ctx.addIssue({
|
|
12183
|
+
code: "custom",
|
|
12184
|
+
message: 'modes must define at least one of "draft" or "live"'
|
|
12185
|
+
});
|
|
12186
|
+
}
|
|
12187
|
+
});
|
|
12188
|
+
var PublishingProfileSchema = object({
|
|
12189
|
+
format: string2().min(1),
|
|
12190
|
+
locale: string2().regex(/^(source|[a-z]{2,3}(-[A-Za-z0-9]+)*)$/, {
|
|
12191
|
+
message: 'locale must be "source" or a valid language tag'
|
|
12192
|
+
}),
|
|
12193
|
+
limits: PublishingProfileLimitsSchema.optional(),
|
|
12194
|
+
requires: PublishingProfileRequiresSchema.optional(),
|
|
12195
|
+
modes: PublishingProfileModesSchema
|
|
12196
|
+
}).strict();
|
|
12197
|
+
var PublishingCapabilitiesSchema = object({
|
|
12198
|
+
defaultProfile: string2().min(1),
|
|
12199
|
+
profiles: record(string2().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/), PublishingProfileSchema)
|
|
12200
|
+
}).strict().superRefine((data, ctx) => {
|
|
12201
|
+
const keys = Object.keys(data.profiles);
|
|
12202
|
+
if (keys.length === 0) {
|
|
12203
|
+
ctx.addIssue({
|
|
12204
|
+
code: "custom",
|
|
12205
|
+
path: ["profiles"],
|
|
12206
|
+
message: "profiles record must be nonempty"
|
|
12207
|
+
});
|
|
12208
|
+
}
|
|
12209
|
+
if (!(data.defaultProfile in data.profiles)) {
|
|
12210
|
+
ctx.addIssue({
|
|
12211
|
+
code: "custom",
|
|
12212
|
+
path: ["defaultProfile"],
|
|
12213
|
+
message: `defaultProfile "${data.defaultProfile}" must reference a declared profile`
|
|
12214
|
+
});
|
|
12215
|
+
}
|
|
12216
|
+
});
|
|
12079
12217
|
var PluginManifestSchemaBase = looseObject({
|
|
12080
12218
|
name: string2().min(1),
|
|
12081
12219
|
kind: PluginKindSchema,
|
|
@@ -12084,23 +12222,31 @@ var PluginManifestSchemaBase = looseObject({
|
|
|
12084
12222
|
version: string2().optional(),
|
|
12085
12223
|
description: string2().optional(),
|
|
12086
12224
|
operations: record(string2(), PluginOperationSchema).optional(),
|
|
12087
|
-
browserSession: BrowserSessionDescriptorSchema.optional()
|
|
12225
|
+
browserSession: BrowserSessionDescriptorSchema.optional(),
|
|
12226
|
+
publishing: PublishingCapabilitiesSchema.optional()
|
|
12088
12227
|
});
|
|
12089
12228
|
var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
|
|
12090
|
-
if (manifest.browserSession
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
}
|
|
12229
|
+
if (manifest.browserSession !== undefined) {
|
|
12230
|
+
if (manifest.kind !== "publish") {
|
|
12231
|
+
ctx.addIssue({
|
|
12232
|
+
code: "custom",
|
|
12233
|
+
path: ["browserSession"],
|
|
12234
|
+
message: `browserSession requires kind "publish", not "${manifest.kind}"`
|
|
12235
|
+
});
|
|
12236
|
+
}
|
|
12237
|
+
if (manifest.check === undefined) {
|
|
12238
|
+
ctx.addIssue({
|
|
12239
|
+
code: "custom",
|
|
12240
|
+
path: ["browserSession"],
|
|
12241
|
+
message: "browserSession requires a check probe entry that owns the session routines"
|
|
12242
|
+
});
|
|
12243
|
+
}
|
|
12098
12244
|
}
|
|
12099
|
-
if (manifest.
|
|
12245
|
+
if (manifest.publishing !== undefined && manifest.kind !== "publish") {
|
|
12100
12246
|
ctx.addIssue({
|
|
12101
12247
|
code: "custom",
|
|
12102
|
-
path: ["
|
|
12103
|
-
message:
|
|
12248
|
+
path: ["publishing"],
|
|
12249
|
+
message: `publishing requires kind "publish", not "${manifest.kind}"`
|
|
12104
12250
|
});
|
|
12105
12251
|
}
|
|
12106
12252
|
});
|
|
@@ -12005,6 +12005,83 @@ import { createHash } from "crypto";
|
|
|
12005
12005
|
import { dirname as dirname2, join } from "path";
|
|
12006
12006
|
import { parseArgs } from "util";
|
|
12007
12007
|
|
|
12008
|
+
// ../../packages/kk-core/src/content-limits.ts
|
|
12009
|
+
var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
12010
|
+
schemaVersion: 5,
|
|
12011
|
+
tagLimits: Object.freeze({
|
|
12012
|
+
default: 7,
|
|
12013
|
+
imageText: Object.freeze({
|
|
12014
|
+
instagram: 5,
|
|
12015
|
+
douyin: 5,
|
|
12016
|
+
kuaishou: 4,
|
|
12017
|
+
weixin: 1,
|
|
12018
|
+
xiaohongshu: 10
|
|
12019
|
+
}),
|
|
12020
|
+
shortVideo: Object.freeze({
|
|
12021
|
+
douyin: 5,
|
|
12022
|
+
kuaishou: 4,
|
|
12023
|
+
xiaohongshu: 10,
|
|
12024
|
+
bilibili: 10,
|
|
12025
|
+
zhihu: 5,
|
|
12026
|
+
tiktok: 20,
|
|
12027
|
+
youtube: 60
|
|
12028
|
+
})
|
|
12029
|
+
}),
|
|
12030
|
+
titleCapabilities: Object.freeze({
|
|
12031
|
+
dynamic: Object.freeze({
|
|
12032
|
+
bilibili: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12033
|
+
zhihu: Object.freeze({ max: 50, unit: "utf16_code_units" }),
|
|
12034
|
+
douban: Object.freeze({ max: 70, unit: "utf16_code_units" }),
|
|
12035
|
+
x: null,
|
|
12036
|
+
threads: null,
|
|
12037
|
+
weibo: null,
|
|
12038
|
+
jike: null,
|
|
12039
|
+
zsxq: null,
|
|
12040
|
+
toutiao: null,
|
|
12041
|
+
juejin: null
|
|
12042
|
+
}),
|
|
12043
|
+
imageText: Object.freeze({
|
|
12044
|
+
xiaohongshu: Object.freeze({ max: 20, unit: "xiaohongshu_title_weighted" }),
|
|
12045
|
+
weixin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12046
|
+
douyin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
|
|
12047
|
+
shipinhao: Object.freeze({ max: 22, unit: "utf16_code_units" }),
|
|
12048
|
+
reddit: Object.freeze({ max: 300, unit: "utf16_code_units" })
|
|
12049
|
+
}),
|
|
12050
|
+
article: Object.freeze({
|
|
12051
|
+
juejin: Object.freeze({ max: 100, unit: "utf16_code_units" }),
|
|
12052
|
+
csdn: Object.freeze({ max: 100, unit: "utf16_code_units" }),
|
|
12053
|
+
cnblogs: Object.freeze({ max: 128, unit: "utf16_code_units" }),
|
|
12054
|
+
weibo: Object.freeze({ max: 30, unit: "utf16_code_units" }),
|
|
12055
|
+
sspai: Object.freeze({ max: 80, unit: "utf16_code_units" })
|
|
12056
|
+
}),
|
|
12057
|
+
shortVideo: Object.freeze({
|
|
12058
|
+
shipinhao: Object.freeze({ max: 16, unit: "utf16_code_units" }),
|
|
12059
|
+
douyin: Object.freeze({ max: 30, unit: "utf16_code_units" }),
|
|
12060
|
+
bilibili: Object.freeze({ max: 80, unit: "utf16_code_units" })
|
|
12061
|
+
})
|
|
12062
|
+
}),
|
|
12063
|
+
bodyCapabilities: Object.freeze({
|
|
12064
|
+
dynamic: Object.freeze({
|
|
12065
|
+
threads: Object.freeze({ max: 500, unit: "unicode_code_points", behavior: "split_thread" }),
|
|
12066
|
+
x: Object.freeze({ max: 280, unit: "weighted", behavior: "split_thread" }),
|
|
12067
|
+
weibo: Object.freeze({ max: 2000, unit: "unicode_code_points" }),
|
|
12068
|
+
jike: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12069
|
+
}),
|
|
12070
|
+
imageText: Object.freeze({
|
|
12071
|
+
xiaohongshu: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12072
|
+
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12073
|
+
}),
|
|
12074
|
+
article: Object.freeze({
|
|
12075
|
+
wechatmp: Object.freeze({ max: 50000, unit: "unicode_code_points" }),
|
|
12076
|
+
juejin: Object.freeze({ max: 50000, unit: "unicode_code_points" })
|
|
12077
|
+
}),
|
|
12078
|
+
shortVideo: Object.freeze({
|
|
12079
|
+
douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12080
|
+
kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
|
|
12081
|
+
shipinhao: Object.freeze({ max: 1000, unit: "unicode_code_points" })
|
|
12082
|
+
})
|
|
12083
|
+
})
|
|
12084
|
+
});
|
|
12008
12085
|
// ../../packages/kk-core/src/kinds.ts
|
|
12009
12086
|
init_zod();
|
|
12010
12087
|
|
|
@@ -12095,6 +12172,67 @@ var BrowserSessionDescriptorSchema = object({
|
|
|
12095
12172
|
}
|
|
12096
12173
|
}).optional()
|
|
12097
12174
|
}).strict();
|
|
12175
|
+
var ContentCountUnitSchema = _enum([
|
|
12176
|
+
"utf16_code_units",
|
|
12177
|
+
"unicode_code_points",
|
|
12178
|
+
"weighted",
|
|
12179
|
+
"xiaohongshu_title_weighted"
|
|
12180
|
+
]);
|
|
12181
|
+
var LimitEntrySchema = object({
|
|
12182
|
+
max: number2().int().positive(),
|
|
12183
|
+
unit: ContentCountUnitSchema
|
|
12184
|
+
}).strict();
|
|
12185
|
+
var PublishingProfileLimitsSchema = object({
|
|
12186
|
+
title: LimitEntrySchema.optional(),
|
|
12187
|
+
body: LimitEntrySchema.optional()
|
|
12188
|
+
}).strict();
|
|
12189
|
+
var PublishingProfileRequiresSchema = object({
|
|
12190
|
+
cover: boolean2().optional(),
|
|
12191
|
+
orderedImages: boolean2().optional()
|
|
12192
|
+
}).strict();
|
|
12193
|
+
var PublishingProfileModeBindingSchema = object({
|
|
12194
|
+
metadata: record(string2(), unknown())
|
|
12195
|
+
}).strict();
|
|
12196
|
+
var PublishingProfileModesSchema = object({
|
|
12197
|
+
draft: PublishingProfileModeBindingSchema.optional(),
|
|
12198
|
+
live: PublishingProfileModeBindingSchema.optional()
|
|
12199
|
+
}).strict().superRefine((modes, ctx) => {
|
|
12200
|
+
if (modes.draft === undefined && modes.live === undefined) {
|
|
12201
|
+
ctx.addIssue({
|
|
12202
|
+
code: "custom",
|
|
12203
|
+
message: 'modes must define at least one of "draft" or "live"'
|
|
12204
|
+
});
|
|
12205
|
+
}
|
|
12206
|
+
});
|
|
12207
|
+
var PublishingProfileSchema = object({
|
|
12208
|
+
format: string2().min(1),
|
|
12209
|
+
locale: string2().regex(/^(source|[a-z]{2,3}(-[A-Za-z0-9]+)*)$/, {
|
|
12210
|
+
message: 'locale must be "source" or a valid language tag'
|
|
12211
|
+
}),
|
|
12212
|
+
limits: PublishingProfileLimitsSchema.optional(),
|
|
12213
|
+
requires: PublishingProfileRequiresSchema.optional(),
|
|
12214
|
+
modes: PublishingProfileModesSchema
|
|
12215
|
+
}).strict();
|
|
12216
|
+
var PublishingCapabilitiesSchema = object({
|
|
12217
|
+
defaultProfile: string2().min(1),
|
|
12218
|
+
profiles: record(string2().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/), PublishingProfileSchema)
|
|
12219
|
+
}).strict().superRefine((data, ctx) => {
|
|
12220
|
+
const keys = Object.keys(data.profiles);
|
|
12221
|
+
if (keys.length === 0) {
|
|
12222
|
+
ctx.addIssue({
|
|
12223
|
+
code: "custom",
|
|
12224
|
+
path: ["profiles"],
|
|
12225
|
+
message: "profiles record must be nonempty"
|
|
12226
|
+
});
|
|
12227
|
+
}
|
|
12228
|
+
if (!(data.defaultProfile in data.profiles)) {
|
|
12229
|
+
ctx.addIssue({
|
|
12230
|
+
code: "custom",
|
|
12231
|
+
path: ["defaultProfile"],
|
|
12232
|
+
message: `defaultProfile "${data.defaultProfile}" must reference a declared profile`
|
|
12233
|
+
});
|
|
12234
|
+
}
|
|
12235
|
+
});
|
|
12098
12236
|
var PluginManifestSchemaBase = looseObject({
|
|
12099
12237
|
name: string2().min(1),
|
|
12100
12238
|
kind: PluginKindSchema,
|
|
@@ -12103,23 +12241,31 @@ var PluginManifestSchemaBase = looseObject({
|
|
|
12103
12241
|
version: string2().optional(),
|
|
12104
12242
|
description: string2().optional(),
|
|
12105
12243
|
operations: record(string2(), PluginOperationSchema).optional(),
|
|
12106
|
-
browserSession: BrowserSessionDescriptorSchema.optional()
|
|
12244
|
+
browserSession: BrowserSessionDescriptorSchema.optional(),
|
|
12245
|
+
publishing: PublishingCapabilitiesSchema.optional()
|
|
12107
12246
|
});
|
|
12108
12247
|
var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
|
|
12109
|
-
if (manifest.browserSession
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
}
|
|
12248
|
+
if (manifest.browserSession !== undefined) {
|
|
12249
|
+
if (manifest.kind !== "publish") {
|
|
12250
|
+
ctx.addIssue({
|
|
12251
|
+
code: "custom",
|
|
12252
|
+
path: ["browserSession"],
|
|
12253
|
+
message: `browserSession requires kind "publish", not "${manifest.kind}"`
|
|
12254
|
+
});
|
|
12255
|
+
}
|
|
12256
|
+
if (manifest.check === undefined) {
|
|
12257
|
+
ctx.addIssue({
|
|
12258
|
+
code: "custom",
|
|
12259
|
+
path: ["browserSession"],
|
|
12260
|
+
message: "browserSession requires a check probe entry that owns the session routines"
|
|
12261
|
+
});
|
|
12262
|
+
}
|
|
12117
12263
|
}
|
|
12118
|
-
if (manifest.
|
|
12264
|
+
if (manifest.publishing !== undefined && manifest.kind !== "publish") {
|
|
12119
12265
|
ctx.addIssue({
|
|
12120
12266
|
code: "custom",
|
|
12121
|
-
path: ["
|
|
12122
|
-
message:
|
|
12267
|
+
path: ["publishing"],
|
|
12268
|
+
message: `publishing requires kind "publish", not "${manifest.kind}"`
|
|
12123
12269
|
});
|
|
12124
12270
|
}
|
|
12125
12271
|
});
|