weaver-work-cli 0.1.47 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{archive-oa-BBDP7AKJ.js → archive-oa-57R2FYHV.js} +565 -17
- package/dist/chunks/{attachment-content-MCXQBD6N.js → attachment-content-MU2LPI5P.js} +3 -3
- package/dist/chunks/{chunk-J2VEB5K3.js → chunk-2BQESR2U.js} +2 -2
- package/dist/chunks/{chunk-727FH2NI.js → chunk-2IGZUMNG.js} +15 -2
- package/dist/chunks/{chunk-IP4CWQCF.js → chunk-3NV2ETZR.js} +8 -8
- package/dist/chunks/{chunk-OXHHJWNC.js → chunk-3X7VOSBA.js} +1 -1
- package/dist/chunks/chunk-5QYE52LG.js +223 -0
- package/dist/chunks/{chunk-IRMIEDXN.js → chunk-6GWU63YF.js} +1 -1
- package/dist/chunks/{chunk-3YV7PKRL.js → chunk-6QYNE6HE.js} +12 -212
- package/dist/chunks/{chunk-Q4OYAQYH.js → chunk-72MI3MBX.js} +4 -0
- package/dist/chunks/{chunk-AD46OMQK.js → chunk-BRRW7CWA.js} +121 -46
- package/dist/chunks/{chunk-76H3IKH6.js → chunk-D2QRZUW4.js} +221 -37
- package/dist/chunks/{chunk-GSZTA43P.js → chunk-EJVA5ZVB.js} +2 -2
- package/dist/chunks/{chunk-4RWS2YYL.js → chunk-GEOMANP7.js} +3 -3
- package/dist/chunks/{chunk-LIEQJIGM.js → chunk-GR76ZDDX.js} +0 -3
- package/dist/chunks/{chunk-O6CMPO65.js → chunk-IW7A2IQY.js} +16 -146
- package/dist/chunks/chunk-JEQHNNSS.js +158 -0
- package/dist/chunks/{chunk-6V5ZPKHV.js → chunk-K3BT54CU.js} +4 -4
- package/dist/chunks/{chunk-6AXKWFKG.js → chunk-KV5SOWMS.js} +4 -4
- package/dist/chunks/{chunk-JB34OE7R.js → chunk-NBEWUR7L.js} +1 -1
- package/dist/chunks/{chunk-PSOMGA3U.js → chunk-ZKEUGS2U.js} +36 -7
- package/dist/chunks/{conflict-H7EHQXYY.js → conflict-6347A7YK.js} +2 -2
- package/dist/chunks/{contract-3QLAGYQL.js → contract-N6P2HIIE.js} +425 -187
- package/dist/chunks/{create-flow-VRVJEOBX.js → create-flow-7WG7LVX5.js} +6 -6
- package/dist/chunks/data-QO7QWOIV.js +2525 -0
- package/dist/chunks/{ehr-SH2LM3NK.js → ehr-XI4BIVR2.js} +16 -5
- package/dist/chunks/{employee-NOHNXC46.js → employee-DR5Y64TI.js} +2 -1
- package/dist/chunks/{env-66FPSJDV.js → env-LHRKSLG6.js} +2 -2
- package/dist/chunks/{factory-UH2TZBVA.js → factory-2H7Z4RWJ.js} +1 -1
- package/dist/chunks/{group-chat-CAKMMV7K.js → group-chat-EW6PNDDT.js} +3 -3
- package/dist/chunks/{hrm-UNKCCCGP.js → hrm-YGIR3HGF.js} +4 -2
- package/dist/chunks/{im-NJB7ZYMH.js → im-3RCNL5GT.js} +107 -1
- package/dist/chunks/{invoice-UEAHSYAE.js → invoice-FXWH5GPO.js} +2 -71
- package/dist/chunks/{lazy-dispatch-25XGTXLM.js → lazy-dispatch-XSAHDK6Z.js} +3 -3
- package/dist/chunks/{meeting-VTBFW4HI.js → meeting-N2FQBHXI.js} +10 -10
- package/dist/chunks/org-NFE7X7FK.js +12 -0
- package/dist/chunks/{reception-5WITA44R.js → reception-MYOKJULO.js} +905 -116
- package/dist/chunks/{recruit-stage-CAKZTUA7.js → recruit-stage-FKWS5UQF.js} +118 -29
- package/dist/chunks/{registry-VWXWPVAG.js → registry-3UGIWH53.js} +4 -2
- package/dist/chunks/{registry-AQVGHUM6.js → registry-7VZ6YJUF.js} +2 -2
- package/dist/chunks/{registry-PVUZQDDQ.js → registry-BUTEDK3C.js} +1 -1
- package/dist/chunks/{registry-JVQBLFQ5.js → registry-CKUVBS53.js} +10 -10
- package/dist/chunks/{room-recommend-5U55FMXZ.js → room-recommend-MBCYENQ2.js} +4 -4
- package/dist/chunks/{schedule-IDETODCA.js → schedule-5IFMCXME.js} +4 -4
- package/dist/chunks/{workflow-BSYT5TGL.js → workflow-2TRU2ZSP.js} +5 -5
- package/dist/core/refs.js +19 -2
- package/dist/index.js +20 -15
- package/dist/shortcuts/archive-oa/constants.js +42 -0
- package/dist/shortcuts/archive-oa/host.js +2 -2
- package/dist/shortcuts/archive-oa/index.js +38 -0
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +117 -3
- package/dist/shortcuts/archive-oa/operations/contract-modules.js +57 -0
- package/dist/shortcuts/archive-oa/operations/contract.js +23 -8
- package/dist/shortcuts/archive-oa/operations/my-borrow-contract.js +271 -0
- package/dist/shortcuts/archive-oa/operations/registry.js +9 -4
- package/dist/shortcuts/archive-oa/operations/shared.js +41 -5
- package/dist/shortcuts/contract/index.js +9 -1
- package/dist/shortcuts/contract/manifest.js +14 -2
- package/dist/shortcuts/contract/operations/card.js +231 -0
- package/dist/shortcuts/contract/operations/registry.js +2 -0
- package/dist/shortcuts/contract/operations/review.js +16 -5
- package/dist/shortcuts/contract/operations/summary.js +25 -17
- package/dist/shortcuts/data/errors.js +64 -0
- package/dist/shortcuts/data/host.js +140 -0
- package/dist/shortcuts/data/index.js +429 -0
- package/dist/shortcuts/data/manifest.js +133 -0
- package/dist/shortcuts/data/operations/attend.js +62 -0
- package/dist/shortcuts/data/operations/conf.js +384 -0
- package/dist/shortcuts/data/operations/ds.js +686 -0
- package/dist/shortcuts/data/operations/field.js +68 -0
- package/dist/shortcuts/data/operations/index.js +65 -0
- package/dist/shortcuts/data/operations/module.js +383 -0
- package/dist/shortcuts/data/operations/noun.js +102 -0
- package/dist/shortcuts/data/operations/query.js +85 -0
- package/dist/shortcuts/data/operations/scene.js +235 -0
- package/dist/shortcuts/data/operations/shared.js +279 -0
- package/dist/shortcuts/ehr/operations/recruit-write.js +22 -5
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +28 -12
- package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +21 -13
- package/dist/shortcuts/ehr/recruit-stage/shared.js +90 -8
- package/dist/shortcuts/im/index.js +128 -0
- package/dist/shortcuts/im/operations/session.js +6 -0
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/host.js +0 -3
- package/dist/shortcuts/invoice/manifest.js +0 -1
- package/dist/shortcuts/invoice/operations/reim-subsidy.js +1 -71
- package/dist/shortcuts/meeting/operations/eb/conflict.js +26 -3
- package/dist/shortcuts/meeting/operations/eb/continuation-alias.js +63 -0
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +71 -12
- package/dist/shortcuts/meeting/operations/eb/factory.js +5 -3
- package/dist/shortcuts/meeting/operations/eb/member-expand.js +200 -0
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/reception/constants.js +11 -0
- package/dist/shortcuts/reception/host.js +33 -1
- package/dist/shortcuts/reception/index.js +22 -1
- package/dist/shortcuts/reception/manifest.js +55 -2
- package/dist/shortcuts/reception/operations/ask.js +37 -1
- package/dist/shortcuts/reception/operations/compose.js +124 -3
- package/dist/shortcuts/reception/operations/doc.js +59 -0
- package/dist/shortcuts/reception/operations/docrender.js +25 -1
- package/dist/shortcuts/reception/operations/leads.js +245 -0
- package/dist/shortcuts/reception/operations/markdown.js +22 -0
- package/dist/shortcuts/reception/operations/panels.js +84 -21
- package/dist/shortcuts/reception/operations/registry.js +2 -0
- package/dist/shortcuts/reception/operations/render.js +76 -3
- package/dist/shortcuts/reception/operations/restaurant-rooms.js +118 -0
- package/dist/shortcuts/reception/operations/restaurant.js +264 -0
- package/dist/shortcuts/reception/operations/restaurantrooms.js +42 -0
- package/dist/shortcuts/reception/operations/schedule.js +7 -1
- package/dist/shortcuts/reception/upload.js +22 -6
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +28 -12
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -13
- package/dist/shortcuts/recruit-stage/shared.js +99 -14
- package/docs/SKILL.md +1 -0
- package/docs/_catalog.md +3 -0
- package/docs/archive-oa.md +4 -2
- package/docs/data.md +149 -0
- package/docs/reception.md +59 -5
- package/package.json +1 -1
- package/scripts/check-skill-sync.mjs +188 -0
- package/scripts/package-skill.mjs +17 -3
- package/skill-template/business-info.json +23 -0
- package/skill-template/domains/archive-oa.md +2 -1
- package/skill-template/domains/data.md +15 -0
- package/skill-template/master-skill-template.md +1 -0
- package/skill-template/skill-template.md +1 -0
- package/skills/weaver-e10-archive-oa/SKILL.md +35 -7
- package/skills/weaver-e10-archive-oa/references/borrow-car.md +32 -7
- package/skills/weaver-e10-archive-oa/references/contract-search.md +105 -4
- package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +2 -2
- package/skills/weaver-e10-archive-oa/references/my-borrow-contract.md +97 -0
- package/skills/weaver-e10-archive-oa/references/my-borrow.md +6 -1
- package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +48 -2
- package/skills/weaver-e10-calendar/SKILL.md +1 -1
- package/skills/weaver-e10-calendar/references/calendar-query.md +1 -1
- package/skills/weaver-e10-calendar/references/calendar-write.md +9 -9
- package/skills/weaver-e10-cowork/SKILL.md +9 -6
- package/skills/weaver-e10-data/SKILL.md +118 -0
- package/skills/weaver-e10-data/references/config-center.md +90 -0
- package/skills/weaver-e10-data/references/datasource.md +136 -0
- package/skills/weaver-e10-data/references/scene-and-misc.md +82 -0
- package/skills/weaver-e10-jinchengda/SKILL.md +10 -7
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +17 -0
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +263 -35
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +8 -5
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +175 -22
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +124 -19
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +6 -0
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +178 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +7 -7
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +279 -0
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +450 -0
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +358 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +505 -0
- package/skills/weaver-e10-jucailin/SKILL.md +7 -4
- package/skills/weaver-e10-jucailin/references/recruit-create.md +3 -2
- package/skills/weaver-e10-jucailin/references/recruit-read.md +2 -1
- package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +3 -3
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +30 -2
- package/skills/weaver-e10-mail/SKILL.md +17 -4
- package/skills/weaver-e10-meeting/SKILL.md +129 -412
- package/skills/weaver-e10-meeting/references/create-flow.md +188 -0
- package/skills/weaver-e10-meeting/references/create-guardrails.md +234 -0
- package/skills/weaver-e10-meeting/references/pitfalls.md +40 -0
- package/skills/weaver-e10-reception-flow/SKILL.md +77 -19
- package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +628 -26
- package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +96 -26
- package/skills/weaver-e10-reception-flow/references/guide.md +4 -3
- package/skills/weaver-e10-reception-flow/scripts/render.py +84 -3
- package/skills/weaver-e10-recruit-stage/SKILL.md +45 -12
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +78 -8
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +5 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +40 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +16 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +169 -0
- package/skills/weaver-e10-shijingran/SKILL.md +6 -2
- package/skills/weaver-e10-shijingran/references/source-manifest.json +5 -4
- package/skills/weaver-e10-workflow/SKILL.md +1 -1
- package/skills/weaver-e10-yepiaotong/SKILL.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +1 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +2 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +32 -0
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +3 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
- package/dist/chunks/{ebuilder-form-GWDTKEI2.js → ebuilder-form-CBYI6CQ6.js} +3 -3
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-README.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-SKILL.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-openai.yaml +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-position-templates.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-arrange-interview.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-capability-check.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-check-install.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-detail-process.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-edit-interview-feedback.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-create.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-template.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-candidate.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-interview.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-match-candidates.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-output-links.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-creator.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-metadata.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-import.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-parse.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-search-candidate.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-urge-feedback.md +0 -0
|
@@ -50,6 +50,11 @@ var CUSTOMER_NEED_OPTIONS = [
|
|
|
50
50
|
"\u4EA4\u6D41\u5177\u4F53\u9879\u76EE\u5408\u4F5C\u4E0E\u5B9E\u65BD\u7EC6\u8282",
|
|
51
51
|
"\u6682\u672A\u786E\u5B9A\uFF0C\u5148\u8FDB\u5F85\u529E"
|
|
52
52
|
];
|
|
53
|
+
var MEETING_TITLE = "\u662F\u5426\u5B89\u6392\u4F1A\u8BAE\uFF08\u9700\u9884\u7559\u573A\u5730\uFF09";
|
|
54
|
+
var MEETING_OPTIONS = [
|
|
55
|
+
{ label: "\u662F\uFF0C\u5B89\u6392\u4F1A\u8BAE\u5BA4", value: "\u662F" },
|
|
56
|
+
{ label: "\u5426\uFF0C\u4E0D\u9700\u8981", value: "\u5426" }
|
|
57
|
+
];
|
|
53
58
|
var SNAPSHOT_KIND = "reception-fields-snapshot";
|
|
54
59
|
var PYTHON_CACHE_TTL_MS = 7 * 24 * 3600 * 1e3;
|
|
55
60
|
|
|
@@ -96,18 +101,22 @@ import { createHash } from "node:crypto";
|
|
|
96
101
|
import { readFile, stat } from "node:fs/promises";
|
|
97
102
|
import { basename } from "node:path";
|
|
98
103
|
var UploadProtocolError = class extends Error {
|
|
99
|
-
constructor(subtype, message, httpStatus, detail, contentType) {
|
|
104
|
+
constructor(subtype, message, httpStatus, detail, contentType, failedAt, request) {
|
|
100
105
|
super(message);
|
|
101
106
|
this.subtype = subtype;
|
|
102
107
|
this.httpStatus = httpStatus;
|
|
103
108
|
this.detail = detail;
|
|
104
109
|
this.contentType = contentType;
|
|
110
|
+
this.failedAt = failedAt;
|
|
111
|
+
this.request = request;
|
|
105
112
|
this.name = "UploadProtocolError";
|
|
106
113
|
}
|
|
107
114
|
subtype;
|
|
108
115
|
httpStatus;
|
|
109
116
|
detail;
|
|
110
117
|
contentType;
|
|
118
|
+
failedAt;
|
|
119
|
+
request;
|
|
111
120
|
};
|
|
112
121
|
var object = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
113
122
|
var hasKeys = (value) => Object.keys(value).length > 0;
|
|
@@ -215,7 +224,7 @@ function terminal(data, expectedSize) {
|
|
|
215
224
|
}
|
|
216
225
|
return record.id;
|
|
217
226
|
}
|
|
218
|
-
async function send(transport, path, fields, file) {
|
|
227
|
+
async function send(transport, path, fields, file, stage) {
|
|
219
228
|
const form = new FormData();
|
|
220
229
|
for (const [key, value] of Object.entries(fields)) form.append(key, value);
|
|
221
230
|
if (file) {
|
|
@@ -225,7 +234,22 @@ async function send(transport, path, fields, file) {
|
|
|
225
234
|
`e10upload.${file.ext}`
|
|
226
235
|
);
|
|
227
236
|
}
|
|
228
|
-
|
|
237
|
+
try {
|
|
238
|
+
return checkedData(await transport.post(path, form));
|
|
239
|
+
} catch (error) {
|
|
240
|
+
if (error instanceof UploadProtocolError) {
|
|
241
|
+
throw new UploadProtocolError(
|
|
242
|
+
error.subtype,
|
|
243
|
+
error.message,
|
|
244
|
+
error.httpStatus,
|
|
245
|
+
error.detail,
|
|
246
|
+
error.contentType,
|
|
247
|
+
stage,
|
|
248
|
+
{ method: "POST", path, headers: [], auth: {} }
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
throw error;
|
|
252
|
+
}
|
|
229
253
|
}
|
|
230
254
|
async function uploadToFileService(input) {
|
|
231
255
|
const buffer = await readFile(input.filePath);
|
|
@@ -281,7 +305,7 @@ async function uploadToFileService(input) {
|
|
|
281
305
|
buffer,
|
|
282
306
|
start: 0,
|
|
283
307
|
size: buffer.length
|
|
284
|
-
});
|
|
308
|
+
}, "moduleUpload");
|
|
285
309
|
return { fileid: terminal(data, buffer.length), name, size: buffer.length, kind: ext };
|
|
286
310
|
}
|
|
287
311
|
const chunkMiB = Number(pre.chunkDto?.chunkSize);
|
|
@@ -307,7 +331,8 @@ async function uploadToFileService(input) {
|
|
|
307
331
|
input.transport,
|
|
308
332
|
"/api/file/module/upload?sf_request_type=ajax",
|
|
309
333
|
{ ...uploadFields, chunk: String(index), chunks: String(count), uploadShardSize: String(size) },
|
|
310
|
-
{ name, ext, buffer, start, size }
|
|
334
|
+
{ name, ext, buffer, start, size },
|
|
335
|
+
"moduleUpload"
|
|
311
336
|
);
|
|
312
337
|
if (index === count - 1) {
|
|
313
338
|
fileid = terminal(data, buffer.length);
|
|
@@ -319,11 +344,117 @@ async function uploadToFileService(input) {
|
|
|
319
344
|
return { fileid, name, size: buffer.length, kind: ext };
|
|
320
345
|
}
|
|
321
346
|
|
|
347
|
+
// src/shortcuts/reception/operations/restaurant-rooms.ts
|
|
348
|
+
var ROOM_SOURCE = {
|
|
349
|
+
group: "weaver-ebuilder-form-service",
|
|
350
|
+
table: "840360795890851855",
|
|
351
|
+
appId: "840360791696547845",
|
|
352
|
+
physicalTable: "uf_xstbxh",
|
|
353
|
+
fields: {
|
|
354
|
+
roomNo: "field_840360795890851870",
|
|
355
|
+
title: "field_840360795890851873",
|
|
356
|
+
region: "field_841962208930570241",
|
|
357
|
+
desc: "field_840360795890851871"
|
|
358
|
+
},
|
|
359
|
+
/** 数据集接口是 BI 侧能力,缺这个头会 403 */
|
|
360
|
+
businessId: "10000000000000000"
|
|
361
|
+
};
|
|
362
|
+
var pickStr = (value) => (value === null || value === void 0 ? "" : String(value)).trim();
|
|
363
|
+
function regionText(value) {
|
|
364
|
+
if (Array.isArray(value)) {
|
|
365
|
+
return value.map((item) => pickStr(item && typeof item === "object" ? item.name || item.label : item)).filter(Boolean).join("/");
|
|
366
|
+
}
|
|
367
|
+
if (value && typeof value === "object") {
|
|
368
|
+
const node = value;
|
|
369
|
+
return pickStr(node.name || node.label || node.text);
|
|
370
|
+
}
|
|
371
|
+
return pickStr(value);
|
|
372
|
+
}
|
|
373
|
+
function capacityFromText(text) {
|
|
374
|
+
const s = pickStr(text);
|
|
375
|
+
const matched = /可容纳\s*(\d{1,3})\s*人/.exec(s) || /[((]\s*(\d{1,3})\s*人/.exec(s) || /(\d{1,3})\s*人/.exec(s);
|
|
376
|
+
const n = matched ? Number(matched[1]) : 0;
|
|
377
|
+
return Number.isFinite(n) && n > 0 && n < 500 ? n : 0;
|
|
378
|
+
}
|
|
379
|
+
async function fetchRestaurantRooms(runtime, options = {}) {
|
|
380
|
+
const { fields, table, group, appId, businessId } = ROOM_SOURCE;
|
|
381
|
+
const pageSize = options.pageSize || 200;
|
|
382
|
+
const queryDto = {
|
|
383
|
+
tableId: table,
|
|
384
|
+
groupId: group,
|
|
385
|
+
pageNo: 1,
|
|
386
|
+
pageSize,
|
|
387
|
+
queryType: "getListData",
|
|
388
|
+
containDetailTable: false,
|
|
389
|
+
needFormat: true,
|
|
390
|
+
// e10-data 的 dyn() 会带 eteamsId / userId / tenantKey:服务端按这三项做行级权限,
|
|
391
|
+
// 缺了可能返回空列表而不是报错。值只在内存里传,不落盘、不打印。
|
|
392
|
+
dynamicParams: {
|
|
393
|
+
...options.context?.eteamsId ? { eteamsId: options.context.eteamsId } : {},
|
|
394
|
+
...options.context?.userId ? { userId: options.context.userId } : {},
|
|
395
|
+
...options.context?.tenantKey ? { tenantKey: options.context.tenantKey } : {},
|
|
396
|
+
langId: 7,
|
|
397
|
+
formatDate: "yyyy-MM-dd HH:mm:ss",
|
|
398
|
+
isPublic: false
|
|
399
|
+
},
|
|
400
|
+
appId,
|
|
401
|
+
queryFields: Object.values(fields).map((fieldId) => ({
|
|
402
|
+
fieldId,
|
|
403
|
+
fieldName: fieldId,
|
|
404
|
+
objId: table,
|
|
405
|
+
mainField: true
|
|
406
|
+
})),
|
|
407
|
+
orderFields: [],
|
|
408
|
+
queryCount: true
|
|
409
|
+
};
|
|
410
|
+
const form = new FormData();
|
|
411
|
+
form.append("sourceType", "LOGIC");
|
|
412
|
+
form.append("queryDto", JSON.stringify(queryDto));
|
|
413
|
+
const response = await runtime.requestJson({
|
|
414
|
+
module: "reception",
|
|
415
|
+
operation: "reception.restaurantRooms",
|
|
416
|
+
method: "POST",
|
|
417
|
+
path: "/api/dw/newetl/chatBi/ds/getListDatas",
|
|
418
|
+
formData: form,
|
|
419
|
+
headers: {
|
|
420
|
+
langType: "zh_CN",
|
|
421
|
+
ebbusinessid: businessId,
|
|
422
|
+
referer: "/sp/ebddesigner/1282331905881874436"
|
|
423
|
+
},
|
|
424
|
+
timeoutMs: options.timeoutMs || 3e4
|
|
425
|
+
});
|
|
426
|
+
const payload = response.value || {};
|
|
427
|
+
const data = payload.data || payload;
|
|
428
|
+
const list = Array.isArray(data.list) ? data.list : Array.isArray(data.records) ? data.records : Array.isArray(data.rows) ? data.rows : [];
|
|
429
|
+
const rooms = [];
|
|
430
|
+
for (const row of list) {
|
|
431
|
+
if (!row) continue;
|
|
432
|
+
const name = pickStr(
|
|
433
|
+
row[fields.roomNo] || row[fields.title] || row.roomNo || row.name || row.title
|
|
434
|
+
);
|
|
435
|
+
if (!name) continue;
|
|
436
|
+
const desc = pickStr(row[fields.desc] || row.desc || row.description || "");
|
|
437
|
+
const region = regionText(row[fields.region] || row.region || row.area || "");
|
|
438
|
+
if (region && !/上海/.test(region)) continue;
|
|
439
|
+
rooms.push({
|
|
440
|
+
name,
|
|
441
|
+
capacity: capacityFromText(`${desc} ${name}`),
|
|
442
|
+
where: region,
|
|
443
|
+
region
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
return {
|
|
447
|
+
rooms,
|
|
448
|
+
total: Number(data.count || data.total || rooms.length) || rooms.length,
|
|
449
|
+
rawCount: list.length
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
322
453
|
// src/shortcuts/reception/host.ts
|
|
323
454
|
var UPLOAD_TIMEOUT_MS = 18e4;
|
|
324
455
|
function createReceptionHost(ctx) {
|
|
325
456
|
let cached = null;
|
|
326
|
-
async function
|
|
457
|
+
async function resolve2() {
|
|
327
458
|
if (cached) return cached;
|
|
328
459
|
const e10 = await getE10Session(ctx);
|
|
329
460
|
if (!e10) {
|
|
@@ -345,17 +476,17 @@ function createReceptionHost(ctx) {
|
|
|
345
476
|
return cached;
|
|
346
477
|
}
|
|
347
478
|
async function getSession() {
|
|
348
|
-
return (await
|
|
479
|
+
return (await resolve2()).info;
|
|
349
480
|
}
|
|
350
481
|
async function requireRuntime() {
|
|
351
|
-
const { e10, info } = await
|
|
482
|
+
const { e10, info } = await resolve2();
|
|
352
483
|
if (!e10) {
|
|
353
484
|
throw receptionEnvironmentError("NO_SESSION", info.reason || "\u672A\u53D6\u5F97 E10 \u4F1A\u8BDD");
|
|
354
485
|
}
|
|
355
486
|
return { runtime: createE10RequestRuntime(ctx, e10), session: info };
|
|
356
487
|
}
|
|
357
488
|
async function uploadFile(filePath, options = {}) {
|
|
358
|
-
const { e10, info } = await
|
|
489
|
+
const { e10, info } = await resolve2();
|
|
359
490
|
if (!e10) {
|
|
360
491
|
return {
|
|
361
492
|
ok: false,
|
|
@@ -407,7 +538,19 @@ function createReceptionHost(ctx) {
|
|
|
407
538
|
httpStatus: error.httpStatus,
|
|
408
539
|
contentType: error.contentType,
|
|
409
540
|
detail: error.detail,
|
|
410
|
-
hint: `\u94FE\u8DEF teamsCheck \u2192 preUploadCheck \u2192 module/upload\uFF0Cmodule=${module}
|
|
541
|
+
hint: `\u94FE\u8DEF teamsCheck \u2192 preUploadCheck \u2192 module/upload\uFF0Cmodule=${module}`,
|
|
542
|
+
failedAt: error.failedAt,
|
|
543
|
+
// 请求侧只暴露「带了哪些头、凭据在不在」,值一律不打印
|
|
544
|
+
request: {
|
|
545
|
+
method: error.request?.method || "POST",
|
|
546
|
+
path: error.request?.path || "",
|
|
547
|
+
headers: ["eteamsid", "cookie", "langtype", "referer"],
|
|
548
|
+
auth: {
|
|
549
|
+
eteamsid: info.userId ? "sent" : "missing",
|
|
550
|
+
cookie: info.userId ? "sent" : "missing",
|
|
551
|
+
userid: info.userId ? String(info.userId) : "missing"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
411
554
|
};
|
|
412
555
|
}
|
|
413
556
|
if (error instanceof E10ApiError) {
|
|
@@ -421,7 +564,22 @@ function createReceptionHost(ctx) {
|
|
|
421
564
|
};
|
|
422
565
|
}
|
|
423
566
|
}
|
|
424
|
-
|
|
567
|
+
async function fetchRestaurantRooms2(options = {}) {
|
|
568
|
+
const { e10 } = await resolve2();
|
|
569
|
+
if (!e10) {
|
|
570
|
+
throw receptionEnvironmentError("NO_SESSION", "\u672A\u53D6\u5F97 E10 \u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u67E5\u8BE2\u5C0F\u98DF\u5802\u5305\u53A2");
|
|
571
|
+
}
|
|
572
|
+
const runtime = createE10RequestRuntime(ctx, e10);
|
|
573
|
+
return fetchRestaurantRooms(runtime, {
|
|
574
|
+
...options,
|
|
575
|
+
context: {
|
|
576
|
+
eteamsId: e10.eteamsId,
|
|
577
|
+
userId: e10.userId,
|
|
578
|
+
tenantKey: e10.tenantKey
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
return { getSession, requireRuntime, uploadFile, fetchRestaurantRooms: fetchRestaurantRooms2 };
|
|
425
583
|
}
|
|
426
584
|
|
|
427
585
|
// src/shortcuts/reception/operations/panels.ts
|
|
@@ -436,7 +594,12 @@ function parseLogistics(text) {
|
|
|
436
594
|
if (mobile) out.mobile = mobile[0];
|
|
437
595
|
const segs = raw.replace(/[①②③④⑤⑥⑦⑧⑨]/g, "\n").replace(/[((]\s*\d\s*[))]/g, "\n").replace(/(^|[\s||;;,,。])\d\s*[.))、]/g, "\n").replace(/总部\s*(\d{3})/g, "\u603B\u90E8$1").replace(/(\d)\s*[人名位]/g, "$1\u4EBA").replace(/(\d)\s*间/g, "$1\u95F4").split(/[\n||;;,,。、]+/).map((item) => item.trim()).filter(Boolean);
|
|
438
596
|
for (const part of segs) {
|
|
439
|
-
|
|
597
|
+
const noMeeting = /(不需要|不用|无需|不安排|不订|不要|取消|没有)\s*(订|定|预)?\s*(会议|会议室|开会|座谈|汇报)/.test(part);
|
|
598
|
+
if (noMeeting) {
|
|
599
|
+
if (!out.meeting) out.meeting = "\u5426";
|
|
600
|
+
if (!out.meetingRoom) out.meetingRoom = "\u4E0D\u9700\u4F1A\u8BAE\u5BA4";
|
|
601
|
+
}
|
|
602
|
+
if (!out.meetingRoom && !noMeeting) {
|
|
440
603
|
const room = part.match(/(?:总部\s*)?(?<!\d)(129|130|131)(?!\d)\s*会议室/) || part.match(/总部\s*(?<!\d)(129|130|131)(?!\d)/);
|
|
441
604
|
if (room) out.meetingRoom = `\u603B\u90E8${room[1]}\u4F1A\u8BAE\u5BA4`;
|
|
442
605
|
else if (/(不需要|不用|无需|没有)会议室/.test(part)) out.meetingRoom = "\u4E0D\u9700\u4F1A\u8BAE\u5BA4";
|
|
@@ -477,6 +640,11 @@ function parseLogistics(text) {
|
|
|
477
640
|
out.gift = part;
|
|
478
641
|
}
|
|
479
642
|
}
|
|
643
|
+
if (!out.meeting && !noMeeting) {
|
|
644
|
+
if (/(要|需要|安排|预定|预订|订|开|有)\s*(会议|开会|座谈|汇报)|会议|开会|座谈/.test(part)) {
|
|
645
|
+
out.meeting = "\u662F";
|
|
646
|
+
}
|
|
647
|
+
}
|
|
480
648
|
}
|
|
481
649
|
return out;
|
|
482
650
|
}
|
|
@@ -493,10 +661,22 @@ function setCompanionMobile(data, mobile) {
|
|
|
493
661
|
data.mobile = value;
|
|
494
662
|
}
|
|
495
663
|
}
|
|
664
|
+
function normalizeDemand(data) {
|
|
665
|
+
const need = String(data.customerNeed ?? "").trim();
|
|
666
|
+
if (need) data.demand = need;
|
|
667
|
+
delete data.customerNeed;
|
|
668
|
+
}
|
|
496
669
|
function mergeAnswers(run, answers = {}) {
|
|
497
670
|
const data = { ...run.data || {} };
|
|
671
|
+
normalizeDemand(data);
|
|
498
672
|
if (answers && typeof answers === "object") {
|
|
499
|
-
if (answers.fields && typeof answers.fields === "object")
|
|
673
|
+
if (answers.fields && typeof answers.fields === "object") {
|
|
674
|
+
const { restaurant: rawRestaurant, ...rest } = answers.fields;
|
|
675
|
+
Object.assign(data, rest);
|
|
676
|
+
if (rawRestaurant && typeof rawRestaurant === "object" && !Array.isArray(rawRestaurant)) {
|
|
677
|
+
data.restaurant = { ...data.restaurant || {}, ...rawRestaurant };
|
|
678
|
+
}
|
|
679
|
+
}
|
|
500
680
|
if (answers.customer_need) data.demand = String(answers.customer_need);
|
|
501
681
|
if (answers.logistics) {
|
|
502
682
|
const raw = String(answers.logistics).trim();
|
|
@@ -515,7 +695,8 @@ function mergeAnswers(run, answers = {}) {
|
|
|
515
695
|
}
|
|
516
696
|
function buildPanels(data) {
|
|
517
697
|
const panels = [];
|
|
518
|
-
|
|
698
|
+
const hasDemand = Boolean(String(data.demand || data.customerNeed || "").trim());
|
|
699
|
+
if (!hasDemand) {
|
|
519
700
|
panels.push({
|
|
520
701
|
id: "customer_need",
|
|
521
702
|
// 同样受「标题单行」约束:不写 ①②③ 追问清单,只留一句
|
|
@@ -526,22 +707,31 @@ function buildPanels(data) {
|
|
|
526
707
|
options: CUSTOMER_NEED_OPTIONS.map((item) => ({ label: item, value: item }))
|
|
527
708
|
});
|
|
528
709
|
}
|
|
529
|
-
const missing = LOGISTICS_FIELDS.filter((key) => !data[key]);
|
|
530
710
|
const mobile = ((data.companions || []).find((item) => item && item.mobile) || {}).mobile || "";
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
hint: known.length ? `\u5DF2\u8BC6\u522B\uFF1A${known.join("\uFF1B")}
|
|
711
|
+
const known = LOGISTICS_FIELDS.filter((key) => data[key]).map((key) => `${LOGISTICS_LABEL[key]}\uFF1A${data[key]}`);
|
|
712
|
+
if (mobile) known.push(`${LOGISTICS_LABEL.mobile}\uFF1A${mobile}`);
|
|
713
|
+
panels.push({
|
|
714
|
+
id: "logistics",
|
|
715
|
+
// 标题严格单行:不拼字段清单、不拼已识别项、不讲规则——拼了必被截断成「…」
|
|
716
|
+
title: LOGISTICS_TITLE,
|
|
717
|
+
inputType: "text",
|
|
718
|
+
required: false,
|
|
719
|
+
allowCustomInput: true,
|
|
720
|
+
hint: known.length ? `\u5DF2\u8BC6\u522B\uFF1A${known.join("\uFF1B")}
|
|
542
721
|
\u8865\u6CA1\u5199\u7684\u5C31\u884C\u3002
|
|
543
722
|
${LOGISTICS_HINT}` : LOGISTICS_HINT,
|
|
544
|
-
|
|
723
|
+
placeholder: LOGISTICS_PLACEHOLDER,
|
|
724
|
+
prefilled: known
|
|
725
|
+
});
|
|
726
|
+
const meetingAnswered = data.meeting === "\u662F" || data.meeting === "\u5426";
|
|
727
|
+
if (!meetingAnswered) {
|
|
728
|
+
panels.push({
|
|
729
|
+
id: "meeting",
|
|
730
|
+
title: MEETING_TITLE,
|
|
731
|
+
inputType: "single",
|
|
732
|
+
required: true,
|
|
733
|
+
allowCustomInput: false,
|
|
734
|
+
options: MEETING_OPTIONS.map((item) => ({ label: item.label, value: item.value }))
|
|
545
735
|
});
|
|
546
736
|
}
|
|
547
737
|
return panels;
|
|
@@ -708,6 +898,81 @@ function tryLoadRun(stateDir, runId) {
|
|
|
708
898
|
return readJson(runPath(stateDir, runId));
|
|
709
899
|
}
|
|
710
900
|
|
|
901
|
+
// src/shortcuts/reception/operations/leads.ts
|
|
902
|
+
var MEETING_ROOMS = [
|
|
903
|
+
{ id: "100502820000000225", name: "130\u4F1A\u8BAE\u5BA4\uFF08\u4E2D\u5EAD\u5DE6\u4FA7\uFF09", no: "130", where: "\u4E2D\u5EAD\u5DE6\u4FA7", capacity: 12, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" },
|
|
904
|
+
{ id: "100502820000000227", name: "131\u4F1A\u8BAE\u5BA4\uFF08\u524D\u5EAD\u5DE6\u4FA7\uFF09", no: "131", where: "\u524D\u5EAD\u5DE6\u4FA7", capacity: 20, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" },
|
|
905
|
+
{ id: "100502820000000224", name: "129\u4F1A\u8BAE\u5BA4\uFF08\u4E2D\u5EAD\u5DE6\u4FA7\uFF09", no: "129", where: "\u4E2D\u5EAD\u5DE6\u4FA7", capacity: 20, desc: "\u4FE1\u521B\u4F1A\u8BAE\u5BA4\uFF0C\u63A5\u5F85\u91CD\u8981\u5BA2\u6237\u4F7F\u7528" }
|
|
906
|
+
];
|
|
907
|
+
function normalizeMeetingRoom(value) {
|
|
908
|
+
const text = String(value || "").trim();
|
|
909
|
+
if (!text) return "";
|
|
910
|
+
const exact = MEETING_ROOMS.find((room) => room.name === text);
|
|
911
|
+
if (exact) return exact.name;
|
|
912
|
+
const byId = MEETING_ROOMS.find((room) => room.id === text);
|
|
913
|
+
if (byId) return byId.name;
|
|
914
|
+
const no = text.match(/(?:总部\s*)?(129|130|131)/);
|
|
915
|
+
if (!no) return "";
|
|
916
|
+
const hit = MEETING_ROOMS.find((room) => room.no === no[1]);
|
|
917
|
+
return hit ? hit.name : "";
|
|
918
|
+
}
|
|
919
|
+
function meetingRoomId(value) {
|
|
920
|
+
const name = normalizeMeetingRoom(value);
|
|
921
|
+
const hit = MEETING_ROOMS.find((room) => room.name === name);
|
|
922
|
+
return hit ? hit.id : "";
|
|
923
|
+
}
|
|
924
|
+
function normalizeMeeting(value) {
|
|
925
|
+
const raw = typeof value === "boolean" ? value ? "\u662F" : "\u5426" : String(value ?? "").trim();
|
|
926
|
+
if (!raw) return "";
|
|
927
|
+
if (/^(否|不|无|没|no|n|false|0)/i.test(raw)) return "\u5426";
|
|
928
|
+
if (/^(是|要|需要|安排|定|订|有|yes|y|true|1)/i.test(raw)) return "\u662F";
|
|
929
|
+
if (/(不需要|不用|无需|不安排|不定|不订)/.test(raw)) return "\u5426";
|
|
930
|
+
if (/(需要|安排|预定|预订|定会|开会|座谈)/.test(raw)) return "\u662F";
|
|
931
|
+
return "";
|
|
932
|
+
}
|
|
933
|
+
function applyMeetingPolicy(data) {
|
|
934
|
+
const declared = normalizeMeeting(data.meeting);
|
|
935
|
+
const room = normalizeMeetingRoom(data.meetingRoom);
|
|
936
|
+
const meeting = declared || (room ? "\u662F" : "");
|
|
937
|
+
if (meeting === "\u662F") {
|
|
938
|
+
data.meeting = "\u662F";
|
|
939
|
+
if (room) {
|
|
940
|
+
const hit = MEETING_ROOMS.find((item) => item.name === room);
|
|
941
|
+
const prev = data.meetingRoomMeta || {};
|
|
942
|
+
data.meetingRoom = room;
|
|
943
|
+
data.meetingRoomMeta = {
|
|
944
|
+
...hit || {},
|
|
945
|
+
...prev.capacity ? prev : {},
|
|
946
|
+
name: room,
|
|
947
|
+
reason: prev.capacity ? prev.reason || "\u6309\u6307\u5B9A\u623F\u95F4\u9884\u7559" : "\u6309\u6307\u5B9A\u623F\u95F4\u9884\u7559"
|
|
948
|
+
};
|
|
949
|
+
} else {
|
|
950
|
+
const picked = pickMeetingRoom(data.headcount, data.headcountMax);
|
|
951
|
+
data.meetingRoom = picked.name;
|
|
952
|
+
data.meetingRoomMeta = { ...picked };
|
|
953
|
+
}
|
|
954
|
+
return data;
|
|
955
|
+
}
|
|
956
|
+
if (meeting === "\u5426") {
|
|
957
|
+
data.meeting = "\u5426";
|
|
958
|
+
data.meetingRoom = "\u4E0D\u9700\u4F1A\u8BAE\u5BA4";
|
|
959
|
+
data.meetingRoomMeta = { name: "\u4E0D\u9700\u4F1A\u8BAE\u5BA4", where: "", capacity: 0, desc: "", reason: "\u672C\u6B21\u4E0D\u5B89\u6392\u4F1A\u8BAE" };
|
|
960
|
+
return data;
|
|
961
|
+
}
|
|
962
|
+
delete data.meetingRoom;
|
|
963
|
+
delete data.meetingRoomMeta;
|
|
964
|
+
return data;
|
|
965
|
+
}
|
|
966
|
+
function pickMeetingRoom(headcount, headcountMax) {
|
|
967
|
+
const upper = Number(headcountMax) || Number(headcount) || 0;
|
|
968
|
+
if (!upper) return { ...MEETING_ROOMS[1], reason: "\u4EBA\u6570\u672A\u5B9A\uFF0C\u9ED8\u8BA4\u9884\u7559 20 \u4EBA\u95F4" };
|
|
969
|
+
const fits = [...MEETING_ROOMS].filter((room) => room.capacity >= upper).sort((a, b) => a.capacity - b.capacity);
|
|
970
|
+
if (!fits.length) {
|
|
971
|
+
return { ...MEETING_ROOMS[1], reason: `\u6700\u591A ${upper} \u4EBA\uFF0C\u8D85\u51FA 20 \u4EBA\u4E0A\u9650\uFF0C\u9700\u53E6\u627E\u573A\u5730` };
|
|
972
|
+
}
|
|
973
|
+
return { ...fits[0], reason: `\u6700\u591A ${upper} \u4EBA\uFF0C${fits[0].capacity} \u4EBA\u95F4\u53EF\u5BB9\u7EB3` };
|
|
974
|
+
}
|
|
975
|
+
|
|
711
976
|
// src/shortcuts/reception/operations/ask.ts
|
|
712
977
|
async function ask(input, ctx) {
|
|
713
978
|
const startedAt = Date.now();
|
|
@@ -717,6 +982,27 @@ async function ask(input, ctx) {
|
|
|
717
982
|
const customerKeyword = input.customer || (typeof known.customer === "string" ? known.customer : "");
|
|
718
983
|
const data = { ...known };
|
|
719
984
|
delete data.customerId;
|
|
985
|
+
delete data.meetingRoom;
|
|
986
|
+
delete data.meetingRoomMeta;
|
|
987
|
+
if (typeof data.logistics === "string" && data.logistics.trim()) {
|
|
988
|
+
const parsed = parseLogistics(data.logistics);
|
|
989
|
+
const mobile = parsed.mobile;
|
|
990
|
+
delete parsed.mobile;
|
|
991
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
992
|
+
if (!data[key]) data[key] = value;
|
|
993
|
+
}
|
|
994
|
+
if (mobile) setCompanionMobile(data, mobile);
|
|
995
|
+
}
|
|
996
|
+
delete data.logistics;
|
|
997
|
+
delete data.customer_need;
|
|
998
|
+
normalizeDemand(data);
|
|
999
|
+
if (data.meetingExplicit === true) {
|
|
1000
|
+
const meeting = normalizeMeeting(data.meeting);
|
|
1001
|
+
if (meeting) data.meeting = meeting;
|
|
1002
|
+
else delete data.meeting;
|
|
1003
|
+
} else {
|
|
1004
|
+
delete data.meeting;
|
|
1005
|
+
}
|
|
720
1006
|
if (customerKeyword) data.customer = customerKeyword;
|
|
721
1007
|
const escorts = nameList(known.escorts);
|
|
722
1008
|
const explicitUser = nameList(input.user || "");
|
|
@@ -746,6 +1032,8 @@ async function ask(input, ctx) {
|
|
|
746
1032
|
customer: data.customer || "",
|
|
747
1033
|
visitDate: data.visitDate || "",
|
|
748
1034
|
visitType: data.visitType || "",
|
|
1035
|
+
demand: data.demand || "",
|
|
1036
|
+
meeting: data.meeting || "",
|
|
749
1037
|
companions: data.companions || [],
|
|
750
1038
|
// 兜底由 render 阶段补:ask 不读会话,这里恒为空
|
|
751
1039
|
contactFallback: ""
|
|
@@ -768,6 +1056,262 @@ var askOperation = {
|
|
|
768
1056
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
769
1057
|
import { basename as basename2, join as join4 } from "node:path";
|
|
770
1058
|
|
|
1059
|
+
// src/shortcuts/reception/operations/schedule.ts
|
|
1060
|
+
var STANDARD_AGENDA = [
|
|
1061
|
+
{ offset: 0, item: "\u516C\u53F8\u53C2\u89C2", activity: "\u53C2\u89C2\u6CDB\u5FAE\u4E0A\u6D77\u603B\u90E8\u5C55\u5385\u4E0E\u529E\u516C\u533A\uFF0C\u4E86\u89E3\u516C\u53F8\u53D1\u5C55\u5386\u7A0B\u4E0E\u4EA7\u54C1\u80FD\u529B" },
|
|
1062
|
+
{ offset: 45, item: "\u65B9\u6848\u4ECB\u7ECD", activity: "" },
|
|
1063
|
+
{ offset: 120, item: "\u8BA8\u8BBA\u4EA4\u6D41", activity: "\u53CC\u65B9\u56F4\u7ED5\u5173\u6CE8\u70B9\u4EA4\u6D41\u7B54\u7591\uFF0C\u660E\u786E\u540E\u7EED\u63A8\u8FDB\u8282\u594F" }
|
|
1064
|
+
];
|
|
1065
|
+
var SEVEN = ["date", "time", "item", "place", "person", "activity", "remark"];
|
|
1066
|
+
function hhmmPlus(start, mins) {
|
|
1067
|
+
const base = /^\d{1,2}:\d{2}$/.test(String(start || "")) ? String(start) : "09:30";
|
|
1068
|
+
const [hour, minute] = base.split(":").map(Number);
|
|
1069
|
+
const total = ((hour * 60 + minute + mins) % 1440 + 1440) % 1440;
|
|
1070
|
+
return `${String(Math.floor(total / 60)).padStart(2, "0")}:${String(total % 60).padStart(2, "0")}`;
|
|
1071
|
+
}
|
|
1072
|
+
function pick7(row) {
|
|
1073
|
+
if (!row || typeof row !== "object" || Array.isArray(row)) return null;
|
|
1074
|
+
const source = row;
|
|
1075
|
+
const out = {};
|
|
1076
|
+
for (const key of SEVEN) {
|
|
1077
|
+
const value = source[key];
|
|
1078
|
+
if (value !== null && value !== void 0 && String(value).trim()) out[key] = String(value).trim();
|
|
1079
|
+
}
|
|
1080
|
+
return Object.keys(out).length ? out : null;
|
|
1081
|
+
}
|
|
1082
|
+
function normalizeScheduleRows(data = {}) {
|
|
1083
|
+
const rows = [];
|
|
1084
|
+
const push = (row) => {
|
|
1085
|
+
if (row) rows.push(row);
|
|
1086
|
+
};
|
|
1087
|
+
const companions = Array.isArray(data.companions) ? data.companions : [];
|
|
1088
|
+
const escortNames = nameList(data.escorts);
|
|
1089
|
+
const mainPerson = escortNames[0] || companions.map((item) => typeof item === "string" ? item : item && item.name || "").filter(Boolean)[0] || data.contact || "";
|
|
1090
|
+
if (Array.isArray(data.scheduleRows)) data.scheduleRows.forEach((row) => push(pick7(row)));
|
|
1091
|
+
if (!rows.length && Array.isArray(data.schedule)) {
|
|
1092
|
+
data.schedule.forEach((row) => {
|
|
1093
|
+
if (Array.isArray(row)) {
|
|
1094
|
+
const [time, item, place] = row;
|
|
1095
|
+
push(pick7({ date: data.visitDate || data.arrivalDate || "", time, item, place, person: mainPerson }));
|
|
1096
|
+
} else {
|
|
1097
|
+
push(pick7(row));
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
if (!rows.length && Array.isArray(data.agenda)) {
|
|
1102
|
+
data.agenda.forEach((row) => push(pick7({
|
|
1103
|
+
date: data.visitDate || data.arrivalDate || "",
|
|
1104
|
+
time: row && (row.start || row.time) || "",
|
|
1105
|
+
item: row && row.item,
|
|
1106
|
+
place: row && row.place,
|
|
1107
|
+
person: row && row.person || mainPerson,
|
|
1108
|
+
activity: row && row.activity,
|
|
1109
|
+
remark: row && row.remark
|
|
1110
|
+
})));
|
|
1111
|
+
}
|
|
1112
|
+
if (!rows.length) {
|
|
1113
|
+
const date = data.visitDate || data.arrivalDate || "";
|
|
1114
|
+
const start = /^\d{1,2}:\d{2}$/.test(String(data.agendaStart || "")) ? String(data.agendaStart) : "09:30";
|
|
1115
|
+
const venue = String(data.venue || "\u6CDB\u5FAE\u4E0A\u6D77\u603B\u90E8");
|
|
1116
|
+
const room = normalizeMeeting(data.meeting) === "\u662F" ? normalizeMeetingRoom(data.meetingRoom) || venue : venue;
|
|
1117
|
+
for (const item of STANDARD_AGENDA) {
|
|
1118
|
+
push(pick7({
|
|
1119
|
+
date,
|
|
1120
|
+
time: hhmmPlus(start, item.offset),
|
|
1121
|
+
item: item.item,
|
|
1122
|
+
place: item.item === "\u516C\u53F8\u53C2\u89C2" ? "\u6CDB\u5FAE\u4E0A\u6D77\u603B\u90E8" : room,
|
|
1123
|
+
person: mainPerson,
|
|
1124
|
+
activity: item.item === "\u65B9\u6848\u4ECB\u7ECD" ? data.demand || "\u4EA7\u54C1\u4E0E\u65B9\u6848\u4ECB\u7ECD" : item.activity
|
|
1125
|
+
}));
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
for (const row of rows) if (!row.person && mainPerson) row.person = mainPerson;
|
|
1129
|
+
return rows;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
// src/shortcuts/reception/operations/restaurant.ts
|
|
1133
|
+
var RESTAURANT_DETAIL = {
|
|
1134
|
+
name: "\u5C0F\u9910\u5385\u9884\u5B9A\u660E\u7EC6",
|
|
1135
|
+
subFormId: "1328260727015997527",
|
|
1136
|
+
dataKey: "formtable__xctydmx",
|
|
1137
|
+
fields: {
|
|
1138
|
+
roomNo: "1329411121197875201",
|
|
1139
|
+
headcount: "1328336675122282515",
|
|
1140
|
+
startDate: "1328336675122282518",
|
|
1141
|
+
startTime: "1328337576855699719",
|
|
1142
|
+
endDate: "1328336675122282519",
|
|
1143
|
+
endTime: "1328337576855699720"
|
|
1144
|
+
},
|
|
1145
|
+
defaultDurationMinutes: 90
|
|
1146
|
+
};
|
|
1147
|
+
var TRIGGER = /小餐厅|包厢|包间|小食堂|内部餐厅/;
|
|
1148
|
+
var ROOM_FIELDS = {
|
|
1149
|
+
roomNo: "field_840360795890851870",
|
|
1150
|
+
title: "field_840360795890851873",
|
|
1151
|
+
region: "field_841962208930570241",
|
|
1152
|
+
desc: "field_840360795890851871"
|
|
1153
|
+
};
|
|
1154
|
+
var pickStr2 = (value) => (value === null || value === void 0 ? "" : String(value)).trim();
|
|
1155
|
+
function capacityFromText2(text) {
|
|
1156
|
+
const s = pickStr2(text);
|
|
1157
|
+
const matched = /可容纳\s*(\d{1,3})\s*人/.exec(s) || /[((]\s*(\d{1,3})\s*人/.exec(s) || /(\d{1,3})\s*人/.exec(s);
|
|
1158
|
+
const n = matched ? Number(matched[1]) : 0;
|
|
1159
|
+
return Number.isFinite(n) && n > 0 && n < 500 ? n : 0;
|
|
1160
|
+
}
|
|
1161
|
+
function regionText2(value) {
|
|
1162
|
+
if (Array.isArray(value)) {
|
|
1163
|
+
return value.map((item) => pickStr2(item && typeof item === "object" ? item.name || item.label : item)).filter(Boolean).join("/");
|
|
1164
|
+
}
|
|
1165
|
+
if (value && typeof value === "object") {
|
|
1166
|
+
const node = value;
|
|
1167
|
+
return pickStr2(node.name || node.label || node.text);
|
|
1168
|
+
}
|
|
1169
|
+
return pickStr2(value);
|
|
1170
|
+
}
|
|
1171
|
+
function unwrapRoomRows(input) {
|
|
1172
|
+
if (Array.isArray(input)) return input;
|
|
1173
|
+
if (!input || typeof input !== "object") return [];
|
|
1174
|
+
const node = input;
|
|
1175
|
+
const candidate = node.rooms || node.items || node.list || node.records || node.rows || node.data && (node.data.list || node.data.records || node.data.rows || node.data.items) || (Array.isArray(node.data) ? node.data : null);
|
|
1176
|
+
return Array.isArray(candidate) ? candidate : [];
|
|
1177
|
+
}
|
|
1178
|
+
function normalizeRoomCandidates(input) {
|
|
1179
|
+
const list = unwrapRoomRows(input);
|
|
1180
|
+
const out = [];
|
|
1181
|
+
for (const row of list) {
|
|
1182
|
+
if (!row) continue;
|
|
1183
|
+
const item = typeof row === "string" ? { name: row } : row;
|
|
1184
|
+
const name = pickStr2(
|
|
1185
|
+
item.name || item.roomNo || item.title || item.label || item[ROOM_FIELDS.roomNo] || item[ROOM_FIELDS.title]
|
|
1186
|
+
);
|
|
1187
|
+
if (!name) continue;
|
|
1188
|
+
const desc = pickStr2(item.desc || item.description || item.remark || item[ROOM_FIELDS.desc]);
|
|
1189
|
+
const region = regionText2(item.region || item.area || item.location || item[ROOM_FIELDS.region]);
|
|
1190
|
+
if (region && !/上海/.test(region)) continue;
|
|
1191
|
+
out.push({
|
|
1192
|
+
name,
|
|
1193
|
+
capacity: Number(item.capacity || item.seats || item.maxPeople || item.size || 0) || capacityFromText2(`${desc} ${name}`),
|
|
1194
|
+
where: region,
|
|
1195
|
+
type: pickStr2(item.type || item.kind)
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
return out;
|
|
1199
|
+
}
|
|
1200
|
+
function timesIn(text) {
|
|
1201
|
+
const out = [];
|
|
1202
|
+
const re = /(\d{1,2})\s*[::]\s*(\d{2})/g;
|
|
1203
|
+
let matched;
|
|
1204
|
+
const source = String(text || "");
|
|
1205
|
+
while ((matched = re.exec(source)) !== null) {
|
|
1206
|
+
const hour = Number(matched[1]);
|
|
1207
|
+
const minute = Number(matched[2]);
|
|
1208
|
+
if (hour <= 23 && minute <= 59) {
|
|
1209
|
+
out.push(`${String(hour).padStart(2, "0")}:${String(minute).padStart(2, "0")}`);
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
return out;
|
|
1213
|
+
}
|
|
1214
|
+
function nextDay(date) {
|
|
1215
|
+
const matched = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(date || ""));
|
|
1216
|
+
if (!matched) return date || "";
|
|
1217
|
+
const d = new Date(Date.UTC(Number(matched[1]), Number(matched[2]) - 1, Number(matched[3]) + 1));
|
|
1218
|
+
return d.toISOString().slice(0, 10);
|
|
1219
|
+
}
|
|
1220
|
+
var RANK = { private: 0, combo: 1, tea: 2, entertainment: 3 };
|
|
1221
|
+
var KIND_LABEL = {
|
|
1222
|
+
private: "\u5305\u53A2",
|
|
1223
|
+
combo: "\u901A\u5305",
|
|
1224
|
+
tea: "\u8336\u5BA4",
|
|
1225
|
+
entertainment: "\u5A31\u4E50\u573A\u5730"
|
|
1226
|
+
};
|
|
1227
|
+
function kindOf(room) {
|
|
1228
|
+
const explicit = pickStr2(room.type);
|
|
1229
|
+
if (explicit && RANK[explicit] !== void 0) return explicit;
|
|
1230
|
+
const name = pickStr2(room.name);
|
|
1231
|
+
if (/卡拉|KTV|ktv|烧烤|娱乐|棋牌/.test(name)) return "entertainment";
|
|
1232
|
+
if (/茶室|茶座/.test(name)) return "tea";
|
|
1233
|
+
if (/通包|联通/.test(name)) return "combo";
|
|
1234
|
+
return "private";
|
|
1235
|
+
}
|
|
1236
|
+
function pickRestaurantRoom(rooms = [], headcount = 0) {
|
|
1237
|
+
const list = normalizeRoomCandidates(rooms);
|
|
1238
|
+
if (!list.length) return null;
|
|
1239
|
+
const count = Number(headcount) || 0;
|
|
1240
|
+
const rank = (room) => RANK[kindOf(room)] ?? RANK.private;
|
|
1241
|
+
const fitSort = (a, b) => a.capacity - b.capacity || rank(a) - rank(b);
|
|
1242
|
+
const overSort = (a, b) => b.capacity - a.capacity || rank(a) - rank(b);
|
|
1243
|
+
const playable = list.filter((room) => kindOf(room) !== "entertainment");
|
|
1244
|
+
const label = (room) => KIND_LABEL[kindOf(room)] || "\u5305\u53A2";
|
|
1245
|
+
if (count) {
|
|
1246
|
+
for (const group of [playable, list]) {
|
|
1247
|
+
const fit = group.filter((room) => room.capacity && room.capacity >= count).sort(fitSort);
|
|
1248
|
+
if (fit.length) {
|
|
1249
|
+
return { ...fit[0], reason: `${count} \u4EBA\uFF0C${fit[0].capacity} \u4EBA${label(fit[0])}\u53EF\u5BB9\u7EB3` };
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
const pool = playable.filter((room) => room.capacity).length ? playable.filter((room) => room.capacity) : list.filter((room) => room.capacity);
|
|
1254
|
+
if (pool.length) {
|
|
1255
|
+
const top = pool.sort(overSort)[0];
|
|
1256
|
+
return {
|
|
1257
|
+
...top,
|
|
1258
|
+
reason: count ? `${count} \u4EBA\u8D85\u51FA\u53EF\u7528${label(top)}\u4E0A\u9650\uFF08${top.capacity} \u4EBA\uFF09\uFF0C\u6309\u6700\u5927\u95F4\u9884\u7559` : `\u672A\u7ED9\u4EBA\u6570\uFF0C\u6309\u6700\u5927 ${top.capacity} \u4EBA\u9884\u7559`
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
return { ...list[0], reason: "\u68C0\u7D22\u7ED3\u679C\u672A\u6807\u5BB9\u91CF\uFF0C\u53D6\u7B2C\u4E00\u6761" };
|
|
1262
|
+
}
|
|
1263
|
+
function rawCandidateCount(input) {
|
|
1264
|
+
return unwrapRoomRows(input).length;
|
|
1265
|
+
}
|
|
1266
|
+
function normalizeRestaurant(options = {}) {
|
|
1267
|
+
const data = options.data || {};
|
|
1268
|
+
const rawRestaurant = data.restaurant && typeof data.restaurant === "object" && !Array.isArray(data.restaurant) && data.restaurant.booked !== true ? data.restaurant : {};
|
|
1269
|
+
const explicit = {
|
|
1270
|
+
...rawRestaurant,
|
|
1271
|
+
...options.explicit && typeof options.explicit === "object" ? options.explicit : {}
|
|
1272
|
+
};
|
|
1273
|
+
const rooms = options.rooms ?? null;
|
|
1274
|
+
const hay = [data.restaurantRaw, data.logisticsRaw, data.meal, explicit.raw, explicit.note].filter(Boolean).join(" ");
|
|
1275
|
+
const mentioned = Boolean(data.restaurant) || data.restaurantIntent === true || Object.keys(explicit).length > 0 || TRIGGER.test(hay);
|
|
1276
|
+
if (!mentioned) return null;
|
|
1277
|
+
const visit = Number(data.headcountMax || data.headcount || 0) || 0;
|
|
1278
|
+
const headcount = Number(explicit.headcount || data.restaurantHeadcount || visit || 10) || 10;
|
|
1279
|
+
const baseDate = pickStr2(explicit.startDate || data.visitDate || "");
|
|
1280
|
+
const noon = /中午|午餐|午宴|午饭/.test(hay);
|
|
1281
|
+
const evening = /晚上|晚宴|晚餐|夜里|今晚/.test(hay);
|
|
1282
|
+
const inText = timesIn(hay);
|
|
1283
|
+
const textTime = pickStr2(inText[0]);
|
|
1284
|
+
const explicitStart = pickStr2(explicit.startTime);
|
|
1285
|
+
const duration = Number(explicit.durationMinutes || RESTAURANT_DETAIL.defaultDurationMinutes) || 90;
|
|
1286
|
+
const startTime = explicitStart || textTime || (noon ? "11:30" : "18:00");
|
|
1287
|
+
const endTime = pickStr2(explicit.endTime) || (explicitStart || textTime ? hhmmPlus(startTime, duration) : noon ? "13:30" : "21:00");
|
|
1288
|
+
const mealPeriod = noon ? "\u4E2D\u5348" : evening ? "\u665A\u4E0A" : "\u665A\u4E0A";
|
|
1289
|
+
let endDate = pickStr2(explicit.endDate) || baseDate;
|
|
1290
|
+
if (!pickStr2(explicit.endDate) && endTime <= startTime && endDate) endDate = nextDay(endDate);
|
|
1291
|
+
const explicitRoom = pickStr2(explicit.roomNo || explicit.room || explicit.roomName);
|
|
1292
|
+
const candidates = normalizeRoomCandidates(rooms || []);
|
|
1293
|
+
const prev = data.restaurant && typeof data.restaurant === "object" ? data.restaurant : null;
|
|
1294
|
+
const picked = explicitRoom ? { name: explicitRoom, capacity: 0, reason: "\u6309\u6307\u5B9A\u5305\u53A2" } : pickRestaurantRoom(candidates, headcount) || (prev && prev.roomNo ? { name: prev.roomNo, capacity: prev.roomCapacity || 0, reason: prev.roomReason || "\u6CBF\u7528\u4E0A\u4E00\u8F6E\u7ED3\u679C" } : null);
|
|
1295
|
+
const rawCount = rawCandidateCount(rooms);
|
|
1296
|
+
const roomState = picked ? picked.capacity && headcount > picked.capacity ? "overflow" : "ok" : rawCount ? "candidates-unparsed" : "no-candidates";
|
|
1297
|
+
return {
|
|
1298
|
+
booked: true,
|
|
1299
|
+
roomNo: picked ? picked.name : "",
|
|
1300
|
+
roomState,
|
|
1301
|
+
roomCapacity: picked && picked.capacity ? picked.capacity : 0,
|
|
1302
|
+
roomReason: picked ? picked.reason : rawCount ? `\u7ED9\u4E86 ${rawCount} \u6761\u5019\u9009\u4F46\u8BA4\u4E0D\u51FA\u5305\u53A2\u540D/\u5BB9\u91CF\uFF08\u68C0\u67E5\u5B57\u6BB5\u6620\u5C04\uFF09` : "\u7F3A\u5305\u53A2\u53F7\uFF1A\u6CA1\u62FF\u5230\u53EF\u7528\u5305\u53A2\u6E05\u5355",
|
|
1303
|
+
headcount,
|
|
1304
|
+
startDate: baseDate,
|
|
1305
|
+
startTime,
|
|
1306
|
+
endDate,
|
|
1307
|
+
endTime,
|
|
1308
|
+
mealPeriod,
|
|
1309
|
+
// 候选清单只留名字与容量,用于「订不上时把可选项告诉用户」
|
|
1310
|
+
candidates: (candidates.length ? candidates : prev && Array.isArray(prev.candidates) ? prev.candidates : []).slice(0, 20).map((room) => ({ name: room.name, capacity: room.capacity })),
|
|
1311
|
+
raw: pickStr2(hay).slice(0, 200)
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
|
|
771
1315
|
// src/shortcuts/reception/operations/render-assets.ts
|
|
772
1316
|
import { spawnSync, execFile } from "node:child_process";
|
|
773
1317
|
import { existsSync } from "node:fs";
|
|
@@ -805,9 +1349,9 @@ function runSync(file, args, options = {}) {
|
|
|
805
1349
|
};
|
|
806
1350
|
}
|
|
807
1351
|
function runAsync(file, args) {
|
|
808
|
-
return new Promise((
|
|
1352
|
+
return new Promise((resolve2) => {
|
|
809
1353
|
execFile(file, args, { encoding: "utf8", maxBuffer: 16 * 1024 * 1024 }, (error, stdout, stderr) => {
|
|
810
|
-
|
|
1354
|
+
resolve2({
|
|
811
1355
|
stdout: String(stdout || ""),
|
|
812
1356
|
stderr: String(stderr || ""),
|
|
813
1357
|
status: error ? typeof error.code === "number" ? error.code : 1 : 0
|
|
@@ -982,6 +1526,28 @@ function applyCases(data, casesFile) {
|
|
|
982
1526
|
if (expertsQuery) data.expertsQuery = String(expertsQuery);
|
|
983
1527
|
}
|
|
984
1528
|
}
|
|
1529
|
+
function readRoomsFile(path) {
|
|
1530
|
+
let raw;
|
|
1531
|
+
try {
|
|
1532
|
+
raw = readFileSync2(path, "utf8");
|
|
1533
|
+
} catch (error) {
|
|
1534
|
+
throw receptionValidationError("RESTAURANT_ROOMS_UNREADABLE", `\u8BFB\u4E0D\u5230 --restaurant-rooms-file\uFF1A${path}`, {
|
|
1535
|
+
path,
|
|
1536
|
+
detail: error.message,
|
|
1537
|
+
hint: "\u4F20\u300C\u5C0F\u98DF\u5802\u5305\u53A2\u300Dds list \u7684\u539F\u59CB\u8F93\u51FA\uFF0C\u6216 [{name,capacity}] \u6570\u7EC4"
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
const parsed = parseJsonText(raw);
|
|
1541
|
+
if (!parsed.ok) {
|
|
1542
|
+
throw receptionValidationError("RESTAURANT_ROOMS_INVALID", `--restaurant-rooms-file \u4E0D\u662F\u5408\u6CD5 JSON\uFF1A${parsed.error}`, {
|
|
1543
|
+
path,
|
|
1544
|
+
preview: parsed.preview,
|
|
1545
|
+
hasBom: parsed.hasBom,
|
|
1546
|
+
hint: "\u5E38\u89C1\u539F\u56E0\uFF1AUTF-8 BOM\u3001\u4E2D\u6587\u5F15\u53F7\u3001\u5C3E\u968F\u9017\u53F7\uFF1B\u4FEE JSON \u672C\u8EAB\uFF0C\u4E0D\u8981\u6362\u4F20\u53C2\u65B9\u5F0F"
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
return parsed.value;
|
|
1550
|
+
}
|
|
985
1551
|
async function doc(input, ctx) {
|
|
986
1552
|
const startedAt = Date.now();
|
|
987
1553
|
const runIdArg = String(input.runId || "").trim();
|
|
@@ -1021,6 +1587,23 @@ async function doc(input, ctx) {
|
|
|
1021
1587
|
const answers = input.answers ?? run.answers ?? {};
|
|
1022
1588
|
const data = mergeAnswers(run, answers);
|
|
1023
1589
|
if (input.casesFile) applyCases(data, input.casesFile);
|
|
1590
|
+
applyMeetingPolicy(data);
|
|
1591
|
+
const booking = normalizeRestaurant({
|
|
1592
|
+
data,
|
|
1593
|
+
rooms: input.restaurantRoomsFile ? readRoomsFile(input.restaurantRoomsFile) : null
|
|
1594
|
+
});
|
|
1595
|
+
if (booking) data.restaurant = booking;
|
|
1596
|
+
const todo = Array.isArray(data.todo) ? [...data.todo] : [];
|
|
1597
|
+
const addTodo = (item) => {
|
|
1598
|
+
if (item && !todo.includes(item)) todo.push(item);
|
|
1599
|
+
};
|
|
1600
|
+
if (!normalizeMeeting(data.meeting)) {
|
|
1601
|
+
addTodo("\u662F\u5426\u9700\u8981\u4F1A\u8BAE\u672A\u8868\u6001\uFF1A\u4F1A\u8BAE\u5BA4\u672A\u9884\u7559\uFF0C\u8BF7\u884C\u653F\u786E\u8BA4\u540E\u56DE\u586B");
|
|
1602
|
+
}
|
|
1603
|
+
if (booking && booking.booked && !String(booking.roomNo || "").trim()) {
|
|
1604
|
+
addTodo(`\u5C0F\u9910\u5385\u5305\u53A2\u5F85\u786E\u8BA4\uFF1A${booking.roomReason || "\u672A\u53D6\u5230\u53EF\u7528\u5305\u53A2"}`);
|
|
1605
|
+
}
|
|
1606
|
+
if (todo.length) data.todo = todo;
|
|
1024
1607
|
const outDir = input.outDir || run.outDir || ctx.outDir;
|
|
1025
1608
|
ensureDir(outDir);
|
|
1026
1609
|
const warnings = [];
|
|
@@ -1258,78 +1841,6 @@ function buildCustomParams(items = []) {
|
|
|
1258
1841
|
return { values, keys: ordered };
|
|
1259
1842
|
}
|
|
1260
1843
|
|
|
1261
|
-
// src/shortcuts/reception/operations/schedule.ts
|
|
1262
|
-
var STANDARD_AGENDA = [
|
|
1263
|
-
{ offset: 0, item: "\u516C\u53F8\u53C2\u89C2", activity: "\u53C2\u89C2\u6CDB\u5FAE\u4E0A\u6D77\u603B\u90E8\u5C55\u5385\u4E0E\u529E\u516C\u533A\uFF0C\u4E86\u89E3\u516C\u53F8\u53D1\u5C55\u5386\u7A0B\u4E0E\u4EA7\u54C1\u80FD\u529B" },
|
|
1264
|
-
{ offset: 45, item: "\u65B9\u6848\u4ECB\u7ECD", activity: "" },
|
|
1265
|
-
{ offset: 120, item: "\u8BA8\u8BBA\u4EA4\u6D41", activity: "\u53CC\u65B9\u56F4\u7ED5\u5173\u6CE8\u70B9\u4EA4\u6D41\u7B54\u7591\uFF0C\u660E\u786E\u540E\u7EED\u63A8\u8FDB\u8282\u594F" }
|
|
1266
|
-
];
|
|
1267
|
-
var SEVEN = ["date", "time", "item", "place", "person", "activity", "remark"];
|
|
1268
|
-
function hhmmPlus(start, mins) {
|
|
1269
|
-
const base = /^\d{1,2}:\d{2}$/.test(String(start || "")) ? String(start) : "09:30";
|
|
1270
|
-
const [hour, minute] = base.split(":").map(Number);
|
|
1271
|
-
const total = ((hour * 60 + minute + mins) % 1440 + 1440) % 1440;
|
|
1272
|
-
return `${String(Math.floor(total / 60)).padStart(2, "0")}:${String(total % 60).padStart(2, "0")}`;
|
|
1273
|
-
}
|
|
1274
|
-
function pick7(row) {
|
|
1275
|
-
if (!row || typeof row !== "object" || Array.isArray(row)) return null;
|
|
1276
|
-
const source = row;
|
|
1277
|
-
const out = {};
|
|
1278
|
-
for (const key of SEVEN) {
|
|
1279
|
-
const value = source[key];
|
|
1280
|
-
if (value !== null && value !== void 0 && String(value).trim()) out[key] = String(value).trim();
|
|
1281
|
-
}
|
|
1282
|
-
return Object.keys(out).length ? out : null;
|
|
1283
|
-
}
|
|
1284
|
-
function normalizeScheduleRows(data = {}) {
|
|
1285
|
-
const rows = [];
|
|
1286
|
-
const push = (row) => {
|
|
1287
|
-
if (row) rows.push(row);
|
|
1288
|
-
};
|
|
1289
|
-
const companions = Array.isArray(data.companions) ? data.companions : [];
|
|
1290
|
-
const escortNames = nameList(data.escorts);
|
|
1291
|
-
const mainPerson = escortNames[0] || companions.map((item) => typeof item === "string" ? item : item && item.name || "").filter(Boolean)[0] || data.contact || "";
|
|
1292
|
-
if (Array.isArray(data.scheduleRows)) data.scheduleRows.forEach((row) => push(pick7(row)));
|
|
1293
|
-
if (!rows.length && Array.isArray(data.schedule)) {
|
|
1294
|
-
data.schedule.forEach((row) => {
|
|
1295
|
-
if (Array.isArray(row)) {
|
|
1296
|
-
const [time, item, place] = row;
|
|
1297
|
-
push(pick7({ date: data.visitDate || data.arrivalDate || "", time, item, place, person: mainPerson }));
|
|
1298
|
-
} else {
|
|
1299
|
-
push(pick7(row));
|
|
1300
|
-
}
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
|
-
if (!rows.length && Array.isArray(data.agenda)) {
|
|
1304
|
-
data.agenda.forEach((row) => push(pick7({
|
|
1305
|
-
date: data.visitDate || data.arrivalDate || "",
|
|
1306
|
-
time: row && (row.start || row.time) || "",
|
|
1307
|
-
item: row && row.item,
|
|
1308
|
-
place: row && row.place,
|
|
1309
|
-
person: row && row.person || mainPerson,
|
|
1310
|
-
activity: row && row.activity,
|
|
1311
|
-
remark: row && row.remark
|
|
1312
|
-
})));
|
|
1313
|
-
}
|
|
1314
|
-
if (!rows.length) {
|
|
1315
|
-
const date = data.visitDate || data.arrivalDate || "";
|
|
1316
|
-
const start = /^\d{1,2}:\d{2}$/.test(String(data.agendaStart || "")) ? String(data.agendaStart) : "09:30";
|
|
1317
|
-
const room = data.meetingRoom || "\u603B\u90E8129/130/131\u4F1A\u8BAE\u5BA4\uFF08\u6309\u4EBA\u6570\u62E9\u4E00\uFF09";
|
|
1318
|
-
for (const item of STANDARD_AGENDA) {
|
|
1319
|
-
push(pick7({
|
|
1320
|
-
date,
|
|
1321
|
-
time: hhmmPlus(start, item.offset),
|
|
1322
|
-
item: item.item,
|
|
1323
|
-
place: item.item === "\u516C\u53F8\u53C2\u89C2" ? "\u6CDB\u5FAE\u4E0A\u6D77\u603B\u90E8" : room,
|
|
1324
|
-
person: mainPerson,
|
|
1325
|
-
activity: item.item === "\u65B9\u6848\u4ECB\u7ECD" ? data.demand || "\u4EA7\u54C1\u4E0E\u65B9\u6848\u4ECB\u7ECD" : item.activity
|
|
1326
|
-
}));
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
for (const row of rows) if (!row.person && mainPerson) row.person = mainPerson;
|
|
1330
|
-
return rows;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
1844
|
// src/shortcuts/reception/operations/compose.ts
|
|
1334
1845
|
var pick = (map, key) => key && map && map[String(key)] !== void 0 ? String(map[String(key)]) : "";
|
|
1335
1846
|
function normAttachmentIds(list, single = "") {
|
|
@@ -1359,8 +1870,13 @@ function composeInitialValues(options) {
|
|
|
1359
1870
|
case "\u5BA2\u6237\u5230\u8FBE\u65E5\u671F":
|
|
1360
1871
|
case "\u5BA2\u6237\u53C2\u89C2\u65E5\u671F":
|
|
1361
1872
|
return data.visitDate || data.arrivalDate || "";
|
|
1362
|
-
case "\u5BA2\u6237\u9700\u6C42":
|
|
1363
|
-
|
|
1873
|
+
case "\u5BA2\u6237\u9700\u6C42": {
|
|
1874
|
+
const picked = String(data.customer_need || "").trim();
|
|
1875
|
+
const need = String(data.customerNeed || "").trim();
|
|
1876
|
+
const legacy = String(data.demand || "").trim();
|
|
1877
|
+
if (picked && need && !picked.includes(need)) return `${picked}\uFF08\u5BA2\u6237\u5173\u6CE8\uFF1A${need}\uFF09`;
|
|
1878
|
+
return picked || need || legacy;
|
|
1879
|
+
}
|
|
1364
1880
|
case "\u5BA2\u6237\u6027\u8D28":
|
|
1365
1881
|
return pick(codes["\u5BA2\u6237\u6027\u8D28"], data.nature) || data.nature || "";
|
|
1366
1882
|
case "\u9879\u76EE\u91D1\u989D\uFF08\u4E07\u5143\uFF09":
|
|
@@ -1368,6 +1884,7 @@ function composeInitialValues(options) {
|
|
|
1368
1884
|
case "\u6CDB\u5FAE\u5206\u652F\u673A\u6784\u53C2\u4E0E\u4EBA\u5458\uFF08\u4E3B\u8054\u7EDC\u4EBA\uFF0C\u6B64\u4EBA\u5FC5\u987B\u966A\u5BA2\u6237\u4E00\u540C\u53C2\u89C2\uFF09": {
|
|
1369
1885
|
const escorts = nameList(data.escorts);
|
|
1370
1886
|
if (escorts.length) return escorts;
|
|
1887
|
+
if (data.empId) return [String(data.empId)];
|
|
1371
1888
|
const list = Array.isArray(data.companions) ? data.companions : [];
|
|
1372
1889
|
const names = list.map((item) => typeof item === "string" ? item : item && (item.name || item.id)).map((item) => String(item || "").trim()).filter(Boolean);
|
|
1373
1890
|
if (names.length) return names;
|
|
@@ -1377,6 +1894,20 @@ function composeInitialValues(options) {
|
|
|
1377
1894
|
return pick(codes["\u662F\u5426\u9700\u8981\u9AD8\u5C42\u53C2\u4E0E"], data.senior) || data.senior || "";
|
|
1378
1895
|
case "\u5BA2\u6237\u5E26\u961F\u4EBA":
|
|
1379
1896
|
return data.leader || "";
|
|
1897
|
+
// 以下字段在 2026-11 的新布局里才有承载位(旧布局只有 10 个主表字段),
|
|
1898
|
+
// 之前这些信息只能写进附件文档;现在有地方就直接落表单。
|
|
1899
|
+
case "\u5BA2\u6237\u4EBA\u6570":
|
|
1900
|
+
return data.headcount === 0 || data.headcount ? data.headcount : "";
|
|
1901
|
+
case "\u7528\u9910\u4EBA\u6570":
|
|
1902
|
+
return data.mealHeadcount || data.restaurant && data.restaurant.headcount || "";
|
|
1903
|
+
case "\u5BA2\u6237\u63A5\u9001\u8981\u6C42\uFF08\u662F\u5426\u9700\u8981\u524D\u5F80\u673A\u573A\u3001\u8F66\u7AD9\u63A5\u9001\u5BA2\u6237\uFF0C\u5982\u9700\u8981\u8BF7\u5199\u660E\u63A5\u9001\u65F6\u95F4\u3001\u4EBA\u6570\u53CA\u7279\u6B8A\u8981\u6C42\uFF09":
|
|
1904
|
+
return data.pickup || "";
|
|
1905
|
+
case "\u662F\u5426\u9700\u8981\u8D2D\u4E70\u793C\u54C1\uFF08\u5982\u9700\u8D2D\u4E70\u5E94\u5199\u660E\u793C\u54C1\u7C7B\u522B\u3001\u4EF7\u4F4D\u3001\u9700\u8981\u65F6\u95F4\u7B49\uFF09":
|
|
1906
|
+
return data.gift || "";
|
|
1907
|
+
case "\u9884\u5B9A\u9152\u5E97":
|
|
1908
|
+
return data.hotel || "";
|
|
1909
|
+
case "\u6B22\u8FCE\u5B57\u5E55\u4E2D\u7684\u5BA2\u6237\u540D\u79F0":
|
|
1910
|
+
return data.customer || "";
|
|
1380
1911
|
case "\u5BA2\u6237\u53C2\u89C2\u63A5\u5F85\u884C\u7A0B\u5355\uFF08\u7531\u884C\u653F\u7ECF\u7406\u6C47\u603B\u540E\u53CD\u9988\uFF09":
|
|
1381
1912
|
return "";
|
|
1382
1913
|
default:
|
|
@@ -1411,12 +1942,83 @@ function composeInitialValues(options) {
|
|
|
1411
1942
|
}));
|
|
1412
1943
|
}
|
|
1413
1944
|
if (!rows.length) warnings.push("\u65E5\u7A0B\u660E\u7EC6\u4E3A 0 \u884C\uFF1A\u9875\u9762\u4E0A\u660E\u7EC6\u4F1A\u662F\u7A7A\u7684");
|
|
1945
|
+
const meeting = snapshot && snapshot.meeting || null;
|
|
1946
|
+
const wantsMeeting = normalizeMeeting(data.meeting) === "\u662F";
|
|
1947
|
+
if (wantsMeeting && (!meeting || !meeting.fields)) {
|
|
1948
|
+
warnings.push("\u4F1A\u8BAE\u5B57\u6BB5\u672A\u586B\uFF1A\u5B57\u6BB5\u5FEB\u7167\u7F3A\u5C11 meeting \u8282\u70B9\uFF0C\u6280\u80FD\u5305\u7248\u672C\u8FC7\u65E7\uFF0C\u9700\u66F4\u65B0 data/fields-snapshot.json");
|
|
1949
|
+
}
|
|
1950
|
+
if (meeting && meeting.fields && wantsMeeting) {
|
|
1951
|
+
const room = normalizeMeetingRoom(data.meetingRoom);
|
|
1952
|
+
const options2 = Array.isArray(meeting.roomOptions) ? meeting.roomOptions : [];
|
|
1953
|
+
if (!room || options2.length > 0 && !options2.includes(room)) {
|
|
1954
|
+
warnings.push(`\u4F1A\u8BAE\u5B57\u6BB5\u672A\u586B\uFF1A\u4F1A\u8BAE\u5BA4\u300C${String(data.meetingRoom || "").trim() || "\u7A7A"}\u300D\u4E0D\u5728 ${options2.join(" / ") || "\u5019\u9009"} \u5185`);
|
|
1955
|
+
} else {
|
|
1956
|
+
const first = rows[0] || {};
|
|
1957
|
+
const second = rows[1] || first;
|
|
1958
|
+
const last = rows[rows.length - 1] || first;
|
|
1959
|
+
const date = String(data.visitDate || data.arrivalDate || first.date || "");
|
|
1960
|
+
const startTime = String(data.meetingStartTime || second.time || first.time || "");
|
|
1961
|
+
const endTime = String(
|
|
1962
|
+
data.meetingEndTime || (last.time ? hhmmPlus(last.time, 30) : "")
|
|
1963
|
+
);
|
|
1964
|
+
const putMeeting = (id, value) => {
|
|
1965
|
+
if (id && value !== "" && value !== null && value !== void 0) {
|
|
1966
|
+
items.push({ fieldId: id, value: String(value) });
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
const roomId = pick(meeting.roomOptionIds, room) || meetingRoomId(room);
|
|
1970
|
+
const roomPrefix = String(meeting.roomValuePrefix ?? "##");
|
|
1971
|
+
putMeeting(meeting.fields.room, roomId ? `${roomPrefix}${roomId}` : room);
|
|
1972
|
+
putMeeting(meeting.fields.title, data.meetingTitle || `${data.customer || "\u5BA2\u6237"}\u6765\u8BBF\u4EA4\u6D41`);
|
|
1973
|
+
putMeeting(meeting.fields.startDate, date);
|
|
1974
|
+
putMeeting(meeting.fields.startTime, startTime);
|
|
1975
|
+
putMeeting(meeting.fields.endDate, data.meetingEndDate || date);
|
|
1976
|
+
putMeeting(meeting.fields.endTime, endTime);
|
|
1977
|
+
if (!startTime || !endTime) warnings.push("\u4F1A\u8BAE\u5F00\u59CB/\u7ED3\u675F\u65F6\u95F4\u672A\u80FD\u4ECE\u65E5\u7A0B\u63A8\u7B97\uFF0C\u8BF7\u5728\u9875\u9762\u8865\u5145");
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
const restaurant = snapshot && snapshot.restaurant || null;
|
|
1981
|
+
if (data.restaurant && data.restaurant.booked && (!restaurant || !restaurant.fields)) {
|
|
1982
|
+
warnings.push("\u5C0F\u9910\u5385\u4FE1\u606F\u65E0\u5BF9\u5E94\u5B57\u6BB5\uFF08\u5B57\u6BB5\u5FEB\u7167\u7F3A\u5C11 restaurant \u8282\u70B9\uFF09\uFF0C\u5DF2\u4EC5\u5199\u5165\u9644\u4EF6\u6587\u6863");
|
|
1983
|
+
todos.push("\u5C0F\u9910\u5385\u4FE1\u606F\u65E0\u5B57\u6BB5\u627F\u8F7D\uFF0C\u8BF7\u5728\u6D41\u7A0B\u5907\u6CE8\u6216\u9644\u4EF6\u4E2D\u8865\u5145");
|
|
1984
|
+
} else if (data.restaurant && data.restaurant.booked && restaurant && restaurant.fields) {
|
|
1985
|
+
const roomNo = String(data.restaurant.roomNo || "").trim();
|
|
1986
|
+
const state = String(data.restaurant.roomState || "");
|
|
1987
|
+
if (!roomNo) {
|
|
1988
|
+
const why = state === "no-candidates" ? "\u5305\u53A2\u6570\u636E\u6E90\u672A\u53D6\u5230\uFF08\u5EFA\u6A21\u8868\u5355\u300C\u5C0F\u98DF\u5802\u5305\u53A2\u300D\u65E0\u8FD4\u56DE\uFF09" : state === "candidates-unparsed" ? `\u5305\u53A2\u5019\u9009\u89E3\u6790\u5931\u8D25\uFF1A${data.restaurant.roomReason || "\u8BA4\u4E0D\u51FA\u5305\u53A2\u540D"}` : "\u5305\u53A2\u53F7\u4E3A\u7A7A";
|
|
1989
|
+
warnings.push(`\u5C0F\u9910\u5385\u9884\u5B9A\u660E\u7EC6\u672A\u586B\uFF1A${why}`);
|
|
1990
|
+
todos.push(`\u5C0F\u9910\u5385\u5305\u53A2\u5F85\u884C\u653F\u786E\u8BA4\uFF08${why}\uFF09`);
|
|
1991
|
+
} else {
|
|
1992
|
+
if (state === "overflow") {
|
|
1993
|
+
const cap = Number(data.restaurant.roomCapacity) || 0;
|
|
1994
|
+
warnings.push(`\u5C0F\u9910\u5385\u5305\u53A2\u5DF2\u6309\u6700\u5927\u95F4\u9884\u7559\uFF08${cap} \u4EBA\uFF09\uFF0C\u672C\u6B21 ${data.restaurant.headcount || "?"} \u4EBA\u9700\u53E6\u884C\u5B89\u6392`);
|
|
1995
|
+
todos.push(`\u5C0F\u9910\u5385\u73B0\u6709\u5305\u53A2\u6700\u5927 ${cap} \u4EBA\uFF0C\u672C\u6B21\u4EBA\u6570\u8D85\u51FA\uFF0C\u9700\u53E6\u884C\u5B89\u6392`);
|
|
1996
|
+
}
|
|
1997
|
+
const putRest = (id, value) => {
|
|
1998
|
+
if (id && value !== "" && value !== null && value !== void 0) {
|
|
1999
|
+
items.push({ fieldId: id, value: String(value), dataIndex: 0 });
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
putRest(restaurant.fields.roomNo, roomNo);
|
|
2003
|
+
putRest(restaurant.fields.headcount, data.restaurant.headcount || "");
|
|
2004
|
+
putRest(restaurant.fields.startDate, data.restaurant.startDate || "");
|
|
2005
|
+
putRest(restaurant.fields.startTime, data.restaurant.startTime || "");
|
|
2006
|
+
putRest(restaurant.fields.endDate, data.restaurant.endDate || "");
|
|
2007
|
+
putRest(restaurant.fields.endTime, data.restaurant.endTime || "");
|
|
2008
|
+
}
|
|
2009
|
+
} else if (data.restaurant) {
|
|
2010
|
+
warnings.push("\u5C0F\u9910\u5385\u660E\u7EC6\u672A\u5199\u5165\uFF1A\u5165\u53C2\u672A\u5F52\u4E00\uFF08\u7F3A\u5C11 booked\uFF09\uFF0C\u8BF7\u786E\u8BA4\u5305\u53A2\u4E0E\u7528\u9910\u65F6\u95F4\u540E\u624B\u5DE5\u8865\u586B");
|
|
2011
|
+
todos.push("\u5C0F\u9910\u5385\u9884\u5B9A\u660E\u7EC6\u5F85\u8865\u586B\uFF08\u5305\u53A2\u3001\u4EBA\u6570\u3001\u65F6\u95F4\uFF09");
|
|
2012
|
+
}
|
|
1414
2013
|
const built = buildCustomParams(items);
|
|
1415
2014
|
params.values = built.values;
|
|
1416
2015
|
params.keys = built.keys;
|
|
1417
2016
|
if (attachmentPending) todos.push("\u884C\u7A0B\u5355\u9644\u4EF6\u672A\u4E0A\u4F20\uFF08\u53EF\u5728\u9875\u9762\u624B\u52A8\u6DFB\u52A0\uFF09");
|
|
1418
2017
|
if (!data.companions || !data.companions.length) todos.push("\u966A\u540C\u4EBA\u5458\u672A\u586B");
|
|
1419
2018
|
if (!data.demand) todos.push("\u5BA2\u6237\u9700\u6C42\u672A\u586B");
|
|
2019
|
+
if (!normalizeMeeting(data.meeting)) {
|
|
2020
|
+
todos.push("\u662F\u5426\u9700\u8981\u4F1A\u8BAE\u672A\u8868\u6001\uFF1A\u4F1A\u8BAE\u5BA4\u672A\u9884\u7559\uFF0C\u63D0\u4EA4\u524D\u8BF7\u884C\u653F\u786E\u8BA4");
|
|
2021
|
+
}
|
|
1420
2022
|
return {
|
|
1421
2023
|
values: params.values,
|
|
1422
2024
|
keys: params.keys,
|
|
@@ -1444,15 +2046,75 @@ async function render(input, ctx) {
|
|
|
1444
2046
|
}
|
|
1445
2047
|
);
|
|
1446
2048
|
}
|
|
2049
|
+
const composedWarnings = [];
|
|
1447
2050
|
const answers = input.answers ?? run.answers ?? {};
|
|
1448
2051
|
const data = mergeAnswers(run, answers);
|
|
1449
2052
|
const argAttachment = String(input.attachmentFileid || "").trim();
|
|
1450
2053
|
const runAttachments = Array.isArray(run.attachmentFileids) ? run.attachmentFileids : [];
|
|
1451
|
-
|
|
2054
|
+
if (data.restaurant && data.restaurant.booked && !String(data.restaurant.roomNo || "").trim() && input.allowMissingRestaurant !== true) {
|
|
2055
|
+
throw receptionBusinessError(
|
|
2056
|
+
"RESTAURANT_DETAIL_MISSING",
|
|
2057
|
+
"\u63D0\u4E86\u5C0F\u9910\u5385\uFF0C\u4F46\u6CA1\u62FF\u5230\u53EF\u7528\u5305\u53A2\u53F7\uFF0C\u586B\u5355\u9875\u4F1A\u7F3A\u300C\u5C0F\u9910\u5385\u9884\u5B9A\u660E\u7EC6\u300D",
|
|
2058
|
+
{
|
|
2059
|
+
roomState: data.restaurant.roomState,
|
|
2060
|
+
roomReason: data.restaurant.roomReason,
|
|
2061
|
+
candidates: data.restaurant.candidates || [],
|
|
2062
|
+
hint: "\u7528 --restaurant-rooms-file \u4F20\u300C\u5C0F\u98DF\u5802\u5305\u53A2\u300D\u5019\u9009\uFF08e10-data ds list \u539F\u59CB\u8F93\u51FA\u5373\u53EF\uFF09\uFF1B\u786E\u5B9E\u6CA1\u6709\u53EF\u7528\u5305\u53A2\u65F6\u52A0 --allow-missing-restaurant \u653E\u884C\uFF0C\u660E\u7EC6\u4F1A\u7559\u7A7A\u8FDB\u5F85\u529E"
|
|
2063
|
+
}
|
|
2064
|
+
);
|
|
2065
|
+
}
|
|
2066
|
+
applyMeetingPolicy(data);
|
|
2067
|
+
if (!normalizeMeeting(data.meeting)) {
|
|
2068
|
+
throw receptionBusinessError(
|
|
2069
|
+
"MEETING_UNCONFIRMED",
|
|
2070
|
+
"\u662F\u5426\u9700\u8981\u4F1A\u8BAE\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u8865\u95EE\u518D\u51FA\u586B\u5355\u9875",
|
|
2071
|
+
{
|
|
2072
|
+
headcount: data.headcount || "",
|
|
2073
|
+
hint: '\u5148\u5411\u7528\u6237\u786E\u8BA4\u300C\u662F\u5426\u9700\u8981\u4F1A\u8BAE\u5BA4\u5EA7\u8C08\u300D\uFF0C\u62FF\u5230\u7B54\u6848\u540E\u653E\u8FDB answers.fields.meeting\uFF08"\u662F"/"\u5426"\uFF09\u91CD\u8DD1\u672C\u6761\uFF1B\u63D0\u4E86\u5C0F\u9910\u5385\u4E0D\u4EE3\u8868\u8981\u5F00\u4F1A\uFF0C\u4E0D\u5F97\u636E\u6B64\u63A8\u65AD'
|
|
2074
|
+
}
|
|
2075
|
+
);
|
|
2076
|
+
}
|
|
2077
|
+
if (normalizeMeeting(data.meeting) === "\u662F") {
|
|
2078
|
+
if (!Number(data.headcount)) {
|
|
2079
|
+
data.todos = [...Array.isArray(data.todos) ? data.todos : [], "\u4EBA\u6570\u672A\u586B\uFF0C\u4F1A\u8BAE\u5BA4\u6309\u9ED8\u8BA4\u9884\u7559"];
|
|
2080
|
+
}
|
|
2081
|
+
const meta = data.meetingRoomMeta || {};
|
|
2082
|
+
if (meta.capacity && Number(data.headcount) > Number(meta.capacity)) {
|
|
2083
|
+
composedWarnings.push(
|
|
2084
|
+
`\u4F1A\u8BAE\u5BA4\u6309\u6700\u5927\u95F4\u9884\u7559\uFF08${meta.capacity} \u4EBA\uFF09\uFF0C\u672C\u6B21 ${data.headcount} \u4EBA\u8D85\u51FA\uFF0C\u9700\u53E6\u884C\u5B89\u6392`
|
|
2085
|
+
);
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
1452
2088
|
const hasEscorts = nameList(data.escorts).length > 0;
|
|
1453
|
-
if (!data.empId && !
|
|
2089
|
+
if (!data.empId && !hasEscorts) {
|
|
1454
2090
|
const session = await ctx.host.getSession();
|
|
1455
2091
|
data.empId = session.userId || "";
|
|
2092
|
+
if (!data.empId) composedWarnings.push("\u4E3B\u8054\u7EDC\u4EBA\u672A\u53D6\u5230\u767B\u5F55\u4EBA\uFF0C\u8BF7\u5728\u9875\u9762\u4E0A\u624B\u52A8\u9009\u62E9");
|
|
2093
|
+
}
|
|
2094
|
+
const defaultsApplied = [];
|
|
2095
|
+
const headcountKnown = Number(data.headcount) > 0;
|
|
2096
|
+
if (normalizeMeeting(data.meeting) === "\u662F" && !headcountKnown) {
|
|
2097
|
+
defaultsApplied.push({
|
|
2098
|
+
field: "meetingRoom",
|
|
2099
|
+
value: String(data.meetingRoom || ""),
|
|
2100
|
+
reason: String(data.meetingRoomMeta && data.meetingRoomMeta.reason || "\u4EBA\u6570\u672A\u586B\uFF0C\u4F1A\u8BAE\u5BA4\u6309\u9ED8\u8BA4\u9884\u7559")
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
if (data.restaurant && data.restaurant.booked) {
|
|
2104
|
+
if (!headcountKnown) {
|
|
2105
|
+
defaultsApplied.push({
|
|
2106
|
+
field: "customerCount",
|
|
2107
|
+
value: String(data.restaurant.headcount || ""),
|
|
2108
|
+
reason: "\u4EBA\u6570\u672A\u586B\uFF0C\u5C0F\u9910\u5385\u6309 10 \u4EBA\u9884\u7559"
|
|
2109
|
+
});
|
|
2110
|
+
}
|
|
2111
|
+
if (data.restaurant.roomNo && !/按指定包厢/.test(String(data.restaurant.roomReason || ""))) {
|
|
2112
|
+
defaultsApplied.push({
|
|
2113
|
+
field: "restaurantRoom",
|
|
2114
|
+
value: String(data.restaurant.roomNo),
|
|
2115
|
+
reason: String(data.restaurant.roomReason || "\u6309\u5BB9\u91CF\u5339\u914D")
|
|
2116
|
+
});
|
|
2117
|
+
}
|
|
1456
2118
|
}
|
|
1457
2119
|
const composed = composeInitialValues({
|
|
1458
2120
|
snapshot: resolved.snapshot,
|
|
@@ -1469,6 +2131,7 @@ async function render(input, ctx) {
|
|
|
1469
2131
|
"\u8BF7\u5728\u9875\u9762\u4E0A\u6838\u5BF9\u300C\u6CDB\u5FAE\u5206\u652F\u673A\u6784\u53C2\u4E0E\u4EBA\u5458\uFF08\u4E3B\u8054\u7EDC\u4EBA\uFF09\u300D\u5B57\u6BB5\u3002"
|
|
1470
2132
|
].join(""));
|
|
1471
2133
|
}
|
|
2134
|
+
if (composedWarnings.length) composed.warnings.push(...composedWarnings);
|
|
1472
2135
|
if (!composed.keys.length) {
|
|
1473
2136
|
return {
|
|
1474
2137
|
state: "empty",
|
|
@@ -1512,6 +2175,7 @@ async function render(input, ctx) {
|
|
|
1512
2175
|
attachmentPending: composed.attachmentPending,
|
|
1513
2176
|
sdkRenderType: resolveRenderType(input.sdkRender),
|
|
1514
2177
|
todos: composed.todos,
|
|
2178
|
+
defaultsApplied,
|
|
1515
2179
|
browsertool,
|
|
1516
2180
|
browsertoolFile,
|
|
1517
2181
|
browsertoolRef: browsertoolFile ? `<browsertool-file path="${browsertoolFile}" />` : "",
|
|
@@ -1533,7 +2197,27 @@ async function docRender(input, ctx) {
|
|
|
1533
2197
|
const docResult = await doc(input, ctx);
|
|
1534
2198
|
if (!docResult.ok) return docResult;
|
|
1535
2199
|
const runId = String((docResult.data || {}).runId || input.runId || "");
|
|
1536
|
-
|
|
2200
|
+
let renderResult;
|
|
2201
|
+
try {
|
|
2202
|
+
renderResult = await render({
|
|
2203
|
+
runId,
|
|
2204
|
+
sdkRender: input.sdkRender,
|
|
2205
|
+
// answers 与 allowMissingRestaurant 必须透传:
|
|
2206
|
+
// render 虽然会回落到 run.answers,但「同一 run 二次调用带新 answers」只能靠这里;
|
|
2207
|
+
// 漏传 allowMissingRestaurant 会让 doc-render 上的放行开关整个失效。
|
|
2208
|
+
answers: input.answers,
|
|
2209
|
+
allowMissingRestaurant: input.allowMissingRestaurant === true
|
|
2210
|
+
}, ctx);
|
|
2211
|
+
} catch (error) {
|
|
2212
|
+
const err = error;
|
|
2213
|
+
const files = (docResult.data || {}).files;
|
|
2214
|
+
if (err && err.details && typeof err.details === "object" && Array.isArray(files) && files.length) {
|
|
2215
|
+
err.details.files = files;
|
|
2216
|
+
err.details.runId = runId;
|
|
2217
|
+
err.details.note = "\u884C\u7A0B\u5355\u4E0E\u53C2\u8003\u6587\u6863\u5DF2\u751F\u6210\uFF0C\u8865\u9F50\u540E\u91CD\u8DD1 doc-render --run-id \u5373\u53EF\uFF0C\u4E0D\u5FC5\u91CD\u51FA\u4EF6";
|
|
2218
|
+
}
|
|
2219
|
+
throw error;
|
|
2220
|
+
}
|
|
1537
2221
|
return {
|
|
1538
2222
|
state: renderResult.state,
|
|
1539
2223
|
ok: renderResult.ok,
|
|
@@ -1550,12 +2234,52 @@ var docRenderOperation = {
|
|
|
1550
2234
|
execute: (input, ctx) => docRender(input, ctx)
|
|
1551
2235
|
};
|
|
1552
2236
|
|
|
2237
|
+
// src/shortcuts/reception/operations/restaurantrooms.ts
|
|
2238
|
+
import { writeFileSync as writeFileSync3, mkdirSync as mkdirSync3 } from "node:fs";
|
|
2239
|
+
import { dirname as dirname2, resolve } from "node:path";
|
|
2240
|
+
async function restaurantRooms(input, ctx) {
|
|
2241
|
+
const startedAt = Date.now();
|
|
2242
|
+
const result = await ctx.host.fetchRestaurantRooms({
|
|
2243
|
+
pageSize: Number(input.pageSize) || void 0,
|
|
2244
|
+
timeoutMs: Number(input.timeoutMs) || void 0
|
|
2245
|
+
});
|
|
2246
|
+
let file = "";
|
|
2247
|
+
if (input.out) {
|
|
2248
|
+
const target = resolve(String(input.out));
|
|
2249
|
+
mkdirSync3(dirname2(target), { recursive: true });
|
|
2250
|
+
writeFileSync3(
|
|
2251
|
+
target,
|
|
2252
|
+
JSON.stringify({ rooms: result.rooms, source: "e10-ds", fetchedAt: (/* @__PURE__ */ new Date()).toISOString() }, null, 2),
|
|
2253
|
+
"utf8"
|
|
2254
|
+
);
|
|
2255
|
+
file = target.replace(/\\/gu, "/");
|
|
2256
|
+
}
|
|
2257
|
+
return {
|
|
2258
|
+
state: "rooms",
|
|
2259
|
+
ok: true,
|
|
2260
|
+
data: {
|
|
2261
|
+
rooms: result.rooms,
|
|
2262
|
+
total: result.total,
|
|
2263
|
+
rawCount: result.rawCount,
|
|
2264
|
+
file,
|
|
2265
|
+
/** 超出所有包厢容量时,提示行政区另找场地 */
|
|
2266
|
+
maxCapacity: result.rooms.reduce((max, room) => Math.max(max, room.capacity || 0), 0),
|
|
2267
|
+
timings: { totalMs: Date.now() - startedAt }
|
|
2268
|
+
},
|
|
2269
|
+
warnings: result.rooms.length ? [] : ["\u300C\u5C0F\u98DF\u5802\u5305\u53A2\u300D\u672A\u8FD4\u56DE\u53EF\u7528\u623F\u95F4\uFF1A\u68C0\u67E5\u6570\u636E\u96C6\u6743\u9650\u6216\u4E0A\u6D77\u533A\u57DF\u6570\u636E"]
|
|
2270
|
+
};
|
|
2271
|
+
}
|
|
2272
|
+
var restaurantRoomsOperation = {
|
|
2273
|
+
execute: (input, ctx) => restaurantRooms(input, ctx)
|
|
2274
|
+
};
|
|
2275
|
+
|
|
1553
2276
|
// src/shortcuts/reception/operations/registry.ts
|
|
1554
2277
|
var REGISTRY = /* @__PURE__ */ new Map([
|
|
1555
2278
|
["reception.ask", askOperation],
|
|
1556
2279
|
["reception.doc", docOperation],
|
|
1557
2280
|
["reception.docRender", docRenderOperation],
|
|
1558
|
-
["reception.render", renderOperation]
|
|
2281
|
+
["reception.render", renderOperation],
|
|
2282
|
+
["reception.restaurantRooms", restaurantRoomsOperation]
|
|
1559
2283
|
]);
|
|
1560
2284
|
function getReceptionOperation(name) {
|
|
1561
2285
|
const hit = REGISTRY.get(name);
|
|
@@ -1571,7 +2295,7 @@ var receptionOperations = [
|
|
|
1571
2295
|
{
|
|
1572
2296
|
name: "reception.ask",
|
|
1573
2297
|
risk: "read",
|
|
1574
|
-
summary: "\u6309 7 \u9879\u62BD\u53D6\u7ED3\u679C\u51FA\u4EA4\u4E92\u9762\u677F\uFF1A\
|
|
2298
|
+
summary: "\u6309 7 \u9879\u62BD\u53D6\u7ED3\u679C\u51FA\u4EA4\u4E92\u9762\u677F\uFF1A\u5BA2\u6237\u9700\u6C42\uFF08\u5DF2\u660E\u786E\u5219\u8DF3\u8FC7\uFF09+ \u63A5\u5F85\u7EC6\u8282\uFF08\u5E38\u9A7B\uFF09+ \u662F\u5426\u4F1A\u8BAE\uFF08\u5FC5\u95EE\uFF0C\u539F\u8BDD\u660E\u786E\u63D0\u53CA\u4F1A\u8BAE\u5BA4\u624D\u8DF3\u8FC7\uFF09\u3002\u8FD4\u56DE runId \u4F9B doc \u4F7F\u7528\u3002",
|
|
1575
2299
|
inputSchema: {
|
|
1576
2300
|
type: "object",
|
|
1577
2301
|
additionalProperties: false,
|
|
@@ -1579,8 +2303,25 @@ var receptionOperations = [
|
|
|
1579
2303
|
properties: {
|
|
1580
2304
|
known: {
|
|
1581
2305
|
type: "object",
|
|
1582
|
-
description: "\u6A21\u578B\u62BD\u53D6\u7684
|
|
1583
|
-
additionalProperties: true
|
|
2306
|
+
description: "\u6A21\u578B\u4ECE\u539F\u8BDD\u62BD\u53D6\u7684\u5B57\u6BB5\u30027 \u9879\u4E3B\u5B57\u6BB5 + 4 \u4E2A\u5173\u952E\u5B57\uFF08escorts/customerNeed/meeting/meetingExplicit\uFF09\uFF0C\u540E\u56DB\u4E2A\u4EE5\u524D\u662F\u9690\u5F0F\u7684\uFF0C\u8FD9\u91CC\u663E\u5F0F\u58F0\u660E\u3002",
|
|
2307
|
+
additionalProperties: true,
|
|
2308
|
+
properties: {
|
|
2309
|
+
customer: { type: "string", description: "\u5BA2\u6237\u540D\u79F0" },
|
|
2310
|
+
headcount: { type: "string", description: "\u6765\u8BBF\u4EBA\u6570\uFF0C\u652F\u6301\u300C6-10\u4EBA\u300D\u8FD9\u7C7B\u533A\u95F4" },
|
|
2311
|
+
visitDate: { type: "string", description: "\u53C2\u89C2\u65E5\u671F yyyy-MM-dd" },
|
|
2312
|
+
visitType: { type: "string", description: "\u53C2\u89C2\u7C7B\u578B\uFF1A\u53C2\u89C2\u4E0A\u6D77\u603B\u90E8 / \u53C2\u89C2\u5178\u578B\u5BA2\u6237" },
|
|
2313
|
+
escorts: {
|
|
2314
|
+
type: ["string", "array"],
|
|
2315
|
+
description: "\u4E3B\u8054\u7EDC\u4EBA\uFF08\u5BF9\u63A5\u4EBA\uFF09\uFF0C\u4F18\u5148\u7EA7\u6700\u9AD8\uFF1B\u4E0D\u4F20\u5219\u7528\u5F53\u524D\u767B\u5F55\u4EBA\u3002\u7981\u6B62\u628A\u4E3B\u8054\u7EDC\u4EBA\u5199\u8FDB companions"
|
|
2316
|
+
},
|
|
2317
|
+
companions: { type: ["string", "array"], description: "\u966A\u540C\u4EBA\u5458\uFF1B\u4EC5\u7528\u4E8E\u300C\u53C2\u4E0E\u4EBA\u5458\u300D\uFF0C\u4E0D\u53C2\u4E0E\u4E3B\u8054\u7EDC\u4EBA\u53D6\u503C" },
|
|
2318
|
+
demand: { type: "string", description: "\u5BA2\u6237\u9700\u6C42\uFF08\u65E7\u5B57\u6BB5\u540D\uFF0CcustomerNeed \u4F18\u5148\uFF09" },
|
|
2319
|
+
customerNeed: { type: "string", description: "\u5BA2\u6237\u9700\u6C42\u539F\u6587\uFF1B\u5DF2\u7ED9\u5219\u4E0D\u518D\u51FA\u300C\u5BA2\u6237\u9700\u6C42\u300D\u9762\u677F\uFF0C\u5E76\u5199\u5165\u8868\u5355\u5BA2\u6237\u9700\u6C42\u5B57\u6BB5" },
|
|
2320
|
+
meeting: { type: "string", enum: ["\u662F", "\u5426"], description: "\u662F\u5426\u9700\u8981\u4F1A\u8BAE\u5BA4\u5EA7\u8C08\uFF1B\u5FC5\u987B\u4E0E meetingExplicit \u4E00\u8D77\u4F20\u624D\u751F\u6548" },
|
|
2321
|
+
meetingExplicit: { type: "boolean", description: "\u539F\u8BDD\u662F\u5426\u660E\u786E\u63D0\u53CA\u9884\u5B9A\u4F1A\u8BAE\u5BA4\uFF08\u4F1A\u8BAE\u5BA4/\u8BA2\u4F1A\u8BAE\u5BA4/\u5EA7\u8C08\u573A\u5730/\u6C47\u62A5\u573A\u5730\uFF0C\u6216\u6307\u5B9A 129/130/131\uFF09\u3002\u53EA\u6709 true \u624D\u8DF3\u8FC7\u4F1A\u8BAE\u5C4F\uFF1B\u300C\u665A\u4E0A\u8BA2\u5C0F\u9910\u5385\u300D\u4E0D\u7B97\uFF0C\u4E0D\u5F97\u636E\u6B64\u63A8\u65AD" },
|
|
2322
|
+
restaurantIntent: { type: "boolean", description: "\u539F\u8BDD\u662F\u5426\u63D0\u5230\u5C0F\u9910\u5385/\u5305\u53A2\uFF1Btrue \u5219\u5FC5\u987B\u5E26 --restaurant-rooms-file" },
|
|
2323
|
+
logistics: { type: "string", description: "\u63A5\u5F85\u7EC6\u8282\u539F\u6587\uFF1A\u4EBA\u6570/\u63A5\u9001/\u7528\u9910/\u4F4F\u5BBF/\u4F34\u624B\u793C/\u624B\u673A" }
|
|
2324
|
+
}
|
|
1584
2325
|
},
|
|
1585
2326
|
user: { type: "string", description: "\u966A\u540C\u4EBA\u5458\u59D3\u540D\uFF0C\u591A\u4EBA\u7528\u9017\u53F7\u5206\u9694\uFF1B\u4E0D\u4F20\u5219\u7528\u5F53\u524D\u767B\u5F55\u4EBA\u515C\u5E95" },
|
|
1586
2327
|
customer: { type: "string", description: "\u5BA2\u6237\u540D\u79F0\uFF08\u8986\u76D6 known.customer\uFF09" },
|
|
@@ -1609,6 +2350,10 @@ var receptionOperations = [
|
|
|
1609
2350
|
known: { type: "object", description: "run \u5931\u6548\u65F6\u7684 7 \u9879\u62BD\u53D6\u7ED3\u679C\uFF0C\u7528\u4E8E\u73B0\u573A\u91CD\u5EFA run" },
|
|
1610
2351
|
answers: { type: "object", description: "ask_user \u9762\u677F\u56DE\u586B\u503C\uFF1A{customer_need, logistics, fields}" },
|
|
1611
2352
|
casesFile: { type: "string", description: "\u6848\u4F8B + \u4E13\u5BB6\u68C0\u7D22\u7ED3\u679C JSON \u6587\u4EF6\u8DEF\u5F84\uFF08\u8F6F\u4F9D\u8D56\uFF0C\u7F3A\u7701\u5219\u4E0D\u6CE8\u5165\uFF09" },
|
|
2353
|
+
restaurantRoomsFile: {
|
|
2354
|
+
type: "string",
|
|
2355
|
+
description: "\u5C0F\u98DF\u5802\u5305\u53A2\u5019\u9009\u6E05\u5355\uFF08e10-data ds list \u539F\u59CB\u8F93\u51FA\u6216 [{name,capacity}]\uFF09\uFF1B\u63D0\u4E86\u5C0F\u9910\u5385\u4F46\u6CA1\u7ED9\uFF0C\u660E\u7EC6\u4F1A\u7559\u7A7A\u5E76\u8FDB\u5F85\u529E"
|
|
2356
|
+
},
|
|
1612
2357
|
workflow: { type: "string", description: "\u76EE\u6807\u6D41\u7A0B\u540D" },
|
|
1613
2358
|
outDir: { type: "string", description: "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55" },
|
|
1614
2359
|
noUpload: { type: "boolean", description: "\u8DF3\u8FC7\u9644\u4EF6\u4E0A\u4F20\uFF0C\u53EA\u51FA\u672C\u5730\u6587\u4EF6" },
|
|
@@ -1651,7 +2396,11 @@ var receptionOperations = [
|
|
|
1651
2396
|
enum: ["inline", "popup", "drawer"],
|
|
1652
2397
|
description: "\u6253\u5F00\u5F62\u6001\uFF1Adrawer \u4E3A\u53F3\u4FA7\u62BD\u5C49\uFF08\u9ED8\u8BA4\uFF09"
|
|
1653
2398
|
},
|
|
1654
|
-
snapshot: { type: "string", description: "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84" }
|
|
2399
|
+
snapshot: { type: "string", description: "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84" },
|
|
2400
|
+
allowMissingRestaurant: {
|
|
2401
|
+
type: "boolean",
|
|
2402
|
+
description: "\u63D0\u4E86\u5C0F\u9910\u5385\u4F46\u6CA1\u5305\u53A2\u53F7\u65F6\u4ECD\u653E\u884C\uFF08\u660E\u7EC6\u7559\u7A7A\u8FDB\u5F85\u529E\uFF09\uFF1B\u9ED8\u8BA4 false\uFF0C\u7F3A\u5305\u53A2\u53F7\u76F4\u63A5\u62A5\u9519"
|
|
2403
|
+
}
|
|
1655
2404
|
}
|
|
1656
2405
|
},
|
|
1657
2406
|
outputSchema: {
|
|
@@ -1682,10 +2431,12 @@ var receptionOperations = [
|
|
|
1682
2431
|
known: { type: "object", description: "run \u5931\u6548\u65F6\u7684 7 \u9879\u62BD\u53D6\u7ED3\u679C\uFF0C\u7528\u4E8E\u73B0\u573A\u91CD\u5EFA run" },
|
|
1683
2432
|
answers: { type: "object", description: "ask_user \u9762\u677F\u56DE\u586B\u503C\uFF1A{customer_need, logistics, fields}" },
|
|
1684
2433
|
casesFile: { type: "string", description: "\u6848\u4F8B + \u4E13\u5BB6\u68C0\u7D22\u7ED3\u679C JSON \u6587\u4EF6\u8DEF\u5F84\uFF08\u8F6F\u4F9D\u8D56\uFF09" },
|
|
2434
|
+
restaurantRoomsFile: { type: "string", description: "\u5C0F\u98DF\u5802\u5305\u53A2\u5019\u9009\u6E05\u5355\uFF08e10-api ds list \u539F\u59CB\u8F93\u51FA\u6216 [{name,capacity}]\uFF09" },
|
|
1685
2435
|
workflow: { type: "string", description: "\u76EE\u6807\u6D41\u7A0B\u540D" },
|
|
1686
2436
|
outDir: { type: "string", description: "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55" },
|
|
1687
2437
|
noUpload: { type: "boolean", description: "\u8DF3\u8FC7\u9644\u4EF6\u4E0A\u4F20\uFF0C\u53EA\u51FA\u672C\u5730\u6587\u4EF6" },
|
|
1688
2438
|
snapshot: { type: "string", description: "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84\uFF1B\u540C\u65F6\u7528\u4E8E\u63A8\u5BFC\u6280\u80FD\u5305\u5185 render.py \u4F4D\u7F6E" },
|
|
2439
|
+
allowMissingRestaurant: { type: "boolean", description: "\u63D0\u4E86\u5C0F\u9910\u5385\u4F46\u786E\u5B9E\u62FF\u4E0D\u5230\u5305\u53A2\u53F7\u65F6\u653E\u884C\uFF08\u660E\u7EC6\u7559\u7A7A\u8FDB\u5F85\u529E\uFF09\uFF0C\u9ED8\u8BA4 false \u76F4\u63A5\u62A5 RESTAURANT_DETAIL_MISSING" },
|
|
1689
2440
|
renderPy: { type: "string", description: "\u663E\u5F0F\u6307\u5B9A render.py \u8DEF\u5F84" },
|
|
1690
2441
|
sdkRender: {
|
|
1691
2442
|
type: "string",
|
|
@@ -1707,6 +2458,7 @@ var receptionOperations = [
|
|
|
1707
2458
|
attachments: { type: "array", items: { type: "object" } },
|
|
1708
2459
|
attachmentPending: { type: "boolean" },
|
|
1709
2460
|
uploadDiagnostics: { type: "array", items: { type: "object" } },
|
|
2461
|
+
restaurant: { type: ["object", "null"], description: "\u5C0F\u9910\u5385\u9884\u5B9A\u660E\u7EC6\uFF08\u542B roomState / \u5019\u9009\uFF09\uFF1Bnull \u8868\u793A\u6CA1\u63D0\u8FD9\u4EF6\u4E8B" },
|
|
1710
2462
|
customParams: { type: "object" },
|
|
1711
2463
|
fieldAssignKeys: { type: "string" },
|
|
1712
2464
|
detailRowCount: { type: "integer" },
|
|
@@ -1718,6 +2470,31 @@ var receptionOperations = [
|
|
|
1718
2470
|
timings: { type: "object" }
|
|
1719
2471
|
}
|
|
1720
2472
|
}
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
name: "reception.restaurantRooms",
|
|
2476
|
+
risk: "read",
|
|
2477
|
+
summary: "\u53EA\u8BFB\u67E5\u8BE2\u300C\u5C0F\u98DF\u5802\u5305\u53A2\u300D\uFF08\u5EFA\u6A21\u8868\u5355\u5B9E\u67E5\uFF0C\u4EC5\u4E0A\u6D77\uFF09\uFF0C\u4EA7\u51FA\u53EF\u76F4\u63A5\u4F20\u7ED9 doc-render \u7684 --restaurant-rooms-file \u5019\u9009\u6E05\u5355\u3002\u5305\u53A2\u662F\u4E1A\u52A1\u6570\u636E\uFF0C\u6587\u6863\u68C0\u7D22\u641C\u4E0D\u5230\u3002",
|
|
2478
|
+
inputSchema: {
|
|
2479
|
+
type: "object",
|
|
2480
|
+
additionalProperties: false,
|
|
2481
|
+
properties: {
|
|
2482
|
+
pageSize: { type: "integer", description: "\u5355\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 200\uFF08\u540E\u7AEF name \u8FC7\u6EE4\u5F53\u524D\u65E0\u6548\uFF0C\u9760\u591A\u6293\u672C\u5730\u7B5B\uFF09" },
|
|
2483
|
+
out: { type: "string", description: "\u628A\u5019\u9009\u6E05\u5355\u5199\u5230\u8BE5\u8DEF\u5F84\u7684 JSON \u6587\u4EF6\uFF0C\u4FBF\u4E8E\u76F4\u63A5\u4F20\u7ED9 --restaurant-rooms-file" },
|
|
2484
|
+
timeoutMs: { type: "integer", description: "\u8D85\u65F6\u6BEB\u79D2\uFF0C\u9ED8\u8BA4 30000" }
|
|
2485
|
+
}
|
|
2486
|
+
},
|
|
2487
|
+
outputSchema: {
|
|
2488
|
+
type: "object",
|
|
2489
|
+
properties: {
|
|
2490
|
+
rooms: { type: "array", items: { type: "object" } },
|
|
2491
|
+
total: { type: "integer" },
|
|
2492
|
+
rawCount: { type: "integer" },
|
|
2493
|
+
file: { type: "string" },
|
|
2494
|
+
maxCapacity: { type: "integer" },
|
|
2495
|
+
timings: { type: "object" }
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
1721
2498
|
}
|
|
1722
2499
|
];
|
|
1723
2500
|
var receptionManifest = {
|
|
@@ -1839,7 +2616,7 @@ var receptionShortcut = {
|
|
|
1839
2616
|
}
|
|
1840
2617
|
await runOperation(ctx, String(operation), input, opts);
|
|
1841
2618
|
}));
|
|
1842
|
-
reception.command("ask").description("\u51FA\u4EA4\u4E92\u9762\u677F\uFF08\u7F3A\u9879\u624D\u51FA\u5C4F\uFF0C\
|
|
2619
|
+
reception.command("ask").description("\u51FA\u4EA4\u4E92\u9762\u677F\uFF08\u7F3A\u9879\u624D\u51FA\u5C4F\uFF0C\u6700\u591A 3 \u5C4F\uFF1A\u5BA2\u6237\u9700\u6C42 / \u63A5\u5F85\u7EC6\u8282 / \u662F\u5426\u4F1A\u8BAE\uFF09").option("--known <json>", "7 \u9879\u62BD\u53D6\u7ED3\u679C\uFF08\u5185\u8054 JSON\uFF09").option("--known-file <path>", "7 \u9879\u62BD\u53D6\u7ED3\u679C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--user <names>", "\u966A\u540C\u4EBA\u5458\u59D3\u540D\uFF0C\u591A\u4EBA\u9017\u53F7\u5206\u9694\uFF1B\u4E0D\u4F20\u7528\u5F53\u524D\u767B\u5F55\u4EBA\u515C\u5E95").option("--customer <name>", "\u5BA2\u6237\u540D\u79F0\uFF0C\u8986\u76D6 known.customer").option("--workflow <name>", `\u76EE\u6807\u6D41\u7A0B\u540D\uFF0C\u9ED8\u8BA4\u300C${DEFAULT_WORKFLOW}\u300D`).option("--out-dir <dir>", "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55").action(action(async (ctx, options) => {
|
|
1843
2620
|
const opts = asOptions(options);
|
|
1844
2621
|
const known = jsonArg(opts, "known", {
|
|
1845
2622
|
code: "KNOWN",
|
|
@@ -1853,13 +2630,14 @@ var receptionShortcut = {
|
|
|
1853
2630
|
workflow: textOf(opts, "workflow") || void 0
|
|
1854
2631
|
}, opts);
|
|
1855
2632
|
}));
|
|
1856
|
-
reception.command("doc").description("\u751F\u6210\u884C\u7A0B\u5355 docx + \u5185\u90E8\u53C2\u8003\u6587\u6863 md\uFF0C\u5E76\u4E0A\u4F20\u9644\u4EF6\uFF08\u96F6\u5199\u8BF7\u6C42\uFF09").option("--run-id <id>", "ask \u8FD4\u56DE\u7684 runId").option("--known <json>", "run \u5931\u6548\u65F6\u7528\u4E8E\u73B0\u573A\u91CD\u5EFA\u7684 7 \u9879\u62BD\u53D6\u7ED3\u679C").option("--known-file <path>", "\u540C\u4E0A\uFF0CJSON \u6587\u4EF6").option("--answers <json>", "\u9762\u677F\u56DE\u586B\u503C\uFF08\u5185\u8054 JSON\uFF09").option("--answers-file <path>", "\u9762\u677F\u56DE\u586B\u503C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--cases-file <path>", "\u6848\u4F8B + \u4E13\u5BB6\u68C0\u7D22\u7ED3\u679C JSON").option("--workflow <name>", "\u76EE\u6807\u6D41\u7A0B\u540D").option("--out-dir <dir>", "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55").option("--snapshot <path>", "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84\uFF08\u540C\u65F6\u7528\u4E8E\u63A8\u5BFC render.py\uFF09").option("--render-py <path>", "\u663E\u5F0F\u6307\u5B9A render.py").option("--no-upload", "\u8DF3\u8FC7\u9644\u4EF6\u4E0A\u4F20\uFF0C\u53EA\u51FA\u672C\u5730\u6587\u4EF6").action(action(async (ctx, options) => {
|
|
2633
|
+
reception.command("doc").description("\u751F\u6210\u884C\u7A0B\u5355 docx + \u5185\u90E8\u53C2\u8003\u6587\u6863 md\uFF0C\u5E76\u4E0A\u4F20\u9644\u4EF6\uFF08\u96F6\u5199\u8BF7\u6C42\uFF09").option("--run-id <id>", "ask \u8FD4\u56DE\u7684 runId").option("--known <json>", "run \u5931\u6548\u65F6\u7528\u4E8E\u73B0\u573A\u91CD\u5EFA\u7684 7 \u9879\u62BD\u53D6\u7ED3\u679C").option("--known-file <path>", "\u540C\u4E0A\uFF0CJSON \u6587\u4EF6").option("--answers <json>", "\u9762\u677F\u56DE\u586B\u503C\uFF08\u5185\u8054 JSON\uFF09").option("--answers-file <path>", "\u9762\u677F\u56DE\u586B\u503C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--cases-file <path>", "\u6848\u4F8B + \u4E13\u5BB6\u68C0\u7D22\u7ED3\u679C JSON").option("--restaurant-rooms-file <path>", "\u5C0F\u98DF\u5802\u5305\u53A2\u5019\u9009\uFF08e10-data ds list \u539F\u59CB\u8F93\u51FA\u6216 [{name,capacity}]\uFF09").option("--workflow <name>", "\u76EE\u6807\u6D41\u7A0B\u540D").option("--out-dir <dir>", "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55").option("--snapshot <path>", "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84\uFF08\u540C\u65F6\u7528\u4E8E\u63A8\u5BFC render.py\uFF09").option("--render-py <path>", "\u663E\u5F0F\u6307\u5B9A render.py").option("--no-upload", "\u8DF3\u8FC7\u9644\u4EF6\u4E0A\u4F20\uFF0C\u53EA\u51FA\u672C\u5730\u6587\u4EF6").action(action(async (ctx, options) => {
|
|
1857
2634
|
const opts = asOptions(options);
|
|
1858
2635
|
await runOperation(ctx, "reception.doc", {
|
|
1859
2636
|
runId: textOf(opts, "runId") || void 0,
|
|
1860
2637
|
known: jsonArg(opts, "known", { code: "KNOWN" }) || void 0,
|
|
1861
2638
|
answers: parseAnswers(opts) || void 0,
|
|
1862
2639
|
casesFile: textOf(opts, "casesFile") || void 0,
|
|
2640
|
+
restaurantRoomsFile: textOf(opts, "restaurantRoomsFile") || void 0,
|
|
1863
2641
|
workflow: textOf(opts, "workflow") || void 0,
|
|
1864
2642
|
outDir: textOf(opts, "outDir") || void 0,
|
|
1865
2643
|
snapshot: textOf(opts, "snapshot") || void 0,
|
|
@@ -1867,28 +2645,39 @@ var receptionShortcut = {
|
|
|
1867
2645
|
noUpload: opts.upload === false
|
|
1868
2646
|
}, opts);
|
|
1869
2647
|
}));
|
|
1870
|
-
reception.command("render").description("\u8F93\u51FA\u586B\u5355\u9875 browsertool\uFF08\u7EAF\u672C\u5730\uFF0C\u4E0D\u8C03\u63A5\u53E3\uFF09").option("--run-id <id>", "ask / doc \u8FD4\u56DE\u7684 runId").option("--answers <json>", "\u9762\u677F\u56DE\u586B\u503C\uFF08\u5185\u8054 JSON\uFF09").option("--answers-file <path>", "\u9762\u677F\u56DE\u586B\u503C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--attachment-fileid <ids>", "\u9644\u4EF6 fileid\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").option("--sdk-render <type>", "\u6253\u5F00\u5F62\u6001\uFF1Ainline / popup / drawer\uFF08\u9ED8\u8BA4 drawer\uFF09").option("--snapshot <path>", "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84").action(action(async (ctx, options) => {
|
|
2648
|
+
reception.command("render").description("\u8F93\u51FA\u586B\u5355\u9875 browsertool\uFF08\u7EAF\u672C\u5730\uFF0C\u4E0D\u8C03\u63A5\u53E3\uFF09").option("--run-id <id>", "ask / doc \u8FD4\u56DE\u7684 runId").option("--answers <json>", "\u9762\u677F\u56DE\u586B\u503C\uFF08\u5185\u8054 JSON\uFF09").option("--answers-file <path>", "\u9762\u677F\u56DE\u586B\u503C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--attachment-fileid <ids>", "\u9644\u4EF6 fileid\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").option("--sdk-render <type>", "\u6253\u5F00\u5F62\u6001\uFF1Ainline / popup / drawer\uFF08\u9ED8\u8BA4 drawer\uFF09").option("--snapshot <path>", "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84").option("--allow-missing-restaurant", "\u63D0\u4E86\u5C0F\u9910\u5385\u4F46\u6CA1\u5305\u53A2\u53F7\u65F6\u4ECD\u653E\u884C\uFF08\u660E\u7EC6\u7559\u7A7A\u8FDB\u5F85\u529E\uFF09").action(action(async (ctx, options) => {
|
|
1871
2649
|
const opts = asOptions(options);
|
|
1872
2650
|
await runOperation(ctx, "reception.render", {
|
|
1873
2651
|
runId: textOf(opts, "runId") || void 0,
|
|
1874
2652
|
answers: parseAnswers(opts) || void 0,
|
|
1875
2653
|
attachmentFileid: textOf(opts, "attachmentFileid") || void 0,
|
|
1876
2654
|
sdkRender: textOf(opts, "sdkRender") || void 0,
|
|
1877
|
-
snapshot: textOf(opts, "snapshot") || void 0
|
|
2655
|
+
snapshot: textOf(opts, "snapshot") || void 0,
|
|
2656
|
+
allowMissingRestaurant: opts.allowMissingRestaurant === true
|
|
2657
|
+
}, opts);
|
|
2658
|
+
}));
|
|
2659
|
+
reception.command("restaurant-rooms").description("\u53EA\u8BFB\u67E5\u8BE2\u300C\u5C0F\u98DF\u5802\u5305\u53A2\u300D\uFF08\u5EFA\u6A21\u8868\u5355\u5B9E\u67E5\uFF0C\u4EC5\u4E0A\u6D77\uFF09\uFF0C\u4EA7\u51FA\u53EF\u76F4\u63A5\u4F20\u7ED9 doc-render \u7684\u5019\u9009").option("--page-size <n>", "\u5355\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 200\uFF08\u540E\u7AEF name \u8FC7\u6EE4\u65E0\u6548\uFF0C\u9760\u591A\u6293\u672C\u5730\u7B5B\uFF09").option("--out <path>", "\u628A\u5019\u9009\u6E05\u5355\u5199\u5230\u8BE5 JSON \u6587\u4EF6\uFF0C\u4FBF\u4E8E\u76F4\u63A5\u4F20\u7ED9 --restaurant-rooms-file").option("--timeout-ms <n>", "\u8D85\u65F6\u6BEB\u79D2\uFF0C\u9ED8\u8BA4 30000").action(action(async (ctx, options) => {
|
|
2660
|
+
const opts = asOptions(options);
|
|
2661
|
+
await runOperation(ctx, "reception.restaurantRooms", {
|
|
2662
|
+
pageSize: textOf(opts, "pageSize") ? Number(textOf(opts, "pageSize")) : void 0,
|
|
2663
|
+
out: textOf(opts, "out") || void 0,
|
|
2664
|
+
timeoutMs: textOf(opts, "timeoutMs") ? Number(textOf(opts, "timeoutMs")) : void 0
|
|
1878
2665
|
}, opts);
|
|
1879
2666
|
}));
|
|
1880
|
-
reception.command("doc-render").description("\u4E00\u6B21\u5B8C\u6210\u300C\u51FA\u4EF6 + \u4F20\u9644\u4EF6 + \u62FC\u586B\u5355\u53C2\u6570\u300D\uFF08doc \u4E0E render \u5408\u5E76\uFF0C\u7701\u4E00\u6B21\u5DE5\u5177\u5F80\u8FD4\uFF09").option("--run-id <id>", "ask \u8FD4\u56DE\u7684 runId").option("--known <json>", "run \u5931\u6548\u65F6\u7528\u4E8E\u73B0\u573A\u91CD\u5EFA\u7684 7 \u9879\u62BD\u53D6\u7ED3\u679C").option("--known-file <path>", "\u540C\u4E0A\uFF0CJSON \u6587\u4EF6").option("--answers <json>", "\u9762\u677F\u56DE\u586B\u503C\uFF08\u5185\u8054 JSON\uFF09").option("--answers-file <path>", "\u9762\u677F\u56DE\u586B\u503C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--cases-file <path>", "\u6848\u4F8B + \u4E13\u5BB6\u68C0\u7D22\u7ED3\u679C JSON").option("--workflow <name>", "\u76EE\u6807\u6D41\u7A0B\u540D").option("--out-dir <dir>", "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55").option("--snapshot <path>", "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84\uFF08\u540C\u65F6\u7528\u4E8E\u63A8\u5BFC render.py\uFF09").option("--render-py <path>", "\u663E\u5F0F\u6307\u5B9A render.py").option("--no-upload", "\u8DF3\u8FC7\u9644\u4EF6\u4E0A\u4F20\uFF0C\u53EA\u51FA\u672C\u5730\u6587\u4EF6").option("--sdk-render <type>", "\u6253\u5F00\u5F62\u6001\uFF1Ainline / popup / drawer\uFF08\u9ED8\u8BA4 drawer\uFF09").action(action(async (ctx, options) => {
|
|
2667
|
+
reception.command("doc-render").description("\u4E00\u6B21\u5B8C\u6210\u300C\u51FA\u4EF6 + \u4F20\u9644\u4EF6 + \u62FC\u586B\u5355\u53C2\u6570\u300D\uFF08doc \u4E0E render \u5408\u5E76\uFF0C\u7701\u4E00\u6B21\u5DE5\u5177\u5F80\u8FD4\uFF09").option("--run-id <id>", "ask \u8FD4\u56DE\u7684 runId").option("--known <json>", "run \u5931\u6548\u65F6\u7528\u4E8E\u73B0\u573A\u91CD\u5EFA\u7684 7 \u9879\u62BD\u53D6\u7ED3\u679C").option("--known-file <path>", "\u540C\u4E0A\uFF0CJSON \u6587\u4EF6").option("--answers <json>", "\u9762\u677F\u56DE\u586B\u503C\uFF08\u5185\u8054 JSON\uFF09").option("--answers-file <path>", "\u9762\u677F\u56DE\u586B\u503C\uFF08JSON \u6587\u4EF6\uFF0C\u63A8\u8350\uFF09").option("--cases-file <path>", "\u6848\u4F8B + \u4E13\u5BB6\u68C0\u7D22\u7ED3\u679C JSON").option("--restaurant-rooms-file <path>", "\u5C0F\u98DF\u5802\u5305\u53A2\u5019\u9009\uFF08e10-data ds list \u539F\u59CB\u8F93\u51FA\u6216 [{name,capacity}]\uFF09").option("--workflow <name>", "\u76EE\u6807\u6D41\u7A0B\u540D").option("--out-dir <dir>", "\u4EA7\u7269\u8F93\u51FA\u76EE\u5F55").option("--snapshot <path>", "\u5B57\u6BB5\u5FEB\u7167\u8DEF\u5F84\uFF08\u540C\u65F6\u7528\u4E8E\u63A8\u5BFC render.py\uFF09").option("--render-py <path>", "\u663E\u5F0F\u6307\u5B9A render.py").option("--no-upload", "\u8DF3\u8FC7\u9644\u4EF6\u4E0A\u4F20\uFF0C\u53EA\u51FA\u672C\u5730\u6587\u4EF6").option("--allow-missing-restaurant", "\u63D0\u4E86\u5C0F\u9910\u5385\u4F46\u6CA1\u5305\u53A2\u53F7\u65F6\u4ECD\u653E\u884C\uFF08\u660E\u7EC6\u7559\u7A7A\u8FDB\u5F85\u529E\uFF09").option("--sdk-render <type>", "\u6253\u5F00\u5F62\u6001\uFF1Ainline / popup / drawer\uFF08\u9ED8\u8BA4 drawer\uFF09").action(action(async (ctx, options) => {
|
|
1881
2668
|
const opts = asOptions(options);
|
|
1882
2669
|
await runOperation(ctx, "reception.docRender", {
|
|
1883
2670
|
runId: textOf(opts, "runId") || void 0,
|
|
1884
2671
|
known: jsonArg(opts, "known", { code: "KNOWN" }) || void 0,
|
|
1885
2672
|
answers: parseAnswers(opts) || void 0,
|
|
1886
2673
|
casesFile: textOf(opts, "casesFile") || void 0,
|
|
2674
|
+
restaurantRoomsFile: textOf(opts, "restaurantRoomsFile") || void 0,
|
|
1887
2675
|
workflow: textOf(opts, "workflow") || void 0,
|
|
1888
2676
|
outDir: textOf(opts, "outDir") || void 0,
|
|
1889
2677
|
snapshot: textOf(opts, "snapshot") || void 0,
|
|
1890
2678
|
renderPy: textOf(opts, "renderPy") || void 0,
|
|
1891
2679
|
noUpload: opts.upload === false,
|
|
2680
|
+
allowMissingRestaurant: opts.allowMissingRestaurant === true,
|
|
1892
2681
|
sdkRender: textOf(opts, "sdkRender") || void 0
|
|
1893
2682
|
}, opts);
|
|
1894
2683
|
}));
|