@gobing-ai/knowledge-kit 0.0.36 → 0.1.0

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.
Files changed (159) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/collect/index.css +654 -16
  3. package/dist/board/collect/index.js +191 -64
  4. package/dist/board/daily-voice/index.css +679 -12
  5. package/dist/board/daily-voice/index.js +185 -66
  6. package/dist/board/itc/index.css +679 -13
  7. package/dist/board/itc/index.js +188 -66
  8. package/dist/index.js +2878 -152
  9. package/package.json +3 -2
  10. package/plugins/generations/content-gen/dist/index.js +158 -12
  11. package/plugins/generations/core-facts-gen/dist/index.js +158 -12
  12. package/plugins/generations/daily-article-gen/dist/index.js +158 -12
  13. package/plugins/generations/dailynews-gen/dist/index.js +180 -12
  14. package/plugins/generations/dailynews-gen/src/script-plan.ts +32 -0
  15. package/plugins/generations/episode-plan-gen/dist/index.js +158 -12
  16. package/plugins/generations/gemini-tts/README.md +4 -3
  17. package/plugins/generations/gemini-tts/dist/index.js +158 -12
  18. package/plugins/generations/image-gen/dist/index.js +158 -12
  19. package/plugins/generations/news-report-gen/dist/index.js +158 -12
  20. package/plugins/generations/omni-voice-gen/README.md +15 -4
  21. package/plugins/generations/omni-voice-gen/profiles.json +1 -2
  22. package/plugins/generations/voice-gen/dist/index.js +158 -12
  23. package/plugins/generations/voxcpm-tts/README.md +21 -1
  24. package/plugins/generations/voxcpm-tts/dist/index.js +173 -13
  25. package/plugins/generations/voxcpm-tts/scripts/audit-speaker-consistency.py +109 -0
  26. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +28 -1
  27. package/plugins/ingestions/aihot-ingest/dist/index.js +158 -12
  28. package/plugins/ingestions/horizon-ingest/dist/index.js +158 -12
  29. package/plugins/ingestions/last30days-ingest/dist/index.js +158 -12
  30. package/plugins/ingestions/web-search/dist/index.js +158 -12
  31. package/plugins/kk/commands/workflow-run.md +56 -18
  32. package/plugins/kk/decisions/kk-itc.yaml +46 -0
  33. package/plugins/kk/decisions/kk-seo-keyword.yaml +57 -0
  34. package/plugins/kk/decisions/kk-seo-page.yaml +230 -0
  35. package/plugins/kk/decisions/kk-seo-pair.yaml +21 -0
  36. package/plugins/kk/decisions/kk-seo-site.yaml +90 -0
  37. package/plugins/kk/plugin.json +1 -1
  38. package/plugins/kk/publish-presets/chinese-article.json +14 -0
  39. package/plugins/kk/publish-presets/technical-article.json +14 -0
  40. package/plugins/kk/references/smart-seo-attribution.md +85 -0
  41. package/plugins/kk/scripts/daily-stages.ts +42 -2
  42. package/plugins/kk/scripts/daily-voice-style.zh.md +1 -1
  43. package/plugins/kk/scripts/itc-stages.ts +25 -118
  44. package/plugins/kk/scripts/kk-workflow-stages.ts +38 -1
  45. package/plugins/kk/scripts/seo-decisions.ts +477 -0
  46. package/plugins/kk/scripts/seo-enrich.ts +728 -0
  47. package/plugins/kk/scripts/seo-facts.ts +610 -0
  48. package/plugins/kk/scripts/seo-fetch.ts +766 -0
  49. package/plugins/kk/scripts/seo-report.ts +460 -0
  50. package/plugins/kk/scripts/seo-rules.ts +1882 -0
  51. package/plugins/kk/scripts/seo-stages.ts +1044 -0
  52. package/plugins/kk/skills/article-adapt/SKILL.md +2 -2
  53. package/plugins/kk/skills/smart-seo/SKILL.md +183 -0
  54. package/plugins/kk/skills/smart-seo/references/method.md +126 -0
  55. package/plugins/kk/skills/smart-seo/references/narrative.md +125 -0
  56. package/plugins/kk/skills/smart-seo/references/operations.md +202 -0
  57. package/plugins/kk/skills/smart-seo/references/seo-geo-sources.md +90 -0
  58. package/plugins/kk/workflows/feature-verification.yaml +28 -24
  59. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +86 -18
  60. package/plugins/kk/workflows/kk-itc-author.yaml +406 -0
  61. package/plugins/kk/workflows/kk-itc.yaml +208 -682
  62. package/plugins/kk/workflows/kk-smart-seo.yaml +251 -0
  63. package/plugins/publishings/bilibili-pub/dist/index.js +21782 -0
  64. package/plugins/publishings/bilibili-pub/dist/profile-check.js +20410 -0
  65. package/plugins/publishings/bilibili-pub/package.json +20 -0
  66. package/plugins/publishings/bilibili-pub/plugin.json +12 -0
  67. package/plugins/publishings/bilibili-pub/src/flow.ts +1296 -0
  68. package/plugins/publishings/bilibili-pub/src/index.ts +139 -0
  69. package/plugins/publishings/bilibili-pub/src/profile-check.ts +19 -0
  70. package/plugins/publishings/bilibili-pub/src/selectors.ts +222 -0
  71. package/plugins/publishings/bilibili-pub/tsconfig.json +4 -0
  72. package/plugins/publishings/cnblogs-pub/dist/index.js +21383 -0
  73. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +20412 -0
  74. package/plugins/publishings/cnblogs-pub/package.json +19 -0
  75. package/plugins/publishings/cnblogs-pub/plugin.json +12 -0
  76. package/plugins/publishings/cnblogs-pub/src/flow.ts +708 -0
  77. package/plugins/publishings/cnblogs-pub/src/index.ts +172 -0
  78. package/plugins/publishings/cnblogs-pub/src/profile-check.ts +24 -0
  79. package/plugins/publishings/cnblogs-pub/src/selectors.ts +104 -0
  80. package/plugins/publishings/cnblogs-pub/tsconfig.json +4 -0
  81. package/plugins/publishings/csdn-pub/dist/index.js +21552 -0
  82. package/plugins/publishings/csdn-pub/dist/profile-check.js +20963 -0
  83. package/plugins/publishings/csdn-pub/package.json +19 -0
  84. package/plugins/publishings/csdn-pub/plugin.json +12 -0
  85. package/plugins/publishings/csdn-pub/src/index.ts +1178 -0
  86. package/plugins/publishings/csdn-pub/src/profile-check.ts +23 -0
  87. package/plugins/publishings/csdn-pub/tsconfig.json +4 -0
  88. package/plugins/publishings/emdash-pub/dist/index.js +158 -12
  89. package/plugins/publishings/emdash-pub/plugin.json +22 -1
  90. package/plugins/publishings/infoq-pub/dist/index.js +160 -12
  91. package/plugins/publishings/infoq-pub/dist/profile-check.js +160 -12
  92. package/plugins/publishings/infoq-pub/plugin.json +21 -0
  93. package/plugins/publishings/jike-pub/dist/index.js +21379 -0
  94. package/plugins/publishings/jike-pub/dist/profile-check.js +20951 -0
  95. package/plugins/publishings/jike-pub/package.json +19 -0
  96. package/plugins/publishings/jike-pub/plugin.json +12 -0
  97. package/plugins/publishings/jike-pub/src/index.ts +800 -0
  98. package/plugins/publishings/jike-pub/src/profile-check.ts +21 -0
  99. package/plugins/publishings/jike-pub/tsconfig.json +4 -0
  100. package/plugins/publishings/juejin-pub/dist/index.js +160 -12
  101. package/plugins/publishings/juejin-pub/dist/profile-check.js +160 -12
  102. package/plugins/publishings/juejin-pub/plugin.json +21 -0
  103. package/plugins/publishings/medium-pub/dist/index.js +158 -12
  104. package/plugins/publishings/medium-pub/plugin.json +22 -1
  105. package/plugins/publishings/podcast-pub/dist/index.js +158 -12
  106. package/plugins/publishings/qiita-pub/dist/index.js +158 -12
  107. package/plugins/publishings/qiita-pub/plugin.json +24 -1
  108. package/plugins/publishings/shipinhao-pub/dist/index.js +21715 -0
  109. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +20431 -0
  110. package/plugins/publishings/shipinhao-pub/package.json +19 -0
  111. package/plugins/publishings/shipinhao-pub/plugin.json +12 -0
  112. package/plugins/publishings/shipinhao-pub/src/flow.ts +1323 -0
  113. package/plugins/publishings/shipinhao-pub/src/index.ts +173 -0
  114. package/plugins/publishings/shipinhao-pub/src/profile-check.ts +25 -0
  115. package/plugins/publishings/shipinhao-pub/src/selectors.ts +241 -0
  116. package/plugins/publishings/shipinhao-pub/tsconfig.json +4 -0
  117. package/plugins/publishings/sspai-pub/dist/index.js +21371 -0
  118. package/plugins/publishings/sspai-pub/dist/profile-check.js +20414 -0
  119. package/plugins/publishings/sspai-pub/package.json +19 -0
  120. package/plugins/publishings/sspai-pub/plugin.json +12 -0
  121. package/plugins/publishings/sspai-pub/src/flow.ts +624 -0
  122. package/plugins/publishings/sspai-pub/src/index.ts +167 -0
  123. package/plugins/publishings/sspai-pub/src/profile-check.ts +25 -0
  124. package/plugins/publishings/sspai-pub/src/selectors.ts +122 -0
  125. package/plugins/publishings/sspai-pub/tsconfig.json +4 -0
  126. package/plugins/publishings/substack-pub/dist/index.js +160 -12
  127. package/plugins/publishings/substack-pub/dist/profile-check.js +160 -12
  128. package/plugins/publishings/substack-pub/plugin.json +21 -0
  129. package/plugins/publishings/surfdash-pub/dist/index.js +158 -12
  130. package/plugins/publishings/surfdash-pub/plugin.json +22 -1
  131. package/plugins/publishings/threads-pub/dist/index.js +158 -12
  132. package/plugins/publishings/wechatmp-pub/dist/index.js +1669 -502
  133. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +204 -21
  134. package/plugins/publishings/wechatmp-pub/plugin.json +32 -0
  135. package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +540 -0
  136. package/plugins/publishings/wechatmp-pub/src/cgi-media.ts +380 -0
  137. package/plugins/publishings/wechatmp-pub/src/cgi.ts +485 -0
  138. package/plugins/publishings/wechatmp-pub/src/flow.ts +104 -0
  139. package/plugins/publishings/weibo-pub/dist/index.js +160 -12
  140. package/plugins/publishings/weibo-pub/dist/profile-check.js +160 -12
  141. package/plugins/publishings/weibo-pub/plugin.json +35 -0
  142. package/plugins/publishings/x-pub/dist/index.js +160 -12
  143. package/plugins/publishings/x-pub/dist/profile-check.js +160 -12
  144. package/plugins/publishings/x-pub/plugin.json +40 -0
  145. package/plugins/publishings/xhs-pub/dist/index.js +160 -12
  146. package/plugins/publishings/xhs-pub/dist/profile-check.js +160 -12
  147. package/plugins/publishings/xhs-pub/plugin.json +37 -0
  148. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +21491 -0
  149. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +20417 -0
  150. package/plugins/publishings/xiaoyuzhou-pub/package.json +19 -0
  151. package/plugins/publishings/xiaoyuzhou-pub/plugin.json +12 -0
  152. package/plugins/publishings/xiaoyuzhou-pub/src/flow.ts +826 -0
  153. package/plugins/publishings/xiaoyuzhou-pub/src/index.ts +174 -0
  154. package/plugins/publishings/xiaoyuzhou-pub/src/profile-check.ts +26 -0
  155. package/plugins/publishings/xiaoyuzhou-pub/src/selectors.ts +125 -0
  156. package/plugins/publishings/xiaoyuzhou-pub/tsconfig.json +4 -0
  157. package/plugins/publishings/zenn-pub/dist/index.js +158 -12
  158. package/plugins/publishings/zenn-pub/plugin.json +22 -1
  159. package/plugins/generations/omni-voice-gen/voices/robin-news.wav +0 -0
