吸收数字员工管理端产物生命周期预览

This commit is contained in:
baiyanyun
2026-06-13 13:42:50 +08:00
parent 1daf58a94c
commit b0f0b95c2a
3 changed files with 158 additions and 1 deletions

View File

@@ -1686,6 +1686,90 @@ function checkDigitalAdminNotificationWorkbench() {
console.log("[DigitalEmployeeCheck] admin notification workbench hooks OK");
}
function checkDigitalAdminArtifactLifecycleWorkbench() {
console.log("\n[DigitalEmployeeCheck] Verify admin artifact lifecycle 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, "artifact_lifecycle", "backend artifact lifecycle view"],
[service, "isArtifactLifecycleRow", "backend artifact lifecycle matcher"],
[service, "artifact_", "backend artifact event classifier"],
[dto, "artifact_id", "backend artifact id row field"],
[test, "queryAdminWorkbenchArtifactLifecycleReturnsArtifactRowsOnly", "backend artifact lifecycle test"],
[qimingTypes, "artifact_lifecycle", "qiming artifact lifecycle view type"],
[qimingOps, "产物治理", "qiming artifact lifecycle tab"],
[qimingOps, "标记保留", "qiming artifact keep action"],
[qimingOps, "标记到期", "qiming artifact expire action"],
[qimingOps, "标记复核", "qiming artifact reviewed action"],
[docs, "正式管理端产物生命周期预览", "docs artifact lifecycle absorption"],
];
const missing = requiredSnippets
.filter(([content, snippet]) => !content.includes(snippet))
.map(([, , label]) => label);
if (missing.length > 0) {
throw new Error(`Missing admin artifact lifecycle workbench hooks: ${missing.join(", ")}`);
}
console.log("[DigitalEmployeeCheck] admin artifact lifecycle workbench hooks OK");
}
function checkLocalDatabaseSchema() {
console.log("\n[DigitalEmployeeCheck] Verify local SQLite digital schema");
const dbPath = path.join(os.homedir(), ".qimingclaw", "qimingclaw.db");
@@ -1752,6 +1836,7 @@ function main() {
checkDigitalAdminServiceOperationsWorkbench();
checkDigitalAdminRouteGovernanceWorkbench();
checkDigitalAdminNotificationWorkbench();
checkDigitalAdminArtifactLifecycleWorkbench();
checkLocalDatabaseSchema();
console.log("\n[DigitalEmployeeCheck] All checks passed");
} catch (error) {