吸收数字员工管理端路由治理预览

This commit is contained in:
baiyanyun
2026-06-12 23:47:20 +08:00
parent ca746366f6
commit 479e2e209d
4 changed files with 138 additions and 3 deletions

View File

@@ -1534,6 +1534,74 @@ function checkDigitalAdminServiceOperationsWorkbench() {
console.log("[DigitalEmployeeCheck] admin service operations workbench hooks OK");
}
function checkDigitalAdminRouteGovernanceWorkbench() {
console.log("\n[DigitalEmployeeCheck] Verify admin route governance 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, "route_governance", "backend route governance view"],
[service, "isRouteGovernanceRow", "backend route governance matcher"],
[service, "route_decision_blocked", "backend route blocked classifier"],
[service, "route_action_policy_blocked", "backend route action policy blocked classifier"],
[service, "route_action_missing_context", "backend route action missing context classifier"],
[service, "governance_", "backend governance event classifier"],
[test, "queryAdminWorkbenchRouteGovernanceReturnsRouteAndGovernanceRowsOnly", "backend route governance test"],
[qimingTypes, "route_governance", "qiming route governance view type"],
[qimingOps, "路由治理", "qiming route governance tab"],
[qimingOps, "重试策略检查", "qiming route policy retry action"],
[qimingOps, "标记已看", "qiming route mark reviewed action"],
[qimingOps, "忽略", "qiming route dismiss action"],
[docs, "正式管理端路由治理预览", "docs route governance absorption"],
];
const missing = requiredSnippets
.filter(([content, snippet]) => !content.includes(snippet))
.map(([, , label]) => label);
if (missing.length > 0) {
throw new Error(`Missing admin route governance workbench hooks: ${missing.join(", ")}`);
}
console.log("[DigitalEmployeeCheck] admin route governance workbench hooks OK");
}
function checkLocalDatabaseSchema() {
console.log("\n[DigitalEmployeeCheck] Verify local SQLite digital schema");
const dbPath = path.join(os.homedir(), ".qimingclaw", "qimingclaw.db");
@@ -1598,6 +1666,7 @@ function main() {
checkDigitalAdminRecordBillingArchiveShell();
checkDigitalAdminApprovalGovernanceWorkbench();
checkDigitalAdminServiceOperationsWorkbench();
checkDigitalAdminRouteGovernanceWorkbench();
checkLocalDatabaseSchema();
console.log("\n[DigitalEmployeeCheck] All checks passed");
} catch (error) {