weaver-work-cli 0.1.44 → 0.1.45

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.
Files changed (179) hide show
  1. package/README.md +9 -5
  2. package/dist/chunks/{archive-P6TBQGKL.js → archive-ZQ4A4TV6.js} +388 -44
  3. package/dist/chunks/{archive-oa-7TQ2NXOH.js → archive-oa-BBDP7AKJ.js} +2 -2
  4. package/dist/chunks/{asset-3ELRG37G.js → asset-ZOJVBWZH.js} +2 -2
  5. package/dist/chunks/{asset-idle-WIGMUFMD.js → asset-idle-XGB5IPGT.js} +2 -2
  6. package/dist/chunks/{attachment-content-E3276UOV.js → attachment-content-CE3GMWTS.js} +3 -3
  7. package/dist/chunks/{blog-C5NMZAAC.js → blog-QSHLZSFW.js} +2 -2
  8. package/dist/chunks/caizhilian-KCQYFH72.js +204 -0
  9. package/dist/chunks/{calendar-FI2WNSBO.js → calendar-DLGMRJQA.js} +2 -2
  10. package/dist/chunks/{chunk-CWYGFU5B.js → chunk-3WBIQLMB.js} +2 -2
  11. package/dist/chunks/{chunk-PUQS5MWL.js → chunk-3YV7PKRL.js} +1 -1
  12. package/dist/chunks/{chunk-PC7VKEB5.js → chunk-3ZMAQQ3W.js} +161 -33
  13. package/dist/chunks/{chunk-GM6J7Q4B.js → chunk-4EXOIQDI.js} +40 -10
  14. package/dist/chunks/{chunk-ETNJSKMM.js → chunk-6NXT4ICB.js} +148 -21
  15. package/dist/chunks/chunk-762M5XJS.js +215 -0
  16. package/dist/chunks/{chunk-GAMZLAG2.js → chunk-77YP6I52.js} +1 -1
  17. package/dist/chunks/{chunk-WSF4NNMR.js → chunk-CZNZKOHR.js} +2 -2
  18. package/dist/chunks/{chunk-Z7VYWPZV.js → chunk-DGMYACGJ.js} +1 -1
  19. package/dist/chunks/{chunk-TA7FXXJD.js → chunk-DLY5GUXX.js} +1 -1
  20. package/dist/chunks/{chunk-BCVYBYYT.js → chunk-GR76ZDDX.js} +2 -2
  21. package/dist/chunks/{chunk-GRDRG6HP.js → chunk-HFXK54M4.js} +2 -2
  22. package/dist/chunks/{chunk-XNIK66I4.js → chunk-JB34OE7R.js} +790 -77
  23. package/dist/chunks/{chunk-QVSWRLLU.js → chunk-JWWTI63L.js} +55 -5
  24. package/dist/chunks/{chunk-FRZKBMSW.js → chunk-LGKWL4OH.js} +176 -39
  25. package/dist/chunks/{chunk-XHK4MDR5.js → chunk-LRCPNDZA.js} +38 -6
  26. package/dist/chunks/{chunk-OF4S23UB.js → chunk-LXFVWZLM.js} +4 -4
  27. package/dist/chunks/{chunk-D4ADSZ7H.js → chunk-O6CMPO65.js} +24 -1
  28. package/dist/chunks/{chunk-N4M2DDFE.js → chunk-OAE3AZBQ.js} +11 -11
  29. package/dist/chunks/chunk-P5GQRWDC.js +60 -0
  30. package/dist/chunks/{caizhilian-5XSM2DFP.js → chunk-PGO4ILMQ.js} +41 -521
  31. package/dist/chunks/{chunk-HIT4Y6OI.js → chunk-T4MWQAQB.js} +7 -5
  32. package/dist/chunks/{chunk-F4E4EM35.js → chunk-TGAGQV4I.js} +2 -2
  33. package/dist/chunks/{chunk-UFIT2UU3.js → chunk-U6R6FZHD.js} +168 -14
  34. package/dist/chunks/{chunk-FAZTGX7S.js → chunk-VIMCY4DI.js} +5 -5
  35. package/dist/chunks/chunk-VRPH24IC.js +76 -0
  36. package/dist/chunks/{chunk-3YBDYOC4.js → chunk-YIKSL36S.js} +2 -2
  37. package/dist/chunks/{chunk-IAZ3UPY6.js → chunk-Z6UUBY37.js} +2 -2
  38. package/dist/chunks/{conflict-ARLSZJ6V.js → conflict-IYJETSGT.js} +2 -2
  39. package/dist/chunks/continuation-GW6PRWK3.js +12 -0
  40. package/dist/chunks/{contract-DNIIW5VJ.js → contract-3QLAGYQL.js} +5793 -4591
  41. package/dist/chunks/{cowork-GMLRGVIW.js → cowork-3ACICHDQ.js} +2 -2
  42. package/dist/chunks/{create-flow-J22BO65E.js → create-flow-7JLC7UID.js} +6 -6
  43. package/dist/chunks/{ebuilder-form-ANV2FHYV.js → ebuilder-form-GWDTKEI2.js} +5 -5
  44. package/dist/chunks/{ehr-GSTGAIY3.js → ehr-MYRDCHZ4.js} +121 -49
  45. package/dist/chunks/{employee-22BGJ3QS.js → employee-NOHNXC46.js} +1 -1
  46. package/dist/chunks/{env-BX3VRFS7.js → env-3MBHAWBL.js} +2 -2
  47. package/dist/chunks/{esb-ATAIASX2.js → esb-4BQHNP5C.js} +4 -4
  48. package/dist/chunks/{factory-PETTFME6.js → factory-TZEVU4DU.js} +1 -1
  49. package/dist/chunks/{fna-YEKBSFSX.js → fna-ZVB2IILI.js} +2 -2
  50. package/dist/chunks/{group-chat-BFVXAYFX.js → group-chat-KL3HFKRM.js} +3 -3
  51. package/dist/chunks/{host-WIKN2EJ5.js → host-3TNBMDTR.js} +3 -3
  52. package/dist/chunks/host-7NTIBSPK.js +25 -0
  53. package/dist/chunks/{host-SZGV4UNT.js → host-7OWWPLM4.js} +3 -3
  54. package/dist/chunks/{host-HRBXEPDQ.js → host-G3VU7SDW.js} +3 -3
  55. package/dist/chunks/{host-LR55CTHP.js → host-M4XP5URR.js} +3 -3
  56. package/dist/chunks/{host-SUOY6VYQ.js → host-TUOIOEMC.js} +3 -3
  57. package/dist/chunks/{hrm-NRDO4W5G.js → hrm-UNKCCCGP.js} +5 -5
  58. package/dist/chunks/{im-IQ2HN23S.js → im-NJB7ZYMH.js} +3 -3
  59. package/dist/chunks/{invoice-MNRW76PP.js → invoice-OQP3TMKQ.js} +3 -3
  60. package/dist/chunks/{jiuchuanhui-DTRBAX4N.js → jiuchuanhui-ASFZBMPU.js} +2 -2
  61. package/dist/chunks/{lazy-dispatch-ZVWAI25B.js → lazy-dispatch-UH6HGK2I.js} +4 -4
  62. package/dist/chunks/{mail-ZVAUXOJA.js → mail-M3HJF5ER.js} +2 -2
  63. package/dist/chunks/{meeting-FEVPZ67S.js → meeting-C67EHQ4Z.js} +12 -12
  64. package/dist/chunks/{okr-SDH3E5RA.js → okr-EVX7FB5G.js} +2 -2
  65. package/dist/chunks/operations-J7PUIVWZ.js +15 -0
  66. package/dist/chunks/{plan-E35JFDI7.js → plan-2QJQEPBO.js} +2 -2
  67. package/dist/chunks/{project-73QXBAB2.js → project-XELELW2T.js} +2 -2
  68. package/dist/chunks/{reception-UWZVACBN.js → reception-5WITA44R.js} +2 -2
  69. package/dist/chunks/{recruit-stage-4MAOCKFY.js → recruit-stage-AHY5QAMF.js} +450 -117
  70. package/dist/chunks/{registry-JDUS4E7D.js → registry-AQVGHUM6.js} +2 -2
  71. package/dist/chunks/{registry-KNKSCJNT.js → registry-QJCZ2GVG.js} +4 -4
  72. package/dist/chunks/{registry-PO7SI256.js → registry-VWXWPVAG.js} +2 -2
  73. package/dist/chunks/{registry-IM5G23LS.js → registry-XPWPGHYE.js} +10 -10
  74. package/dist/chunks/{room-recommend-H7KLXA5R.js → room-recommend-CNWE5WQK.js} +6 -4
  75. package/dist/chunks/{schedule-ESZIBAUO.js → schedule-YYNYBQIE.js} +4 -4
  76. package/dist/chunks/{workflow-CWJFJLQU.js → workflow-BSYT5TGL.js} +6 -4
  77. package/dist/index.js +30 -30
  78. package/dist/internal/e10/auth/commands.js +32 -0
  79. package/dist/internal/e10/auth/error-log.js +156 -26
  80. package/dist/internal/e10/auth/xiaoe.js +176 -13
  81. package/dist/internal/e10/context.js +12 -1
  82. package/dist/shortcuts/archive/operations/borrow-list.js +105 -14
  83. package/dist/shortcuts/archive/operations/flow-url.js +182 -22
  84. package/dist/shortcuts/archive/operations/getPageUrl.js +75 -0
  85. package/dist/shortcuts/archive/operations/prelib.js +33 -4
  86. package/dist/shortcuts/archive/operations/shared.js +52 -0
  87. package/dist/shortcuts/contract/host.js +111 -4
  88. package/dist/shortcuts/contract/index.js +19 -0
  89. package/dist/shortcuts/contract/manifest.js +125 -0
  90. package/dist/shortcuts/contract/ooxml/clause-insert.js +249 -0
  91. package/dist/shortcuts/contract/operations/clause-insert.js +56 -0
  92. package/dist/shortcuts/contract/operations/customer.js +192 -0
  93. package/dist/shortcuts/contract/operations/file-download.js +75 -0
  94. package/dist/shortcuts/contract/operations/flow.js +44 -2
  95. package/dist/shortcuts/contract/operations/form-info.js +162 -62
  96. package/dist/shortcuts/contract/operations/registry.js +8 -0
  97. package/dist/shortcuts/contract/operations/review.js +116 -1
  98. package/dist/shortcuts/contract/operations/summary.js +177 -0
  99. package/dist/shortcuts/contract/operations/upload.js +64 -4
  100. package/dist/shortcuts/contract/upload-cache.js +104 -0
  101. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +4 -2
  102. package/dist/shortcuts/ehr/operations/recruit-position.js +136 -35
  103. package/dist/shortcuts/ehr/operations/recruit-write.js +17 -18
  104. package/dist/shortcuts/ehr/operations/recruit.js +17 -5
  105. package/dist/shortcuts/hrm/operations/employee.js +29 -1
  106. package/dist/shortcuts/meeting/operations/eb/create-flow.js +182 -58
  107. package/dist/shortcuts/meeting/operations/eb/draft-memory.js +56 -0
  108. package/dist/shortcuts/meeting/operations/eb/factory.js +58 -3
  109. package/dist/shortcuts/meeting/operations/eb/person-cache.js +2 -2
  110. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +47 -5
  111. package/dist/shortcuts/meeting/operations/invitation-publish.js +132 -0
  112. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  113. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +86 -16
  114. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +6 -4
  115. package/dist/shortcuts/recruit-stage/operations/jd-create.js +208 -56
  116. package/dist/shortcuts/recruit-stage/operations/resume-import.js +42 -16
  117. package/dist/shortcuts/recruit-stage/shared.js +161 -18
  118. package/dist/shortcuts/workflow/index.js +2 -0
  119. package/dist/shortcuts/workflow/operations/read.js +8 -3
  120. package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +92 -5
  121. package/dist/shortcuts/workflow/operations/todoSmartConvert/priorityExpr.js +509 -0
  122. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +22 -1
  123. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +32 -6
  124. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +57 -11
  125. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +165 -52
  126. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +57 -14
  127. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +44 -18
  128. package/docs/contract.md +1 -0
  129. package/docs/e10-auth.md +4 -2
  130. package/docs/todo-smart-convert/data-contract.md +7 -0
  131. package/package.json +1 -1
  132. package/skill-template/domains/jinchengda.md +2 -0
  133. package/skills/weaver-e10-jinchengda/SKILL.md +198 -205
  134. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +759 -0
  135. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +250 -0
  136. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +146 -7
  137. package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +178 -0
  138. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +75 -0
  139. package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +137 -0
  140. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +163 -0
  141. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +52 -3
  142. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +92 -5
  143. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +602 -0
  144. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +209 -0
  145. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +126 -0
  146. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +312 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +555 -0
  148. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +47 -12
  149. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +469 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +154 -1
  151. package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +224 -0
  152. package/skills/weaver-e10-jinchengda/references/orchestration.md +355 -0
  153. package/skills/weaver-e10-jucailin/references/recruit-create.md +5 -3
  154. package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -2
  155. package/skills/weaver-e10-meeting/SKILL.md +57 -9
  156. package/skills/weaver-e10-recruit-stage/SKILL.md +11 -6
  157. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +10 -2
  158. package/skills/weaver-e10-recruit-stage/references/position-templates.md +3 -1
  159. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +13 -1
  160. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -18
  161. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +27 -14
  162. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +7 -1
  163. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +4 -2
  164. package/skills/weaver-e10-wenshuding/SKILL.md +17 -7
  165. package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +28 -0
  166. package/skills/weaver-e10-wenshuding/references/archive-flow.md +24 -8
  167. package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +3 -0
  168. package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +4 -0
  169. package/skills/weaver-e10-wenshuding/references/archive-search.md +3 -1
  170. package/skills/weaver-e10-workflow/SKILL.md +19 -17
  171. package/skills/weaver-e10-workflow/aigroup/default.json +10 -6
  172. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +36 -3
  173. package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
  174. package/skills/weaver-e10-workflow/references/workflow-query.md +9 -6
  175. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +152 -1
  176. package/skills/weaver-e10-yimiaoban/SKILL.md +17 -5
  177. package/skills/weaver-e10-yimiaoban/references/msg-write.md +30 -0
  178. package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +72 -0
  179. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
