weaver-work-cli 0.1.54 → 0.1.56

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 (183) hide show
  1. package/dist/chunks/{archive-ZQ4A4TV6.js → archive-4SQAVTIB.js} +3 -2
  2. package/dist/chunks/{archive-oa-57R2FYHV.js → archive-oa-W2UEJ67L.js} +137 -8
  3. package/dist/chunks/{asset-ZOJVBWZH.js → asset-EGZEABBI.js} +3 -2
  4. package/dist/chunks/{asset-idle-XGB5IPGT.js → asset-idle-EBUZBB6M.js} +3 -2
  5. package/dist/chunks/{attachment-content-2EPEI4HV.js → attachment-content-QGM5MLQE.js} +4 -3
  6. package/dist/chunks/{blog-QSHLZSFW.js → blog-2YKMWOWI.js} +3 -2
  7. package/dist/chunks/{caizhilian-KCQYFH72.js → caizhilian-QJ4FLSQJ.js} +5 -4
  8. package/dist/chunks/{calendar-DLGMRJQA.js → calendar-H4QTJCUY.js} +3 -2
  9. package/dist/chunks/{chunk-XPQN4E5O.js → chunk-44KJ7WFA.js} +300 -55
  10. package/dist/chunks/{chunk-CZNZKOHR.js → chunk-4GG72JAT.js} +2 -2
  11. package/dist/chunks/{chunk-YIKSL36S.js → chunk-5N222HK6.js} +2 -2
  12. package/dist/chunks/{chunk-XHMJBRLZ.js → chunk-6DVL5IN5.js} +4 -1
  13. package/dist/chunks/{chunk-JJRIT2ZN.js → chunk-6MS3RLPO.js} +5 -334
  14. package/dist/chunks/{chunk-QUDHSMG3.js → chunk-7EBV7Q3R.js} +112 -27
  15. package/dist/chunks/{chunk-CNVZETM5.js → chunk-AHJZIMCX.js} +1 -1
  16. package/dist/chunks/{chunk-TGAGQV4I.js → chunk-CQ4OVCKG.js} +2 -2
  17. package/dist/chunks/{chunk-2BQESR2U.js → chunk-DVR2EDUU.js} +99 -34
  18. package/dist/chunks/{chunk-7KKI5KDY.js → chunk-FDAJC7R4.js} +4 -4
  19. package/dist/chunks/{chunk-GR76ZDDX.js → chunk-FMNCSYIG.js} +2 -2
  20. package/dist/chunks/{chunk-6LGLI46Q.js → chunk-L2LMBFG5.js} +1 -1
  21. package/dist/chunks/{chunk-DLY5GUXX.js → chunk-PH7N4UFT.js} +1 -1
  22. package/dist/chunks/{chunk-U6R6FZHD.js → chunk-SFM3M2L3.js} +286 -93
  23. package/dist/chunks/chunk-SHYQUBY3.js +48 -0
  24. package/dist/chunks/{chunk-HFXK54M4.js → chunk-TGM7BWEH.js} +2 -2
  25. package/dist/chunks/{chunk-Z7B7QSR2.js → chunk-TJUAGZU7.js} +11 -11
  26. package/dist/chunks/{chunk-LYOFRYC4.js → chunk-UI66EMOR.js} +4 -4
  27. package/dist/chunks/{chunk-762M5XJS.js → chunk-VMCCRWFO.js} +2 -2
  28. package/dist/chunks/{chunk-FE3CQAAM.js → chunk-WHJIUKJW.js} +681 -48
  29. package/dist/chunks/{chunk-PGO4ILMQ.js → chunk-WMB3SMXI.js} +1 -1
  30. package/dist/chunks/chunk-WMRNO6IU.js +337 -0
  31. package/dist/chunks/{chunk-6NXT4ICB.js → chunk-WVH5ESDA.js} +1 -1
  32. package/dist/chunks/{chunk-O6RIBG5E.js → chunk-XU3FL3AW.js} +4 -4
  33. package/dist/chunks/{chunk-Z6UUBY37.js → chunk-Z4IPY5GV.js} +2 -2
  34. package/dist/chunks/{conflict-K2IAKKFR.js → conflict-VAFFPUY3.js} +2 -2
  35. package/dist/chunks/{contract-LJRAXVZU.js → contract-LLRKMLQQ.js} +2655 -1319
  36. package/dist/chunks/{cowork-3ACICHDQ.js → cowork-2RDFBZWB.js} +3 -2
  37. package/dist/chunks/{create-flow-UL37MZGP.js → create-flow-TVYE3IOH.js} +6 -6
  38. package/dist/chunks/{data-WK5CQXNF.js → data-WVICO3DT.js} +57 -11
  39. package/dist/chunks/{ebuilder-form-CBYI6CQ6.js → ebuilder-form-TWSXS5NA.js} +7 -6
  40. package/dist/chunks/{ehr-XI4BIVR2.js → ehr-52GBKNJR.js} +3 -2
  41. package/dist/chunks/{env-BZDB5OVZ.js → env-BVVFIN4P.js} +2 -2
  42. package/dist/chunks/{esb-4BQHNP5C.js → esb-HJSXCEOM.js} +5 -4
  43. package/dist/chunks/{factory-VD3YI6N7.js → factory-RCQ36LLE.js} +1 -1
  44. package/dist/chunks/{fna-ECOYBQYL.js → fna-OBACRT3J.js} +72 -3
  45. package/dist/chunks/{group-chat-DHNVO76L.js → group-chat-YFZDUUY3.js} +3 -3
  46. package/dist/chunks/{host-TUOIOEMC.js → host-2BKMPWDH.js} +4 -3
  47. package/dist/chunks/{host-3TNBMDTR.js → host-KJT3G5D2.js} +4 -3
  48. package/dist/chunks/{host-7OWWPLM4.js → host-KOWUMNAY.js} +4 -3
  49. package/dist/chunks/{host-M4XP5URR.js → host-MFXRA2MY.js} +4 -3
  50. package/dist/chunks/{host-7NTIBSPK.js → host-TTSGY5NZ.js} +4 -3
  51. package/dist/chunks/{host-G3VU7SDW.js → host-W4JCNRFS.js} +4 -3
  52. package/dist/chunks/{hrm-YGIR3HGF.js → hrm-AK3WGBMN.js} +4 -3
  53. package/dist/chunks/{im-TN2JYVGJ.js → im-JZSBPO4Z.js} +4 -3
  54. package/dist/chunks/{invoice-V7ZTITUO.js → invoice-V6KD4TZE.js} +4 -3
  55. package/dist/chunks/{jiuchuanhui-ASFZBMPU.js → jiuchuanhui-K4EQU6GK.js} +3 -2
  56. package/dist/chunks/{lazy-dispatch-XSAHDK6Z.js → lazy-dispatch-JHGFCKJN.js} +5 -4
  57. package/dist/chunks/{mail-M3HJF5ER.js → mail-IKVCQCVZ.js} +3 -2
  58. package/dist/chunks/{meeting-OWG4O2XH.js → meeting-JOHV4RH3.js} +14 -12
  59. package/dist/chunks/minute-doc-JLS4KMFZ.js +156 -0
  60. package/dist/chunks/{okr-EVX7FB5G.js → okr-KV43FPPX.js} +3 -2
  61. package/dist/chunks/{operations-J7PUIVWZ.js → operations-ZPWBMYKE.js} +5 -4
  62. package/dist/chunks/{plan-2QJQEPBO.js → plan-WOYR4WEG.js} +3 -2
  63. package/dist/chunks/{project-XELELW2T.js → project-CQJKBUIL.js} +3 -2
  64. package/dist/chunks/{reception-QGPNTGHG.js → reception-MPBU3JXC.js} +3 -2
  65. package/dist/chunks/{recruit-stage-XCMVEQA2.js → recruit-stage-USTTRHOX.js} +3 -2
  66. package/dist/chunks/{registry-CJOVECZD.js → registry-GURQG4ZV.js} +3 -2
  67. package/dist/chunks/{registry-ASYCWF2U.js → registry-LITYOH2W.js} +12 -10
  68. package/dist/chunks/{registry-QJCZ2GVG.js → registry-SS5J2FZQ.js} +5 -4
  69. package/dist/chunks/{room-recommend-LSVAMGKV.js → room-recommend-62MECG4J.js} +4 -4
  70. package/dist/chunks/{schedule-7QOPRUU4.js → schedule-6QRXIBGU.js} +4 -4
  71. package/dist/chunks/{smart-extract-FOUYNIG3.js → smart-extract-APX2PNIN.js} +3 -2
  72. package/dist/chunks/{workflow-YHXFIU63.js → workflow-WMPW3WSB.js} +5 -4
  73. package/dist/index.js +33 -32
  74. package/dist/internal/e10/auth/agent-host-key.js +68 -0
  75. package/dist/internal/e10/auth/agent-hosts.js +250 -0
  76. package/dist/internal/e10/auth/commands.js +99 -30
  77. package/dist/internal/e10/auth/paths.js +9 -0
  78. package/dist/internal/e10/auth/session.js +17 -0
  79. package/dist/internal/e10/auth/xiaoe.js +37 -3
  80. package/dist/shortcuts/archive-oa/operations/contract-modules.js +106 -0
  81. package/dist/shortcuts/archive-oa/operations/contract.js +38 -4
  82. package/dist/shortcuts/archive-oa/operations/registry.js +2 -1
  83. package/dist/shortcuts/contract/index.js +6 -7
  84. package/dist/shortcuts/contract/manifest.js +101 -24
  85. package/dist/shortcuts/contract/ooxml/docx-table.js +75 -3
  86. package/dist/shortcuts/contract/ooxml/xlsx.js +49 -13
  87. package/dist/shortcuts/contract/operations/card-action.js +113 -12
  88. package/dist/shortcuts/contract/operations/card-ebdf-list.js +29 -7
  89. package/dist/shortcuts/contract/operations/card-plan.js +75 -9
  90. package/dist/shortcuts/contract/operations/card-risk-report.js +2 -2
  91. package/dist/shortcuts/contract/operations/card.js +1 -1
  92. package/dist/shortcuts/contract/operations/clause-library.js +88 -16
  93. package/dist/shortcuts/contract/operations/compare-screen.js +378 -0
  94. package/dist/shortcuts/contract/operations/compare.js +1 -1
  95. package/dist/shortcuts/contract/operations/credit-page.js +1 -1
  96. package/dist/shortcuts/contract/operations/docx-slots.js +1000 -0
  97. package/dist/shortcuts/contract/operations/flow.js +2 -2
  98. package/dist/shortcuts/contract/operations/quote-to-contract.js +495 -0
  99. package/dist/shortcuts/contract/operations/quote.js +2 -229
  100. package/dist/shortcuts/contract/operations/recommend.js +1 -1
  101. package/dist/shortcuts/contract/operations/registry.js +6 -2
  102. package/dist/shortcuts/contract/operations/review.js +230 -4
  103. package/dist/shortcuts/contract/operations/save-recognize.js +122 -3
  104. package/dist/shortcuts/contract/operations/template.js +11 -10
  105. package/dist/shortcuts/data/operations/ds.js +5 -5
  106. package/dist/shortcuts/data/operations/shared.js +76 -4
  107. package/dist/shortcuts/fna/manifest.js +7 -2
  108. package/dist/shortcuts/fna/operations/budget.js +68 -0
  109. package/dist/shortcuts/meeting/minute-doc.js +153 -0
  110. package/dist/shortcuts/meeting/operations/compose-outcome.js +176 -0
  111. package/dist/shortcuts/meeting/operations/eb/catalog.js +1 -1
  112. package/dist/shortcuts/meeting/operations/eb/create-flow.js +26 -0
  113. package/dist/shortcuts/meeting/operations/eb/decision-task-batch.js +144 -0
  114. package/dist/shortcuts/meeting/operations/eb/decision.js +92 -4
  115. package/dist/shortcuts/meeting/operations/eb/index.js +133 -4
  116. package/dist/shortcuts/meeting/operations/eb/meeting-link.js +90 -0
  117. package/dist/shortcuts/meeting/operations/from-group-chat.js +46 -0
  118. package/dist/shortcuts/meeting/operations/minute-content.js +61 -0
  119. package/dist/shortcuts/meeting/operations/registry.js +14 -1
  120. package/dist/shortcuts/meeting/operations/self-check.js +49 -0
  121. package/dist/shortcuts/workflow/endpoints.js +2 -0
  122. package/dist/shortcuts/workflow/operations/read.js +114 -8
  123. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +72 -46
  124. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +41 -0
  125. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +46 -11
  126. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +18 -1
  127. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroupAdd.js +51 -0
  128. package/docs/e10-auth.md +78 -0
  129. package/docs/fna.md +8 -3
  130. package/package.json +4 -2
  131. package/scripts/pack-offline.mjs +228 -0
  132. package/scripts/package-skill.mjs +14 -5
  133. package/skill-template/business-info.json +3 -0
  134. package/skill-template/domains/qiyecheng.md +4 -3
  135. package/skills/weaver-e10-archive-oa/SKILL.md +6 -1
  136. package/skills/weaver-e10-archive-oa/references/contract-search.md +91 -4
  137. package/skills/weaver-e10-jinchengda/SKILL.md +100 -81
  138. package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +11 -6
  139. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +5 -4
  140. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +38 -12
  141. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +1 -1
  142. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
  143. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +20 -6
  144. package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +8 -3
  145. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +56 -13
  146. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +7 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
  148. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +11 -5
  149. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
  150. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
  151. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +38 -7
  152. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +13 -25
  153. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +9 -8
  154. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +8 -6
  155. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +10 -7
  156. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +2 -2
  157. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +3 -1
  158. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +26 -18
  159. package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +4 -4
  160. package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +18 -13
  161. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +5 -3
  162. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +105 -49
  163. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
  164. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +3 -6
  165. package/skills/weaver-e10-meeting/SKILL.md +47 -9
  166. package/skills/weaver-e10-qiyecheng/SKILL.md +16 -7
  167. package/skills/weaver-e10-qiyecheng/references/budget.md +77 -3
  168. package/skills/weaver-e10-qiyecheng/references/catalog.md +6 -4
  169. package/skills/weaver-e10-qiyecheng/references/getEnabledTemplate-api.md +255 -0
  170. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +70 -25
  171. package/skills/weaver-e10-workflow/SKILL.md +54 -40
  172. package/skills/weaver-e10-workflow/references/todo-dialogue.md +134 -0
  173. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +102 -80
  174. package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +23 -13
  175. package/skills/weaver-e10-workflow/references/workflow-query.md +68 -46
  176. package/skills/weaver-e10-workflow/references/workflow-view.md +21 -13
  177. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +317 -332
  178. package/dist/shortcuts/contract/ooxml/docx.js +0 -295
  179. package/dist/shortcuts/contract/operations/docx-fillfromquote.js +0 -532
  180. package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +0 -178
  181. package/skills/weaver-e10-jinchengda/references/source-manifest.json +0 -1270
  182. package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +0 -998
  183. package/skills/weaver-e10-workflow/tools/todo-serve.cjs +0 -327
