@gobing-ai/knowledge-kit 0.1.1 → 0.1.3
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 +178 -0
- package/dist/board/collect/index.js +1164 -345
- package/dist/board/daily-voice/index.css +178 -0
- package/dist/board/daily-voice/index.js +32 -8
- package/dist/board/itc/index.css +178 -0
- package/dist/board/itc/index.js +32 -8
- package/dist/index.js +3991 -3032
- package/package.json +4 -4
- package/plugins/generations/content-gen/dist/index.js +11 -11
- package/plugins/generations/core-facts-gen/dist/index.js +14 -14
- package/plugins/generations/daily-article-gen/dist/index.js +14 -14
- package/plugins/generations/dailynews-gen/dist/index.js +11 -11
- package/plugins/generations/episode-plan-gen/dist/index.js +14 -14
- package/plugins/generations/gemini-tts/dist/index.js +11 -11
- package/plugins/generations/image-gen/dist/index.js +11 -11
- package/plugins/generations/news-report-gen/dist/index.js +59 -15
- package/plugins/generations/news-report-gen/src/index.ts +78 -1
- package/plugins/generations/voice-gen/dist/index.js +11 -11
- package/plugins/generations/voxcpm-tts/dist/index.js +11 -11
- package/plugins/ingestions/aihot-ingest/dist/index.js +14 -14
- package/plugins/ingestions/horizon-ingest/dist/index.js +14 -14
- package/plugins/ingestions/karakeep-local/dist/index.js +15 -15
- package/plugins/ingestions/last30days-ingest/dist/index.js +14 -14
- package/plugins/ingestions/web-search/dist/index.js +12 -12
- package/plugins/kk/commands/workflow-run.md +8 -4
- package/plugins/kk/decisions/extract/ai-news.yaml +7 -1
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/kk-workflow-stages.ts +12 -3
- package/plugins/kk/workflows/feature-verification.yaml +1 -9
- package/plugins/kk/workflows/kk-itc-author.yaml +12 -9
- package/plugins/kk/workflows/kk-itc-publish-tail.yaml +90 -0
- package/plugins/kk/workflows/kk-solo-podcast.yaml +6 -0
- package/plugins/publishings/bilibili-pub/dist/index.js +24 -24
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/cnblogs-pub/dist/index.js +24 -24
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/csdn-pub/dist/index.js +24 -24
- package/plugins/publishings/csdn-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/emdash-pub/dist/index.js +11 -11
- package/plugins/publishings/infoq-pub/dist/index.js +24 -24
- package/plugins/publishings/infoq-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/jike-pub/dist/index.js +24 -24
- package/plugins/publishings/jike-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/juejin-pub/dist/index.js +24 -24
- package/plugins/publishings/juejin-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/medium-pub/dist/index.js +11 -11
- package/plugins/publishings/podcast-pub/dist/index.js +11 -11
- package/plugins/publishings/qiita-pub/dist/index.js +11 -11
- package/plugins/publishings/shipinhao-pub/dist/index.js +24 -24
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/sspai-pub/dist/index.js +24 -24
- package/plugins/publishings/sspai-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/substack-pub/dist/index.js +24 -24
- package/plugins/publishings/substack-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/surfdash-pub/dist/index.js +11 -11
- package/plugins/publishings/threads-pub/dist/index.js +11 -11
- package/plugins/publishings/wechatmp-pub/dist/index.js +29 -25
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +30 -25
- package/plugins/publishings/wechatmp-pub/src/modes.ts +11 -1
- package/plugins/publishings/wechatmp-pub/src/profile-check.ts +15 -1
- package/plugins/publishings/weibo-pub/dist/index.js +24 -24
- package/plugins/publishings/weibo-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/x-pub/dist/index.js +24 -24
- package/plugins/publishings/x-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/x-pub/plugin.json +18 -0
- package/plugins/publishings/xhs-pub/dist/index.js +38 -25
- package/plugins/publishings/xhs-pub/dist/profile-check.js +38 -25
- package/plugins/publishings/xhs-pub/src/page.ts +25 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +24 -24
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/zenn-pub/dist/index.js +11 -11
|
@@ -4821,7 +4821,7 @@ var init_zod = __esm(() => {
|
|
|
4821
4821
|
init_external();
|
|
4822
4822
|
});
|
|
4823
4823
|
|
|
4824
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4824
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4825
4825
|
var ErrorCode;
|
|
4826
4826
|
var init_errors3 = __esm(() => {
|
|
4827
4827
|
ErrorCode = {
|
|
@@ -4832,7 +4832,7 @@ var init_errors3 = __esm(() => {
|
|
|
4832
4832
|
};
|
|
4833
4833
|
});
|
|
4834
4834
|
|
|
4835
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4835
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4836
4836
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4837
4837
|
var init_api_response = __esm(() => {
|
|
4838
4838
|
init_errors3();
|
|
@@ -4855,13 +4855,13 @@ var init_api_response = __esm(() => {
|
|
|
4855
4855
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4856
4856
|
});
|
|
4857
4857
|
|
|
4858
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4858
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4859
4859
|
var init_cursor = () => {};
|
|
4860
4860
|
|
|
4861
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4861
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4862
4862
|
var init_event_severity = () => {};
|
|
4863
4863
|
|
|
4864
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4864
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4865
4865
|
function processStream(name) {
|
|
4866
4866
|
const proc = globalThis.process;
|
|
4867
4867
|
const stream = proc?.[name];
|
|
@@ -4879,7 +4879,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4879
4879
|
}
|
|
4880
4880
|
var defaultStderrTarget;
|
|
4881
4881
|
|
|
4882
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4882
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4883
4883
|
var init_dist = __esm(() => {
|
|
4884
4884
|
init_api_response();
|
|
4885
4885
|
init_cursor();
|
|
@@ -11877,7 +11877,7 @@ var init_dist2 = __esm(() => {
|
|
|
11877
11877
|
$visitAsync = visit.visitAsync;
|
|
11878
11878
|
});
|
|
11879
11879
|
|
|
11880
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11880
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11881
11881
|
var configSchema;
|
|
11882
11882
|
var init_config = __esm(() => {
|
|
11883
11883
|
init_dist2();
|
|
@@ -11901,7 +11901,7 @@ var init_config = __esm(() => {
|
|
|
11901
11901
|
});
|
|
11902
11902
|
});
|
|
11903
11903
|
|
|
11904
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11904
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11905
11905
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11906
11906
|
import { dirname, resolve as resolvePath } from "path";
|
|
11907
11907
|
function createNodeFileSystem(root, paths) {
|
|
@@ -11919,11 +11919,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
11919
11919
|
const lines = buffer.split(/\r?\n/);
|
|
11920
11920
|
buffer = lines.pop() ?? "";
|
|
11921
11921
|
for (const line of lines) {
|
|
11922
|
-
yield line;
|
|
11922
|
+
yield { text: line, terminated: true };
|
|
11923
11923
|
}
|
|
11924
11924
|
}
|
|
11925
11925
|
if (buffer.length > 0)
|
|
11926
|
-
yield buffer;
|
|
11926
|
+
yield { text: buffer, terminated: false };
|
|
11927
11927
|
},
|
|
11928
11928
|
writeFile: (path, content) => {
|
|
11929
11929
|
ensureParentDir(path);
|
|
@@ -12573,7 +12573,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12573
12573
|
});
|
|
12574
12574
|
}
|
|
12575
12575
|
});
|
|
12576
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12576
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12577
12577
|
init_file_system_node();
|
|
12578
12578
|
init_config();
|
|
12579
12579
|
|
|
@@ -4813,7 +4813,7 @@ var init_zod = __esm(() => {
|
|
|
4813
4813
|
init_external();
|
|
4814
4814
|
});
|
|
4815
4815
|
|
|
4816
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4816
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4817
4817
|
var ErrorCode;
|
|
4818
4818
|
var init_errors3 = __esm(() => {
|
|
4819
4819
|
ErrorCode = {
|
|
@@ -4824,7 +4824,7 @@ var init_errors3 = __esm(() => {
|
|
|
4824
4824
|
};
|
|
4825
4825
|
});
|
|
4826
4826
|
|
|
4827
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4827
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4828
4828
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4829
4829
|
var init_api_response = __esm(() => {
|
|
4830
4830
|
init_errors3();
|
|
@@ -4847,13 +4847,13 @@ var init_api_response = __esm(() => {
|
|
|
4847
4847
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4848
4848
|
});
|
|
4849
4849
|
|
|
4850
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4850
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4851
4851
|
var init_cursor = () => {};
|
|
4852
4852
|
|
|
4853
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4853
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4854
4854
|
var init_event_severity = () => {};
|
|
4855
4855
|
|
|
4856
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4856
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4857
4857
|
function processStream(name) {
|
|
4858
4858
|
const proc = globalThis.process;
|
|
4859
4859
|
const stream = proc?.[name];
|
|
@@ -4871,7 +4871,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4871
4871
|
}
|
|
4872
4872
|
var defaultStderrTarget;
|
|
4873
4873
|
|
|
4874
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4874
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4875
4875
|
var init_dist = __esm(() => {
|
|
4876
4876
|
init_api_response();
|
|
4877
4877
|
init_cursor();
|
|
@@ -11869,7 +11869,7 @@ var init_dist2 = __esm(() => {
|
|
|
11869
11869
|
$visitAsync = visit.visitAsync;
|
|
11870
11870
|
});
|
|
11871
11871
|
|
|
11872
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11872
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11873
11873
|
var configSchema;
|
|
11874
11874
|
var init_config = __esm(() => {
|
|
11875
11875
|
init_dist2();
|
|
@@ -11893,7 +11893,7 @@ var init_config = __esm(() => {
|
|
|
11893
11893
|
});
|
|
11894
11894
|
});
|
|
11895
11895
|
|
|
11896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11896
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11897
11897
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11898
11898
|
import { dirname, resolve as resolvePath } from "path";
|
|
11899
11899
|
function createNodeFileSystem(root, paths) {
|
|
@@ -11911,11 +11911,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
11911
11911
|
const lines = buffer.split(/\r?\n/);
|
|
11912
11912
|
buffer = lines.pop() ?? "";
|
|
11913
11913
|
for (const line of lines) {
|
|
11914
|
-
yield line;
|
|
11914
|
+
yield { text: line, terminated: true };
|
|
11915
11915
|
}
|
|
11916
11916
|
}
|
|
11917
11917
|
if (buffer.length > 0)
|
|
11918
|
-
yield buffer;
|
|
11918
|
+
yield { text: buffer, terminated: false };
|
|
11919
11919
|
},
|
|
11920
11920
|
writeFile: (path, content) => {
|
|
11921
11921
|
ensureParentDir(path);
|
|
@@ -12248,14 +12248,14 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12248
12248
|
});
|
|
12249
12249
|
}
|
|
12250
12250
|
});
|
|
12251
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12251
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12252
12252
|
init_file_system_node();
|
|
12253
12253
|
init_config();
|
|
12254
12254
|
|
|
12255
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12255
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
|
|
12256
12256
|
init_file_system_node();
|
|
12257
12257
|
|
|
12258
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12258
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
12259
12259
|
function normalizeSeparators(path) {
|
|
12260
12260
|
return path.replaceAll("\\", "/");
|
|
12261
12261
|
}
|
|
@@ -12289,7 +12289,7 @@ function dirnamePath(path) {
|
|
|
12289
12289
|
return normalized.slice(0, index);
|
|
12290
12290
|
}
|
|
12291
12291
|
|
|
12292
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12292
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
|
|
12293
12293
|
async function ensureDirForFile(path, fs = createNodeFileSystem()) {
|
|
12294
12294
|
await fs.ensureDir(dirnamePath(path));
|
|
12295
12295
|
}
|
|
@@ -12395,6 +12395,27 @@ function minimumsFromEnv() {
|
|
|
12395
12395
|
}
|
|
12396
12396
|
return out;
|
|
12397
12397
|
}
|
|
12398
|
+
async function readPublishCompleteness(path) {
|
|
12399
|
+
if (!path || path.trim() === "")
|
|
12400
|
+
return null;
|
|
12401
|
+
try {
|
|
12402
|
+
const parsed = JSON.parse(await Bun.file(path).text());
|
|
12403
|
+
const rows = parsed?.rows;
|
|
12404
|
+
if (!Array.isArray(rows) || rows.length === 0)
|
|
12405
|
+
return null;
|
|
12406
|
+
const missing = parsed.missing;
|
|
12407
|
+
return {
|
|
12408
|
+
rows: rows.filter((row) => row !== null && typeof row === "object").map((row) => ({
|
|
12409
|
+
channel: typeof row.channel === "string" ? row.channel : "?",
|
|
12410
|
+
state: typeof row.state === "string" ? row.state : "?",
|
|
12411
|
+
detail: typeof row.detail === "string" ? row.detail : ""
|
|
12412
|
+
})),
|
|
12413
|
+
missing: Array.isArray(missing) ? missing.filter((name) => typeof name === "string") : []
|
|
12414
|
+
};
|
|
12415
|
+
} catch {
|
|
12416
|
+
return null;
|
|
12417
|
+
}
|
|
12418
|
+
}
|
|
12398
12419
|
async function readQcSummary(path) {
|
|
12399
12420
|
if (!path || path.trim() === "")
|
|
12400
12421
|
return null;
|
|
@@ -12561,6 +12582,19 @@ function renderReportMarkdown(docs, date, options = {}) {
|
|
|
12561
12582
|
lines.push(`| ${issue.type} | ${issue.count} |`);
|
|
12562
12583
|
lines.push("");
|
|
12563
12584
|
}
|
|
12585
|
+
const completeness = options.completeness ?? null;
|
|
12586
|
+
if (completeness !== null) {
|
|
12587
|
+
lines.push("## \u53D1\u5E03\u5B8C\u6574\u6027", "");
|
|
12588
|
+
lines.push("| \u901A\u9053 | \u72B6\u6001 | \u8BF4\u660E |", "| --- | --- | --- |");
|
|
12589
|
+
for (const row of completeness.rows) {
|
|
12590
|
+
const detail = row.detail.replace(/\|/g, "\\|").replace(/\s+/g, " ").slice(0, 200);
|
|
12591
|
+
lines.push(`| ${row.channel} | ${row.state} | ${detail || "\u2014"} |`);
|
|
12592
|
+
}
|
|
12593
|
+
lines.push("");
|
|
12594
|
+
if (completeness.missing.length > 0) {
|
|
12595
|
+
lines.push(`**\u672A\u5B8C\u6210\u901A\u9053**: ${completeness.missing.join(", ")} \u2014 \u8BE6\u7EC6\u539F\u56E0\u89C1\u4E0A\u8868\uFF0C\u91CD\u8DD1\u5BF9\u5E94 stage \u53EF\u8865\u53D1\uFF08'kk stage daily-publish-<channel> \u2026'\uFF09\u3002`, "");
|
|
12596
|
+
}
|
|
12597
|
+
}
|
|
12564
12598
|
const timing = options.timing ?? [];
|
|
12565
12599
|
if (timing.length > 0) {
|
|
12566
12600
|
lines.push("## \u6B65\u8017\u65F6", "");
|
|
@@ -12653,7 +12687,16 @@ async function processGeneratorIO(inputPath, outputPath) {
|
|
|
12653
12687
|
const scriptSource = await readScriptSource(process.env.NEWS_REPORT_SCRIPT_FILE);
|
|
12654
12688
|
const planAudit = await readPlanAudit(process.env.NEWS_REPORT_PLAN_AUDIT_FILE);
|
|
12655
12689
|
const blended = await readBlendedCorpus(process.env.NEWS_REPORT_BLENDED_FILE);
|
|
12656
|
-
const
|
|
12690
|
+
const completeness = await readPublishCompleteness(process.env.NEWS_REPORT_COMPLETENESS_FILE);
|
|
12691
|
+
const content = docsToContent(docs, dateFromEnv(), {
|
|
12692
|
+
rejected,
|
|
12693
|
+
timing,
|
|
12694
|
+
qc,
|
|
12695
|
+
scriptSource,
|
|
12696
|
+
planAudit,
|
|
12697
|
+
blended,
|
|
12698
|
+
completeness
|
|
12699
|
+
});
|
|
12657
12700
|
const fs = createNodeFileSystem();
|
|
12658
12701
|
const outDir = dirname2(outputPath);
|
|
12659
12702
|
if (outDir && outDir !== ".")
|
|
@@ -12692,6 +12735,7 @@ export {
|
|
|
12692
12735
|
processGeneratorIO,
|
|
12693
12736
|
readBlendedCorpus,
|
|
12694
12737
|
readPlanAudit,
|
|
12738
|
+
readPublishCompleteness,
|
|
12695
12739
|
readQcSummary,
|
|
12696
12740
|
readRejectedAudit,
|
|
12697
12741
|
readScriptSource,
|
|
@@ -27,6 +27,9 @@ import { echoError } from '@gobing-ai/ts-utils';
|
|
|
27
27
|
* - `NEWS_REPORT_SCRIPT_FILE` — the script stage's Content path
|
|
28
28
|
* (`24-script/<date>_08_script_content.json`, F613 R5); absent or metadata-less -> the
|
|
29
29
|
* 脚本来源 line is omitted, never throw.
|
|
30
|
+
* - `NEWS_REPORT_COMPLETENESS_FILE` — the publish tail's channel ledger
|
|
31
|
+
* (`31-publish/<date>_17_publish_completeness.json`, written by
|
|
32
|
+
* `kk stage daily-publish-completeness`); absent -> the 发布完整性 section is omitted, never throw.
|
|
30
33
|
* - `NEWS_REPORT_TIMING_FILE` — `<work_dir>/step-timing.json` JSONL of
|
|
31
34
|
* {step, startedAt, endedAt} appended by the workflow shell steps; missing
|
|
32
35
|
* or unreadable -> the timing section is omitted, never throw.
|
|
@@ -152,6 +155,49 @@ interface RejectedAudit {
|
|
|
152
155
|
reasons: string[];
|
|
153
156
|
}
|
|
154
157
|
|
|
158
|
+
/** One independent publish channel's terminal state, as the publish tail recorded it. */
|
|
159
|
+
export interface PublishCompletenessRow {
|
|
160
|
+
channel: string;
|
|
161
|
+
state: string;
|
|
162
|
+
detail: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface PublishCompleteness {
|
|
166
|
+
rows: PublishCompletenessRow[];
|
|
167
|
+
/** Channels that did not reach `done` — the ones the operator has to act on. */
|
|
168
|
+
missing: string[];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Read the publish tail's completeness ledger (`kk stage daily-publish-completeness`).
|
|
173
|
+
*
|
|
174
|
+
* Best-effort by contract like every other report input: absent, unreadable, malformed, or
|
|
175
|
+
* row-less -> `null` and the section is omitted. The ledger is the only place the independent
|
|
176
|
+
* channels (xhs, wechat, locales, cms-resync) surface — they never enter `publish_status` — so
|
|
177
|
+
* 20261016 a run that drafted nothing to WeChat/XHS reported only its scoring and QC.
|
|
178
|
+
*/
|
|
179
|
+
export async function readPublishCompleteness(path: string | undefined): Promise<PublishCompleteness | null> {
|
|
180
|
+
if (!path || path.trim() === '') return null;
|
|
181
|
+
try {
|
|
182
|
+
const parsed: unknown = JSON.parse(await Bun.file(path).text());
|
|
183
|
+
const rows = (parsed as { rows?: unknown } | null)?.rows;
|
|
184
|
+
if (!Array.isArray(rows) || rows.length === 0) return null;
|
|
185
|
+
const missing = (parsed as { missing?: unknown }).missing;
|
|
186
|
+
return {
|
|
187
|
+
rows: rows
|
|
188
|
+
.filter((row): row is Record<string, unknown> => row !== null && typeof row === 'object')
|
|
189
|
+
.map((row) => ({
|
|
190
|
+
channel: typeof row.channel === 'string' ? row.channel : '?',
|
|
191
|
+
state: typeof row.state === 'string' ? row.state : '?',
|
|
192
|
+
detail: typeof row.detail === 'string' ? row.detail : '',
|
|
193
|
+
})),
|
|
194
|
+
missing: Array.isArray(missing) ? missing.filter((name): name is string => typeof name === 'string') : [],
|
|
195
|
+
};
|
|
196
|
+
} catch {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
155
201
|
/** Generate-stage audio QC summary rendered into the run report (task 0139 R5b). */
|
|
156
202
|
export interface QcSummary {
|
|
157
203
|
passed: boolean;
|
|
@@ -278,6 +324,7 @@ export function renderReportMarkdown(
|
|
|
278
324
|
scriptSource?: ScriptSource | null;
|
|
279
325
|
planAudit?: PlanAuditRow[] | null;
|
|
280
326
|
blended?: BlendedDoc[] | null;
|
|
327
|
+
completeness?: PublishCompleteness | null;
|
|
281
328
|
} = {},
|
|
282
329
|
): string {
|
|
283
330
|
const lines: string[] = [`# 每日 AI 语音运行报告 — ${date}`, ''];
|
|
@@ -376,6 +423,26 @@ export function renderReportMarkdown(
|
|
|
376
423
|
lines.push('');
|
|
377
424
|
}
|
|
378
425
|
|
|
426
|
+
const completeness = options.completeness ?? null;
|
|
427
|
+
if (completeness !== null) {
|
|
428
|
+
// 20261016: the independent channels (xhs, wechat, locales, cms-resync) are non-blocking and
|
|
429
|
+
// never enter `publish_status`, so a run that drafted nothing to WeChat/XHS still reported
|
|
430
|
+
// `full`. Surface each channel's state here instead of leaving it to a separate JSON.
|
|
431
|
+
lines.push('## 发布完整性', '');
|
|
432
|
+
lines.push('| 通道 | 状态 | 说明 |', '| --- | --- | --- |');
|
|
433
|
+
for (const row of completeness.rows) {
|
|
434
|
+
const detail = row.detail.replace(/\|/g, '\\|').replace(/\s+/g, ' ').slice(0, 200);
|
|
435
|
+
lines.push(`| ${row.channel} | ${row.state} | ${detail || '—'} |`);
|
|
436
|
+
}
|
|
437
|
+
lines.push('');
|
|
438
|
+
if (completeness.missing.length > 0) {
|
|
439
|
+
lines.push(
|
|
440
|
+
`**未完成通道**: ${completeness.missing.join(', ')} — 详细原因见上表,重跑对应 stage 可补发('kk stage daily-publish-<channel> …')。`,
|
|
441
|
+
'',
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
379
446
|
const timing = options.timing ?? [];
|
|
380
447
|
if (timing.length > 0) {
|
|
381
448
|
lines.push('## 步耗时', '');
|
|
@@ -498,6 +565,7 @@ export function docsToContent(
|
|
|
498
565
|
scriptSource?: ScriptSource | null;
|
|
499
566
|
planAudit?: PlanAuditRow[] | null;
|
|
500
567
|
blended?: BlendedDoc[] | null;
|
|
568
|
+
completeness?: PublishCompleteness | null;
|
|
501
569
|
},
|
|
502
570
|
): Content {
|
|
503
571
|
return ContentSchema.parse({
|
|
@@ -522,7 +590,16 @@ export async function processGeneratorIO(inputPath: string, outputPath: string):
|
|
|
522
590
|
const scriptSource = await readScriptSource(process.env.NEWS_REPORT_SCRIPT_FILE);
|
|
523
591
|
const planAudit = await readPlanAudit(process.env.NEWS_REPORT_PLAN_AUDIT_FILE);
|
|
524
592
|
const blended = await readBlendedCorpus(process.env.NEWS_REPORT_BLENDED_FILE);
|
|
525
|
-
const
|
|
593
|
+
const completeness = await readPublishCompleteness(process.env.NEWS_REPORT_COMPLETENESS_FILE);
|
|
594
|
+
const content = docsToContent(docs, dateFromEnv(), {
|
|
595
|
+
rejected,
|
|
596
|
+
timing,
|
|
597
|
+
qc,
|
|
598
|
+
scriptSource,
|
|
599
|
+
planAudit,
|
|
600
|
+
blended,
|
|
601
|
+
completeness,
|
|
602
|
+
});
|
|
526
603
|
const fs = createNodeFileSystem();
|
|
527
604
|
const outDir = dirname(outputPath);
|
|
528
605
|
if (outDir && outDir !== '.') await fs.ensureDir(outDir);
|
|
@@ -4813,7 +4813,7 @@ var init_zod = __esm(() => {
|
|
|
4813
4813
|
init_external();
|
|
4814
4814
|
});
|
|
4815
4815
|
|
|
4816
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4816
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4817
4817
|
var ErrorCode;
|
|
4818
4818
|
var init_errors3 = __esm(() => {
|
|
4819
4819
|
ErrorCode = {
|
|
@@ -4824,7 +4824,7 @@ var init_errors3 = __esm(() => {
|
|
|
4824
4824
|
};
|
|
4825
4825
|
});
|
|
4826
4826
|
|
|
4827
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4827
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4828
4828
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4829
4829
|
var init_api_response = __esm(() => {
|
|
4830
4830
|
init_errors3();
|
|
@@ -4847,13 +4847,13 @@ var init_api_response = __esm(() => {
|
|
|
4847
4847
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4848
4848
|
});
|
|
4849
4849
|
|
|
4850
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4850
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4851
4851
|
var init_cursor = () => {};
|
|
4852
4852
|
|
|
4853
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4853
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4854
4854
|
var init_event_severity = () => {};
|
|
4855
4855
|
|
|
4856
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4856
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4857
4857
|
function processStream(name) {
|
|
4858
4858
|
const proc = globalThis.process;
|
|
4859
4859
|
const stream = proc?.[name];
|
|
@@ -4871,7 +4871,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4871
4871
|
}
|
|
4872
4872
|
var defaultStderrTarget;
|
|
4873
4873
|
|
|
4874
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4874
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4875
4875
|
var init_dist = __esm(() => {
|
|
4876
4876
|
init_api_response();
|
|
4877
4877
|
init_cursor();
|
|
@@ -11869,7 +11869,7 @@ var init_dist2 = __esm(() => {
|
|
|
11869
11869
|
$visitAsync = visit.visitAsync;
|
|
11870
11870
|
});
|
|
11871
11871
|
|
|
11872
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11872
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11873
11873
|
var configSchema;
|
|
11874
11874
|
var init_config = __esm(() => {
|
|
11875
11875
|
init_dist2();
|
|
@@ -11893,7 +11893,7 @@ var init_config = __esm(() => {
|
|
|
11893
11893
|
});
|
|
11894
11894
|
});
|
|
11895
11895
|
|
|
11896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11896
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11897
11897
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11898
11898
|
import { dirname, resolve as resolvePath } from "path";
|
|
11899
11899
|
function createNodeFileSystem(root, paths) {
|
|
@@ -11911,11 +11911,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
11911
11911
|
const lines = buffer.split(/\r?\n/);
|
|
11912
11912
|
buffer = lines.pop() ?? "";
|
|
11913
11913
|
for (const line of lines) {
|
|
11914
|
-
yield line;
|
|
11914
|
+
yield { text: line, terminated: true };
|
|
11915
11915
|
}
|
|
11916
11916
|
}
|
|
11917
11917
|
if (buffer.length > 0)
|
|
11918
|
-
yield buffer;
|
|
11918
|
+
yield { text: buffer, terminated: false };
|
|
11919
11919
|
},
|
|
11920
11920
|
writeFile: (path, content) => {
|
|
11921
11921
|
ensureParentDir(path);
|
|
@@ -12248,7 +12248,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12248
12248
|
});
|
|
12249
12249
|
}
|
|
12250
12250
|
});
|
|
12251
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12251
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12252
12252
|
init_file_system_node();
|
|
12253
12253
|
init_config();
|
|
12254
12254
|
|
|
@@ -13,7 +13,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
13
13
|
};
|
|
14
14
|
var __require = import.meta.require;
|
|
15
15
|
|
|
16
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
16
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
17
17
|
var ErrorCode;
|
|
18
18
|
var init_errors = __esm(() => {
|
|
19
19
|
ErrorCode = {
|
|
@@ -24,7 +24,7 @@ var init_errors = __esm(() => {
|
|
|
24
24
|
};
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
27
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
28
28
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
29
29
|
var init_api_response = __esm(() => {
|
|
30
30
|
init_errors();
|
|
@@ -47,13 +47,13 @@ var init_api_response = __esm(() => {
|
|
|
47
47
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
50
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
51
51
|
var init_cursor = () => {};
|
|
52
52
|
|
|
53
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
53
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
54
54
|
var init_event_severity = () => {};
|
|
55
55
|
|
|
56
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
56
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
57
57
|
function processStream(name) {
|
|
58
58
|
const proc = globalThis.process;
|
|
59
59
|
const stream = proc?.[name];
|
|
@@ -71,7 +71,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
71
71
|
}
|
|
72
72
|
var defaultStderrTarget;
|
|
73
73
|
|
|
74
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
74
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
75
75
|
var init_dist = __esm(() => {
|
|
76
76
|
init_api_response();
|
|
77
77
|
init_cursor();
|
|
@@ -11869,7 +11869,7 @@ var init_dist2 = __esm(() => {
|
|
|
11869
11869
|
$visitAsync = visit.visitAsync;
|
|
11870
11870
|
});
|
|
11871
11871
|
|
|
11872
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11872
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11873
11873
|
var configSchema;
|
|
11874
11874
|
var init_config = __esm(() => {
|
|
11875
11875
|
init_dist2();
|
|
@@ -11893,7 +11893,7 @@ var init_config = __esm(() => {
|
|
|
11893
11893
|
});
|
|
11894
11894
|
});
|
|
11895
11895
|
|
|
11896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11896
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11897
11897
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11898
11898
|
import { dirname, resolve as resolvePath } from "path";
|
|
11899
11899
|
function createNodeFileSystem(root, paths) {
|
|
@@ -11911,11 +11911,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
11911
11911
|
const lines = buffer.split(/\r?\n/);
|
|
11912
11912
|
buffer = lines.pop() ?? "";
|
|
11913
11913
|
for (const line of lines) {
|
|
11914
|
-
yield line;
|
|
11914
|
+
yield { text: line, terminated: true };
|
|
11915
11915
|
}
|
|
11916
11916
|
}
|
|
11917
11917
|
if (buffer.length > 0)
|
|
11918
|
-
yield buffer;
|
|
11918
|
+
yield { text: buffer, terminated: false };
|
|
11919
11919
|
},
|
|
11920
11920
|
writeFile: (path, content) => {
|
|
11921
11921
|
ensureParentDir(path);
|
|
@@ -12251,7 +12251,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12251
12251
|
});
|
|
12252
12252
|
}
|
|
12253
12253
|
});
|
|
12254
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12254
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12255
12255
|
init_file_system_node();
|
|
12256
12256
|
init_config();
|
|
12257
12257
|
|
|
@@ -5065,7 +5065,7 @@ var init_zod = __esm(() => {
|
|
|
5065
5065
|
init_external();
|
|
5066
5066
|
});
|
|
5067
5067
|
|
|
5068
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
5068
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
5069
5069
|
var ErrorCode;
|
|
5070
5070
|
var init_errors3 = __esm(() => {
|
|
5071
5071
|
ErrorCode = {
|
|
@@ -5076,7 +5076,7 @@ var init_errors3 = __esm(() => {
|
|
|
5076
5076
|
};
|
|
5077
5077
|
});
|
|
5078
5078
|
|
|
5079
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
5079
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
5080
5080
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
5081
5081
|
var init_api_response = __esm(() => {
|
|
5082
5082
|
init_errors3();
|
|
@@ -5099,13 +5099,13 @@ var init_api_response = __esm(() => {
|
|
|
5099
5099
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
5100
5100
|
});
|
|
5101
5101
|
|
|
5102
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
5102
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
5103
5103
|
var init_cursor = () => {};
|
|
5104
5104
|
|
|
5105
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
5105
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
5106
5106
|
var init_event_severity = () => {};
|
|
5107
5107
|
|
|
5108
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
5108
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
5109
5109
|
function processStream(name) {
|
|
5110
5110
|
const proc = globalThis.process;
|
|
5111
5111
|
const stream = proc?.[name];
|
|
@@ -5123,7 +5123,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
5123
5123
|
}
|
|
5124
5124
|
var defaultStderrTarget;
|
|
5125
5125
|
|
|
5126
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
5126
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
5127
5127
|
var init_dist = __esm(() => {
|
|
5128
5128
|
init_api_response();
|
|
5129
5129
|
init_cursor();
|
|
@@ -12121,7 +12121,7 @@ var init_dist2 = __esm(() => {
|
|
|
12121
12121
|
$visitAsync = visit.visitAsync;
|
|
12122
12122
|
});
|
|
12123
12123
|
|
|
12124
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12124
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
12125
12125
|
var configSchema;
|
|
12126
12126
|
var init_config = __esm(() => {
|
|
12127
12127
|
init_dist2();
|
|
@@ -12145,7 +12145,7 @@ var init_config = __esm(() => {
|
|
|
12145
12145
|
});
|
|
12146
12146
|
});
|
|
12147
12147
|
|
|
12148
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12148
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
12149
12149
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
12150
12150
|
import { dirname, resolve as resolvePath } from "path";
|
|
12151
12151
|
function createNodeFileSystem(root, paths) {
|
|
@@ -12163,11 +12163,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
12163
12163
|
const lines = buffer.split(/\r?\n/);
|
|
12164
12164
|
buffer = lines.pop() ?? "";
|
|
12165
12165
|
for (const line of lines) {
|
|
12166
|
-
yield line;
|
|
12166
|
+
yield { text: line, terminated: true };
|
|
12167
12167
|
}
|
|
12168
12168
|
}
|
|
12169
12169
|
if (buffer.length > 0)
|
|
12170
|
-
yield buffer;
|
|
12170
|
+
yield { text: buffer, terminated: false };
|
|
12171
12171
|
},
|
|
12172
12172
|
writeFile: (path, content) => {
|
|
12173
12173
|
ensureParentDir(path);
|
|
@@ -12500,14 +12500,14 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12500
12500
|
});
|
|
12501
12501
|
}
|
|
12502
12502
|
});
|
|
12503
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12503
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12504
12504
|
init_file_system_node();
|
|
12505
12505
|
init_config();
|
|
12506
12506
|
|
|
12507
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12507
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
|
|
12508
12508
|
init_file_system_node();
|
|
12509
12509
|
|
|
12510
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12510
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
12511
12511
|
function normalizeSeparators(path) {
|
|
12512
12512
|
return path.replaceAll("\\", "/");
|
|
12513
12513
|
}
|
|
@@ -12541,7 +12541,7 @@ function dirnamePath(path) {
|
|
|
12541
12541
|
return normalized.slice(0, index);
|
|
12542
12542
|
}
|
|
12543
12543
|
|
|
12544
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12544
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
|
|
12545
12545
|
async function ensureDirForFile(path, fs = createNodeFileSystem()) {
|
|
12546
12546
|
await fs.ensureDir(dirnamePath(path));
|
|
12547
12547
|
}
|