@gobing-ai/knowledge-kit 0.1.20 → 0.1.22
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.js +1 -0
- package/dist/board/daily-voice/index.js +1279 -261
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +13893 -8995
- package/package.json +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +285 -16
- package/plugins/generations/dailynews-gen/src/editorial-claims.ts +215 -0
- package/plugins/generations/dailynews-gen/src/index.ts +23 -4
- package/plugins/generations/dailynews-gen/src/script-builder.ts +10 -3
- package/plugins/generations/dailynews-gen/src/script-plan.ts +74 -14
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23544 -0
- package/plugins/generations/music-gen/package.json +24 -0
- package/plugins/generations/music-gen/plugin.json +23 -0
- package/plugins/generations/music-gen/presets/SOURCE.md +39 -0
- package/plugins/generations/music-gen/presets/formats/clip.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/jingle.yaml +22 -0
- package/plugins/generations/music-gen/presets/formats/loop.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/song.yaml +31 -0
- package/plugins/generations/music-gen/presets/formats/underscore.yaml +22 -0
- package/plugins/generations/music-gen/presets/themes/ambient-tech.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/cinematic.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/lofi.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/synthwave.yaml +30 -0
- package/plugins/generations/music-gen/scripts/gen-preset-index.ts +181 -0
- package/plugins/generations/music-gen/scripts/resolve-preset.ts +64 -0
- package/plugins/generations/music-gen/src/adapter/index.ts +35 -0
- package/plugins/generations/music-gen/src/adapter/instance.ts +904 -0
- package/plugins/generations/music-gen/src/adapter/offline.ts +124 -0
- package/plugins/generations/music-gen/src/artifact.ts +223 -0
- package/plugins/generations/music-gen/src/audio/checks.ts +618 -0
- package/plugins/generations/music-gen/src/audio/master.ts +267 -0
- package/plugins/generations/music-gen/src/audio/measure.ts +507 -0
- package/plugins/generations/music-gen/src/audio/profile.ts +131 -0
- package/plugins/generations/music-gen/src/audio.ts +122 -0
- package/plugins/generations/music-gen/src/brief.ts +191 -0
- package/plugins/generations/music-gen/src/config.ts +451 -0
- package/plugins/generations/music-gen/src/content.ts +199 -0
- package/plugins/generations/music-gen/src/digest.ts +100 -0
- package/plugins/generations/music-gen/src/index.ts +147 -0
- package/plugins/generations/music-gen/src/job.ts +131 -0
- package/plugins/generations/music-gen/src/plugin.ts +371 -0
- package/plugins/generations/music-gen/src/presets.ts +918 -0
- package/plugins/generations/music-gen/src/render.ts +87 -0
- package/plugins/generations/music-gen/src/request.ts +102 -0
- package/plugins/generations/music-gen/src/spend.ts +495 -0
- package/plugins/generations/music-gen/tsconfig.json +8 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +2 -1
- package/plugins/kk/scripts/cover-compositor.ts +380 -32
- package/plugins/kk/scripts/daily-cover-mock.ts +40 -3
- package/plugins/kk/scripts/daily-stages.ts +659 -20
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +37 -1
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- package/plugins/kk/scripts/source-citation.ts +187 -0
- package/plugins/kk/scripts/topic-selection-attempts.ts +446 -0
- package/plugins/kk/scripts/topic-selection-calibration.ts +161 -0
- package/plugins/kk/skills/content-judge/SKILL.md +11 -6
- package/plugins/kk/skills/content-judge/references/music-quality-rubric.md +147 -0
- package/plugins/kk/skills/content-judge/references/rubrics.md +15 -0
- package/plugins/kk/skills/content-safety/SKILL.md +12 -0
- package/plugins/kk/skills/music-authoring/SKILL.md +276 -0
- package/plugins/kk/skills/music-authoring/references/judge-input.md +117 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +102 -15
- package/plugins/kk/skills/news-editorial/references/selection.md +4 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +58 -11
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +8 -8
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +7 -7
- package/plugins/kk/workflows/kk-music.yaml +328 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +58 -3
- package/plugins/publishings/bilibili-pub/dist/index.js +11 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/csdn-pub/dist/index.js +11 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/infoq-pub/dist/index.js +11 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/jike-pub/dist/index.js +11 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/juejin-pub/dist/index.js +11 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/podcast-pub/dist/index.js +586 -20
- package/plugins/publishings/podcast-pub/src/corrections.ts +509 -0
- package/plugins/publishings/podcast-pub/src/index.ts +257 -5
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +240 -0
- package/plugins/publishings/podcast-pub/src/show-notes.ts +69 -13
- package/plugins/publishings/shipinhao-pub/dist/index.js +59 -8
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +105 -6
- package/plugins/publishings/sspai-pub/dist/index.js +11 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/substack-pub/dist/index.js +11 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +72 -20
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +100 -17
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +3 -1
- package/plugins/publishings/threads-pub/dist/index.js +11 -1
- package/plugins/publishings/threads-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +11 -1
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/weibo-pub/dist/index.js +11 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/dist/index.js +11 -1
- package/plugins/publishings/x-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xhs-pub/dist/index.js +11 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +11 -1
|
@@ -20758,6 +20758,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20758
20758
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20759
20759
|
// ../../packages/publish-harness/src/browser.ts
|
|
20760
20760
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20761
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20762
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20763
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20761
20764
|
var DEFAULT_POLL_MS = 500;
|
|
20762
20765
|
function isInstantBrowserDeath(message) {
|
|
20763
20766
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20880,14 +20883,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20880
20883
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20881
20884
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20882
20885
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20886
|
+
const deadline = Date.now() + timeoutMs;
|
|
20887
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20888
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20889
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20883
20890
|
for (const headless of passes) {
|
|
20891
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20892
|
+
if (remainingMs < minPassMs)
|
|
20893
|
+
break;
|
|
20884
20894
|
try {
|
|
20885
20895
|
await withProfilePage({
|
|
20886
20896
|
profileDir: opts.profileDir,
|
|
20887
20897
|
headless,
|
|
20888
20898
|
url: config.homeUrl,
|
|
20889
20899
|
isAuthenticated: config.isAuthenticated,
|
|
20890
|
-
timeoutMs,
|
|
20900
|
+
timeoutMs: remainingMs,
|
|
20891
20901
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20892
20902
|
}, async () => true);
|
|
20893
20903
|
return {
|
|
@@ -20189,6 +20189,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20189
20189
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20190
20190
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20191
20191
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20192
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20193
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20194
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20192
20195
|
var DEFAULT_POLL_MS = 500;
|
|
20193
20196
|
function isInstantBrowserDeath(message) {
|
|
20194
20197
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20311,14 +20314,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20311
20314
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20312
20315
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20313
20316
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20317
|
+
const deadline = Date.now() + timeoutMs;
|
|
20318
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20319
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20320
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20314
20321
|
for (const headless of passes) {
|
|
20322
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20323
|
+
if (remainingMs < minPassMs)
|
|
20324
|
+
break;
|
|
20315
20325
|
try {
|
|
20316
20326
|
await withProfilePage({
|
|
20317
20327
|
profileDir: opts.profileDir,
|
|
20318
20328
|
headless,
|
|
20319
20329
|
url: config.homeUrl,
|
|
20320
20330
|
isAuthenticated: config.isAuthenticated,
|
|
20321
|
-
timeoutMs,
|
|
20331
|
+
timeoutMs: remainingMs,
|
|
20322
20332
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20323
20333
|
}, async () => true);
|
|
20324
20334
|
return {
|
|
@@ -20779,6 +20779,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20779
20779
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20780
20780
|
// ../../packages/publish-harness/src/browser.ts
|
|
20781
20781
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20782
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20783
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20784
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20782
20785
|
var DEFAULT_STEP_TIMEOUT_MS = 30000;
|
|
20783
20786
|
var DEFAULT_POLL_MS = 500;
|
|
20784
20787
|
var ATTACH_POLL_MS = 100;
|
|
@@ -20903,14 +20906,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20903
20906
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20904
20907
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20905
20908
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20909
|
+
const deadline = Date.now() + timeoutMs;
|
|
20910
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20911
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20912
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20906
20913
|
for (const headless of passes) {
|
|
20914
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20915
|
+
if (remainingMs < minPassMs)
|
|
20916
|
+
break;
|
|
20907
20917
|
try {
|
|
20908
20918
|
await withProfilePage({
|
|
20909
20919
|
profileDir: opts.profileDir,
|
|
20910
20920
|
headless,
|
|
20911
20921
|
url: config.homeUrl,
|
|
20912
20922
|
isAuthenticated: config.isAuthenticated,
|
|
20913
|
-
timeoutMs,
|
|
20923
|
+
timeoutMs: remainingMs,
|
|
20914
20924
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20915
20925
|
}, async () => true);
|
|
20916
20926
|
return {
|
|
@@ -20210,6 +20210,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20210
20210
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20211
20211
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20212
20212
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20213
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20214
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20215
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20213
20216
|
var DEFAULT_POLL_MS = 500;
|
|
20214
20217
|
function isInstantBrowserDeath(message) {
|
|
20215
20218
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20332,14 +20335,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20332
20335
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20333
20336
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20334
20337
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20338
|
+
const deadline = Date.now() + timeoutMs;
|
|
20339
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20340
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20341
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20335
20342
|
for (const headless of passes) {
|
|
20343
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20344
|
+
if (remainingMs < minPassMs)
|
|
20345
|
+
break;
|
|
20336
20346
|
try {
|
|
20337
20347
|
await withProfilePage({
|
|
20338
20348
|
profileDir: opts.profileDir,
|
|
20339
20349
|
headless,
|
|
20340
20350
|
url: config.homeUrl,
|
|
20341
20351
|
isAuthenticated: config.isAuthenticated,
|
|
20342
|
-
timeoutMs,
|
|
20352
|
+
timeoutMs: remainingMs,
|
|
20343
20353
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20344
20354
|
}, async () => true);
|
|
20345
20355
|
return {
|
|
@@ -20776,6 +20776,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20776
20776
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20777
20777
|
// ../../packages/publish-harness/src/browser.ts
|
|
20778
20778
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20779
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20780
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20781
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20779
20782
|
var DEFAULT_STEP_TIMEOUT_MS = 30000;
|
|
20780
20783
|
var DEFAULT_POLL_MS = 500;
|
|
20781
20784
|
var ATTACH_POLL_MS = 100;
|
|
@@ -20900,14 +20903,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20900
20903
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20901
20904
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20902
20905
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
|
+
const deadline = Date.now() + timeoutMs;
|
|
20907
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20908
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20909
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20903
20910
|
for (const headless of passes) {
|
|
20911
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20912
|
+
if (remainingMs < minPassMs)
|
|
20913
|
+
break;
|
|
20904
20914
|
try {
|
|
20905
20915
|
await withProfilePage({
|
|
20906
20916
|
profileDir: opts.profileDir,
|
|
20907
20917
|
headless,
|
|
20908
20918
|
url: config.homeUrl,
|
|
20909
20919
|
isAuthenticated: config.isAuthenticated,
|
|
20910
|
-
timeoutMs,
|
|
20920
|
+
timeoutMs: remainingMs,
|
|
20911
20921
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20912
20922
|
}, async () => true);
|
|
20913
20923
|
return {
|
|
@@ -20482,6 +20482,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20482
20482
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20483
20483
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20484
20484
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20485
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20486
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20487
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20485
20488
|
var DEFAULT_POLL_MS = 500;
|
|
20486
20489
|
function isInstantBrowserDeath(message) {
|
|
20487
20490
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20604,14 +20607,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20604
20607
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20605
20608
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20606
20609
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
|
+
const deadline = Date.now() + timeoutMs;
|
|
20611
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20612
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20613
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20607
20614
|
for (const headless of passes) {
|
|
20615
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20616
|
+
if (remainingMs < minPassMs)
|
|
20617
|
+
break;
|
|
20608
20618
|
try {
|
|
20609
20619
|
await withProfilePage({
|
|
20610
20620
|
profileDir: opts.profileDir,
|
|
20611
20621
|
headless,
|
|
20612
20622
|
url: config.homeUrl,
|
|
20613
20623
|
isAuthenticated: config.isAuthenticated,
|
|
20614
|
-
timeoutMs,
|
|
20624
|
+
timeoutMs: remainingMs,
|
|
20615
20625
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20616
20626
|
}, async () => true);
|
|
20617
20627
|
return {
|
|
@@ -20776,6 +20776,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20776
20776
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20777
20777
|
// ../../packages/publish-harness/src/browser.ts
|
|
20778
20778
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20779
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20780
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20781
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20779
20782
|
var DEFAULT_STEP_TIMEOUT_MS = 30000;
|
|
20780
20783
|
var DEFAULT_POLL_MS = 500;
|
|
20781
20784
|
var ATTACH_POLL_MS = 100;
|
|
@@ -20900,14 +20903,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20900
20903
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20901
20904
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20902
20905
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
|
+
const deadline = Date.now() + timeoutMs;
|
|
20907
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20908
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20909
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20903
20910
|
for (const headless of passes) {
|
|
20911
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20912
|
+
if (remainingMs < minPassMs)
|
|
20913
|
+
break;
|
|
20904
20914
|
try {
|
|
20905
20915
|
await withProfilePage({
|
|
20906
20916
|
profileDir: opts.profileDir,
|
|
20907
20917
|
headless,
|
|
20908
20918
|
url: config.homeUrl,
|
|
20909
20919
|
isAuthenticated: config.isAuthenticated,
|
|
20910
|
-
timeoutMs,
|
|
20920
|
+
timeoutMs: remainingMs,
|
|
20911
20921
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20912
20922
|
}, async () => true);
|
|
20913
20923
|
return {
|
|
@@ -20482,6 +20482,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20482
20482
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20483
20483
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20484
20484
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20485
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20486
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20487
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20485
20488
|
var DEFAULT_POLL_MS = 500;
|
|
20486
20489
|
function isInstantBrowserDeath(message) {
|
|
20487
20490
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20604,14 +20607,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20604
20607
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20605
20608
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20606
20609
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
|
+
const deadline = Date.now() + timeoutMs;
|
|
20611
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20612
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20613
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20607
20614
|
for (const headless of passes) {
|
|
20615
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20616
|
+
if (remainingMs < minPassMs)
|
|
20617
|
+
break;
|
|
20608
20618
|
try {
|
|
20609
20619
|
await withProfilePage({
|
|
20610
20620
|
profileDir: opts.profileDir,
|
|
20611
20621
|
headless,
|
|
20612
20622
|
url: config.homeUrl,
|
|
20613
20623
|
isAuthenticated: config.isAuthenticated,
|
|
20614
|
-
timeoutMs,
|
|
20624
|
+
timeoutMs: remainingMs,
|
|
20615
20625
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20616
20626
|
}, async () => true);
|
|
20617
20627
|
return {
|
|
@@ -20776,6 +20776,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20776
20776
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20777
20777
|
// ../../packages/publish-harness/src/browser.ts
|
|
20778
20778
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20779
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20780
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20781
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20779
20782
|
var DEFAULT_STEP_TIMEOUT_MS = 30000;
|
|
20780
20783
|
var DEFAULT_POLL_MS = 500;
|
|
20781
20784
|
var ATTACH_POLL_MS = 100;
|
|
@@ -20900,14 +20903,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20900
20903
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20901
20904
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20902
20905
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
|
+
const deadline = Date.now() + timeoutMs;
|
|
20907
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20908
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20909
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20903
20910
|
for (const headless of passes) {
|
|
20911
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20912
|
+
if (remainingMs < minPassMs)
|
|
20913
|
+
break;
|
|
20904
20914
|
try {
|
|
20905
20915
|
await withProfilePage({
|
|
20906
20916
|
profileDir: opts.profileDir,
|
|
20907
20917
|
headless,
|
|
20908
20918
|
url: config.homeUrl,
|
|
20909
20919
|
isAuthenticated: config.isAuthenticated,
|
|
20910
|
-
timeoutMs,
|
|
20920
|
+
timeoutMs: remainingMs,
|
|
20911
20921
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20912
20922
|
}, async () => true);
|
|
20913
20923
|
return {
|
|
@@ -20482,6 +20482,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20482
20482
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20483
20483
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20484
20484
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20485
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20486
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20487
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20485
20488
|
var DEFAULT_POLL_MS = 500;
|
|
20486
20489
|
function isInstantBrowserDeath(message) {
|
|
20487
20490
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20604,14 +20607,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20604
20607
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20605
20608
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20606
20609
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
|
+
const deadline = Date.now() + timeoutMs;
|
|
20611
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20612
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20613
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20607
20614
|
for (const headless of passes) {
|
|
20615
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20616
|
+
if (remainingMs < minPassMs)
|
|
20617
|
+
break;
|
|
20608
20618
|
try {
|
|
20609
20619
|
await withProfilePage({
|
|
20610
20620
|
profileDir: opts.profileDir,
|
|
20611
20621
|
headless,
|
|
20612
20622
|
url: config.homeUrl,
|
|
20613
20623
|
isAuthenticated: config.isAuthenticated,
|
|
20614
|
-
timeoutMs,
|
|
20624
|
+
timeoutMs: remainingMs,
|
|
20615
20625
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20616
20626
|
}, async () => true);
|
|
20617
20627
|
return {
|
|
@@ -20776,6 +20776,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20776
20776
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20777
20777
|
// ../../packages/publish-harness/src/browser.ts
|
|
20778
20778
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20779
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20780
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20781
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20779
20782
|
var DEFAULT_STEP_TIMEOUT_MS = 30000;
|
|
20780
20783
|
var DEFAULT_POLL_MS = 500;
|
|
20781
20784
|
var ATTACH_POLL_MS = 100;
|
|
@@ -20900,14 +20903,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20900
20903
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20901
20904
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20902
20905
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
|
+
const deadline = Date.now() + timeoutMs;
|
|
20907
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20908
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20909
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20903
20910
|
for (const headless of passes) {
|
|
20911
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20912
|
+
if (remainingMs < minPassMs)
|
|
20913
|
+
break;
|
|
20904
20914
|
try {
|
|
20905
20915
|
await withProfilePage({
|
|
20906
20916
|
profileDir: opts.profileDir,
|
|
20907
20917
|
headless,
|
|
20908
20918
|
url: config.homeUrl,
|
|
20909
20919
|
isAuthenticated: config.isAuthenticated,
|
|
20910
|
-
timeoutMs,
|
|
20920
|
+
timeoutMs: remainingMs,
|
|
20911
20921
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20912
20922
|
}, async () => true);
|
|
20913
20923
|
return {
|
|
@@ -20482,6 +20482,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20482
20482
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20483
20483
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20484
20484
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20485
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20486
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20487
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20485
20488
|
var DEFAULT_POLL_MS = 500;
|
|
20486
20489
|
function isInstantBrowserDeath(message) {
|
|
20487
20490
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20604,14 +20607,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20604
20607
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20605
20608
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20606
20609
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
|
+
const deadline = Date.now() + timeoutMs;
|
|
20611
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20612
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20613
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20607
20614
|
for (const headless of passes) {
|
|
20615
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20616
|
+
if (remainingMs < minPassMs)
|
|
20617
|
+
break;
|
|
20608
20618
|
try {
|
|
20609
20619
|
await withProfilePage({
|
|
20610
20620
|
profileDir: opts.profileDir,
|
|
20611
20621
|
headless,
|
|
20612
20622
|
url: config.homeUrl,
|
|
20613
20623
|
isAuthenticated: config.isAuthenticated,
|
|
20614
|
-
timeoutMs,
|
|
20624
|
+
timeoutMs: remainingMs,
|
|
20615
20625
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20616
20626
|
}, async () => true);
|
|
20617
20627
|
return {
|
|
@@ -20776,6 +20776,9 @@ async function ensureProfileDir2(profileDir, headless) {
|
|
|
20776
20776
|
var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
20777
20777
|
// ../../packages/publish-harness/src/browser.ts
|
|
20778
20778
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20779
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20780
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20781
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20779
20782
|
var DEFAULT_STEP_TIMEOUT_MS = 30000;
|
|
20780
20783
|
var DEFAULT_POLL_MS = 500;
|
|
20781
20784
|
var ATTACH_POLL_MS = 100;
|
|
@@ -20900,14 +20903,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20900
20903
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20901
20904
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20902
20905
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
|
+
const deadline = Date.now() + timeoutMs;
|
|
20907
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20908
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20909
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20903
20910
|
for (const headless of passes) {
|
|
20911
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20912
|
+
if (remainingMs < minPassMs)
|
|
20913
|
+
break;
|
|
20904
20914
|
try {
|
|
20905
20915
|
await withProfilePage({
|
|
20906
20916
|
profileDir: opts.profileDir,
|
|
20907
20917
|
headless,
|
|
20908
20918
|
url: config.homeUrl,
|
|
20909
20919
|
isAuthenticated: config.isAuthenticated,
|
|
20910
|
-
timeoutMs,
|
|
20920
|
+
timeoutMs: remainingMs,
|
|
20911
20921
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20912
20922
|
}, async () => true);
|
|
20913
20923
|
return {
|
|
@@ -20482,6 +20482,9 @@ var MAX_QUEUED_BYTES = 8 * 1024 * 1024;
|
|
|
20482
20482
|
var DEFAULT_LOGIN_TIMEOUT_MS = 180000;
|
|
20483
20483
|
var DEFAULT_OPEN_NAV_TIMEOUT_MS = 30000;
|
|
20484
20484
|
var DEFAULT_CHECK_TIMEOUT_MS = 30000;
|
|
20485
|
+
var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
20486
|
+
var MIN_PASS_BUDGET_MS = 5000;
|
|
20487
|
+
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
20485
20488
|
var DEFAULT_POLL_MS = 500;
|
|
20486
20489
|
function isInstantBrowserDeath(message) {
|
|
20487
20490
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
@@ -20604,14 +20607,21 @@ async function checkChannelSession(config, opts) {
|
|
|
20604
20607
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20605
20608
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20606
20609
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
|
+
const deadline = Date.now() + timeoutMs;
|
|
20611
|
+
const printMarginMs = Math.min(VERDICT_PRINT_MARGIN_MS, Math.floor(timeoutMs / 4));
|
|
20612
|
+
const minPassMs = Math.min(MIN_PASS_BUDGET_MS, Math.floor(timeoutMs / 3));
|
|
20613
|
+
const launchReserveMs = Math.min(PASS_LAUNCH_RESERVE_MS, Math.floor(timeoutMs / 3));
|
|
20607
20614
|
for (const headless of passes) {
|
|
20615
|
+
const remainingMs = deadline - Date.now() - printMarginMs - launchReserveMs;
|
|
20616
|
+
if (remainingMs < minPassMs)
|
|
20617
|
+
break;
|
|
20608
20618
|
try {
|
|
20609
20619
|
await withProfilePage({
|
|
20610
20620
|
profileDir: opts.profileDir,
|
|
20611
20621
|
headless,
|
|
20612
20622
|
url: config.homeUrl,
|
|
20613
20623
|
isAuthenticated: config.isAuthenticated,
|
|
20614
|
-
timeoutMs,
|
|
20624
|
+
timeoutMs: remainingMs,
|
|
20615
20625
|
launcher: opts.launcher ?? kkBrowserLauncher
|
|
20616
20626
|
}, async () => true);
|
|
20617
20627
|
return {
|