@@ -20301,6 +20301,8 @@ async function ensureProfileDir2(profileDir, headless) {
20301
20301
  throw new BrowserProfileMissingError(profileDir);
20302
20302
  await mkdir2(profileDir, { recursive: true, mode: 448 });
20303
20303
  }
20304
+ // ../../packages/publish-harness/src/browser-anti-detection.ts
20305
+ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
20304
20306
  // ../../packages/publish-harness/src/browser.ts
20305
20307
  var DEFAULT_POLL_MS = 500;
20306
20308
  function createKkBrowserLauncher(loadPlaywright = () => import("playwright"), ownership, leaseOptions = {}) {
@@ -20414,6 +20416,83 @@ function errorMessage2(error) {
20414
20416
  // ../../plugins/publishings/wechatmp-pub/src/profile-check.ts
20415
20417
  init_dist();
20416
20418
 
20419
+ // ../../packages/kk-core/src/content-limits.ts
20420
+ var PLATFORM_CONTENT_LIMITS = Object.freeze({
20421
+ schemaVersion: 5,
20422
+ tagLimits: Object.freeze({
20423
+ default: 7,
20424
+ imageText: Object.freeze({
20425
+ instagram: 5,
20426
+ douyin: 5,
20427
+ kuaishou: 4,
20428
+ weixin: 1,
20429
+ xiaohongshu: 10
20430
+ }),
20431
+ shortVideo: Object.freeze({
20432
+ douyin: 5,
20433
+ kuaishou: 4,
20434
+ xiaohongshu: 10,
20435
+ bilibili: 10,
20436
+ zhihu: 5,
20437
+ tiktok: 20,
20438
+ youtube: 60
20439
+ })
20440
+ }),
20441
+ titleCapabilities: Object.freeze({
20442
+ dynamic: Object.freeze({
20443
+ bilibili: Object.freeze({ max: 20, unit: "utf16_code_units" }),
20444
+ zhihu: Object.freeze({ max: 50, unit: "utf16_code_units" }),
20445
+ douban: Object.freeze({ max: 70, unit: "utf16_code_units" }),
20446
+ x: null,
20447
+ threads: null,
20448
+ weibo: null,
20449
+ jike: null,
20450
+ zsxq: null,
20451
+ toutiao: null,
20452
+ juejin: null
20453
+ }),
20454
+ imageText: Object.freeze({
20455
+ xiaohongshu: Object.freeze({ max: 20, unit: "xiaohongshu_title_weighted" }),
20456
+ weixin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
20457
+ douyin: Object.freeze({ max: 20, unit: "utf16_code_units" }),
20458
+ shipinhao: Object.freeze({ max: 22, unit: "utf16_code_units" }),
20459
+ reddit: Object.freeze({ max: 300, unit: "utf16_code_units" })
20460
+ }),
20461
+ article: Object.freeze({
20462
+ juejin: Object.freeze({ max: 100, unit: "utf16_code_units" }),
20463
+ csdn: Object.freeze({ max: 100, unit: "utf16_code_units" }),
20464
+ cnblogs: Object.freeze({ max: 128, unit: "utf16_code_units" }),
20465
+ weibo: Object.freeze({ max: 30, unit: "utf16_code_units" }),
20466
+ sspai: Object.freeze({ max: 80, unit: "utf16_code_units" })
20467
+ }),
20468
+ shortVideo: Object.freeze({
20469
+ shipinhao: Object.freeze({ max: 16, unit: "utf16_code_units" }),
20470
+ douyin: Object.freeze({ max: 30, unit: "utf16_code_units" }),
20471
+ bilibili: Object.freeze({ max: 80, unit: "utf16_code_units" })
20472
+ })
20473
+ }),
20474
+ bodyCapabilities: Object.freeze({
20475
+ dynamic: Object.freeze({
20476
+ threads: Object.freeze({ max: 500, unit: "unicode_code_points", behavior: "split_thread" }),
20477
+ x: Object.freeze({ max: 280, unit: "weighted", behavior: "split_thread" }),
20478
+ weibo: Object.freeze({ max: 2000, unit: "unicode_code_points" }),
20479
+ jike: Object.freeze({ max: 1000, unit: "unicode_code_points" })
20480
+ }),
20481
+ imageText: Object.freeze({
20482
+ xiaohongshu: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
20483
+ douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" })
20484
+ }),
20485
+ article: Object.freeze({
20486
+ wechatmp: Object.freeze({ max: 50000, unit: "unicode_code_points" }),
20487
+ juejin: Object.freeze({ max: 50000, unit: "unicode_code_points" })
20488
+ }),
20489
+ shortVideo: Object.freeze({
20490
+ douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
20491
+ kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
20492
+ shipinhao: Object.freeze({ max: 1000, unit: "unicode_code_points" })
20493
+ })
20494
+ })
20495
+ });
20417
20496
  // ../../packages/kk-core/src/kinds.ts
20418
20497
  init_zod();
20419
20498
 
@@ -20504,6 +20583,67 @@ var BrowserSessionDescriptorSchema = object2({
20504
20583
  }
20505
20584
  }).optional()
20506
20585
  }).strict();
