吸收数字员工发送账单审计外壳
This commit is contained in:
@@ -1306,6 +1306,82 @@ function checkDigitalBackendMaterializedFacts() {
|
||||
console.log("[DigitalEmployeeCheck] backend materialized business fact hooks OK");
|
||||
}
|
||||
|
||||
function checkDigitalAdminRecordBillingArchiveShell() {
|
||||
console.log("\n[DigitalEmployeeCheck] Verify admin send/billing/audit archive shell hooks");
|
||||
const backendRoot = path.resolve(packageRoot, "..", "..", "..", "qiming-backend");
|
||||
const qimingRoot = path.resolve(packageRoot, "..", "..", "..", "qiming");
|
||||
const docsPath = path.resolve(packageRoot, "..", "..", "docs", "digital-employee-frontend-integration-plan.md");
|
||||
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 controllerPath = path.join(
|
||||
backendRoot,
|
||||
"app-platform-modules",
|
||||
"app-platform-agent",
|
||||
"app-platform-agent-core-ui",
|
||||
"src",
|
||||
"main",
|
||||
"java",
|
||||
"com",
|
||||
"xspaceagi",
|
||||
"agent",
|
||||
"web",
|
||||
"ui",
|
||||
"controller",
|
||||
"DigitalEmployeeAdminRecordController.java",
|
||||
);
|
||||
const qimingServicePath = path.join(qimingRoot, "src", "services", "systemManage.ts");
|
||||
const qimingTypesPath = path.join(qimingRoot, "src", "types", "interfaces", "systemManage.ts");
|
||||
const qimingOpsPath = path.join(qimingRoot, "src", "pages", "SystemManagement", "Content", "DigitalEmployeeOps", "index.tsx");
|
||||
const service = fs.readFileSync(servicePath, "utf8");
|
||||
const controller = fs.readFileSync(controllerPath, "utf8");
|
||||
const qimingService = fs.readFileSync(qimingServicePath, "utf8");
|
||||
const qimingTypes = fs.readFileSync(qimingTypesPath, "utf8");
|
||||
const qimingOps = fs.readFileSync(qimingOpsPath, "utf8");
|
||||
const docs = fs.readFileSync(docsPath, "utf8");
|
||||
const requiredSnippets = [
|
||||
[controller, "/daily-reports/send-records", "backend daily report send record endpoint"],
|
||||
[controller, "/billing/estimates", "backend billing estimate endpoint"],
|
||||
[controller, "/audit-archives", "backend audit archive endpoint"],
|
||||
[service, "recordDailyReportSendResult", "backend daily report send record service"],
|
||||
[service, "queryBillingEstimates", "backend billing estimate service"],
|
||||
[service, "recordAuditArchive", "backend audit archive service"],
|
||||
[service, "sanitizeAdminRecordValue", "backend admin record redaction"],
|
||||
[service, "authorization", "backend sensitive authorization guard"],
|
||||
[service, "raw_input", "backend sensitive raw input guard"],
|
||||
[qimingService, "apiDigitalEmployeeAdminDailyReportSendRecord", "qiming daily report send record helper"],
|
||||
[qimingService, "apiDigitalEmployeeAdminBillingEstimates", "qiming billing estimate helper"],
|
||||
[qimingService, "apiDigitalEmployeeAdminAuditArchive", "qiming audit archive helper"],
|
||||
[qimingTypes, "DigitalEmployeeBillingEstimate", "qiming billing estimate type"],
|
||||
[qimingTypes, "DigitalEmployeeAdminRecordSubmitParams", "qiming admin record submit type"],
|
||||
[qimingOps, "记录发送结果", "qiming daily report send UI"],
|
||||
[qimingOps, "标记归档", "qiming audit archive UI"],
|
||||
[qimingOps, "估算 Token", "qiming billing token UI"],
|
||||
[qimingOps, "估算成本 USD", "qiming billing cost UI"],
|
||||
[docs, "发送账单审计外壳", "docs send billing audit shell absorption"],
|
||||
];
|
||||
const missing = requiredSnippets
|
||||
.filter(([content, snippet]) => !content.includes(snippet))
|
||||
.map(([, , label]) => label);
|
||||
if (missing.length > 0) {
|
||||
throw new Error(`Missing admin send/billing/audit archive shell hooks: ${missing.join(", ")}`);
|
||||
}
|
||||
console.log("[DigitalEmployeeCheck] admin send/billing/audit archive shell hooks OK");
|
||||
}
|
||||
|
||||
function checkLocalDatabaseSchema() {
|
||||
console.log("\n[DigitalEmployeeCheck] Verify local SQLite digital schema");
|
||||
const dbPath = path.join(os.homedir(), ".qimingclaw", "qimingclaw.db");
|
||||
@@ -1367,6 +1443,7 @@ function main() {
|
||||
checkDigitalAdminActionLoop();
|
||||
checkDigitalAdminPolicySnapshots();
|
||||
checkDigitalBackendMaterializedFacts();
|
||||
checkDigitalAdminRecordBillingArchiveShell();
|
||||
checkLocalDatabaseSchema();
|
||||
console.log("\n[DigitalEmployeeCheck] All checks passed");
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user