@@ -2,33 +2,33 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingEbGroupChatOperations
5
- } from "./chunk-N4M2DDFE.js";
5
+ } from "./chunk-OAE3AZBQ.js";
6
6
  import {
7
7
  meetingEbCreateFlowOperations
8
- } from "./chunk-FRZKBMSW.js";
8
+ } from "./chunk-LGKWL4OH.js";
9
9
  import {
10
10
  ebRoomRecommendOperation,
11
11
  recommendRooms,
12
12
  rememberFrequentRoom
13
- } from "./chunk-GM6J7Q4B.js";
13
+ } from "./chunk-4EXOIQDI.js";
14
14
  import {
15
15
  meetingEbScheduleOperations
16
- } from "./chunk-FAZTGX7S.js";
16
+ } from "./chunk-VIMCY4DI.js";
17
17
  import {
18
18
  ebMeetingWritePreflight,
19
19
  meetingEbConflictOperations
20
- } from "./chunk-OF4S23UB.js";
20
+ } from "./chunk-LXFVWZLM.js";
21
21
  import {
22
22
  PENDING_MARK,
23
23
  listMeetingAttachments,
24
24
  meetingAttachmentContentOperations,
25
25
  renderDocx
26
- } from "./chunk-CWYGFU5B.js";
26
+ } from "./chunk-3WBIQLMB.js";
27
27
  import {
28
28
  meetingEnvOperations,
29
29
  meetingStateDir,
30
30
  resolveMeetingEnvMode
31
- } from "./chunk-GAMZLAG2.js";
31
+ } from "./chunk-77YP6I52.js";
32
32
  import {
33
33
  EB_BASE,
34
34
  EB_ENDPOINTS,
@@ -60,7 +60,7 @@ import {
60
60
  toIdString,
61
61
  verifyLease,
62
62
  writeBody
63
- } from "./chunk-QVSWRLLU.js";
63
+ } from "./chunk-JWWTI63L.js";
64
64
  import {
65
65
  CONTINUATION_TTL_SECONDS
66
66
  } from "./chunk-7BDPM5ST.js";