@@ -1,39 +1,42 @@
1
1
  import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
- PENDING_MARK,
5
4
  listMeetingAttachments,
6
- meetingAttachmentContentOperations,
5
+ meetingAttachmentContentOperations
6
+ } from "./chunk-6MS3RLPO.js";
7
+ import {
8
+ PENDING_MARK,
7
9
  renderDocx
8
- } from "./chunk-JJRIT2ZN.js";
10
+ } from "./chunk-WMRNO6IU.js";
9
11
  import {
10
12
  meetingEbGroupChatOperations
11
- } from "./chunk-Z7B7QSR2.js";
13
+ } from "./chunk-TJUAGZU7.js";
12
14
  import {
15
+ attachMeetingUrls,
13
16
  meetingEbCreateFlowOperations
14
- } from "./chunk-QUDHSMG3.js";
17
+ } from "./chunk-7EBV7Q3R.js";
15
18
  import {
16
19
  ebMeetingWritePreflight,
17
20
  meetingEbConflictOperations
18
- } from "./chunk-O6RIBG5E.js";
21
+ } from "./chunk-XU3FL3AW.js";
19
22
  import {
20
23
  meetingEbScheduleOperations
21
- } from "./chunk-7KKI5KDY.js";
24
+ } from "./chunk-FDAJC7R4.js";
22
25
  import {
23
26
  ebRoomRecommendOperation,
24
27
  recommendRooms,
25
28
  rememberFrequentRoom
26
- } from "./chunk-LYOFRYC4.js";
29
+ } from "./chunk-UI66EMOR.js";
27
30
  import {
28
31
  cacheScopeSuffix,
29
32
  readCache,
30
33
  writeCache
31
- } from "./chunk-CNVZETM5.js";
34
+ } from "./chunk-AHJZIMCX.js";
32
35
  import {
33
36
  meetingEnvOperations,
34
37
  meetingStateDir,
35
38
  resolveMeetingEnvMode
36
- } from "./chunk-6LGLI46Q.js";
39
+ } from "./chunk-L2LMBFG5.js";
37
40
  import {
38
41
  EB_BASE,
39
42
  EB_ENDPOINTS,
@@ -65,10 +68,13 @@ import {
65
68
  toIdString,
66
69
  verifyLease,
67
70
  writeBody
68
- } from "./chunk-XHMJBRLZ.js";
71
+ } from "./chunk-6DVL5IN5.js";
69
72
  import {
70
73
  CONTINUATION_TTL_SECONDS
71
74
  } from "./chunk-7BDPM5ST.js";
75
+ import {
76
+ packagePath
77
+ } from "./chunk-SHYQUBY3.js";
72
78
 
73
79
  // src/shortcuts/meeting/operations/meetings.ts
