吸收数字员工管理端记忆技能审计预览

This commit is contained in:
baiyanyun
2026-06-13 14:21:16 +08:00
parent b6b0a9dcb3
commit de501c0252
7 changed files with 318 additions and 5 deletions

View File

@@ -1449,6 +1449,102 @@ function checkDigitalAdminApprovalGovernanceWorkbench() {
console.log("[DigitalEmployeeCheck] admin approval governance workbench hooks OK");
}
function checkDigitalAdminMemorySkillWorkbench() {
console.log("\n[DigitalEmployeeCheck] Verify admin memory governance and skill audit 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 dtoPath = path.join(
backendRoot,
"app-platform-modules",
"app-platform-agent",
"app-platform-agent-core-adapter",
"src",
"main",
"java",
"com",
"xspaceagi",
"agent",
"core",
"adapter",
"dto",
"digital",
"DigitalEmployeeAdminWorkbenchRowDto.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 dto = fs.readFileSync(dtoPath, "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, "memory_governance", "backend memory governance view"],
[service, "skill_audits", "backend skill audits view"],
[service, "isMemoryGovernanceRow", "backend memory governance matcher"],
[service, "isSkillAuditRow", "backend skill audit matcher"],
[service, "skill_call_", "backend skill call classifier"],
[service, "tool_call_audit", "backend tool audit classifier"],
[service, "token_cost", "backend token cost classifier"],
[dto, "memory_id", "backend memory id row field"],
[dto, "memory_key", "backend memory key row field"],
[dto, "skill_id", "backend skill id row field"],
[dto, "tool_name", "backend tool name row field"],
[dto, "server_id", "backend server id row field"],
[test, "queryAdminWorkbenchMemoryGovernanceReturnsMemoryRowsOnly", "backend memory governance test"],
[test, "queryAdminWorkbenchSkillAuditsReturnsSkillAndToolAuditRowsOnly", "backend skill audits test"],
[qimingTypes, "memory_governance", "qiming memory governance view type"],
[qimingTypes, "skill_audits", "qiming skill audits view type"],
[qimingOps, "记忆治理", "qiming memory governance tab"],
[qimingOps, "技能审计", "qiming skill audits tab"],
[qimingOps, "批量归档", "qiming memory archive action"],
[qimingOps, "批量恢复", "qiming memory restore action"],
[qimingOps, "重复候选", "qiming memory duplicate copy"],
[docs, "正式管理端记忆治理预览", "docs memory governance absorption"],
[docs, "正式管理端技能审计预览", "docs skill audit absorption"],
];
const missing = requiredSnippets
.filter(([content, snippet]) => !content.includes(snippet))
.map(([, , label]) => label);
if (missing.length > 0) {
throw new Error(`Missing admin memory governance and skill audit hooks: ${missing.join(", ")}`);
}
console.log("[DigitalEmployeeCheck] admin memory governance and skill audit hooks OK");
}
function checkDigitalAdminServiceOperationsWorkbench() {
console.log("\n[DigitalEmployeeCheck] Verify admin service operations workbench hooks");
const backendRoot = path.resolve(packageRoot, "..", "..", "..", "qiming-backend");
@@ -2053,6 +2149,7 @@ function main() {
checkDigitalBackendMaterializedFacts();
checkDigitalAdminRecordBillingArchiveShell();
checkDigitalAdminApprovalGovernanceWorkbench();
checkDigitalAdminMemorySkillWorkbench();
checkDigitalAdminServiceOperationsWorkbench();
checkDigitalAdminRouteGovernanceWorkbench();
checkDigitalAdminNotificationWorkbench();