迭代批量安排酒店

This commit is contained in:
andy committed 2026-09-24 14:43:08 +08:00
1 parent 4cfbefffe8
commit c2c71d35af
48 files changed
+5670 -57

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@ const persistedExtensionResultVersions = new Map();
let taskCreateInProgress = false;
const AUTO_HANDOFF_RETRY_MS = 30_000;
const REQUIRED_EXTENSION_VERSION = '0.5.189';
const REQUIRED_EXTENSION_VERSION = '0.5.190';
const MANUAL_HANDOFF_LABEL = '确认并提交到 ERP 插件';
const RETRY_HANDOFF_LABEL = '继续提交到 ERP 插件';
const RECONCILE_LABEL = '只读回查 ERP 现有结果';
@@ -2391,6 +2391,12 @@ export function validateAgentOperation(operation) {
// entry point so a Program-only operation can share the downstream standard
// contract without becoming an Agent-recognized action.
export function validateProgramOperation(operation) {
if (operation?.data && Object.hasOwn(operation.data, 'arrangements')) {
try {
return operationPlans.expandHotelBatch(operation).flatMap((item, index) =>
validateAgentOperation(item).map(message => `第 ${index + 1} 条:${message}`));
} catch (error) { return [error.message]; }
}
if (operation?.action !== 'shared_child_order_batch_create') return validateAgentOperation(operation);
const errors = [];
if (!isPlainObject(operation)) return ['operation 必须是 JSON 对象。'];
@@ -2794,6 +2800,7 @@ function validateCommonOperationData(data, errors) {
}
export function validateStandardOperation(operation) {
if (operation?.data && Object.hasOwn(operation.data, 'arrangements')) return validateProgramOperation(operation);
const errors = [];
if (!isPlainObject(operation)) return ['operation 必须是 JSON 对象。'];
pushUnknownKeyError('operation', operation, STANDARD_OPERATION_KEYS, errors);