feat: add shared child batch creation

This commit is contained in:
inman committed 2026-09-09 17:24:16 +08:00
1 parent 515b545b32
commit 6ac90f838a
32 files changed
+958 -90

No files matched your search

@@ -16,6 +16,7 @@ import {
parseJsonObject,
parseSseBlock,
validateAgentOperation,
validateProgramOperation,
validateStandardOperation
} from './external-agent-client.mjs';
import { createBusinessServer } from './server.mjs';
@@ -1464,6 +1465,25 @@ describe('SSE and result helpers', () => {
assert.doesNotMatch(message, /TEST-202609|test_context|server_response|native_request|requery|fresh|write_attempted|DoInfo|allowlist/);
});
it('keeps shared-child batch creation Program-only and outside the external Agent router', () => {
const operation = {
action: 'shared_child_order_batch_create',
order_nature: 'formal',
submit_mode: 'dry_run',
data: {
customer: { name: '合成客户', keyword: '合成客户' },
product: { name: '合成产品', keyword: '合成产品' },
leader: { name: '测试领队', keyword: '测试领队' },
recurrence: { start_date: '2026-10-06', end_date: '2026-11-03' },
passenger_counts: { adult: 20, leader: 1 }
}
};
assert.match(validateAgentOperation(operation).join('\n'), /当前 18 类业务/);
assert.deepEqual(validateProgramOperation(operation), []);
assert.deepEqual(validateStandardOperation(operation), []);
assert.equal(STANDARD_DIRECTIVE_ROUTES.some((route) => route.includes('散拼团多个新增子单')), false);
});
it('pins the optional other/filing fields in the per-task guidance', () => {
const message = buildParserMessage({
rawText: '安排其他/备案\n团号:LW-260903-A\n业务日期:09-03\n结算单位搜索:美女',