feat: 接入模板诊断人工审阅登记
This commit is contained in:
1 parent
f57e1b1336
commit
d2ce2d2a84
4 files changed
+113
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { diagnoseTemplate } from "./lib/template-doctor.mjs";
|
||||
import { applyManualReview, diagnoseTemplate } from "./lib/template-doctor.mjs";
|
||||
|
||||
try {
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
@@ -25,6 +25,12 @@ try {
|
||||
);
|
||||
}
|
||||
if (!reports.length) throw new Error("No matching templates found");
|
||||
const registryPath = path.join(
|
||||
root,
|
||||
".codex-tasks/template-audit-execution/raw/manual-review.json",
|
||||
);
|
||||
const registry = JSON.parse(fs.readFileSync(registryPath, "utf8"));
|
||||
applyManualReview(reports, registry.items, registry.scope);
|
||||
const report = { schemaVersion: 1, completionStatus: "unverified", templates: reports };
|
||||
const output = JSON.stringify(report, null, 2) + "\n";
|
||||
if (options["--output"]) {
|
||||
|
||||
Reference in new issue
Block a user