@@ -2224,7 +2224,7 @@ var meetingAttachmentAttach = {
2224
2224
  if (mode === "append" && existingIds.length === 0) {
2225
2225
  existingIds.push(...beforeIds);
2226
2226
  }
2227
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
2227
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
2228
2228
  const list = getMeetingOperation2("meeting.eb.meeting.list");
2229
2229
  let fileId = incomingFileId;
2230
2230
  let name = String(args.name ?? "").trim();
@@ -2312,7 +2312,7 @@ function textOf(value) {
2312
2312
  return value === void 0 || value === null ? "" : String(value);
2313
2313
  }
2314
2314
  async function readMinute(env, id) {
2315
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
2315
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
2316
2316
  const detail = getMeetingOperation2("meeting.eb.minute.detail");
2317
2317
  const result = await detail.handler({ id }, env);
2318
2318
  const row = result?.data?.data;
@@ -2391,7 +2391,7 @@ var meetingMinuteWriteContent = {
2391
2391
  } else {
2392
2392
  statusReason = "\u4EC5\u6E05\u7A7A\u5185\u5BB9\uFF0C\u672A\u6539\u72B6\u6001";
2393
2393
  }
2394
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
2394
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
2395
2395
  const prepare = getMeetingOperation2("meeting.eb.minute.update.prepare");
2396
2396
  const apply = getMeetingOperation2("meeting.eb.minute.update.apply");
2397
2397
  const prepared = await prepare.handler({ id, mt_id: mtId, ...patch }, env);
@@ -2750,7 +2750,7 @@ var meetingMinuteFromGroupChat = {
2750
2750
  const mtId = textOf2(args.mt_id).trim();
2751
2751
  if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
2752
2752
  const pipeline = ["text", "minutes", "document"].includes(args.pipeline) ? args.pipeline : "text";
2753
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
2753
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
2754
2754
  const ctx = env.ctx;
2755
2755
  let stepStart = Date.now();
2756
2756
  const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
@@ -2774,7 +2774,7 @@ var meetingMinuteFromGroupChat = {
2774
2774
  }
2775
2775
  mark("readMeeting", stepStart);
2776
2776
  const pullStart = Date.now();
2777
- const { createImHost } = await import("./host-LR55CTHP.js");
2777
+ const { createImHost } = await import("./host-M4XP5URR.js");
2778
2778
  const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
2779
2779
  const { getImOperation } = await import("./registry-PVUZQDDQ.js");
2780
2780
  const imEnv = { ctx, host: createImHost(ctx), continuation: createImContinuationSigner(ctx) };
@@ -2844,7 +2844,7 @@ var meetingMinuteFromGroupChat = {
2844
2844
  try {
2845
2845
  const { readFile: readFile4 } = await import("node:fs/promises");
2846
2846
  const buffer = await readFile4(file);
2847
- const { extractText } = await import("./attachment-content-E3276UOV.js");
2847
+ const { extractText } = await import("./attachment-content-CE3GMWTS.js");
2848
2848
  const extracted = extractText(buffer, file, "");
2849
2849
  if (extracted.text.trim()) {
2850
2850
  extraSections.push(`\u3010\u6750\u6599\uFF1A${file.split(/[\\/]/).pop() ?? file}\u3011
@@ -2973,9 +2973,9 @@ ${groupTranscript}` : ""
2973
2973
  if (!employeeId) {
2974
2974
  warnings.push("\u672A\u53D6\u5230 ESB \u89E6\u53D1\u4EBA id\uFF08employeeId\uFF09\uFF0C\u5DF2\u8DF3\u8FC7\u540E\u7EED ESB \u8C03\u7528");
2975
2975
  } else {
2976
- const { createEsbHost } = await import("./host-WIKN2EJ5.js");
2976
+ const { createEsbHost } = await import("./host-3TNBMDTR.js");
2977
2977
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
2978
- const { getEsbOperation } = await import("./registry-KNKSCJNT.js");
2978
+ const { getEsbOperation } = await import("./registry-QJCZ2GVG.js");
2979
2979
  const esbEnv = { ctx, host: createEsbHost(ctx), continuation: createEsbContinuationSigner(ctx) };
2980
2980
  const prepareOp = getEsbOperation("esb.trigger.prepare");
2981
2981
  const applyOp = getEsbOperation("esb.trigger.apply");
@@ -3163,7 +3163,7 @@ var meetingDecisionNotifyGroup = {
3163
3163
  const warnings = [];
3164
3164
  const mtId = textOf3(args.mt_id).trim();
3165
3165
  if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
3166
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
3166
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
3167
3167
  const ctx = env.ctx;
3168
3168
  const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
3169
3169
  { mt_id: mtId, pageNo: 1, pageSize: 1 },
@@ -3227,7 +3227,7 @@ var meetingDecisionNotifyGroup = {
3227
3227
  charCount: formatted.text.length,
3228
3228
  text: formatted.text
3229
3229
  };
3230
- const { createImHost } = await import("./host-LR55CTHP.js");
3230
+ const { createImHost } = await import("./host-M4XP5URR.js");
3231
3231
  const imHost = createImHost(ctx);
3232
3232
  let displayText = formatted.text;
3233
3233
  let wireText = formatted.text;
@@ -3465,7 +3465,7 @@ var meetingPipelineRun = {
3465
3465
  const needsConfirm = level === "tasks" || level === "notify";
3466
3466
  const confirmed = args.confirm === true;
3467
3467
  const executedLevel = needsConfirm && !confirmed ? "document" : level;
3468
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
3468
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
3469
3469
  const ctx = env.ctx;
3470
3470
  let stepStart = Date.now();
3471
3471
  const reuseMinuteId = textOf4(args.minuteId).trim();
@@ -3534,8 +3534,8 @@ var meetingPipelineRun = {
3534
3534
  ]);
3535
3535
  }
3536
3536
  stepStart = Date.now();
3537
- const { createHrmHost } = await import("./host-HRBXEPDQ.js");
3538
- const { getHrmOperation } = await import("./registry-PO7SI256.js");
3537
+ const { createHrmHost } = await import("./host-G3VU7SDW.js");
3538
+ const { getHrmOperation } = await import("./registry-VWXWPVAG.js");
3539
3539
  const hrmEnv = { ctx, host: createHrmHost(ctx) };
3540
3540
  const queryOp = getHrmOperation("hrm.employee.query");
3541
3541
  const resolved = [];
@@ -3837,7 +3837,7 @@ function formatTimeRange(start, end) {
3837
3837
  }
3838
3838
  async function loadAgendaFromTopics(env, mtId) {
3839
3839
  try {
3840
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
3840
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
3841
3841
  const operation = getMeetingOperation2("meeting.eb.topic.list");
3842
3842
  const result = await operation.handler({ mt_id: mtId, pageNo: 1, pageSize: 200 }, env);
3843
3843
  const rows = result.data?.rows ?? [];
@@ -3917,7 +3917,7 @@ function flattenFieldValue(raw) {
3917
3917
  }
3918
3918
  async function resolveIssuerOrganization(env, creatorId) {
3919
3919
  try {
3920
- const { hrmEmployeeOperations } = await import("./employee-22BGJ3QS.js");
3920
+ const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
3921
3921
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
3922
3922
  if (!batch) return null;
3923
3923
  const result = await batch.handler({ ids: [creatorId] }, env);
@@ -3939,7 +3939,7 @@ async function resolveSessionUserName(env) {
3939
3939
  const session = await env.host.getSession();
3940
3940
  const userId = String(session?.userId ?? "").trim();
3941
3941
  if (!userId) return "";
3942
- const { hrmEmployeeOperations } = await import("./employee-22BGJ3QS.js");
3942
+ const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
3943
3943
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
3944
3944
  if (!batch) return "";
3945
3945
  const result = await batch.handler({ ids: [userId] }, env);
@@ -3975,7 +3975,7 @@ async function supplementRowFromDetail(row, mtId, env) {
3975
3975
  const missing = DETAIL_FALLBACK_KEYS.filter((key) => isBlank(row[key]));
3976
3976
  if (missing.length === 0) return { row, filled: [] };
3977
3977
  try {
3978
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
3978
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
3979
3979
  const detailOperation = getMeetingOperation2("meeting.eb.meeting.detail");
3980
3980
  const result = await detailOperation.handler({ id: mtId }, env);
3981
3981
  const flat = result?.data?.data ?? result?.data ?? {};
@@ -4149,7 +4149,7 @@ var meetingInvitationRender = {
4149
4149
  };
4150
4150
  dataSource = "payload";
4151
4151
  } else {
4152
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
4152
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
4153
4153
  const listOperation = getMeetingOperation2("meeting.eb.meeting.list");
4154
4154
  try {
4155
4155
  const listed = await listOperation.handler({ mt_id: mtId, pageNo: 1, pageSize: 1 }, env);
@@ -4266,6 +4266,133 @@ var meetingInvitationRender = {
4266
4266
  };
4267
4267
  var meetingInvitationOperations = [meetingInvitationRender];
4268
4268
 
4269
+ // src/shortcuts/meeting/operations/invitation-publish.ts
4270
+ import { win32 } from "node:path";
4271
+ var DEFAULT_FOLDER_ID = "300";
4272
+ var DEFAULT_FOLDER_TYPE = "company";
4273
+ function normalizeWinPath(path) {
4274
+ return win32.normalize(path);
4275
+ }
4276
+ var meetingInvitationPublish = {
4277
+ name: "meeting.invitation.publish",
4278
+ resource: "invitation",
4279
+ method: "publish",
4280
+ action: "meeting.invitation.publish",
4281
+ summary: '\u751F\u6210\u9080\u8BF7\u51FD\u5E76**\u53D1\u5E03\u6210 E10 \u6587\u6863**\uFF1A\u6A21\u677F\u586B\u5145 \u2192 \u4E0A\u4F20\u5230\u6587\u6863\u4E2D\u5FC3\uFF08\u9ED8\u8BA4\u76EE\u5F55 300\uFF09\u2192 \u8FD4\u56DE docId\u3002\u62FF\u5230\u540E\u628A `extraFields: {"\u9080\u8BF7\u51FD":[{"id":docId,"name":\u6587\u6863\u540D}]}` \u4F20\u7ED9\u5EFA\u4F1A\u63A5\u53E3\u5373\u53EF\u5199\u8FDB\u8868\u5355\u3002\u4F1A\u771F\u5B9E\u521B\u5EFA\u6587\u6863\uFF08\u9700 confirm: true\uFF09\u3002',
4282
+ capability: "invitation",
4283
+ risk: "high-risk-write",
4284
+ inputSchema: {
4285
+ type: "object",
4286
+ additionalProperties: false,
4287
+ properties: {
4288
+ mtId: { ...SCHEMA_ID, description: "\u4F1A\u8BAE id\uFF08\u4E0E\u4E0B\u9762\u5B57\u6BB5\u4E8C\u9009\u4E00\uFF09\uFF1A\u6709\u5219\u6309\u771F\u5B9E\u4F1A\u8BAE\u6570\u636E\u751F\u6210" },
4289
+ mt_name: { type: "string", description: "\u4F1A\u8BAE\u540D\u79F0\uFF08\u65E0 mtId \u65F6\u5FC5\u586B\uFF09" },
4290
+ begin_datetime: { type: "string", description: "\u5F00\u59CB\u65F6\u95F4 yyyy-MM-dd HH:mm" },
4291
+ end_datetime: { type: "string", description: "\u7ED3\u675F\u65F6\u95F4 yyyy-MM-dd HH:mm" },
4292
+ address: { type: "string", description: "\u4F1A\u8BAE\u5730\u70B9\uFF08\u540D\u79F0\uFF09" },
4293
+ hrm_members: { type: "string", description: "\u53C2\u4F1A\u4EBA\u59D3\u540D\uFF08\u9017\u53F7/\u987F\u53F7\u5206\u9694\uFF09" },
4294
+ mt_desc: { type: "string", description: "\u4F1A\u8BAE\u5185\u5BB9" },
4295
+ org_members: { type: "string", description: "\u843D\u6B3E\u5355\u4F4D" },
4296
+ caller: { type: "string", description: "\u53EC\u96C6\u4EBA" },
4297
+ contacter: { type: "string", description: "\u8054\u7CFB\u4EBA" },
4298
+ total_member: { type: "string", description: "\u53C2\u4F1A\u4EBA\u6570" },
4299
+ extra: {
4300
+ type: "object",
4301
+ additionalProperties: { type: "string" },
4302
+ description: "\u81EA\u5B9A\u4E49\u5B57\u6BB5\uFF08\u5982 guest_org=\u5BA2\u6237\u5355\u4F4D\uFF1Bagenda=\u8BAE\u7A0B\uFF09"
4303
+ },
4304
+ doc_name: { type: "string", description: "\u6587\u6863\u540D\uFF0C\u9ED8\u8BA4\u300C\u9080\u8BF7\u51FD-<\u4F1A\u8BAE\u540D>-<\u65E5\u671F>\u300D" },
4305
+ folder_id: { type: "string", description: `\u6587\u6863\u4E2D\u5FC3\u76EE\u5F55 id\uFF0C\u9ED8\u8BA4 ${DEFAULT_FOLDER_ID}` },
4306
+ folder_type: { type: "string", enum: ["company", "privy", "sys"], description: `\u76EE\u5F55\u7C7B\u578B\uFF0C\u9ED8\u8BA4 ${DEFAULT_FOLDER_TYPE}` },
4307
+ confirm: { type: "boolean", description: "\u5FC5\u987B\u663E\u5F0F\u4F20 true \u2014\u2014 \u4F1A\u771F\u5B9E\u521B\u5EFA\u4E00\u7BC7\u6587\u6863" }
4308
+ },
4309
+ required: ["confirm"]
4310
+ },
4311
+ handler: async (args, env) => {
4312
+ if (args.confirm !== true) {
4313
+ throw meetingValidationError(
4314
+ "confirm_required",
4315
+ "\u4F1A\u771F\u5B9E\u521B\u5EFA\u6587\u6863\uFF0C\u5FC5\u987B\u663E\u5F0F\u4F20 confirm: true\uFF08\u53EF\u5148\u4E0D\u5E26 confirm \u8C03 meeting.invitation.render \u9884\u89C8\u6B63\u6587\uFF09"
4316
+ );
4317
+ }
4318
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
4319
+ const render = getMeetingOperation2("meeting.invitation.render");
4320
+ const rendered = await render.handler(
4321
+ {
4322
+ ...args.mtId !== void 0 ? { mtId: args.mtId } : {},
4323
+ ...args.mt_name !== void 0 ? { mt_name: args.mt_name } : {},
4324
+ ...args.begin_datetime !== void 0 ? { begin_datetime: args.begin_datetime } : {},
4325
+ ...args.end_datetime !== void 0 ? { end_datetime: args.end_datetime } : {},
4326
+ ...args.address !== void 0 ? { address: args.address } : {},
4327
+ ...args.hrm_members !== void 0 ? { hrm_members: args.hrm_members } : {},
4328
+ ...args.mt_desc !== void 0 ? { mt_desc: args.mt_desc } : {},
4329
+ ...args.org_members !== void 0 ? { org_members: args.org_members } : {},
4330
+ ...args.caller !== void 0 ? { caller: args.caller } : {},
4331
+ ...args.contacter !== void 0 ? { contacter: args.contacter } : {},
4332
+ ...args.total_member !== void 0 ? { total_member: args.total_member } : {},
4333
+ ...args.extra !== void 0 ? { extra: args.extra } : {}
4334
+ },
4335
+ env
4336
+ );
4337
+ const filePath = String(rendered?.data?.filePath ?? "").trim();
4338
+ if (!filePath) throw meetingValidationError("render_failed", "\u9080\u8BF7\u51FD docx \u672A\u751F\u6210\uFF08render \u672A\u8FD4\u56DE filePath\uFF09");
4339
+ const session = await env.host.getSession();
4340
+ const authorId = String(session?.userId ?? "").trim();
4341
+ if (!authorId) throw meetingValidationError("session_missing", "\u62FF\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u4EBA\uFF0C\u65E0\u6CD5\u521B\u5EFA\u6587\u6863");
4342
+ const docName = String(args.doc_name ?? "").trim() || String(rendered?.data?.fileName ?? "").replace(/\.docx$/i, "") || "\u9080\u8BF7\u51FD";
4343
+ const caizhilianArgs = {
4344
+ file_path: normalizeWinPath(filePath),
4345
+ name: docName,
4346
+ folder_id: String(args.folder_id ?? DEFAULT_FOLDER_ID),
4347
+ folder_type: String(args.folder_type ?? DEFAULT_FOLDER_TYPE),
4348
+ author_id: authorId
4349
+ };
4350
+ const { executeCaizhilianOperation } = await import("./operations-J7PUIVWZ.js");
4351
+ const { createCaizhilianHost } = await import("./host-7NTIBSPK.js");
4352
+ const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
4353
+ const caizhilianEnv = {
4354
+ ctx: env.ctx,
4355
+ host: createCaizhilianHost(env.ctx),
4356
+ continuation: createCaizhilianContinuationSigner(env.ctx)
4357
+ };
4358
+ const prepared = await executeCaizhilianOperation(
4359
+ "caizhilian.document.create-office.prepare",
4360
+ caizhilianArgs,
4361
+ caizhilianEnv
4362
+ );
4363
+ const continuation = String(prepared?.data?.continuation ?? "");
4364
+ if (!continuation) {
4365
+ throw meetingValidationError("publish_prepare_failed", "create-office.prepare \u672A\u8FD4\u56DE continuation");
4366
+ }
4367
+ const applied = await executeCaizhilianOperation(
4368
+ "caizhilian.document.create-office.apply",
4369
+ { ...caizhilianArgs, continuation, confirm: true },
4370
+ caizhilianEnv
4371
+ );
4372
+ const docId = String(applied?.data?.doc_id ?? "").trim();
4373
+ if (!docId) throw meetingValidationError("publish_failed", "create-office.apply \u672A\u8FD4\u56DE doc_id");
4374
+ return meetingSuccess(
4375
+ "meeting.invitation.publish",
4376
+ {
4377
+ docId,
4378
+ docName,
4379
+ filePath,
4380
+ folderId: caizhilianArgs.folder_id,
4381
+ folderType: caizhilianArgs.folder_type,
4382
+ // 直接可用的表单字段值(建会时放进 extraFields.邀请函)
4383
+ formFieldValue: [{ id: docId, name: docName }],
4384
+ // 对话里要贴正文,别只给 id
4385
+ text: rendered?.data?.text ?? "",
4386
+ pendingFields: rendered?.data?.pendingFields ?? []
4387
+ },
4388
+ {
4389
+ ...Array.isArray(applied?.warnings) && applied.warnings.length > 0 ? { warnings: applied.warnings } : {}
4390
+ }
4391
+ );
4392
+ }
4393
+ };
4394
+ var meetingInvitationPublishOperations = [meetingInvitationPublish];
4395
+
4269
4396
  // src/shortcuts/meeting/operations/qrcode.ts
4270
4397
  import { mkdir as mkdir3, writeFile as writeFile3 } from "node:fs/promises";
4271
4398
  import { dirname as dirname2, isAbsolute, join as join2, resolve as resolve4 } from "node:path";
@@ -4903,7 +5030,7 @@ var meetingSummaryGet = {
4903
5030
  const mtId = textOf5(args.mt_id).trim();
4904
5031
  if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
4905
5032
  const ctx = env.ctx;
4906
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
5033
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
4907
5034
  const warnings = [];
4908
5035
  const timings = {};
4909
5036
  const include = Array.isArray(args.include) && args.include.length > 0 ? args.include.filter((item) => ALL_SECTIONS.includes(item)) : ALL_SECTIONS;
@@ -5039,7 +5166,7 @@ var meetingSummaryGet = {
5039
5166
  warnings.push("\u8BE5\u4F1A\u8BAE\u6CA1\u6709\u5173\u8054\u7FA4\u804A\uFF08imchat_groupid \u4E3A\u7A7A\uFF09\uFF0Cchat \u6BB5\u4E3A null");
5040
5167
  } else {
5041
5168
  try {
5042
- const { createImHost } = await import("./host-LR55CTHP.js");
5169
+ const { createImHost } = await import("./host-M4XP5URR.js");
5043
5170
  const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
5044
5171
  const { getImOperation } = await import("./registry-PVUZQDDQ.js");
5045
5172
  const imEnv = {
@@ -5165,7 +5292,7 @@ var meetingFormFields = {
5165
5292
  hint: "\u6CA1\u89E3\u6790\u5230\u8BE5\u8868\u7684 objId\uFF08\u53EF\u80FD\u5F53\u524D\u73AF\u5883\u6CA1\u6709\u8FD9\u5F20\u8868\uFF0C\u6216\u8D26\u53F7\u65E0\u6743\u9650\uFF09"
5166
5293
  }, { warnings: resolved.warnings });
5167
5294
  }
5168
- const { createEbuilderFormHost } = await import("./host-SZGV4UNT.js");
5295
+ const { createEbuilderFormHost } = await import("./host-7OWWPLM4.js");
5169
5296
  const { createEbuilderFormContinuationSigner } = await import("./continuation-3XLYYTKV.js");
5170
5297
  const { executeEbuilderFormOperation } = await import("./operations-62N6EP3C.js");
5171
5298
  const formEnv = {
@@ -5224,7 +5351,7 @@ var MT_STATUS_OVER = "8";
5224
5351
  var CANCELLED_MARK_DELAY_MS = 800;
5225
5352
  async function isCancelledMeeting(env, mtId) {
5226
5353
  try {
5227
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
5354
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
5228
5355
  const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
5229
5356
  // withCount:false —— 这里只要一行状态,不必额外请求 count(少一次往返,也便于测试替身)
5230
5357
  { mt_id: mtId, pageNo: 1, pageSize: 1, withCount: false },
@@ -6037,9 +6164,9 @@ async function runCrmSearchFlow(env, input) {
6037
6164
  if (!employeeId) {
6038
6165
  throw meetingValidationError("crm_employee_required", "\u53D6\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u7528\u6237 id\uFF0C\u65E0\u6CD5\u89E6\u53D1 ESB \u5BA2\u6237\u67E5\u8BE2");
6039
6166
  }
6040
- const { createEsbHost } = await import("./host-WIKN2EJ5.js");
6167
+ const { createEsbHost } = await import("./host-3TNBMDTR.js");
6041
6168
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
6042
- const { getEsbOperation } = await import("./registry-KNKSCJNT.js");
6169
+ const { getEsbOperation } = await import("./registry-QJCZ2GVG.js");
6043
6170
  const esbEnv = {
6044
6171
  ctx: env.ctx,
6045
6172
  host: createEsbHost(env.ctx),
@@ -6249,7 +6376,7 @@ var ebAutoInvitationAfterWrite = async (context) => {
6249
6376
  const mtId = String(context.dataIds?.[0] ?? "").trim();
6250
6377
  if (!isCreate || !enabled || !mtId) return association;
6251
6378
  try {
6252
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-IM5G23LS.js");
6379
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-XPWPGHYE.js");
6253
6380
  const render = getMeetingOperation2("meeting.invitation.render");
6254
6381
  const result = await render.handler({ mtId }, context.env);
6255
6382
  return { ...association ?? {}, invitation: result?.data ?? null };
@@ -6300,6 +6427,7 @@ function buildRegistry() {
6300
6427
  ...meetingDecisionNotifyOperations,
6301
6428
  ...meetingPipelineOperations,
6302
6429
  ...meetingInvitationOperations,
6430
+ ...meetingInvitationPublishOperations,
6303
6431
  ...meetingQrOperations,
6304
6432
  ...meetingSummaryOperations,
6305
6433
  ...meetingFormFieldOperations,
@@ -4,7 +4,7 @@ import {
4
4
  cacheScopeSuffix,
5
5
  readCache,
6
6
  writeCache
7
- } from "./chunk-Z7VYWPZV.js";
7
+ } from "./chunk-DGMYACGJ.js";
8
8
  import {
9
9
  EB_BASE,
10
10
  SCHEMA_DATETIME_MINUTE,
@@ -13,7 +13,7 @@ import {
13
13
  meetingSuccess,
14
14
  queryBody,
15
15
  schemaOf
16
- } from "./chunk-QVSWRLLU.js";
16
+ } from "./chunk-JWWTI63L.js";
17
17
 
18
18
  // src/shortcuts/meeting/operations/eb/usage-cache.ts
19
19
  var USAGE_TTL_MS = 5 * 60 * 1e3;
@@ -88,14 +88,30 @@ async function clearCache(env, key) {
88
88
  try {
89
89
  const { rm } = await import("node:fs/promises");
90
90
  const { join } = await import("node:path");
91
- const { meetingStateDir } = await import("./env-BX3VRFS7.js");
91
+ const { meetingStateDir } = await import("./env-3MBHAWBL.js");
92
92
  await rm(join(meetingStateDir(env.ctx), "cache", `${key}.json`), { force: true });
93
93
  } catch {
94
94
  }
95
95
  }
96
96
 
97
97
  // src/shortcuts/meeting/operations/eb/room-recommend.ts
98
- var ROOMS_TTL_MS = 24 * 60 * 60 * 1e3;
98
+ function inferRoomFloor(name, desc = "") {
99
+ const cnDigits = { \u4E00: 1, \u4E8C: 2, \u4E09: 3, \u56DB: 4, \u4E94: 5, \u516D: 6, \u4E03: 7, \u516B: 8, \u4E5D: 9, \u5341: 10 };
100
+ const fromText = (text) => {
101
+ const cn = text.match(/([一二三四五六七八九十])\s*(?:楼|层)/u);
102
+ if (cn) return cnDigits[cn[1]] ?? null;
103
+ const en = text.match(/(\d{1,2})\s*(?:F|f|楼|层)(?!\d)/u);
104
+ if (en) return Number(en[1]);
105
+ return null;
106
+ };
107
+ const byText = fromText(name) ?? fromText(desc);
108
+ if (byText) return byText;
109
+ const lead = name.match(/^\s*(\d{3,4})/u);
110
+ if (!lead) return null;
111
+ const digits = lead[1];
112
+ return digits.length === 4 ? Number(digits.slice(0, 2)) : Number(digits[0]);
113
+ }
114
+ var ROOMS_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
99
115
  var STALE_NOTICE_MS = 4 * 60 * 60 * 1e3;
100
116
  var FREQUENT_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
101
117
  var FREQUENT_WINDOW_DAYS = 180;
@@ -151,11 +167,12 @@ function normalizeRoom(row) {
151
167
  // ⛔ 2026-11-04 真机发现:以前没映射 room_desc,`roomDesc` 永远是 undefined,
152
168
  // 于是「带客户优先接待类」里**按描述文案判定**那一半从来没生效过(只有名称含「接待」的能命中)。
153
169
  // 例:广州会议室四 的描述「用来接待重要来宾…」明明写着,却被当普通房间。
154
- roomDesc: toText(main.room_desc).trim()
170
+ roomDesc: toText(main.room_desc).trim(),
171
+ floor: inferRoomFloor(toText(main.room_name).trim(), toText(main.room_desc).trim())
155
172
  };
156
173
  }
157
174
  async function loadRooms(env, options = {}) {
158
- const key = `rooms-v3-${await cacheScopeSuffix(env)}`;
175
+ const key = `rooms-v4-${await cacheScopeSuffix(env)}`;
159
176
  const warnings = [];
160
177
  if (!options.refresh) {
161
178
  const cached = await readCache(env, key, { ttlMs: ROOMS_TTL_MS });
@@ -204,7 +221,7 @@ async function loadFrequentRooms(env, options = {}) {
204
221
  const counts = /* @__PURE__ */ new Map();
205
222
  let requests = 0;
206
223
  try {
207
- const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
224
+ const { getMeetingOperation } = await import("./registry-XPWPGHYE.js");
208
225
  const listOp = getMeetingOperation("meeting.eb.meeting.list");
209
226
  let seen = 0;
210
227
  let total = 0;
@@ -294,7 +311,15 @@ async function recommendRooms(env, input) {
294
311
  }
295
312
  if (requirement.roomAttr && room.roomAttr !== requirement.roomAttr) continue;
296
313
  if (requirement.mrType && room.mrType !== requirement.mrType) continue;
297
- if (requirement.placeKeyword && !room.place.includes(requirement.placeKeyword)) continue;
314
+ if (input.floor !== void 0 && input.floor !== null && room.floor !== input.floor) continue;
315
+ if (requirement.placeKeyword) {
316
+ const floorHint = inferRoomFloor(String(requirement.placeKeyword));
317
+ if (floorHint !== null && /楼|层|F/iu.test(String(requirement.placeKeyword))) {
318
+ if (room.floor !== floorHint) continue;
319
+ } else if (!room.place.includes(requirement.placeKeyword)) {
320
+ continue;
321
+ }
322
+ }
298
323
  if (requirement.nameKeyword && !room.name.includes(requirement.nameKeyword)) continue;
299
324
  if (requirement.equipmentsKeyword && !room.equipments.includes(requirement.equipmentsKeyword)) continue;
300
325
  const reasons = [];
@@ -347,6 +372,7 @@ async function recommendRooms(env, input) {
347
372
  place: room.place,
348
373
  equipments: room.equipments,
349
374
  roomAttrText: room.roomAttrText,
375
+ ...room.floor !== null && room.floor !== void 0 ? { floor: room.floor } : {},
350
376
  ...String(room.roomDesc ?? "").trim() !== "" ? { roomDesc: String(room.roomDesc).trim() } : {},
351
377
  frequentCount: freq?.count ?? 0,
352
378
  score,
@@ -421,7 +447,8 @@ var ebRoomRecommendOperation = {
421
447
  mrType: { type: "string", description: "\u4F1A\u8BAE\u5BA4\u7C7B\u578B id\uFF08mr_type\uFF09" },
422
448
  roomAttr: { type: "string", enum: ["0", "1", "2"], description: "\u4F1A\u8BAE\u5BA4\u5C5E\u6027\uFF1A0 \u5B9E\u4F53 / 1 \u865A\u62DF / 2 \u7EC4\u5408" },
423
449
  equipmentsKeyword: { type: "string", description: "\u8BBE\u5907\u5173\u952E\u8BCD\uFF08\u6A21\u7CCA\u5339\u914D equipments\uFF0C\u5982 \u6295\u5F71/\u89C6\u9891\uFF09" },
424
- hasCustomer: { type: "boolean", description: "\u672C\u6B21\u4F1A\u8BAE\u662F\u5426\u5E26\u5BA2\u6237\uFF1Atrue \u65F6\u4F18\u5148\u63A8\u8350\u63A5\u5F85\u7C7B\u4F1A\u8BAE\u5BA4\uFF08\u63CF\u8FF0/\u540D\u79F0\u542B \u63A5\u5F85/\u62DB\u5F85/\u5BA2\u6237/\u5546\u52A1/\u8D35\u5BBE \u7684\u52A0\u5206\uFF09" },
450
+ hasCustomer: { type: "boolean", description: "\u672C\u6B21\u4F1A\u8BAE\u662F\u5426\u5E26\u5BA2\u6237\uFF1Atrue \u65F6\u4F18\u5148\u63A8\u8350\u63A5\u5F85\u7C7B\u4F1A\u8BAE\u5BA4\uFF08\u540D\u79F0\u6216\u63CF\u8FF0\u542B \u63A5\u5F85/\u62DB\u5F85/\u8D35\u5BBE/\u5546\u52A1 \u7684\u52A0 35 \u5206\uFF09" },
451
+ floor: { type: "number", description: "\u53EA\u8981\u67D0\u5C42\uFF08\u5982 1 \u8868\u793A\u4E00\u697C\uFF09\uFF1A\u6309\u4F1A\u8BAE\u5BA4\u540D\u79F0/\u63CF\u8FF0\u63A8\u65AD\u697C\u5C42\u8FC7\u6EE4\uFF08120\u4F1A\u8BAE\u5BA4=1\u697C\u30011007\u4F1A\u8BAE\u5BA4=10\u697C\u3001601-8=6\u697C\uFF09" },
425
452
  topN: { type: "number", description: "\u8FD4\u56DE\u5019\u9009\u6570\u91CF\uFF08\u9ED8\u8BA4 3\uFF0C\u6700\u591A 10\uFF09" },
426
453
  refresh: { type: "boolean", description: "true=\u5237\u65B0\u4F1A\u8BAE\u5BA4\u5168\u91CF\u4E0E\u5E38\u7528\u8BB0\u5F55\u7F13\u5B58" },
427
454
  includeBusy: { type: "boolean", description: "true=\u628A\u8BE5\u65F6\u6BB5\u5DF2\u88AB\u5360\u7528\u7684\u4F1A\u8BAE\u5BA4\u4E5F\u8FD4\u56DE\uFF08\u6392\u5728\u6700\u540E\uFF0C\u5E26\u8BF4\u660E\uFF09" }
@@ -444,6 +471,8 @@ var ebRoomRecommendOperation = {
444
471
  // 2026-11-04 修:以前漏了它 —— 用户传了 hasCustomer,打分却读 requirement.hasCustomer,永远 false
445
472
  ...args.hasCustomer === true ? { hasCustomer: true } : {}
446
473
  },
474
+ // ⛔ floor 是 RecommendRoomInput 的**顶层**字段(放 requirement 里会被忽略,2026-11-06 踩到)
475
+ ...Number.isFinite(Number(args.floor)) ? { floor: Number(args.floor) } : {},
447
476
  ...args.topN !== void 0 ? { topN: Number(args.topN) } : {},
448
477
  ...args.refresh === true ? { refreshRooms: true, refreshFrequent: true } : {},
449
478
  ...args.includeBusy === true ? { includeBusy: true } : {}
@@ -463,7 +492,7 @@ async function rememberFrequentRoom(env, roomId) {
463
492
  const id = String(roomId ?? "").trim();
464
493
  if (!id) return false;
465
494
  const scope = await cacheScopeSuffix(env);
466
- const roomsCached = await readCache(env, `rooms-v3-${scope}`, { ttlMs: ROOMS_TTL_MS });
495
+ const roomsCached = await readCache(env, `rooms-v4-${scope}`, { ttlMs: ROOMS_TTL_MS });
467
496
  const name = roomsCached?.data?.find((room) => room.id === id)?.name ?? "";
468
497
  if (!name) return false;
469
498
  const session = await env.host.getSession().catch(() => null);
@@ -485,6 +514,7 @@ export {
485
514
  filterUsages,
486
515
  loadDayUsages,
487
516
  invalidateDayUsages,
517
+ inferRoomFloor,
488
518
  loadRooms,
489
519
  loadFrequentRooms,
490
520
  recommendRooms,