吸收数字员工PlanStep依赖图派发策略
This commit is contained in:
@@ -283,6 +283,50 @@ function checkDigitalApprovalHistorySubscriptions() {
|
||||
console.log("[DigitalEmployeeCheck] approval history/subscription hooks OK");
|
||||
}
|
||||
|
||||
function checkDigitalPlanStepGraphDispatchPolicy() {
|
||||
console.log("\n[DigitalEmployeeCheck] Verify PlanStep graph/dispatch policy hooks");
|
||||
const adapterPath = path.join(packageRoot, "embedded", "sgrobot-digital", "src", "lib", "qimingclawAdapter.ts");
|
||||
const apiPath = path.join(packageRoot, "embedded", "sgrobot-digital", "src", "lib", "api.ts");
|
||||
const typesPath = path.join(packageRoot, "embedded", "sgrobot-digital", "src", "types", "api.ts");
|
||||
const stateServicePath = path.join(packageRoot, "src", "main", "services", "digitalEmployee", "stateService.ts");
|
||||
const schedulerServicePath = path.join(packageRoot, "src", "main", "services", "digitalEmployee", "schedulerService.ts");
|
||||
const syncServicePath = path.join(packageRoot, "src", "main", "services", "digitalEmployee", "syncService.ts");
|
||||
const adapter = fs.readFileSync(adapterPath, "utf8");
|
||||
const api = fs.readFileSync(apiPath, "utf8");
|
||||
const types = fs.readFileSync(typesPath, "utf8");
|
||||
const stateService = fs.readFileSync(stateServicePath, "utf8");
|
||||
const schedulerService = fs.readFileSync(schedulerServicePath, "utf8");
|
||||
const syncService = fs.readFileSync(syncServicePath, "utf8");
|
||||
const requiredSnippets = [
|
||||
[adapter, "/api/digital-employee/plan-steps", "adapter plan step endpoint"],
|
||||
[adapter, "/api/digital-employee/plan-step-graph", "adapter plan step graph endpoint"],
|
||||
[adapter, "/api/plan-step/dispatch-policy", "adapter plan step dispatch policy endpoint"],
|
||||
[adapter, "planStepRows", "management plan step rows"],
|
||||
[adapter, "planStepGraphRows", "management plan step graph rows"],
|
||||
[adapter, "filterPlanStepRows", "management plan step filters"],
|
||||
[adapter, "update_plan_step_dispatch_policy", "adapter plan step dispatch policy save action"],
|
||||
[api, "getPlanStepDispatchPolicy", "plan step dispatch policy API getter"],
|
||||
[api, "patchPlanStepDispatchPolicy", "plan step dispatch policy API patcher"],
|
||||
[api, "getPlanSteps", "plan steps API getter"],
|
||||
[api, "getPlanStepGraph", "plan step graph API getter"],
|
||||
[types, "PlanStepDispatchPolicy", "plan step dispatch policy type"],
|
||||
[stateService, "planStepDispatchPolicy", "plan step dispatch policy UI state"],
|
||||
[stateService, "update_plan_step_dispatch_policy", "plan step dispatch policy runtime event"],
|
||||
[schedulerService, "readDigitalEmployeePlanStepDispatchPolicy", "scheduler plan step dispatch policy reader"],
|
||||
[schedulerService, "max_per_sweep", "scheduler max per sweep policy"],
|
||||
[syncService, "planStepBusinessView", "plan step sync business view"],
|
||||
[syncService, "planStepDispatchPolicyBusinessView", "plan step dispatch policy sync view"],
|
||||
[syncService, "digital_workday_update_plan_step_dispatch_policy", "plan step dispatch policy sync event kind"],
|
||||
];
|
||||
const missing = requiredSnippets
|
||||
.filter(([content, snippet]) => !content.includes(snippet))
|
||||
.map(([, , label]) => label);
|
||||
if (missing.length > 0) {
|
||||
throw new Error(`Missing PlanStep graph/dispatch policy hooks: ${missing.join(", ")}`);
|
||||
}
|
||||
console.log("[DigitalEmployeeCheck] PlanStep graph/dispatch policy hooks OK");
|
||||
}
|
||||
|
||||
function checkLocalDatabaseSchema() {
|
||||
console.log("\n[DigitalEmployeeCheck] Verify local SQLite digital schema");
|
||||
const dbPath = path.join(os.homedir(), ".qimingclaw", "qimingclaw.db");
|
||||
@@ -328,6 +372,7 @@ function main() {
|
||||
checkDigitalDiagnosticAuditProjection();
|
||||
checkDigitalNotificationPreferences();
|
||||
checkDigitalApprovalHistorySubscriptions();
|
||||
checkDigitalPlanStepGraphDispatchPolicy();
|
||||
checkLocalDatabaseSchema();
|
||||
console.log("\n[DigitalEmployeeCheck] All checks passed");
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user