20586
+ var ContentCountUnitSchema = _enum([
20587
+ "utf16_code_units",
20588
+ "unicode_code_points",
20589
+ "weighted",
20590
+ "xiaohongshu_title_weighted"
20591
+ ]);
20592
+ var LimitEntrySchema = object2({
20593
+ max: number2().int().positive(),
20594
+ unit: ContentCountUnitSchema
20595
+ }).strict();
20596
+ var PublishingProfileLimitsSchema = object2({
20597
+ title: LimitEntrySchema.optional(),
20598
+ body: LimitEntrySchema.optional()
20599
+ }).strict();
20600
+ var PublishingProfileRequiresSchema = object2({
20601
+ cover: boolean2().optional(),
20602
+ orderedImages: boolean2().optional()
20603
+ }).strict();
20604
+ var PublishingProfileModeBindingSchema = object2({
20605
+ metadata: record(string2(), unknown())
20606
+ }).strict();
20607
+ var PublishingProfileModesSchema = object2({
20608
+ draft: PublishingProfileModeBindingSchema.optional(),
20609
+ live: PublishingProfileModeBindingSchema.optional()
20610
+ }).strict().superRefine((modes, ctx) => {
20611
+ if (modes.draft === undefined && modes.live === undefined) {
20612
+ ctx.addIssue({
20613
+ code: "custom",
20614
+ message: 'modes must define at least one of "draft" or "live"'
20615
+ });
20616
+ }
20617
+ });
20618
+ var PublishingProfileSchema = object2({
20619
+ format: string2().min(1),
20620
+ locale: string2().regex(/^(source|[a-z]{2,3}(-[A-Za-z0-9]+)*)$/, {
20621
+ message: 'locale must be "source" or a valid language tag'
20622
+ }),
20623
+ limits: PublishingProfileLimitsSchema.optional(),
20624
+ requires: PublishingProfileRequiresSchema.optional(),
20625
+ modes: PublishingProfileModesSchema
20626
+ }).strict();
20627
+ var PublishingCapabilitiesSchema = object2({
20628
+ defaultProfile: string2().min(1),
20629
+ profiles: record(string2().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/), PublishingProfileSchema)
20630
+ }).strict().superRefine((data, ctx) => {
20631
+ const keys = Object.keys(data.profiles);
20632
+ if (keys.length === 0) {
20633
+ ctx.addIssue({
20634
+ code: "custom",
20635
+ path: ["profiles"],
20636
+ message: "profiles record must be nonempty"
20637
+ });
20638
+ }
20639
+ if (!(data.defaultProfile in data.profiles)) {
20640
+ ctx.addIssue({
20641
+ code: "custom",
20642
+ path: ["defaultProfile"],
20643
+ message: `defaultProfile "${data.defaultProfile}" must reference a declared profile`
20644
+ });
20645
+ }
20646
+ });
20507
20647
  var PluginManifestSchemaBase = looseObject({
20508
20648
  name: string2().min(1),
20509
20649
  kind: PluginKindSchema,
@@ -20512,28 +20652,80 @@ var PluginManifestSchemaBase = looseObject({
20512
20652
  version: string2().optional(),
20513
20653
  description: string2().optional(),
20514
20654
  operations: record(string2(), PluginOperationSchema).optional(),
20515
- browserSession: BrowserSessionDescriptorSchema.optional()
20655
+ browserSession: BrowserSessionDescriptorSchema.optional(),
20656
+ publishing: PublishingCapabilitiesSchema.optional()
20516
20657
  });
20517
20658
  var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
20518
- if (manifest.browserSession === undefined)
20519
- return;
20520
- if (manifest.kind !== "publish") {
20521
- ctx.addIssue({
20522
- code: "custom",
20523
- path: ["browserSession"],
20524
- message: `browserSession requires kind "publish", not "${manifest.kind}"`
20525
- });
20659
+ if (manifest.browserSession !== undefined) {
20660
+ if (manifest.kind !== "publish") {
20661
+ ctx.addIssue({
20662
+ code: "custom",
20663
+ path: ["browserSession"],
20664
+ message: `browserSession requires kind "publish", not "${manifest.kind}"`
20665
+ });
20666
+ }
20667
+ if (manifest.check === undefined) {
20668
+ ctx.addIssue({
20669
+ code: "custom",
20670
+ path: ["browserSession"],
20671
+ message: "browserSession requires a check probe entry that owns the session routines"
20672
+ });
20673
+ }
20526
20674
  }
20527
- if (manifest.check === undefined) {
20675
+ if (manifest.publishing !== undefined && manifest.kind !== "publish") {
20528
20676
  ctx.addIssue({
20529
20677
  code: "custom",
20530
- path: ["browserSession"],
20531
- message: "browserSession requires a check probe entry that owns the session routines"
20678
+ path: ["publishing"],
20679
+ message: `publishing requires kind "publish", not "${manifest.kind}"`
20532
20680
  });
20533
20681
  }
20534
20682
  });
20535
20683
  // ../../packages/kk-core/src/render-md.ts
20536
20684
  if (false) {}
20685
+ // ../../plugins/publishings/wechatmp-pub/src/cgi.ts
20686
+ var MP_ORIGIN = "https://mp.weixin.qq.com";
20687
+ var FILETRANSFER_URL = `${MP_ORIGIN}/cgi-bin/filetransfer`;
20688
+ var CROPIMAGE_URL = `${MP_ORIGIN}/cgi-bin/cropimage`;
20689
+ var MAX_RESPONSE_BYTES = 2 * 1024 * 1024;
20690
+ var MAX_IMAGE_BYTES = 10 * 1024 * 1024;
20691
+
20692
+ // ../../plugins/publishings/wechatmp-pub/src/modes.ts
20693
+ var TARGET = "wechatmp";
20694
+ var CONSOLE_URL = "https://mp.weixin.qq.com/";
20695
+ var CONSOLE_HOME_FRAGMENT = "/cgi-bin/home";
20696
+ var CONSOLE_TOKEN_PATTERN = /[?&]token=([0-9]+)/;
20697
+ function readConsoleToken(url) {
20698
+ return CONSOLE_TOKEN_PATTERN.exec(url)?.[1];
20699
+ }
20700
+
20701
+ // ../../plugins/publishings/wechatmp-pub/src/cgi-draft.ts
20702
+ var MP_ORIGIN2 = "https://mp.weixin.qq.com";
20703
+ var CREATE_URL = `${MP_ORIGIN2}/cgi-bin/operate_appmsg`;
20704
+ var APPMSG_URL = `${MP_ORIGIN2}/cgi-bin/appmsg`;
20705
+ var MAX_RESPONSE_BYTES2 = 2 * 1024 * 1024;
20706
+ var MAX_SNAPSHOT_CHARS = 2 * 1024 * 1024;
20707
+ var ALLOWED_METADATA_KEYS = new Set([
20708
+ "operation",
20709
+ "publishStatus",
20710
+ "title",
20711
+ "body",
20712
+ "digest",
20713
+ "author",
20714
+ "contentId",
20715
+ "source",
20716
+ "sourceUrl",
20717
+ "tags",
20718
+ "categories",
20719
+ "coverPath",
20720
+ "images"
20721
+ ]);
20722
+
20723
+ // ../../plugins/publishings/wechatmp-pub/src/cgi-media.ts
20724
+ var MP_ORIGIN3 = "https://mp.weixin.qq.com";
20725
+ var UPLOADIMG2CDN_URL = `${MP_ORIGIN3}/cgi-bin/uploadimg2cdn`;
20726
+ var MAX_RESPONSE_BYTES3 = 2 * 1024 * 1024;
20727
+ var MAX_AGGREGATE_BYTES = 20 * 1024 * 1024;
20728
+
20537
20729
  // ../../plugins/publishings/wechatmp-pub/src/enrich.ts
20538
20730
  var DIALOG = ".weui-desktop-dialog:visible";
20539
20731
  var CONFIRM = `${DIALOG} button:has-text("\u786E\u8BA4"), ${DIALOG} button:has-text("\u786E\u5B9A")`;
@@ -20546,15 +20738,6 @@ var URL_INPUT = [`${DIALOG} input[type="url"]`, `${DIALOG} input[placeholder*="\
20546
20738
  var ORIGINAL_DECLARATION = `${DIALOG} label:has(.js_original_type_radio):has-text("\u6587\u5B57\u539F\u521B")`;
20547
20739
  var ORIGINAL_AGREEMENT = `${DIALOG} .original_agreement`;
20548
20740
 
20549
- // ../../plugins/publishings/wechatmp-pub/src/modes.ts
20550
- var TARGET = "wechatmp";
20551
- var CONSOLE_URL = "https://mp.weixin.qq.com/";
20552
- var CONSOLE_HOME_FRAGMENT = "/cgi-bin/home";
20553
- var CONSOLE_TOKEN_PATTERN = /[?&]token=([0-9]+)/;
20554
- function readConsoleToken(url) {
20555
- return CONSOLE_TOKEN_PATTERN.exec(url)?.[1];
20556
- }
20557
-
20558
20741
  // ../../plugins/publishings/wechatmp-pub/src/index.ts
20559
20742
  var CHANNEL = TARGET;
20560
20743
  var CONSOLE_READY_TIMEOUT_MS = 30000;
@@ -8,5 +8,37 @@
8
8
  "browserSession": {
9
9
  "profileName": "wechatmp",
10
10
  "homeUrl": "https://mp.weixin.qq.com/"
11
+ },
12
+ "publishing": {
13
+ "defaultProfile": "article",
14
+ "profiles": {
15
+ "article": {
16
+ "format": "wechat-article",
17
+ "locale": "zh",
18
+ "requires": {
19
+ "cover": true
20
+ },
21
+ "limits": {
22
+ "title": {
23
+ "max": 64,
24
+ "unit": "unicode_code_points"
25
+ }
26
+ },
27
+ "modes": {
28
+ "draft": {
29
+ "metadata": {
30
+ "operation": "文章",
31
+ "publishStatus": "draft"
32
+ }
33
+ },
34
+ "live": {
35
+ "metadata": {
36
+ "operation": "文章",
37
+ "publishStatus": "public"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
11
43
  }
12
44
  }