吸收数字员工管理端审计诊断预览
This commit is contained in:
@@ -1770,6 +1770,75 @@ function checkDigitalAdminArtifactLifecycleWorkbench() {
|
||||
console.log("[DigitalEmployeeCheck] admin artifact lifecycle workbench hooks OK");
|
||||
}
|
||||
|
||||
function checkDigitalAdminAuditDiagnosticsWorkbench() {
|
||||
console.log("\n[DigitalEmployeeCheck] Verify admin audit diagnostics workbench hooks");
|
||||
const backendRoot = path.resolve(packageRoot, "..", "..", "..", "qiming-backend");
|
||||
const qimingRoot = path.resolve(packageRoot, "..", "..", "..", "qiming");
|
||||
const servicePath = path.join(
|
||||
backendRoot,
|
||||
"app-platform-modules",
|
||||
"app-platform-agent",
|
||||
"app-platform-agent-core-application",
|
||||
"src",
|
||||
"main",
|
||||
"java",
|
||||
"com",
|
||||
"xspaceagi",
|
||||
"agent",
|
||||
"core",
|
||||
"application",
|
||||
"service",
|
||||
"DigitalEmployeeSyncApplicationServiceImpl.java",
|
||||
);
|
||||
const testPath = path.join(
|
||||
backendRoot,
|
||||
"app-platform-modules",
|
||||
"app-platform-agent",
|
||||
"app-platform-agent-core-application",
|
||||
"src",
|
||||
"test",
|
||||
"java",
|
||||
"com",
|
||||
"xspaceagi",
|
||||
"agent",
|
||||
"core",
|
||||
"application",
|
||||
"service",
|
||||
"DigitalEmployeeSyncApplicationServiceImplTest.java",
|
||||
);
|
||||
const qimingOpsPath = path.join(qimingRoot, "src", "pages", "SystemManagement", "Content", "DigitalEmployeeOps", "index.tsx");
|
||||
const qimingTypesPath = path.join(qimingRoot, "src", "types", "interfaces", "systemManage.ts");
|
||||
const docsPath = path.resolve(packageRoot, "..", "..", "docs", "digital-employee-frontend-integration-plan.md");
|
||||
const service = fs.readFileSync(servicePath, "utf8");
|
||||
const test = fs.readFileSync(testPath, "utf8");
|
||||
const qimingOps = fs.readFileSync(qimingOpsPath, "utf8");
|
||||
const qimingTypes = fs.readFileSync(qimingTypesPath, "utf8");
|
||||
const docs = fs.readFileSync(docsPath, "utf8");
|
||||
const requiredSnippets = [
|
||||
[service, "audits", "backend audits view"],
|
||||
[service, "isAuditRow", "backend audit matcher"],
|
||||
[service, "sandbox_audit", "backend sandbox audit category"],
|
||||
[service, "token_cost", "backend token cost category"],
|
||||
[service, "tool_call_audit", "backend tool call audit category"],
|
||||
[service, "sync_failure", "backend sync failure audit category"],
|
||||
[test, "queryAdminWorkbenchAuditsReturnsAuditRowsOnly", "backend audit diagnostics test"],
|
||||
[test, "doesNotContainKeys(\"token\", \"authorization\", \"raw_input\", \"command\", \"prompt\")", "backend audit redaction assertion"],
|
||||
[qimingTypes, "audits", "qiming audits view type"],
|
||||
[qimingOps, "审计诊断", "qiming audit diagnostics tab"],
|
||||
[qimingOps, "标记复核", "qiming audit reviewed action"],
|
||||
[qimingOps, "忽略", "qiming audit dismiss action"],
|
||||
[qimingOps, "标记归档", "qiming audit archive action"],
|
||||
[docs, "正式管理端审计诊断预览", "docs audit diagnostics absorption"],
|
||||
];
|
||||
const missing = requiredSnippets
|
||||
.filter(([content, snippet]) => !content.includes(snippet))
|
||||
.map(([, , label]) => label);
|
||||
if (missing.length > 0) {
|
||||
throw new Error(`Missing admin audit diagnostics workbench hooks: ${missing.join(", ")}`);
|
||||
}
|
||||
console.log("[DigitalEmployeeCheck] admin audit diagnostics workbench hooks OK");
|
||||
}
|
||||
|
||||
function checkLocalDatabaseSchema() {
|
||||
console.log("\n[DigitalEmployeeCheck] Verify local SQLite digital schema");
|
||||
const dbPath = path.join(os.homedir(), ".qimingclaw", "qimingclaw.db");
|
||||
@@ -1837,6 +1906,7 @@ function main() {
|
||||
checkDigitalAdminRouteGovernanceWorkbench();
|
||||
checkDigitalAdminNotificationWorkbench();
|
||||
checkDigitalAdminArtifactLifecycleWorkbench();
|
||||
checkDigitalAdminAuditDiagnosticsWorkbench();
|
||||
checkLocalDatabaseSchema();
|
||||
console.log("\n[DigitalEmployeeCheck] All checks passed");
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user