74
80
  function overlapsDate(beginDatetime, endDatetime, date) {
@@ -2229,7 +2235,7 @@ var meetingAttachmentAttach = {
2229
2235
  if (mode === "append" && existingIds.length === 0) {
2230
2236
  existingIds.push(...beforeIds);
2231
2237
  }
2232
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
2238
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
2233
2239
  const list = getMeetingOperation2("meeting.eb.meeting.list");
2234
2240
  let fileId = incomingFileId;
2235
2241
  let name = String(args.name ?? "").trim();
@@ -2317,7 +2323,7 @@ function textOf(value) {
2317
2323
  return value === void 0 || value === null ? "" : String(value);
2318
2324
  }
2319
2325
  async function readMinute(env, id) {
2320
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
2326
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
2321
2327
  const detail = getMeetingOperation2("meeting.eb.minute.detail");
2322
2328
  const result = await detail.handler({ id }, env);
2323
2329
  const row = result?.data?.data;
@@ -2357,6 +2363,10 @@ var meetingMinuteWriteContent = {
2357
2363
  type: "string",
2358
2364
  enum: ["0", "1", "2", "3", "4"],
2359
2365
  description: "\u663E\u5F0F\u6307\u5B9A\u72B6\u6001\uFF08\u4E00\u822C\u4E0D\u8981\u4F20\uFF0C\u4EA4\u7ED9\u81EA\u52A8\u89C4\u5219\uFF09\u3002\u4F20\u4E86\u4EE5\u4F60\u4E3A\u51C6"
2366
+ },
2367
+ with_doc: {
2368
+ type: "boolean",
2369
+ description: "\u5199\u5B8C\u5185\u5BB9\u540E\u662F\u5426\u751F\u6210 docx \u5E76\u6302\u5230 doc_file\uFF08\u9ED8\u8BA4 true\uFF09\u3002\u7CFB\u7EDF\u4E0D\u4F1A\u6839\u636E\u6B63\u6587\u81EA\u52A8\u51FA\u6587\u6863\uFF0C\u4E0D\u751F\u6210\u7EAA\u8981\u6587\u4EF6\u5B57\u6BB5\u5C31\u4E00\u76F4\u7A7A\u7740\uFF1B\u4F20 false \u53EF\u8DF3\u8FC7"
2360
2370
  }
2361
2371
  },
2362
2372
  required: ["id", "mt_id"]
@@ -2396,7 +2406,7 @@ var meetingMinuteWriteContent = {
2396
2406
  } else {
2397
2407
  statusReason = "\u4EC5\u6E05\u7A7A\u5185\u5BB9\uFF0C\u672A\u6539\u72B6\u6001";
2398
2408
  }
2399
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
2409
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
2400
2410
  const prepare = getMeetingOperation2("meeting.eb.minute.update.prepare");
2401
2411
  const apply = getMeetingOperation2("meeting.eb.minute.update.apply");
2402
2412
  const prepared = await prepare.handler({ id, mt_id: mtId, ...patch }, env);
@@ -2409,6 +2419,60 @@ var meetingMinuteWriteContent = {
2409
2419
  if (textOf(after.minutes_content) !== textOf(patch.minutes_content ?? after.minutes_content)) {
2410
2420
  warnings.push("minutes_content \u56DE\u8BFB\u4E0E\u5199\u5165\u503C\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u4EBA\u5DE5\u6838\u5BF9\uFF08\u670D\u52A1\u7AEF\u53EF\u80FD\u505A\u4E86\u5BCC\u6587\u672C\u5904\u7406\uFF09");
2411
2421
  }
2422
+ let minuteDoc = null;
2423
+ if (args.with_doc !== false) {
2424
+ try {
2425
+ const { buildMinuteDocx } = await import("./minute-doc-JLS4KMFZ.js");
2426
+ const { meetingStateDir: meetingStateDir2 } = await import("./env-BVVFIN4P.js");
2427
+ const { mkdir: mkdir4, writeFile: writeFile4 } = await import("node:fs/promises");
2428
+ const { join: join3 } = await import("node:path");
2429
+ const subject = textOf(after.mt_minutes_subject).trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
2430
+ const body = textOf(after.parse_content) || textOf(after.minutes_content);
2431
+ const buf = buildMinuteDocx({ title: subject, meta: [`\u4F1A\u8BAE id\uFF1A${mtId}`], content: body });
2432
+ const dir = join3(meetingStateDir2(env.ctx), "minute-docs");
2433
+ await mkdir4(dir, { recursive: true });
2434
+ const filePath = join3(dir, `${id}.docx`);
2435
+ await writeFile4(filePath, buf);
2436
+ const upload = await getMeetingOperation2("meeting.attachment.upload").handler(
2437
+ { file: filePath, name: `${subject.replace(/[\\/:*?"<>|]+/g, "-")}.docx`, module: "meeting", refId: mtId },
2438
+ env
2439
+ );
2440
+ const fileId = textOf(upload?.data?.fileId);
2441
+ if (!fileId) {
2442
+ warnings.push("\u7EAA\u8981\u6587\u6863\u5DF2\u751F\u6210\u4F46\u4E0A\u4F20\u672A\u8FD4\u56DE fileId\uFF0Cdoc_file \u4ECD\u4E3A\u7A7A");
2443
+ } else {
2444
+ const docPrepared = await getMeetingOperation2("meeting.eb.minute.update.prepare").handler(
2445
+ { id, mt_id: mtId, doc_file: fileId, mt_minutes: fileId, file_type: "0", minutes_status: "2" },
2446
+ env
2447
+ );
2448
+ await getMeetingOperation2("meeting.eb.minute.update.apply").handler(
2449
+ { confirm: true, continuation: docPrepared?.data?.continuation },
2450
+ env
2451
+ );
2452
+ const check = await readMinute(env, id);
2453
+ const attached = textOf(check.doc_file) === fileId;
2454
+ minuteDoc = { fileId, name: `${subject}.docx`, size: buf.length, attached };
2455
+ if (!attached) warnings.push("\u7EAA\u8981\u6587\u6863\u5DF2\u4E0A\u4F20\uFF0C\u4F46 doc_file \u56DE\u8BFB\u4E3A\u7A7A\uFF08\u53EF\u80FD\u88AB\u670D\u52A1\u7AEF\u8986\u76D6\uFF09\uFF0C\u53EF\u7A0D\u540E\u91CD\u8BD5");
2456
+ }
2457
+ } catch (error) {
2458
+ warnings.push(`\u7EAA\u8981\u6587\u6863\u751F\u6210\u5931\u8D25\uFF08\u6B63\u6587\u4E0D\u53D7\u5F71\u54CD\uFF09\uFF1A${String(error?.message ?? error).slice(0, 120)}`);
2459
+ }
2460
+ }
2461
+ if (args.with_doc !== false) {
2462
+ try {
2463
+ const { ensureMinuteDoc } = await import("./minute-doc-JLS4KMFZ.js");
2464
+ const better = await ensureMinuteDoc(env, {
2465
+ id,
2466
+ mtId,
2467
+ subject: textOf(after.mt_minutes_subject) || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`,
2468
+ content: textOf(after.parse_content) || textOf(after.minutes_content)
2469
+ });
2470
+ if (better) minuteDoc = better;
2471
+ if (better && better.docId === "") warnings.push("\u7EAA\u8981\u6587\u6863\u5DF2\u6302\u5230\u9644\u4EF6\uFF0C\u4F46\u672A\u751F\u6210\u6587\u6863\u4E2D\u5FC3\u6587\u6863\uFF08mt_minutes \u53EF\u80FD\u4ECD\u4E3A\u7A7A\uFF09");
2472
+ } catch (error) {
2473
+ warnings.push(`\u7EAA\u8981\u6587\u6863\u751F\u6210\u5931\u8D25\uFF08\u6B63\u6587\u4E0D\u53D7\u5F71\u54CD\uFF09\uFF1A${String(error?.message ?? error).slice(0, 120)}`);
2474
+ }
2475
+ }
2412
2476
  return meetingSuccess(
2413
2477
  "meeting.minute.writeContent",
2414
2478
  {
@@ -2423,7 +2487,8 @@ var meetingMinuteWriteContent = {
2423
2487
  parseContentLength: textOf(after.parse_content).length,
2424
2488
  videoTaskId: textOf(after.video_taskId),
2425
2489
  videoTaskResult: textOf(after.video_taskResult),
2426
- applyResult: applied?.data ?? null
2490
+ applyResult: applied?.data ?? null,
2491
+ ...minuteDoc ? { minuteDoc } : {}
2427
2492
  },
2428
2493
  warnings.length > 0 ? { warnings } : void 0
2429
2494
  );
@@ -2735,6 +2800,10 @@ var meetingMinuteFromGroupChat = {
2735
2800
  description: "text=\u53EA\u62FC\u539F\u6587\u5199\u8FDB\u7EAA\u8981\uFF08\u9ED8\u8BA4\uFF0C\u6700\u5FEB\uFF09\uFF1Bminutes=\u7EE7\u7EED\u8C03 ESB \u751F\u6210\u7EAA\u8981\u6587\u6848\uFF1Bdocument=\u518D\u751F\u6210\u6587\u6863\u4E0A\u4F20 OA"
2736
2801
  },
2737
2802
  employeeId: { type: "string", description: "ESB \u89E6\u53D1\u4EBA id\uFF0C\u7701\u7565\u65F6\u7528\u5F53\u524D\u767B\u5F55\u4EBA" },
2803
+ with_doc: {
2804
+ type: "boolean",
2805
+ description: "\u662F\u5426\u751F\u6210\u7EAA\u8981 docx \u5E76\u6302\u5230 doc_file\uFF08\u9ED8\u8BA4 true\uFF09\u3002\u7CFB\u7EDF\u4E0D\u4F1A\u6839\u636E\u6B63\u6587\u81EA\u52A8\u51FA\u6587\u6863\uFF0C\u4E0D\u751F\u6210\u7684\u8BDD\u7EAA\u8981\u6587\u4EF6\u5B57\u6BB5\u4F1A\u4E00\u76F4\u7A7A\u7740\uFF1B\u4F20 false \u53EF\u8DF3\u8FC7"
2806
+ },
2738
2807
  aiPageId: {
2739
2808
  type: "string",
2740
2809
  description: "\u667A\u80FD\u7EAA\u8981\u9875\u9762 id\uFF08mt_minutes_ai_page\uFF09\u3002\u7701\u7565\u65F6\u4ECE\u8BE5\u4F1A\u8BAE\u5DF2\u6709\u7EAA\u8981\u53CD\u67E5"
@@ -2762,7 +2831,7 @@ var meetingMinuteFromGroupChat = {
2762
2831
  const mtId = textOf2(args.mt_id).trim();
2763
2832
  if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
2764
2833
  const pipeline = ["text", "minutes", "document"].includes(args.pipeline) ? args.pipeline : "text";
2765
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
2834
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
2766
2835
  const ctx = env.ctx;
2767
2836
  let stepStart = Date.now();
2768
2837
  const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
@@ -2786,7 +2855,7 @@ var meetingMinuteFromGroupChat = {
2786
2855
  }
2787
2856
  mark("readMeeting", stepStart);
2788
2857
  const pullStart = Date.now();
2789
- const { createImHost } = await import("./host-M4XP5URR.js");
2858
+ const { createImHost } = await import("./host-MFXRA2MY.js");
2790
2859
  const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
2791
2860
  const { getImOperation } = await import("./registry-E5RQJVWN.js");
2792
2861
  const imEnv = { ctx, host: createImHost(ctx), continuation: createImContinuationSigner(ctx) };
@@ -2856,7 +2925,7 @@ var meetingMinuteFromGroupChat = {
2856
2925
  try {
2857
2926
  const { readFile: readFile4 } = await import("node:fs/promises");
2858
2927
  const buffer = await readFile4(file);
2859
- const { extractText } = await import("./attachment-content-2EPEI4HV.js");
2928
+ const { extractText } = await import("./attachment-content-QGM5MLQE.js");
2860
2929
  const extracted = extractText(buffer, file, "");
2861
2930
  if (extracted.text.trim()) {
2862
2931
  extraSections.push(`\u3010\u6750\u6599\uFF1A${file.split(/[\\/]/).pop() ?? file}\u3011
@@ -2985,9 +3054,9 @@ ${groupTranscript}` : ""
2985
3054
  if (!employeeId) {
2986
3055
  warnings.push("\u672A\u53D6\u5230 ESB \u89E6\u53D1\u4EBA id\uFF08employeeId\uFF09\uFF0C\u5DF2\u8DF3\u8FC7\u540E\u7EED ESB \u8C03\u7528");
2987
3056
  } else {
2988
- const { createEsbHost } = await import("./host-3TNBMDTR.js");
3057
+ const { createEsbHost } = await import("./host-KJT3G5D2.js");
2989
3058
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
2990
- const { getEsbOperation } = await import("./registry-QJCZ2GVG.js");
3059
+ const { getEsbOperation } = await import("./registry-SS5J2FZQ.js");
2991
3060
  const esbEnv = { ctx, host: createEsbHost(ctx), continuation: createEsbContinuationSigner(ctx) };
2992
3061
  const prepareOp = getEsbOperation("esb.trigger.prepare");
2993
3062
  const applyOp = getEsbOperation("esb.trigger.apply");
@@ -3028,6 +3097,50 @@ ${groupTranscript}` : ""
3028
3097
  const row = final?.data?.data ?? {};
3029
3098
  result.finalStatus = textOf2(row.minutes_status);
3030
3099
  result.parseContentLength = textOf2(row.parse_content).length;
3100
+ if (args.with_doc !== false) {
3101
+ const docStarted = Date.now();
3102
+ try {
3103
+ const { buildMinuteDocx } = await import("./minute-doc-JLS4KMFZ.js");
3104
+ const { meetingStateDir: meetingStateDir2 } = await import("./env-BVVFIN4P.js");
3105
+ const { mkdir: mkdir4, writeFile: writeFile4 } = await import("node:fs/promises");
3106
+ const { join: join3 } = await import("node:path");
3107
+ const body = textOf2(row.parse_content) || textOf2(row.minutes_content) || transcript;
3108
+ const meta = [
3109
+ `\u4F1A\u8BAE\uFF1A${textOf2(meeting.mt_name)}`,
3110
+ ...meeting.begin_datetime ? [`\u65F6\u95F4\uFF1A${textOf2(meeting.begin_datetime)} ~ ${textOf2(meeting.end_datetime)}`] : [],
3111
+ ...meeting.address ? [`\u5730\u70B9\uFF1A${textOf2(meeting.address)}`] : []
3112
+ ];
3113
+ const buf = buildMinuteDocx({ title: subject, meta, content: body });
3114
+ const dir = join3(meetingStateDir2(env.ctx), "minute-docs");
3115
+ await mkdir4(dir, { recursive: true });
3116
+ const filePath = join3(dir, `${minuteId}.docx`);
3117
+ await writeFile4(filePath, buf);
3118
+ const upload = await getMeetingOperation2("meeting.attachment.upload").handler(
3119
+ { file: filePath, name: `${subject.replace(/[\\/:*?"<>|]+/g, "-")}.docx`, module: "meeting", refId: mtId },
3120
+ env
3121
+ );
3122
+ const fileId = textOf2(upload?.data?.fileId);
3123
+ if (!fileId) {
3124
+ warnings.push("\u7EAA\u8981\u6587\u6863\u5DF2\u751F\u6210\u4F46\u4E0A\u4F20\u672A\u8FD4\u56DE fileId\uFF0Cdoc_file \u4ECD\u4E3A\u7A7A");
3125
+ } else {
3126
+ const updatePrepared = await getMeetingOperation2("meeting.eb.minute.update.prepare").handler(
3127
+ { id: minuteId, mt_id: mtId, doc_file: fileId, mt_minutes: fileId, file_type: "0" },
3128
+ env
3129
+ );
3130
+ await getMeetingOperation2("meeting.eb.minute.update.apply").handler(
3131
+ { confirm: true, continuation: updatePrepared?.data?.continuation },
3132
+ env
3133
+ );
3134
+ const afterDoc = await getMeetingOperation2("meeting.eb.minute.detail").handler({ id: minuteId }, env);
3135
+ const attached = textOf2((afterDoc?.data?.data ?? {}).doc_file) === fileId;
3136
+ result.minuteDoc = { fileId, name: `${subject}.docx`, size: buf.length, attached };
3137
+ if (!attached) warnings.push("\u7EAA\u8981\u6587\u6863\u5DF2\u4E0A\u4F20\uFF0C\u4F46 doc_file \u56DE\u8BFB\u4E3A\u7A7A\uFF08\u53EF\u80FD\u88AB\u670D\u52A1\u7AEF\u8986\u76D6\uFF09\uFF0C\u53EF\u7A0D\u540E\u91CD\u8BD5");
3138
+ }
3139
+ } catch (error) {
3140
+ warnings.push(`\u7EAA\u8981\u6587\u6863\u751F\u6210\u5931\u8D25\uFF08\u6B63\u6587\u4E0D\u53D7\u5F71\u54CD\uFF09\uFF1A${String(error?.message ?? error).slice(0, 120)}`);
3141
+ }
3142
+ mark("minuteDoc", docStarted);
3143
+ }
3031
3144
  result.documentId = textOf2(row.mt_minutes) || documentIdFromFlow || null;
3032
3145
  result.timings = { ...timings, total: Date.now() - startedAt };
3033
3146
  return meetingSuccess("meeting.minute.fromGroupChat", result, warnings.length > 0 ? { warnings } : void 0);
@@ -3175,7 +3288,7 @@ var meetingDecisionNotifyGroup = {
3175
3288
  const warnings = [];
3176
3289
  const mtId = textOf3(args.mt_id).trim();
3177
3290
  if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
3178
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
3291
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
3179
3292
  const ctx = env.ctx;
3180
3293
  const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
3181
3294
  { mt_id: mtId, pageNo: 1, pageSize: 1 },
@@ -3239,7 +3352,7 @@ var meetingDecisionNotifyGroup = {
3239
3352
  charCount: formatted.text.length,
3240
3353
  text: formatted.text
3241
3354
  };
3242
- const { createImHost } = await import("./host-M4XP5URR.js");
3355
+ const { createImHost } = await import("./host-MFXRA2MY.js");
3243
3356
  const imHost = createImHost(ctx);
3244
3357
  let displayText = formatted.text;
3245
3358
  let wireText = formatted.text;
@@ -3477,7 +3590,7 @@ var meetingPipelineRun = {
3477
3590
  const needsConfirm = level === "tasks" || level === "notify";
3478
3591
  const confirmed = args.confirm === true;
3479
3592
  const executedLevel = needsConfirm && !confirmed ? "document" : level;
3480
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
3593
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
3481
3594
  const ctx = env.ctx;
3482
3595
  let stepStart = Date.now();
3483
3596
  const reuseMinuteId = textOf4(args.minuteId).trim();
@@ -3546,7 +3659,7 @@ var meetingPipelineRun = {
3546
3659
  ]);
3547
3660
  }
3548
3661
  stepStart = Date.now();
3549
- const { createHrmHost } = await import("./host-G3VU7SDW.js");
3662
+ const { createHrmHost } = await import("./host-W4JCNRFS.js");
3550
3663
  const { getHrmOperation } = await import("./registry-3UGIWH53.js");
3551
3664
  const hrmEnv = { ctx, host: createHrmHost(ctx) };
3552
3665
  const queryOp = getHrmOperation("hrm.employee.query");
@@ -3849,7 +3962,7 @@ function formatTimeRange(start, end) {
3849
3962
  }
3850
3963
  async function loadAgendaFromTopics(env, mtId) {
3851
3964
  try {
3852
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
3965
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
3853
3966
  const operation = getMeetingOperation2("meeting.eb.topic.list");
3854
3967
  const result = await operation.handler({ mt_id: mtId, pageNo: 1, pageSize: 200 }, env);
3855
3968
  const rows = result.data?.rows ?? [];
@@ -4000,7 +4113,7 @@ async function supplementRowFromDetail(row, mtId, env) {
4000
4113
  const missing = DETAIL_FALLBACK_KEYS.filter((key) => isBlank(row[key]));
4001
4114
  if (missing.length === 0) return { row, filled: [] };
4002
4115
  try {
4003
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
4116
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
4004
4117
  const detailOperation = getMeetingOperation2("meeting.eb.meeting.detail");
4005
4118
  const result = await detailOperation.handler({ id: mtId }, env);
4006
4119
  const flat = result?.data?.data ?? result?.data ?? {};
@@ -4174,7 +4287,7 @@ var meetingInvitationRender = {
4174
4287
  };
4175
4288
  dataSource = "payload";
4176
4289
  } else {
4177
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
4290
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
4178
4291
  const listOperation = getMeetingOperation2("meeting.eb.meeting.list");
4179
4292
  try {
4180
4293
  const listed = await listOperation.handler({ mt_id: mtId, pageNo: 1, pageSize: 1 }, env);
@@ -4518,7 +4631,7 @@ var meetingInvitationPublish = {
4518
4631
  "\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"
4519
4632
  );
4520
4633
  }
4521
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
4634
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
4522
4635
  const render = getMeetingOperation2("meeting.invitation.render");
4523
4636
  const rendered = await render.handler(
4524
4637
  {
@@ -4550,8 +4663,8 @@ var meetingInvitationPublish = {
4550
4663
  folder_type: String(args.folder_type ?? DEFAULT_FOLDER_TYPE),
4551
4664
  author_id: authorId
4552
4665
  };
4553
- const { executeCaizhilianOperation } = await import("./operations-J7PUIVWZ.js");
4554
- const { createCaizhilianHost } = await import("./host-7NTIBSPK.js");
4666
+ const { executeCaizhilianOperation } = await import("./operations-ZPWBMYKE.js");
4667
+ const { createCaizhilianHost } = await import("./host-TTSGY5NZ.js");
4555
4668
  const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
4556
4669
  const caizhilianEnv = {
4557
4670
  ctx: env.ctx,
@@ -5233,7 +5346,7 @@ var meetingSummaryGet = {
5233
5346
  const mtId = textOf5(args.mt_id).trim();
5234
5347
  if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
5235
5348
  const ctx = env.ctx;
5236
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
5349
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
5237
5350
  const warnings = [];
5238
5351
  const timings = {};
5239
5352
  const include = Array.isArray(args.include) && args.include.length > 0 ? args.include.filter((item) => ALL_SECTIONS.includes(item)) : ALL_SECTIONS;
@@ -5369,7 +5482,7 @@ var meetingSummaryGet = {
5369
5482
  warnings.push("\u8BE5\u4F1A\u8BAE\u6CA1\u6709\u5173\u8054\u7FA4\u804A\uFF08imchat_groupid \u4E3A\u7A7A\uFF09\uFF0Cchat \u6BB5\u4E3A null");
5370
5483
  } else {
5371
5484
  try {
5372
- const { createImHost } = await import("./host-M4XP5URR.js");
5485
+ const { createImHost } = await import("./host-MFXRA2MY.js");
5373
5486
  const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
5374
5487
  const { getImOperation } = await import("./registry-E5RQJVWN.js");
5375
5488
  const imEnv = {
@@ -5495,7 +5608,7 @@ var meetingFormFields = {
5495
5608
  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"
5496
5609
  }, { warnings: resolved.warnings });
5497
5610
  }
5498
- const { createEbuilderFormHost } = await import("./host-7OWWPLM4.js");
5611
+ const { createEbuilderFormHost } = await import("./host-KOWUMNAY.js");
5499
5612
  const { createEbuilderFormContinuationSigner } = await import("./continuation-3XLYYTKV.js");
5500
5613
  const { executeEbuilderFormOperation } = await import("./operations-62N6EP3C.js");
5501
5614
  const formEnv = {
@@ -5554,7 +5667,7 @@ var MT_STATUS_OVER = "8";
5554
5667
  var CANCELLED_MARK_DELAY_MS = 800;
5555
5668
  async function isCancelledMeeting(env, mtId) {
5556
5669
  try {
5557
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
5670
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
5558
5671
  const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
5559
5672
  // withCount:false —— 这里只要一行状态,不必额外请求 count(少一次往返,也便于测试替身)
5560
5673
  { mt_id: mtId, pageNo: 1, pageSize: 1, withCount: false },
@@ -5585,6 +5698,65 @@ function businessFailed(response, interfacePk) {
5585
5698
  );
5586
5699
  }
5587
5700
  }
5701
+ async function resolveDecisionPeople(env, input, ownerId) {
5702
+ const rows = Array.isArray(input) ? input : [];
5703
+ const tokensOf = (value) => String(value ?? "").split(/[,;,;\s]+/).map((item) => item.trim()).filter((item) => item !== "");
5704
+ const nameTokens = /* @__PURE__ */ new Set();
5705
+ for (const row of rows) {
5706
+ const source = row && typeof row === "object" ? row : {};
5707
+ for (const key of ["executors", "rummager"]) {
5708
+ for (const token of tokensOf(source[key])) {
5709
+ if (!/^\d+$/.test(token)) nameTokens.add(token);
5710
+ }
5711
+ }
5712
+ }
5713
+ let nameToId = /* @__PURE__ */ new Map();
5714
+ if (nameTokens.size > 0) {
5715
+ const { resolveMemberIdsByName } = await import("./schedule-6QRXIBGU.js");
5716
+ nameToId = await resolveMemberIdsByName(env, [...nameTokens]).catch(() => /* @__PURE__ */ new Map());
5717
+ }
5718
+ const unresolved = [];
5719
+ let rummagerDefaulted = false;
5720
+ const resolved = rows.map((row) => {
5721
+ const source = { ...row };
5722
+ const convert = (value, field) => tokensOf(value).map((token) => {
5723
+ if (/^\d+$/.test(token)) return token;
5724
+ const id = nameToId.get(token);
5725
+ if (!id) {
5726
+ if (!unresolved.includes(token)) unresolved.push(token);
5727
+ return "";
5728
+ }
5729
+ return id;
5730
+ }).filter((id) => id !== "").join(",");
5731
+ if (source.executors !== void 0) source.executors = convert(source.executors, "executors");
5732
+ for (const key of ["begin_datetime", "end_datetime"]) {
5733
+ const raw = String(source[key] ?? "").trim();
5734
+ if (raw === "") continue;
5735
+ if (/^\d{4}-\d{2}-\d{2}$/.test(raw)) {
5736
+ source[key] = `${raw} 09:00`;
5737
+ continue;
5738
+ }
5739
+ source[key] = raw.replace("T", " ").replace(/:\d{2}\.\d+/, "");
5740
+ }
5741
+ if (source.rummager === void 0 || String(source.rummager).trim() === "") {
5742
+ if (ownerId) {
5743
+ source.rummager = ownerId;
5744
+ rummagerDefaulted = true;
5745
+ }
5746
+ } else {
5747
+ source.rummager = convert(source.rummager, "rummager");
5748
+ }
5749
+ return source;
5750
+ });
5751
+ return { rows: resolved, unresolved, rummagerDefaulted };
5752
+ }
5753
+ function autoDecisionSummary(input) {
5754
+ const rows = Array.isArray(input) ? input : [];
5755
+ const titles = rows.map((row) => String(row?.decision_title ?? "").trim()).filter((title) => title !== "");
5756
+ if (titles.length === 0) return "\u672C\u6B21\u4F1A\u8BAE\u5DF2\u5F62\u6210\u51B3\u8BAE\uFF0C\u8BE6\u89C1\u51B3\u8BAE\u660E\u7EC6";
5757
+ const brief = titles.slice(0, 6).join("\uFF1B");
5758
+ return `\u672C\u6B21\u4F1A\u8BAE\u5171\u5F62\u6210 ${titles.length} \u9879\u51B3\u8BAE\uFF1A${brief}${titles.length > 6 ? "\u2026" : ""}`.slice(0, 300);
5759
+ }
5588
5760
  function normalizeDecisionRows(input) {
5589
5761
  if (input === void 0 || input === null) {
5590
5762
  throw meetingValidationError(
@@ -5621,7 +5793,7 @@ var decisionPublishPrepare = {
5621
5793
  additionalProperties: false,
5622
5794
  properties: {
5623
5795
  mt_id: { type: "string", description: "\u4F1A\u8BAE id\uFF08\u5FC5\u586B\uFF09" },
5624
- mt_content: { type: "string", description: "\u51B3\u8BAE\u6982\u8FF0\u6587\u672C\uFF08\u5FC5\u586B\uFF09\uFF1A\u7531\u8C03\u7528\u65B9\u7ED3\u5408\u4F1A\u8BAE\u8BAE\u9898 / \u7EAA\u8981 / \u7528\u6237\u63D0\u4F9B\u7684\u6750\u6599\u6C47\u603B" },
5796
+ mt_content: { type: "string", description: "\u51B3\u8BAE\u6982\u8FF0\u6587\u672C\uFF1A\u7701\u7565\u65F6\u7531 CLI \u7528 detail1 \u7684\u51B3\u7B56\u6807\u9898\u81EA\u52A8\u6C47\u603B\uFF0C\u4E0D\u518D\u56DE\u95EE\u7528\u6237" },
5625
5797
  detail1: {
5626
5798
  type: "array",
5627
5799
  minItems: 1,
@@ -5646,18 +5818,19 @@ var decisionPublishPrepare = {
5646
5818
  },
5647
5819
  mt_status: { type: "string", description: `\u5199\u56DE\u4F1A\u8BAE\u72B6\u6001\uFF0C\u9ED8\u8BA4 ${MT_STATUS_OVER}\uFF08\u7ED3\u675F\uFF09\uFF1B\u4EA7\u751F\u51B3\u8BAE\u5373\u89C6\u4E3A\u4F1A\u8BAE\u7ED3\u675F` }
5648
5820
  },
5649
- required: ["mt_id", "mt_content", "detail1"]
5821
+ required: ["mt_id", "detail1"]
5650
5822
  },
5651
5823
  handler: async (args, env) => {
5652
5824
  const session = await env.host.getSession();
5825
+ const people = await resolveDecisionPeople(env, args.detail1, String(session.userId ?? ""));
5653
5826
  const create = normalizeEbWrite(
5654
5827
  requireEndpoint("create_mt_decision"),
5655
5828
  {
5656
5829
  mt_id: args.mt_id,
5657
- mt_content: args.mt_content,
5830
+ mt_content: String(args.mt_content ?? "").trim() || autoDecisionSummary(args.detail1),
5658
5831
  // 注意:**不要传 data_status** —— 2026-09-21 真机实测该接口拒绝该字段
5659
5832
  // (DataError:dataKey:data_status,该字段不存在),提交状态由系统自动置 1。
5660
- detail1: normalizeDecisionRows(args.detail1)
5833
+ detail1: normalizeDecisionRows(people.rows)
5661
5834
  },
5662
5835
  session.userId
5663
5836
  );
@@ -5699,7 +5872,9 @@ var decisionPublishPrepare = {
5699
5872
  meta: {
5700
5873
  notes: [
5701
5874
  "\u7B2C 1 \u6B65\u5199\u5165\u51B3\u8BAE\u6982\u8FF0\u4E0E\u660E\u7EC6\uFF0C\u7B2C 2 \u6B65\u628A\u4F1A\u8BAE\u5199\u56DE\u4E3A\u300C\u5DF2\u51B3\u8BAE\uFF08is_decision=2\uFF09\u300D\u5E76\u7F6E\u4F1A\u8BAE\u72B6\u6001\u3002",
5702
- "\u51B3\u8BAE\u4EFB\u52A1\u7531 ESB \u8054\u52A8\u6309\u660E\u7EC6\u751F\u6210\uFF0C\u672C\u64CD\u4F5C\u4E0D\u76F4\u63A5\u5199\u4EFB\u52A1\u8868\u3002"
5875
+ "\u51B3\u8BAE\u4EFB\u52A1\u7531 ESB \u8054\u52A8\u6309\u660E\u7EC6\u751F\u6210\uFF0C\u672C\u64CD\u4F5C\u4E0D\u76F4\u63A5\u5199\u4EFB\u52A1\u8868\u3002",
5876
+ ...people.unresolved.length > 0 ? [`\u4EE5\u4E0B\u4EBA\u5458\u6CA1\u89E3\u6790\u5230\u5458\u5DE5 id\uFF0C\u5BF9\u5E94\u6267\u884C\u4EBA/\u68C0\u67E5\u4EBA\u4F1A\u88AB\u670D\u52A1\u7AEF\u4E22\u5F03\uFF1A${people.unresolved.join("\u3001")}`] : [],
5877
+ ...people.rummagerDefaulted ? ["\u68C0\u67E5\u4EBA\u672A\u6307\u5B9A\uFF0C\u5DF2\u9ED8\u8BA4\u586B\u5F53\u524D\u767B\u5F55\u4EBA\uFF08\u53EC\u96C6\u4EBA\uFF09"] : []
5703
5878
  ]
5704
5879
  }
5705
5880
  });
@@ -5725,6 +5900,7 @@ var decisionPublishApply = {
5725
5900
  },
5726
5901
  handler: async (args, env) => {
5727
5902
  const applyName = "meeting.eb.decision.publish.apply";
5903
+ const startedAt = Date.now();
5728
5904
  requireConfirm(args, applyName);
5729
5905
  const lease = await verifyLease(args, applyName, env);
5730
5906
  const payload = lease.payload;
@@ -5736,6 +5912,7 @@ var decisionPublishApply = {
5736
5912
  }
5737
5913
  const session = await env.host.getSession();
5738
5914
  const { create, mtId, mtStatus } = payload;
5915
+ let writeMs = 0;
5739
5916
  const cancelled = await isCancelledMeeting(env, mtId);
5740
5917
  const warnings = [];
5741
5918
  let createResponse;
@@ -5772,6 +5949,7 @@ var decisionPublishApply = {
5772
5949
  { stage: applyName }
5773
5950
  );
5774
5951
  }
5952
+ writeMs = Date.now() - startedAt;
5775
5953
  if (cancelled) {
5776
5954
  await new Promise((resolve5) => {
5777
5955
  setTimeout(resolve5, CANCELLED_MARK_DELAY_MS);
@@ -6367,9 +6545,9 @@ async function runCrmSearchFlow(env, input) {
6367
6545
  if (!employeeId) {
6368
6546
  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");
6369
6547
  }
6370
- const { createEsbHost } = await import("./host-3TNBMDTR.js");
6548
+ const { createEsbHost } = await import("./host-KJT3G5D2.js");
6371
6549
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
6372
- const { getEsbOperation } = await import("./registry-QJCZ2GVG.js");
6550
+ const { getEsbOperation } = await import("./registry-SS5J2FZQ.js");
6373
6551
  const esbEnv = {
6374
6552
  ctx: env.ctx,
6375
6553
  host: createEsbHost(env.ctx),
@@ -6492,6 +6670,136 @@ var ebCrmSearch = {
6492
6670
  };
6493
6671
  var meetingEbCrmOperations = [ebCrmSearch];
6494
6672
 
6673
+ // src/shortcuts/meeting/operations/eb/decision-task-batch.ts
6674
+ var CONCURRENCY = 6;
6675
+ async function runWithConcurrency(items, limit, worker) {
6676
+ const results = new Array(items.length);
6677
+ let cursor = 0;
6678
+ const runners = Array.from({ length: Math.min(limit, items.length) }, async () => {
6679
+ while (cursor < items.length) {
6680
+ const index = cursor;
6681
+ cursor += 1;
6682
+ results[index] = await worker(items[index], index);
6683
+ }
6684
+ });
6685
+ await Promise.all(runners);
6686
+ return results;
6687
+ }
6688
+ var deleteMany = {
6689
+ name: "meeting.eb.decisionTask.deleteMany",
6690
+ resource: "eb",
6691
+ method: "meeting.eb.decisionTask.deleteMany",
6692
+ action: "meeting.eb.decisionTask.deleteMany",
6693
+ summary: "\u6279\u91CF\u5220\u9664\u51B3\u8BAE\u4EFB\u52A1\uFF1A\u4E00\u6B21\u4F20 ids\uFF08\u6216 mt_id \u5220\u9664\u8BE5\u4F1A\u8BAE\u4E0B\u5168\u90E8\u4EFB\u52A1\uFF09\uFF0C\u5185\u90E8\u5E76\u53D1\u5C55\u5F00\uFF0C\u522B\u9010\u6761\u5220",
6694
+ capability: "eb.decision",
6695
+ risk: "high-risk-write",
6696
+ requiresConfirmation: true,
6697
+ inputSchema: {
6698
+ type: "object",
6699
+ additionalProperties: false,
6700
+ properties: {
6701
+ confirm: { const: true, description: "\u5FC5\u987B\u663E\u5F0F\u4F20 true\uFF08\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF09" },
6702
+ ids: {
6703
+ type: "array",
6704
+ items: { type: "string", minLength: 1 },
6705
+ description: "\u4EFB\u52A1 id \u5217\u8868\uFF08decisionTask.list \u7684 rows[].mainTable.id\uFF09"
6706
+ },
6707
+ mt_id: { type: "string", description: "\u4F1A\u8BAE id\uFF1A\u4E0D\u4F20 ids \u65F6\uFF0C\u5220\u9664\u8BE5\u4F1A\u8BAE\u4E0B\u5168\u90E8\u51B3\u8BAE\u4EFB\u52A1" },
6708
+ concurrency: { type: "integer", minimum: 1, maximum: 10, description: "\u5E76\u53D1\u6570\uFF0C\u9ED8\u8BA4 6" },
6709
+ with_decision: { type: "boolean", description: "\u540C\u65F6\u5220\u9664\u8BE5\u4F1A\u8BAE\u7684\u51B3\u8BAE\u6982\u8FF0\uFF08\u542B\u660E\u7EC6\uFF09\uFF0C\u5E76\u628A\u4F1A\u8BAE\u6062\u590D\u4E3A\u672A\u51B3\u8BAE\uFF1B\u9ED8\u8BA4 true" }
6710
+ },
6711
+ required: ["confirm"]
6712
+ },
6713
+ handler: async (args, env) => {
6714
+ if (args.confirm !== true) {
6715
+ throw meetingValidationError("confirmation_required", "\u6279\u91CF\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u5FC5\u987B\u4F20 confirm=true");
6716
+ }
6717
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
6718
+ const listOp = getMeetingOperation2("meeting.eb.decisionTask.list");
6719
+ const prepareOp = getMeetingOperation2("meeting.eb.decisionTask.delete.prepare");
6720
+ const applyOp = getMeetingOperation2("meeting.eb.decisionTask.delete.apply");
6721
+ let ids = Array.isArray(args.ids) ? args.ids.map((id) => String(id).trim()).filter((id) => id !== "") : [];
6722
+ const mtId = String(args.mt_id ?? "").trim();
6723
+ if (ids.length === 0 && mtId !== "") {
6724
+ const listed = await listOp.handler({ mt_id: mtId, pageSize: 200 }, env);
6725
+ const rows = listed?.data?.rows ?? [];
6726
+ ids = rows.map((row) => String((row?.mainTable ?? row)?.id ?? "").trim()).filter((id) => id !== "");
6727
+ }
6728
+ if (ids.length === 0 && (mtId === "" || args.with_decision === false)) {
6729
+ return meetingSuccess("meeting.eb.decisionTask.deleteMany", {
6730
+ status: "NOTHING_TO_DELETE",
6731
+ requested: 0,
6732
+ deleted: 0,
6733
+ failed: [],
6734
+ message: mtId ? `\u4F1A\u8BAE ${mtId} \u4E0B\u6CA1\u6709\u51B3\u8BAE\u4EFB\u52A1` : "\u6CA1\u6709\u53EF\u5220\u9664\u7684\u4EFB\u52A1 id"
6735
+ });
6736
+ }
6737
+ const concurrency = Math.max(1, Math.min(10, Number(args.concurrency) || CONCURRENCY));
6738
+ const startedAt = Date.now();
6739
+ const results = await runWithConcurrency(ids, concurrency, async (id) => {
6740
+ try {
6741
+ const prepared = await prepareOp.handler({ id }, env);
6742
+ const applied = await applyOp.handler(
6743
+ { confirm: true, continuation: prepared?.data?.continuation },
6744
+ env
6745
+ );
6746
+ return { id, ok: applied?.ok !== false, error: applied?.error?.message };
6747
+ } catch (error) {
6748
+ return { id, ok: false, error: String(error?.message ?? error).slice(0, 200) };
6749
+ }
6750
+ });
6751
+ const failed = results.filter((item) => !item.ok);
6752
+ let decisionsDeleted = 0;
6753
+ let meetingUnmarked = false;
6754
+ const decisionFailures = [];
6755
+ if (mtId !== "" && args.with_decision !== false) {
6756
+ const listOp2 = getMeetingOperation2("meeting.eb.decision.list");
6757
+ const delPrepare = getMeetingOperation2("meeting.eb.decision.delete.prepare");
6758
+ const delApply = getMeetingOperation2("meeting.eb.decision.delete.apply");
6759
+ const listed = await listOp2.handler({ mt_id: mtId, pageSize: 200 }, env);
6760
+ const decisionIds = (listed?.data?.rows ?? []).map((row) => String((row?.mainTable ?? row)?.id ?? "").trim()).filter((id) => id !== "");
6761
+ const outcomes = await runWithConcurrency(decisionIds, 4, async (id) => {
6762
+ try {
6763
+ const prepared = await delPrepare.handler({ id }, env);
6764
+ await delApply.handler({ confirm: true, continuation: prepared?.data?.continuation }, env);
6765
+ return true;
6766
+ } catch (error) {
6767
+ decisionFailures.push({ id, error: String(error?.message ?? error).slice(0, 150) });
6768
+ return false;
6769
+ }
6770
+ });
6771
+ decisionsDeleted = outcomes.filter(Boolean).length;
6772
+ if (decisionIds.length > 0 && decisionsDeleted === decisionIds.length) {
6773
+ try {
6774
+ const markPrepare = getMeetingOperation2("meeting.eb.meeting.markDecided.prepare");
6775
+ const markApply = getMeetingOperation2("meeting.eb.meeting.markDecided.apply");
6776
+ const prepared = await markPrepare.handler(
6777
+ { id: mtId, is_decision: "0", decision_Id: "0", mt_status: "8" },
6778
+ env
6779
+ );
6780
+ await markApply.handler({ confirm: true, continuation: prepared?.data?.continuation }, env);
6781
+ meetingUnmarked = true;
6782
+ } catch (error) {
6783
+ decisionFailures.push({ id: mtId, error: `\u6062\u590D\u672A\u51B3\u8BAE\u5931\u8D25\uFF1A${String(error?.message ?? error).slice(0, 120)}` });
6784
+ }
6785
+ }
6786
+ }
6787
+ return meetingSuccess("meeting.eb.decisionTask.deleteMany", {
6788
+ status: failed.length === 0 && decisionFailures.length === 0 ? "COMPLETE" : "PARTIAL",
6789
+ requested: ids.length,
6790
+ deleted: ids.length - failed.length,
6791
+ failed,
6792
+ decisionsDeleted,
6793
+ meetingUnmarked,
6794
+ decisionFailures,
6795
+ concurrency,
6796
+ durationMs: Date.now() - startedAt,
6797
+ hint: "\u56DE\u67E5\uFF1AdecisionTask.list + decision.list\uFF08\u90FD\u5E94\u4E3A 0\uFF09\uFF1B\u4F1A\u8BAE\u8BE6\u60C5 is_decision \u5E94\u4E3A 0"
6798
+ });
6799
+ }
6800
+ };
6801
+ var meetingEbDecisionTaskBatchOperations = [deleteMany];
6802
+
6495
6803
  // src/shortcuts/meeting/operations/eb/index.ts
6496
6804
  var ebAutoRoomPreflight = async (context) => {
6497
6805
  const { extras } = context;
@@ -6579,7 +6887,7 @@ var ebAutoInvitationAfterWrite = async (context) => {
6579
6887
  const mtId = String(context.dataIds?.[0] ?? "").trim();
6580
6888
  if (!isCreate || !enabled || !mtId) return association;
6581
6889
  try {
6582
- const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-ASYCWF2U.js");
6890
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
6583
6891
  const render = getMeetingOperation2("meeting.invitation.render");
6584
6892
  const result = await render.handler({ mtId }, context.env);
6585
6893
  return { ...association ?? {}, invitation: result?.data ?? null };
@@ -6594,13 +6902,116 @@ var ebAutoInvitationAfterWrite = async (context) => {
6594
6902
  };
6595
6903
  }
6596
6904
  };
6905
+ var ebBaseOperations = buildEbOperations(EB_ENDPOINTS, {
6906
+ preflight: ebAutoRoomPreflight,
6907
+ afterWrite: ebAutoInvitationAfterWrite
6908
+ });
6909
+ var ebOperationsWithLinks = ebBaseOperations.map((operation) => {
6910
+ const isList = operation.name === "meeting.eb.meeting.list";
6911
+ const needsUrl = isList || operation.name === "meeting.eb.meeting.detail";
6912
+ if (!needsUrl) return operation;
6913
+ return {
6914
+ ...operation,
6915
+ handler: async (args, env) => {
6916
+ let nextArgs = args;
6917
+ if (isList && args?.mine === true && !args?.hrmmember && !args?.hrm_member) {
6918
+ const session = await env.host.getSession().catch(() => null);
6919
+ const uid = String(session?.userId ?? "").trim();
6920
+ if (uid) nextArgs = { ...nextArgs ?? {}, hrmmember: uid };
6921
+ }
6922
+ if (isList && args?.member && !args?.hrmmember && !args?.hrm_member) {
6923
+ const raw = String(args.member).trim();
6924
+ let uid = /^\d+$/.test(raw) ? raw : "";
6925
+ if (!uid) {
6926
+ const { resolveMemberIdsByName } = await import("./schedule-6QRXIBGU.js");
6927
+ const map = await resolveMemberIdsByName(env, [raw]).catch(() => /* @__PURE__ */ new Map());
6928
+ uid = String(map.get(raw) ?? "");
6929
+ }
6930
+ if (uid) {
6931
+ const { member: _member, ...rest } = nextArgs ?? args;
6932
+ nextArgs = { ...rest, hrmmember: uid };
6933
+ }
6934
+ }
6935
+ if (isList && args?.date && !args?.begin_datetime && !args?.begindatetime) {
6936
+ const day = String(args.date).trim();
6937
+ const start = /* @__PURE__ */ new Date(`${day}T00:00:00`);
6938
+ if (!Number.isNaN(start.getTime())) {
6939
+ const end = new Date(start);
6940
+ end.setDate(end.getDate() + 1);
6941
+ const pad2 = (n) => String(n).padStart(2, "0");
6942
+ const fmt = (d) => `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())} 00:00`;
6943
+ const { date: _date, ...rest } = nextArgs ?? args;
6944
+ nextArgs = { ...rest, begindatetime: fmt(start), enddatetime: fmt(end) };
6945
+ }
6946
+ }
6947
+ const result = await operation.handler(nextArgs, env);
6948
+ if (result?.data && needsUrl) await attachMeetingUrls(env, result.data);
6949
+ return result;
6950
+ }
6951
+ };
6952
+ });
6953
+ var decisionPublishAliases = meetingEbDecisionOperations.filter((operation) => operation.name.startsWith("meeting.eb.decision.publish.")).map((operation) => ({ ...operation, name: operation.name.replace("meeting.eb.", "meeting.") }));
6954
+ var DEFAULT_AI_MINUTE_PAGE2 = "1250830691712172036";
6955
+ var ebOperationsWithMinuteDoc = ebOperationsWithLinks.map((operation) => {
6956
+ if (operation.name === "meeting.eb.minute.create.prepare") {
6957
+ return {
6958
+ ...operation,
6959
+ handler: async (args, env) => {
6960
+ const nextArgs = { ...args ?? {} };
6961
+ if (!nextArgs.mt_minutes_ai_page) nextArgs.mt_minutes_ai_page = DEFAULT_AI_MINUTE_PAGE2;
6962
+ if (!String(nextArgs.mt_minutes_subject ?? "").trim() && nextArgs.mt_id) {
6963
+ let meetingName = "";
6964
+ try {
6965
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
6966
+ const detailOp = getMeetingOperation2("meeting.eb.meeting.detail");
6967
+ const detail = await detailOp.handler({ id: String(nextArgs.mt_id) }, env);
6968
+ const row = detail?.data?.data ?? {};
6969
+ meetingName = String(row.name ?? row.mt_name ?? "").trim();
6970
+ } catch {
6971
+ meetingName = "";
6972
+ }
6973
+ nextArgs.mt_minutes_subject = `${meetingName || "\u4F1A\u8BAE"} \u4F1A\u8BAE\u7EAA\u8981`;
6974
+ }
6975
+ return operation.handler(nextArgs, env);
6976
+ }
6977
+ };
6978
+ }
6979
+ if (operation.name !== "meeting.eb.minute.create.apply") return operation;
6980
+ return {
6981
+ ...operation,
6982
+ handler: async (args, env) => {
6983
+ const result = await operation.handler(args, env);
6984
+ try {
6985
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
6986
+ const { ensureMinuteDoc } = await import("./minute-doc-JLS4KMFZ.js");
6987
+ const minuteId = String((result?.data?.dataIds ?? [])[0] ?? "").trim();
6988
+ if (minuteId) {
6989
+ const detail = await getMeetingOperation2("meeting.eb.minute.detail").handler({ id: minuteId }, env);
6990
+ const row = detail?.data?.data ?? {};
6991
+ const doc = await ensureMinuteDoc(env, {
6992
+ id: minuteId,
6993
+ mtId: String(row.mt_id ?? ""),
6994
+ subject: String(row.mt_minutes_subject ?? ""),
6995
+ content: String(row.parse_content || row.minutes_content || "")
6996
+ });
6997
+ if (doc) result.data.minuteDoc = doc;
6998
+ }
6999
+ } catch (error) {
7000
+ const message = String(error?.message ?? error).slice(0, 120);
7001
+ result.warnings = [...result.warnings ?? [], `\u7EAA\u8981\u6587\u6863\u751F\u6210\u5931\u8D25\uFF08\u6B63\u6587\u4E0D\u53D7\u5F71\u54CD\uFF09\uFF1A${message}`];
7002
+ }
7003
+ return result;
7004
+ }
7005
+ };
7006
+ });
7007
+ var minuteCreateAliases = ebOperationsWithMinuteDoc.filter((operation) => operation.name.startsWith("meeting.eb.minute.create.")).map((operation) => ({ ...operation, name: operation.name.replace("meeting.eb.", "meeting.") }));
6597
7008
  var meetingEbOperations = [
6598
- ...buildEbOperations(EB_ENDPOINTS, {
6599
- preflight: ebAutoRoomPreflight,
6600
- afterWrite: ebAutoInvitationAfterWrite
6601
- }),
7009
+ ...ebOperationsWithMinuteDoc,
6602
7010
  ...meetingEbConflictOperations,
6603
7011
  ...meetingEbDecisionOperations,
7012
+ ...decisionPublishAliases,
7013
+ ...minuteCreateAliases,
7014
+ ...meetingEbDecisionTaskBatchOperations,
6604
7015
  ...meetingEbScheduleOperations,
6605
7016
  ...meetingEbCrmOperations,
6606
7017
  ...meetingEbCreateFlowOperations,
@@ -6608,6 +7019,223 @@ var meetingEbOperations = [
6608
7019
  ebRoomRecommendOperation
6609
7020
  ];
6610
7021
 
7022
+ // src/shortcuts/meeting/operations/self-check.ts
7023
+ import { readFileSync } from "node:fs";
7024
+ var selfCheck = {
7025
+ name: "meeting.selfCheck",
7026
+ resource: "self",
7027
+ method: "selfCheck",
7028
+ action: "meeting.selfCheck",
7029
+ summary: '\u81EA\u68C0\uFF1A\u8FD4\u56DE CLI \u7248\u672C\u4E0E\u5173\u952E\u80FD\u529B\u6E05\u5355\uFF08\u5224\u65AD"\u662F\u4E0D\u662F\u6700\u65B0\u5305"\u7528\u8FD9\u4E2A\uFF0C\u4E0D\u8981\u53EA\u770B\u7248\u672C\u53F7\uFF09',
7030
+ capability: "read",
7031
+ risk: "read",
7032
+ inputSchema: { type: "object", additionalProperties: false, properties: {} },
7033
+ handler: async () => {
7034
+ let version = "0.0.0";
7035
+ try {
7036
+ const pkg = JSON.parse(readFileSync(packagePath("package.json"), "utf-8"));
7037
+ version = String(pkg.version ?? "0.0.0");
7038
+ } catch {
7039
+ version = "0.0.0";
7040
+ }
7041
+ const capabilities = {
7042
+ composeOutcome: hasMeetingOperation("meeting.outcome.compose"),
7043
+ deleteTasksWithDecision: hasMeetingOperation("meeting.eb.decisionTask.deleteMany"),
7044
+ selfCheck: hasMeetingOperation("meeting.selfCheck"),
7045
+ minuteCreateAlias: hasMeetingOperation("meeting.minute.create.prepare"),
7046
+ decisionPublishAlias: hasMeetingOperation("meeting.decision.publish.prepare"),
7047
+ memberExpand: hasMeetingOperation("meeting.member.expand")
7048
+ };
7049
+ const missing = Object.entries(capabilities).filter(([, ok]) => !ok).map(([name]) => name);
7050
+ return meetingSuccess("meeting.selfCheck", {
7051
+ version,
7052
+ capabilities,
7053
+ verdict: missing.length === 0 ? "\u5DF2\u662F\u6700\u65B0\u80FD\u529B\u96C6" : `\u7F3A\u5C11 ${missing.length} \u9879\u8F83\u65E9\u80FD\u529B\uFF0C\u5EFA\u8BAE\u5347\u7EA7 CLI\uFF08\u5F53\u524D ${version}\uFF09`,
7054
+ note: "\u5224\u65AD\u662F\u5426\u6700\u65B0\u8BF7\u770B capabilities \u5168\u4E3A true\uFF0C\u4E0D\u8981\u53EA\u770B\u7248\u672C\u53F7\uFF08\u540C\u53F7\u53EF\u80FD\u662F\u4E0D\u540C\u6784\u5EFA\uFF09"
7055
+ });
7056
+ }
7057
+ };
7058
+ var meetingSelfCheckOperations = [selfCheck];
7059
+
7060
+ // src/shortcuts/meeting/operations/compose-outcome.ts
7061
+ var composeOutcome = {
7062
+ name: "meeting.outcome.compose",
7063
+ resource: "outcome",
7064
+ method: "compose",
7065
+ action: "meeting.outcome.compose",
7066
+ summary: "\u4E00\u6761\u547D\u4EE4\u751F\u6210\u4F1A\u8BAE\u7EAA\u8981\uFF08docx + \u5DF2\u5B8C\u6210\uFF09\u5E76\u53D1\u5E03\u51B3\u8BAE\u4EFB\u52A1\uFF1B\u6750\u6599\u6574\u7406\u597D\u540E\u4E00\u6B21\u63D0\u4EA4\uFF0C\u522B\u62C6\u6210 4 \u6B21\u8C03\u7528",
7067
+ capability: "eb.decision",
7068
+ risk: "high-risk-write",
7069
+ requiresConfirmation: true,
7070
+ inputSchema: {
7071
+ type: "object",
7072
+ additionalProperties: false,
7073
+ properties: {
7074
+ confirm: { type: "boolean", description: "\u53EF\u7701\u7565\uFF08\u9ED8\u8BA4 true\uFF09\uFF1B\u4F20 false \u624D\u963B\u6B62\u5199\u5165" },
7075
+ mt_id: { type: "string", description: "\u4F1A\u8BAE id\uFF1B\u4E0E mt_name/date \u4E8C\u9009\u4E00" },
7076
+ mt_name: { type: "string", description: "\u4F1A\u8BAE\u540D\u79F0\u5173\u952E\u8BCD\uFF08\u53EF\u7701\u7565 mt_id\uFF0CCLI \u81EA\u52A8\u89E3\u6790\uFF09" },
7077
+ date: { type: "string", description: "\u4F1A\u8BAE\u65E5\u671F yyyy-MM-dd\uFF0C\u914D\u5408 mt_name/date \u89E3\u6790\u7528" },
7078
+ mine: { type: "boolean", description: "\u53EA\u770B\u81EA\u5DF1\u53C2\u4E0E\u7684\u4F1A\u8BAE\uFF08\u89E3\u6790\u7528\uFF09" },
7079
+ subject: { type: "string", description: "\u7EAA\u8981\u6807\u9898\uFF0C\u9ED8\u8BA4\u300C<\u4F1A\u8BAE\u540D> \u4F1A\u8BAE\u7EAA\u8981\u300D" },
7080
+ minutes_content: { type: "string", minLength: 1, description: "\u7EAA\u8981\u6B63\u6587\uFF08\u6309 SKILL \u7684\u56DB\u6BB5\u7ED3\u6784\uFF09" },
7081
+ mt_content: { type: "string", description: "\u51B3\u8BAE\u6982\u8FF0\uFF1B\u7701\u7565\u65F6\u7528\u660E\u7EC6\u6807\u9898\u81EA\u52A8\u6C47\u603B" },
7082
+ detail1: {
7083
+ type: "array",
7084
+ minItems: 1,
7085
+ description: "\u51B3\u8BAE\u660E\u7EC6\uFF08\u6BCF\u6761=\u4E00\u4E2A\u4EFB\u52A1\uFF09\uFF1Adecision_title / executors / begin_datetime / end_datetime / rummager",
7086
+ items: {
7087
+ type: "object",
7088
+ additionalProperties: true,
7089
+ properties: {
7090
+ decision_title: { type: "string" },
7091
+ executors: { type: "string", description: "\u6267\u884C\u4EBA\uFF1A\u59D3\u540D\u6216\u5458\u5DE5 id\uFF0C\u9017\u53F7\u5206\u9694" },
7092
+ begin_datetime: { type: "string" },
7093
+ end_datetime: { type: "string" },
7094
+ rummager: { type: "string", description: "\u68C0\u67E5\u4EBA\uFF0C\u7701\u7565\u9ED8\u8BA4\u5F53\u524D\u767B\u5F55\u4EBA" }
7095
+ },
7096
+ required: ["decision_title", "executors", "begin_datetime", "end_datetime"]
7097
+ }
7098
+ },
7099
+ with_doc: { type: "boolean", description: "\u662F\u5426\u751F\u6210\u7EAA\u8981 docx \u5E76\u6302\u5230 doc_file/mt_minutes\uFF08\u9ED8\u8BA4 true\uFF09" }
7100
+ },
7101
+ required: ["minutes_content", "detail1"]
7102
+ },
7103
+ handler: async (args, env) => {
7104
+ if (args.confirm === false) {
7105
+ throw meetingValidationError("confirmation_required", "\u4F20\u4E86 confirm=false\uFF0C\u5DF2\u963B\u6B62\u5199\u5165");
7106
+ }
7107
+ const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-LITYOH2W.js");
7108
+ let mtId = String(args.mt_id ?? "").trim();
7109
+ if (!mtId) {
7110
+ const listOp2 = getMeetingOperation2("meeting.eb.meeting.list");
7111
+ const listed = await listOp2.handler(
7112
+ {
7113
+ ...args.date ? { date: String(args.date) } : {},
7114
+ ...args.mine === true ? { mine: true } : {},
7115
+ pageSize: 50
7116
+ },
7117
+ env
7118
+ );
7119
+ const rows = (listed?.data?.rows ?? []).map((row) => row?.mainTable ?? row).map((row) => ({ id: String(row?.id ?? ""), name: String(row?.name ?? row?.mt_name ?? ""), begin: String(row?.begin_datetime ?? "") })).filter((row) => row.id !== "" && (!args.mt_name || row.name.includes(String(args.mt_name))));
7120
+ if (rows.length === 1) {
7121
+ mtId = rows[0].id;
7122
+ } else {
7123
+ throw meetingValidationError(
7124
+ "meeting_not_resolved",
7125
+ `\u672A\u80FD\u552F\u4E00\u5B9A\u4F4D\u4F1A\u8BAE\uFF08\u5019\u9009 ${rows.length} \u4E2A\uFF09\uFF1A\u4F20 mt_id\uFF0C\u6216\u8865 date / mt_name \u6536\u7A84`,
7126
+ { candidates: rows.slice(0, 10) }
7127
+ );
7128
+ }
7129
+ }
7130
+ const warnings = [];
7131
+ const startedAt = Date.now();
7132
+ let subject = String(args.subject ?? "").trim();
7133
+ if (!subject) {
7134
+ try {
7135
+ const detailOp = getMeetingOperation2("meeting.eb.meeting.detail");
7136
+ const detail = await detailOp.handler({ id: mtId }, env);
7137
+ const row = detail?.data?.data ?? {};
7138
+ subject = `${String(row.name || row.mt_name || "\u4F1A\u8BAE")} \u4F1A\u8BAE\u7EAA\u8981`;
7139
+ } catch {
7140
+ subject = "\u4F1A\u8BAE\u7EAA\u8981";
7141
+ }
7142
+ }
7143
+ const listOp = getMeetingOperation2("meeting.eb.minute.list");
7144
+ const existingList = await listOp.handler({ mt_id: mtId, pageSize: 100 }, env);
7145
+ const existing = (existingList?.data?.rows ?? []).map((row) => row?.mainTable ?? row).find((row) => String(row?.mt_minutes_subject ?? "").trim() === subject);
7146
+ let minuteId = "";
7147
+ let minuteDoc = null;
7148
+ if (existing?.id) {
7149
+ const written = await getMeetingOperation2("meeting.minute.writeContent").handler(
7150
+ { id: String(existing.id), mt_id: mtId, minutes_content: String(args.minutes_content ?? ""), with_doc: true },
7151
+ env
7152
+ );
7153
+ minuteId = String(existing.id);
7154
+ minuteDoc = written?.data?.minuteDoc ?? null;
7155
+ for (const w of written?.warnings ?? []) warnings.push(String(w));
7156
+ } else {
7157
+ const createPrepare = getMeetingOperation2("meeting.eb.minute.create.prepare");
7158
+ const createApply = getMeetingOperation2("meeting.eb.minute.create.apply");
7159
+ const prepared = await createPrepare.handler(
7160
+ {
7161
+ mt_id: mtId,
7162
+ mt_minutes_subject: subject,
7163
+ minutes_content: String(args.minutes_content ?? "")
7164
+ },
7165
+ env
7166
+ );
7167
+ const applied = await createApply.handler(
7168
+ { confirm: true, continuation: prepared?.data?.continuation },
7169
+ env
7170
+ );
7171
+ minuteId = String((applied?.data?.dataIds ?? [])[0] ?? "").trim();
7172
+ if (!minuteId) {
7173
+ throw meetingValidationError("minute_create_failed", "\u7EAA\u8981\u521B\u5EFA\u672A\u8FD4\u56DE id", { applied: applied?.data ?? null });
7174
+ }
7175
+ minuteDoc = applied?.data?.minuteDoc ?? null;
7176
+ for (const w of applied?.warnings ?? []) warnings.push(String(w));
7177
+ }
7178
+ if (args.with_doc !== false && !minuteDoc) {
7179
+ warnings.push("\u7EAA\u8981\u5DF2\u521B\u5EFA\uFF0C\u4F46\u6587\u6863\u672A\u6302\u4E0A\uFF08minuteDoc \u4E3A\u7A7A\uFF09\uFF0C\u8BF7\u68C0\u67E5\u9644\u4EF6\u4E0A\u4F20");
7180
+ }
7181
+ const rawDetails = Array.isArray(args.detail1) ? args.detail1 : [];
7182
+ const details = rawDetails.map((row) => {
7183
+ const executors = Array.isArray(row?.executors) ? row.executors.map((x) => String(x)).join(",") : row?.executors ?? row?.executor ?? "";
7184
+ return {
7185
+ ...row,
7186
+ decision_title: String(row?.decision_title ?? row?.title ?? row?.task ?? "").trim(),
7187
+ executors: String(executors).trim(),
7188
+ begin_datetime: String(row?.begin_datetime ?? row?.begin ?? row?.start ?? "").trim(),
7189
+ end_datetime: String(row?.end_datetime ?? row?.end ?? row?.due ?? row?.deadline ?? "").trim(),
7190
+ ...row?.rummager ?? row?.checker ? { rummager: row.rummager ?? row.checker } : {}
7191
+ };
7192
+ }).filter((row) => row.decision_title !== "");
7193
+ const invalid = details.filter((row) => !row.executors || !row.begin_datetime || !row.end_datetime);
7194
+ if (details.length === 0 || invalid.length > 0) {
7195
+ throw meetingValidationError(
7196
+ "detail1_invalid",
7197
+ "\u51B3\u8BAE\u660E\u7EC6\u4E0D\u5B8C\u6574\uFF1A\u6BCF\u6761\u81F3\u5C11\u8981 decision_title / executors / begin_datetime / end_datetime\uFF08yyyy-MM-dd HH:mm\uFF09",
7198
+ {
7199
+ expectedExample: {
7200
+ decision_title: "\u4F1A\u8BAEEB\u529F\u80FD\u56DE\u5F52",
7201
+ executors: "\u738B\u4E39\u4E39",
7202
+ begin_datetime: "2026-11-17 09:00",
7203
+ end_datetime: "2026-11-30 18:00"
7204
+ },
7205
+ invalidRows: invalid.slice(0, 5)
7206
+ }
7207
+ );
7208
+ }
7209
+ const publishPrepare = getMeetingOperation2("meeting.eb.decision.publish.prepare");
7210
+ const publishApply = getMeetingOperation2("meeting.eb.decision.publish.apply");
7211
+ const decisionPrepared = await publishPrepare.handler(
7212
+ {
7213
+ mt_id: mtId,
7214
+ ...String(args.mt_content ?? "").trim() ? { mt_content: String(args.mt_content) } : {},
7215
+ detail1: details
7216
+ },
7217
+ env
7218
+ );
7219
+ const decisionApplied = await publishApply.handler(
7220
+ { confirm: true, continuation: decisionPrepared?.data?.continuation },
7221
+ env
7222
+ );
7223
+ return meetingSuccess("meeting.outcome.compose", {
7224
+ status: "COMPLETE",
7225
+ mtId,
7226
+ minuteId,
7227
+ minuteDoc,
7228
+ minutesStatus: "2",
7229
+ decisionId: decisionApplied?.data?.decisionId ?? null,
7230
+ decisionCount: details.length,
7231
+ timings: decisionApplied?.data?.timings ?? null,
7232
+ durationMs: Date.now() - startedAt,
7233
+ hint: "\u8FD4\u56DE\u503C\u5373\u7ED3\u679C\uFF1A\u4E0D\u8981\u518D\u9010\u6761\u56DE\u67E5\u7EAA\u8981/\u4EFB\u52A1\uFF1B\u5982\u786E\u9700\u6838\u5BF9\uFF0C\u53EA\u8DD1\u4E00\u6B21 decisionTask.list"
7234
+ }, warnings.length > 0 ? { warnings } : void 0);
7235
+ }
7236
+ };
7237
+ var meetingOutcomeComposeOperations = [composeOutcome];
7238
+
6611
7239
  // src/shortcuts/meeting/operations/registry.ts
6612
7240
  function buildRegistry() {
6613
7241
  const registry = /* @__PURE__ */ new Map();
@@ -6635,7 +7263,9 @@ function buildRegistry() {
6635
7263
  ...meetingQrOperations,
6636
7264
  ...meetingSummaryOperations,
6637
7265
  ...meetingFormFieldOperations,
6638
- ...meetingEbOperations
7266
+ ...meetingEbOperations,
7267
+ ...meetingSelfCheckOperations,
7268
+ ...meetingOutcomeComposeOperations
6639
7269
  ];
6640
7270
  for (const definition of definitions) {
6641
7271
  if (registry.has(definition.name)) {
@@ -6652,7 +7282,10 @@ function meetingOperationDefinitions() {
6652
7282
  function getMeetingOperation(operation) {
6653
7283
  const definition = meetingOperationRegistry.get(operation);
6654
7284
  if (!definition) {
6655
- throw meetingValidationError("operation_unknown", `\u4F1A\u8BAE\u6A21\u5757\u4E0D\u652F\u6301\u64CD\u4F5C\uFF1A${operation}`);
7285
+ const candidate = operation.startsWith("meeting.eb.") ? operation.replace("meeting.eb.", "meeting.") : operation.replace(/^meeting\./, "meeting.eb.");
7286
+ const prepareCandidate = `${operation}.prepare`;
7287
+ const hint = meetingOperationRegistry.has(candidate) ? `\uFF1B\u662F\u5426\u60F3\u7528 ${candidate}\uFF1F` : meetingOperationRegistry.has(prepareCandidate) ? `\uFF1B\u8BE5\u64CD\u4F5C\u9700\u8981\u5148 prepare \u518D apply\uFF0C\u8BD5\u8BD5 ${prepareCandidate} \u548C ${operation}.apply` : "";
7288
+ throw meetingValidationError("operation_unknown", `\u4F1A\u8BAE\u6A21\u5757\u4E0D\u652F\u6301\u64CD\u4F5C\uFF1A${operation}${hint}`);
6656
7289
  }
6657
7290
  return definition;
6658
7291
  }