weaver-work-cli 0.1.76 → 0.1.78

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 (175) hide show
  1. package/README.md +3 -1
  2. package/dist/chunks/{attachment-content-24RL44SE.js → attachment-content-TFOC3Y3X.js} +3 -3
  3. package/dist/chunks/{chunk-FEZK536Z.js → chunk-4PBN7NJY.js} +353 -43
  4. package/dist/chunks/{chunk-SQFKBWTR.js → chunk-5VQ7JHV4.js} +132 -47
  5. package/dist/chunks/{chunk-KJA7CRES.js → chunk-7SQN5IZR.js} +1 -1
  6. package/dist/chunks/{chunk-MS7MKBGJ.js → chunk-BP7BONZO.js} +664 -75
  7. package/dist/chunks/{chunk-L5SCNJKX.js → chunk-DACQKJ6O.js} +1 -1
  8. package/dist/chunks/{chunk-T7HVQ2WP.js → chunk-E2EY3DMS.js} +2 -2
  9. package/dist/chunks/{chunk-WJQJ7YEX.js → chunk-FAC4IFGQ.js} +2 -2
  10. package/dist/chunks/{minute-doc-4BA2R5EA.js → chunk-IBTGXLOT.js} +99 -16
  11. package/dist/chunks/{chunk-OJ4JPD25.js → chunk-LQLIXBJF.js} +6 -8
  12. package/dist/chunks/{chunk-H6N6U2D6.js → chunk-SWFTWNWL.js} +7 -7
  13. package/dist/chunks/{chunk-SU6IJD6D.js → chunk-TD5IOEGN.js} +1 -1
  14. package/dist/chunks/{chunk-Q7RXCK2Y.js → chunk-USYFVIUR.js} +22 -7
  15. package/dist/chunks/{chunk-WHI6YAUE.js → chunk-UZ2E3VNI.js} +1 -1
  16. package/dist/chunks/{chunk-AZC53XSQ.js → chunk-VNEU7OUN.js} +1 -1
  17. package/dist/chunks/{chunk-5QUTQHXF.js → chunk-WNFDR5PC.js} +198 -80
  18. package/dist/chunks/{chunk-NZQRW4KL.js → chunk-Z44YFIN6.js} +2 -2
  19. package/dist/chunks/{chunk-R4PN3OFK.js → chunk-ZOTXXGUM.js} +7 -7
  20. package/dist/chunks/{cli-DFLV57LO.js → cli-WA7FOQKC.js} +10 -10
  21. package/dist/chunks/{conflict-72Q6DM4I.js → conflict-D4GVAURN.js} +2 -2
  22. package/dist/chunks/{contract-IRNRQ5FY.js → contract-GW7US3UF.js} +4399 -3547
  23. package/dist/chunks/{create-flow-UGTDI7SP.js → create-flow-ERDGW3FZ.js} +10 -6
  24. package/dist/chunks/{ehr-PHIBBUIG.js → ehr-P6T7OAAV.js} +1 -1
  25. package/dist/chunks/{entry-mode-5WOXFE67.js → entry-mode-SQU5WTX6.js} +3 -3
  26. package/dist/chunks/{env-H4ALHESA.js → env-DASBNSEM.js} +2 -2
  27. package/dist/chunks/{factory-COX6AVK7.js → factory-A3NAKZAA.js} +1 -1
  28. package/dist/chunks/{group-chat-ZIWQQO4G.js → group-chat-7SEAVAJR.js} +3 -3
  29. package/dist/chunks/{lazy-dispatch-MZ3EZYDL.js → lazy-dispatch-ZDKLS5MR.js} +3 -3
  30. package/dist/chunks/{meeting-XE6CTXYA.js → meeting-7AEQGBAT.js} +18 -12
  31. package/dist/chunks/minute-doc-REI6RUE4.js +20 -0
  32. package/dist/chunks/{project-XREEXFU2.js → project-6PRGBLO2.js} +38 -14
  33. package/dist/chunks/{recruit-stage-TSQWOGQD.js → recruit-stage-TLZJUFHD.js} +543 -463
  34. package/dist/chunks/{registry-F4YFZLOD.js → registry-KQ4TNUWO.js} +1 -1
  35. package/dist/chunks/{registry-7UDUWYB5.js → registry-UVTI323K.js} +12 -11
  36. package/dist/chunks/{room-recommend-FO3HLPNB.js → room-recommend-ELEJUYBN.js} +4 -4
  37. package/dist/chunks/{schedule-DHNNOHVS.js → schedule-XBKY7VEA.js} +4 -4
  38. package/dist/chunks/{update-AV5VOXGY.js → update-77ZUIYSG.js} +2 -2
  39. package/dist/chunks/{workflow-MAGCHWYZ.js → workflow-SYCBS5XD.js} +1 -1
  40. package/dist/index.js +3 -3
  41. package/dist/internal/update/service.js +9 -8
  42. package/dist/shortcuts/contract/data/collection-ledger-html.js +109 -33
  43. package/dist/shortcuts/contract/data/collection-node-catalog.js +26 -2
  44. package/dist/shortcuts/contract/data/report-renderers.js +75 -31
  45. package/dist/shortcuts/contract/data/report-spec.js +17 -3
  46. package/dist/shortcuts/contract/manifest.js +20 -3
  47. package/dist/shortcuts/contract/operations/bizreview-report.js +23 -2
  48. package/dist/shortcuts/contract/operations/collection-node.js +116 -1
  49. package/dist/shortcuts/contract/operations/compare-report.js +27 -5
  50. package/dist/shortcuts/contract/operations/credit-page.js +11 -2
  51. package/dist/shortcuts/contract/operations/docx-slots.js +27 -2
  52. package/dist/shortcuts/contract/operations/draft-submit.js +9 -6
  53. package/dist/shortcuts/contract/operations/elements-build.js +162 -30
  54. package/dist/shortcuts/contract/operations/elements-spec.js +50 -0
  55. package/dist/shortcuts/contract/operations/generated-submit.js +35 -0
  56. package/dist/shortcuts/contract/operations/ledger-card.js +32 -2
  57. package/dist/shortcuts/contract/operations/ledger-stat.js +17 -5
  58. package/dist/shortcuts/contract/operations/ledger.js +88 -16
  59. package/dist/shortcuts/contract/operations/metrics.js +16 -3
  60. package/dist/shortcuts/contract/operations/ops-draft.js +359 -27
  61. package/dist/shortcuts/contract/operations/page.js +23 -0
  62. package/dist/shortcuts/contract/operations/quote-recognize.js +91 -13
  63. package/dist/shortcuts/contract/operations/quote-submit.js +16 -0
  64. package/dist/shortcuts/contract/operations/review-report.js +11 -3
  65. package/dist/shortcuts/contract/operations/save-recognize.js +62 -1
  66. package/dist/shortcuts/contract/operations/triage.js +18 -3
  67. package/dist/shortcuts/contract/operations/viewlink.js +17 -1
  68. package/dist/shortcuts/ehr/operations/recruit.js +255 -90
  69. package/dist/shortcuts/meeting/confirm-gate.js +42 -0
  70. package/dist/shortcuts/meeting/continuation.js +6 -2
  71. package/dist/shortcuts/meeting/minute-doc.js +119 -12
  72. package/dist/shortcuts/meeting/operations/attachment.js +19 -0
  73. package/dist/shortcuts/meeting/operations/compose-outcome.js +24 -2
  74. package/dist/shortcuts/meeting/operations/eb/conflict.js +2 -1
  75. package/dist/shortcuts/meeting/operations/eb/create-flow.js +162 -19
  76. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +22 -3
  77. package/dist/shortcuts/meeting/operations/group-share.js +268 -0
  78. package/dist/shortcuts/meeting/operations/minute-content.js +58 -1
  79. package/dist/shortcuts/meeting/operations/minute-export.js +295 -0
  80. package/dist/shortcuts/meeting/operations/registry.js +4 -0
  81. package/dist/shortcuts/project/operations/read.js +40 -15
  82. package/dist/shortcuts/recruit-stage/context.js +16 -81
  83. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +89 -53
  84. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +15 -5
  85. package/dist/shortcuts/recruit-stage/operations/jd-create.js +46 -108
  86. package/dist/shortcuts/recruit-stage/operations/list.js +203 -74
  87. package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -85
  88. package/dist/shortcuts/recruit-stage/operations/search.js +113 -53
  89. package/dist/shortcuts/recruit-stage/shared.js +153 -4
  90. package/dist/shortcuts/workflow/endpoints.js +2 -0
  91. package/dist/shortcuts/workflow/operations/form.js +11 -0
  92. package/dist/shortcuts/workflow/operations/read.js +24 -5
  93. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +2 -2
  94. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -0
  95. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +28 -4
  96. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.node.js +198 -0
  97. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -2
  98. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subordinate.js +70 -0
  99. package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +15 -5
  100. package/docs/project.md +1 -1
  101. package/package.json +1 -1
  102. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  103. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  104. package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
  105. package/skills/weaver-e10-jinchengda/SKILL.md +64 -28
  106. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +4 -4
  107. package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +1 -1
  108. package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +5 -4
  109. package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +26 -2
  110. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
  111. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +9 -8
  112. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +47 -52
  113. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
  114. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +5 -5
  115. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +1 -1
  116. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +7 -1
  117. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +21 -12
  118. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +44 -1
  119. package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +5 -4
  120. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +8 -0
  121. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +33 -3
  122. package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +1 -1
  123. package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +17 -3
  124. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +12 -12
  125. package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +18 -10
  126. package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +77 -37
  127. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +7 -0
  128. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +55 -12
  129. package/skills/weaver-e10-jinchengda/references/contract-review-todo.md +102 -0
  130. package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +1 -17
  131. package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +11 -8
  132. package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +2 -1
  133. package/skills/weaver-e10-jinchengda/references/orchestration.md +6 -6
  134. package/skills/weaver-e10-meeting/SKILL.md +203 -80
  135. package/skills/weaver-e10-meeting/references/create-quickstart.md +98 -0
  136. package/skills/weaver-e10-meeting/references/delivery-checklist.md +34 -0
  137. package/skills/weaver-e10-meeting/references/error-codes.md +44 -0
  138. package/skills/weaver-e10-meeting/references/minutes-pipeline.md +56 -3
  139. package/skills/weaver-e10-meeting/references/room-recommend.md +2 -0
  140. package/skills/weaver-e10-recruit-stage/SKILL.md +61 -58
  141. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +28 -25
  142. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +20 -14
  143. package/skills/weaver-e10-recruit-stage/lib/recruit-attach-probe.mjs +127 -0
  144. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +71 -25
  145. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +39 -7
  146. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +2 -2
  147. package/skills/weaver-e10-recruit-stage/references/position-templates.md +10 -10
  148. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +8 -5
  149. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +29 -31
  150. package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +4 -2
  151. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +6 -6
  152. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -4
  153. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +3 -3
  154. package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +10 -0
  155. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +2 -1
  156. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +1 -0
  157. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +1 -1
  158. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +10 -28
  159. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +2 -0
  160. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -1
  161. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +2 -2
  162. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
  163. package/skills/weaver-e10-recruit-stage/templates/match-report.html +14 -10
  164. package/skills/weaver-e10-shijingran/SKILL.md +2 -2
  165. package/skills/weaver-e10-shijingran/references/operations.md +5 -2
  166. package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
  167. package/skills/weaver-e10-workflow/SKILL.md +13 -9
  168. package/skills/weaver-e10-workflow/references/todo-dialogue.md +33 -8
  169. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +19 -14
  170. package/skills/weaver-e10-workflow/references/workflow-create.md +1 -1
  171. package/skills/weaver-e10-workflow/references/workflow-query.md +4 -2
  172. package/skills/weaver-e10-workflow/references/workflow-view.md +3 -3
  173. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +132 -42
  174. package/templates/meeting/minute.docx +0 -0
  175. package/skills/weaver-e10-yepiaotong.zip +0 -0
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-AJ62BGAW.js";
19
19
  import {
20
20
  updateCommand
21
- } from "./chunk-SU6IJD6D.js";
21
+ } from "./chunk-TD5IOEGN.js";
22
22
  import {
23
23
  registerE10AuthCommands
24
24
  } from "./chunk-OVTCWLNQ.js";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-WMRNO6IU.js";
6
6
  import {
7
7
  meetingStateDir
8
- } from "./chunk-KJA7CRES.js";
8
+ } from "./chunk-7SQN5IZR.js";
9
9
  import {
10
10
  SCHEMA_ID,
11
11
  meetingSuccess,
12
12
  meetingValidationError,
13
13
  schemaOf
14
- } from "./chunk-WHI6YAUE.js";
14
+ } from "./chunk-UZ2E3VNI.js";
15
15
 
16
16
  // src/shortcuts/meeting/operations/attachment-content.ts
17
17
  import { mkdir, writeFile } from "node:fs/promises";
@@ -3,13 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  readCache,
5
5
  writeCache
6
- } from "./chunk-AZC53XSQ.js";
6
+ } from "./chunk-VNEU7OUN.js";
7
7
  import {
8
8
  SCHEMA_DATETIME_MINUTE,
9
9
  meetingSuccess,
10
10
  meetingValidationError,
11
11
  schemaOf
12
- } from "./chunk-WHI6YAUE.js";
12
+ } from "./chunk-UZ2E3VNI.js";
13
13
 
14
14
  // src/shortcuts/meeting/operations/eb/schedule.ts
15
15
  var SCHEDULE_TYPE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/queryAgendaType";
@@ -3,20 +3,42 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  writeDocxEntries
5
5
  } from "./chunk-WMRNO6IU.js";
6
- import "./chunk-BUSC6UAE.js";
7
6
 
8
7
  // src/shortcuts/meeting/minute-doc.ts
9
8
  function esc(text) {
10
9
  return String(text ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
11
10
  }
12
11
  function para(text, options = {}) {
12
+ const spacing = [];
13
+ if (options.before !== void 0) spacing.push(`w:before="${options.before}"`);
14
+ if (options.after !== void 0) spacing.push(`w:after="${options.after}"`);
15
+ if (options.line !== void 0) spacing.push(`w:line="${options.line}"`, 'w:lineRule="auto"');
13
16
  const props = [
17
+ spacing.length > 0 ? `<w:spacing ${spacing.join(" ")}/>` : "",
14
18
  options.bold ? "<w:b/>" : "",
15
19
  options.size ? `<w:sz w:val="${options.size}"/><w:szCs w:val="${options.size}"/>` : "",
16
20
  options.align ? `<w:jc w:val="${options.align}"/>` : ""
17
21
  ].join("");
18
22
  return `<w:p><w:pPr>${props}</w:pPr><w:r><w:t xml:space="preserve">${esc(text)}</w:t></w:r></w:p>`;
19
23
  }
24
+ function splitRow(line) {
25
+ return line.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((cell) => cell.trim());
26
+ }
27
+ function table(rows, cellSize = 20) {
28
+ const cols = Math.max(...rows.map((row) => row.length), 1);
29
+ const totalWidth = 9026;
30
+ const cellWidth = Math.floor(totalWidth / cols);
31
+ const border = "<w:tblBorders>" + ["top", "left", "bottom", "right", "insideH", "insideV"].map((side) => `<w:${side} w:val="single" w:sz="4" w:space="0" w:color="000000"/>`).join("") + "</w:tblBorders>";
32
+ const body = rows.map((row, rowIndex) => {
33
+ const cells = Array.from({ length: cols }, (_, colIndex) => {
34
+ const text = row[colIndex] ?? "";
35
+ const isHeader = rowIndex === 0;
36
+ return `<w:tc><w:tcPr><w:tcW w:w="${cellWidth}" w:type="dxa"/><w:vAlign w:val="center"/></w:tcPr>` + para(text, { bold: isHeader, size: cellSize }) + "</w:tc>";
37
+ }).join("");
38
+ return `<w:tr>${cells}</w:tr>`;
39
+ }).join("");
40
+ return `<w:tbl><w:tblPr><w:tblW w:w="${totalWidth}" w:type="dxa"/>${border}</w:tblPr>${body}</w:tbl>` + para("", { size: cellSize + 1 });
41
+ }
20
42
  var CONTENT_TYPES = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
21
43
  <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
22
44
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
@@ -27,30 +49,53 @@ var RELS = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
27
49
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
28
50
  <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
29
51
  </Relationships>`;
30
- function buildMinuteDocx(input) {
52
+ var DEFAULT_BODY_SIZES = { body: 21, heading: 28, cell: 20 };
53
+ function buildBodyParagraphsXml(content, sizes = DEFAULT_BODY_SIZES) {
31
54
  const body = [];
32
- body.push(para(input.title, { bold: true, size: 36, align: "center" }));
33
- for (const line of input.meta) {
34
- if (String(line).trim() !== "") body.push(para(line, { size: 21 }));
35
- }
36
- body.push(para("", { size: 21 }));
37
- for (const raw of String(input.content ?? "").split(/\r?\n/)) {
38
- const line = raw.replace(/\s+$/, "");
55
+ const lines = String(content ?? "").split(/\r?\n/);
56
+ for (let i = 0; i < lines.length; i += 1) {
57
+ const line = lines[i].replace(/\s+$/, "");
39
58
  if (line.trim() === "") {
40
- body.push(para("", { size: 21 }));
59
+ body.push(para("", { size: sizes.body, after: 0 }));
60
+ continue;
61
+ }
62
+ const isRow = /^\s*\|.*\|\s*$/.test(line);
63
+ const isSep = /^\s*\|[\s:|-]+\|\s*$/.test(lines[i + 1] ?? "");
64
+ if (isRow && isSep) {
65
+ const rows = [splitRow(line)];
66
+ i += 1;
67
+ while (i + 1 < lines.length && /^\s*\|.*\|\s*$/.test(lines[i + 1])) {
68
+ i += 1;
69
+ rows.push(splitRow(lines[i]));
70
+ }
71
+ body.push(table(rows, sizes.cell));
41
72
  continue;
42
73
  }
43
74
  const heading = line.match(/^#{1,4}\s+(.*)$/);
44
75
  if (heading) {
45
- body.push(para(heading[1], { bold: true, size: 28 }));
76
+ body.push(para(heading[1], { bold: true, size: sizes.heading, before: 240, after: 120, line: 300 }));
46
77
  continue;
47
78
  }
48
- body.push(para(line.replace(/^[-*]\s+/, "\xB7 "), { size: 21 }));
79
+ body.push(para(line.replace(/^[-*]\s+/, "\xB7 "), { size: sizes.body, after: 80, line: 360 }));
80
+ }
81
+ return body.join("");
82
+ }
83
+ function buildMinuteDocumentXml(input) {
84
+ const body = [];
85
+ body.push(para(input.title, { bold: true, size: 36, align: "center" }));
86
+ for (const line of input.meta) {
87
+ if (String(line).trim() !== "") body.push(para(line, { size: 21 }));
49
88
  }
89
+ body.push(para("", { size: 21 }));
90
+ body.push(buildBodyParagraphsXml(String(input.content ?? "")));
50
91
  const documentXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
51
92
  <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
52
93
  <w:body>${body.join("")}<w:sectPr><w:pgSz w:w="11906" w:h="16838"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440"/></w:sectPr></w:body>
53
94
  </w:document>`;
95
+ return documentXml;
96
+ }
97
+ function buildMinuteDocx(input) {
98
+ const documentXml = buildMinuteDocumentXml(input);
54
99
  const entries = [
55
100
  { name: "[Content_Types].xml", data: Buffer.from(CONTENT_TYPES, "utf8") },
56
101
  { name: "_rels/.rels", data: Buffer.from(RELS, "utf8") },
@@ -58,6 +103,40 @@ function buildMinuteDocx(input) {
58
103
  ];
59
104
  return writeDocxEntries(entries);
60
105
  }
106
+ var FLOW_GENERATE_DOCUMENT = "1F638AE31BC746C28A1D9DCF26D91037";
107
+ async function generateMinuteDocViaEsb(env, input) {
108
+ const id = String(input.id ?? "").trim();
109
+ const content = String(input.content ?? "").trim();
110
+ if (!id) return { docId: "", error: "missing_minute_id" };
111
+ if (!content) return { docId: "", error: "empty_content" };
112
+ try {
113
+ const session = await env.host.getSession();
114
+ const employeeId = String(session?.userId ?? "").trim();
115
+ if (!employeeId) return { docId: "", error: "no_employee_id" };
116
+ const flowId = String(input.flowId ?? "").trim() || FLOW_GENERATE_DOCUMENT;
117
+ const { createEsbHost } = await import("./host-EJSJSLVK.js");
118
+ const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
119
+ const { getEsbOperation } = await import("./registry-3VTB3KLV.js");
120
+ const esbEnv = {
121
+ ctx: env.ctx,
122
+ host: createEsbHost(env.ctx),
123
+ continuation: createEsbContinuationSigner(env.ctx)
124
+ };
125
+ const target = /^\d+$/.test(flowId) ? { esbFlowId: flowId } : { uniqueIndent: flowId };
126
+ const prepared = await getEsbOperation("esb.trigger.prepare").handler(
127
+ { employeeId, ...target, customParams: { mainTable: { parse_content: content, mt_minute_id: id } } },
128
+ esbEnv
129
+ );
130
+ const applied = await getEsbOperation("esb.trigger.apply").handler(
131
+ { continuation: prepared?.data?.continuation, confirm: true },
132
+ esbEnv
133
+ );
134
+ const docId = String(applied?.data?.actionData?.responseData?.customData?.mainTable?.wdID ?? "").trim();
135
+ return docId ? { docId } : { docId: "", error: "esb_returned_no_wdid" };
136
+ } catch (error) {
137
+ return { docId: "", error: String(error?.message ?? error).slice(0, 160) };
138
+ }
139
+ }
61
140
  function safeDocxName(subject) {
62
141
  return String(subject ?? "").replace(/[\\/:*?"<>|]+/g, "-").replace(/\s+/g, " ").trim().slice(0, 80) || "\u4F1A\u8BAE\u7EAA\u8981";
63
142
  }
@@ -65,8 +144,8 @@ async function ensureMinuteDoc(env, input) {
65
144
  const id = String(input.id ?? "").trim();
66
145
  const mtId = String(input.mtId ?? "").trim();
67
146
  if (!id || !mtId) return null;
68
- const { getMeetingOperation } = await import("./registry-7UDUWYB5.js");
69
- const { meetingStateDir } = await import("./env-H4ALHESA.js");
147
+ const { getMeetingOperation } = await import("./registry-UVTI323K.js");
148
+ const { meetingStateDir } = await import("./env-DASBNSEM.js");
70
149
  const { mkdir, writeFile } = await import("node:fs/promises");
71
150
  const { join } = await import("node:path");
72
151
  const subject = String(input.subject ?? "").trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
@@ -149,8 +228,12 @@ async function ensureMinuteDoc(env, input) {
149
228
  attached: String(row.doc_file ?? "") === fileId && (docId === "" || String(row.mt_minutes ?? "").includes(docId))
150
229
  };
151
230
  }
231
+
152
232
  export {
233
+ buildBodyParagraphsXml,
234
+ buildMinuteDocumentXml,
153
235
  buildMinuteDocx,
154
- ensureMinuteDoc,
155
- safeDocxName
236
+ generateMinuteDocViaEsb,
237
+ safeDocxName,
238
+ ensureMinuteDoc
156
239
  };
@@ -202,6 +202,7 @@ var UpdateStore = class {
202
202
 
203
203
  // src/internal/update/service.ts
204
204
  var NAME = "weaver-work-cli";
205
+ var UPDATE_REGISTRY = "https://registry.npmmirror.com/";
205
206
  var CHECK_TIMEOUT_MS = 3e3;
206
207
  var INSTALL_TIMEOUT_MS = 12e4;
207
208
  var UpdateService = class {
@@ -239,7 +240,7 @@ var UpdateService = class {
239
240
  } catch {
240
241
  throw new Error("\u65E0\u6CD5\u8BFB\u53D6 npm \u5B89\u88C5\u914D\u7F6E\uFF0C\u8BF7\u68C0\u67E5 npm \u662F\u5426\u53EF\u7528\u3002");
241
242
  }
242
- if (typeof config.prefix !== "string" || typeof config.registry !== "string") throw new Error("\u65E0\u6CD5\u8BC6\u522B npm \u5B89\u88C5\u914D\u7F6E\u3002");
243
+ if (typeof config.prefix !== "string") throw new Error("\u65E0\u6CD5\u8BC6\u522B npm \u5B89\u88C5\u914D\u7F6E\u3002");
243
244
  const prefix = resolve2(config.prefix);
244
245
  const expected = process.platform === "win32" ? join3(prefix, "node_modules", NAME) : join3(prefix, "lib", "node_modules", NAME);
245
246
  let matches = false;
@@ -248,11 +249,7 @@ var UpdateService = class {
248
249
  } catch {
249
250
  }
250
251
  if (!matches) throw new Error("\u5F53\u524D CLI \u4E0D\u662F\u6B64 npm \u7BA1\u7406\u7684\u5168\u5C40\u5B89\u88C5\uFF0C\u672A\u6267\u884C\u66F4\u65B0\u3002\u8BF7\u4F7F\u7528\u539F\u5B89\u88C5\u65B9\u5F0F\u7EF4\u62A4\u3002");
251
- const registry = new URL(config.registry);
252
- if (!["https:", "http:"].includes(registry.protocol) || registry.username || registry.password) {
253
- throw new Error("npm registry \u914D\u7F6E\u4E0D\u53EF\u7528\u4E8E\u66F4\u65B0\u3002");
254
- }
255
- return { prefix, registry: registry.href };
252
+ return { prefix, registry: UPDATE_REGISTRY };
256
253
  }
257
254
  status() {
258
255
  if (this.skipReason) return { currentVersion: this.options.currentVersion, skipped: this.skipReason };
@@ -266,7 +263,7 @@ var UpdateService = class {
266
263
  };
267
264
  }
268
265
  validPending(state) {
269
- return typeof state.pending?.version === "string" && typeof state.pending.token === "string" && /^[a-f0-9-]{36}$/.test(state.pending.token) && compareVersions(state.pending.version, this.options.currentVersion) === 1;
266
+ return state.registry === UPDATE_REGISTRY && typeof state.pending?.version === "string" && typeof state.pending.token === "string" && /^[a-f0-9-]{36}$/.test(state.pending.token) && compareVersions(state.pending.version, this.options.currentVersion) === 1;
270
267
  }
271
268
  async check(force = false) {
272
269
  if (this.skipReason) return this.status();
@@ -298,11 +295,12 @@ var UpdateService = class {
298
295
  if (typeof latest !== "string" || compareVersions(latest, this.options.currentVersion) === void 0) {
299
296
  throw new Error("npm \u8FD4\u56DE\u7684\u7248\u672C\u53F7\u65E0\u6548\u3002");
300
297
  }
298
+ const samePending = this.validPending(state) && state.pending.version === latest;
301
299
  state.latestVersion = latest;
302
300
  state.prefix = install.prefix;
303
301
  state.registry = install.registry;
304
302
  if (compareVersions(latest, this.options.currentVersion) === 1) {
305
- if (!this.validPending(state) || state.pending.version !== latest) {
303
+ if (!samePending) {
306
304
  state.pending = { version: latest, token: randomUUID2() };
307
305
  }
308
306
  } else delete state.pending;
@@ -2,12 +2,12 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-KJA7CRES.js";
5
+ } from "./chunk-7SQN5IZR.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError,
9
9
  schemaOf
10
- } from "./chunk-WHI6YAUE.js";
10
+ } from "./chunk-UZ2E3VNI.js";
11
11
 
12
12
  // src/shortcuts/meeting/operations/eb/group-chat.ts
13
13
  import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -159,7 +159,7 @@ async function triggerGroupFlow(env, input, meetingName, memberIds) {
159
159
  if (addressText === "[object Object]") addressText = "";
160
160
  if (addressText) {
161
161
  try {
162
- const { resolveAddressRoom } = await import("./create-flow-UGTDI7SP.js");
162
+ const { resolveAddressRoom } = await import("./create-flow-ERDGW3FZ.js");
163
163
  const room = await resolveAddressRoom(env, addressText);
164
164
  if (room?.name) addressText = room.name;
165
165
  } catch {
@@ -201,7 +201,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
201
201
  const group = String(groupId).trim();
202
202
  if (id === "" || group === "") return { ok: false, error: "\u6CA1\u6709\u4F1A\u8BAE id \u6216\u7FA4 id" };
203
203
  try {
204
- const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-COX6AVK7.js");
204
+ const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-A3NAKZAA.js");
205
205
  const session = await env.host.getSession();
206
206
  await env.host.request({
207
207
  method: "POST",
@@ -219,7 +219,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
219
219
  return { ok: false, error: String(error?.message ?? error).slice(0, 300) };
220
220
  }
221
221
  try {
222
- const { getMeetingOperation } = await import("./registry-7UDUWYB5.js");
222
+ const { getMeetingOperation } = await import("./registry-UVTI323K.js");
223
223
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
224
224
  const read = await detail.handler({ id }, env);
225
225
  const main = read?.data?.data ?? read?.data?.main ?? {};
@@ -235,7 +235,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
235
235
  }
236
236
  async function searchMyRequests(env, options = {}) {
237
237
  try {
238
- const { getWorkflowOperation } = await import("./registry-F4YFZLOD.js");
238
+ const { getWorkflowOperation } = await import("./registry-KQ4TNUWO.js");
239
239
  const op = getWorkflowOperation("workflow.search");
240
240
  const wfEnv = await buildWorkflowEnv(env);
241
241
  const args = { category: "mine", pageSize: 20, sort: "createTime:desc" };
@@ -267,7 +267,7 @@ async function resolveMeetingByRequestId(env, requestId, sinceMs) {
267
267
  const target = String(requestId).trim();
268
268
  if (target === "") return null;
269
269
  try {
270
- const { getMeetingOperation } = await import("./registry-7UDUWYB5.js");
270
+ const { getMeetingOperation } = await import("./registry-UVTI323K.js");
271
271
  const list = getMeetingOperation("meeting.eb.meeting.list");
272
272
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
273
273
  const page = await list.handler({ pageSize: 30 }, env);
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  UpdateService
5
- } from "./chunk-OJ4JPD25.js";
5
+ } from "./chunk-LQLIXBJF.js";
6
6
  import {
7
7
  packageRootDir
8
8
  } from "./chunk-2BZ7TY4M.js";
@@ -4,7 +4,7 @@ import {
4
4
  cacheScopeSuffix,
5
5
  readCache,
6
6
  writeCache
7
- } from "./chunk-AZC53XSQ.js";
7
+ } from "./chunk-VNEU7OUN.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-WHI6YAUE.js";
16
+ } from "./chunk-UZ2E3VNI.js";
17
17
 
18
18
  // src/shortcuts/meeting/operations/eb/usage-cache.ts
19
19
  var USAGE_TTL_MS = 5 * 60 * 1e3;
@@ -88,7 +88,7 @@ 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-H4ALHESA.js");
91
+ const { meetingStateDir } = await import("./env-DASBNSEM.js");
92
92
  await rm(join(meetingStateDir(env.ctx), "cache", `${key}.json`), { force: true });
93
93
  } catch {
94
94
  }
@@ -221,7 +221,7 @@ async function loadFrequentRooms(env, options = {}) {
221
221
  const counts = /* @__PURE__ */ new Map();
222
222
  let requests = 0;
223
223
  try {
224
- const { getMeetingOperation } = await import("./registry-7UDUWYB5.js");
224
+ const { getMeetingOperation } = await import("./registry-UVTI323K.js");
225
225
  const listOp = getMeetingOperation("meeting.eb.meeting.list");
226
226
  let seen = 0;
227
227
  let total = 0;
@@ -299,8 +299,14 @@ async function recommendRooms(env, input) {
299
299
  let busyCount = 0;
300
300
  const candidates = [];
301
301
  const purposeHitIds = /* @__PURE__ */ new Set();
302
+ let receptionSeen = false;
302
303
  for (const room of usable) {
303
304
  const isBusy = busy.ids.has(room.id);
305
+ if (requirement.hasCustomer === true && !receptionSeen) {
306
+ const hostName = room.name.match(/(接待|招待|贵宾|商务|vip)/iu);
307
+ const hostDesc = String(room.roomDesc ?? "").trim().match(/(接待|招待|贵宾|商务|vip)/iu);
308
+ if (hostName || hostDesc) receptionSeen = true;
309
+ }
304
310
  if (isBusy) {
305
311
  busyCount += 1;
306
312
  if (!input.includeBusy) continue;
@@ -370,9 +376,18 @@ async function recommendRooms(env, input) {
370
376
  reasons
371
377
  });
372
378
  }
373
- if (requirement.hasCustomer === true && purposeHitIds.size > 0) {
379
+ let receptionBlocked = false;
380
+ if (requirement.hasCustomer === true && receptionSeen) {
374
381
  const preferred = candidates.filter((candidate) => purposeHitIds.has(candidate.id));
375
- if (preferred.length > 0) candidates.splice(0, candidates.length, ...preferred);
382
+ if (preferred.length > 0) {
383
+ candidates.splice(0, candidates.length, ...preferred);
384
+ } else if (candidates.length > 0) {
385
+ candidates.length = 0;
386
+ receptionBlocked = true;
387
+ warnings.push(
388
+ "\u672C\u6B21\u5E26\u5BA2\u6237\uFF0C\u4F46\u5F53\u524D\u6761\u4EF6\u4E0B\u6CA1\u6709\u53EF\u7528\u7684\u63A5\u5F85\u7C7B\u4F1A\u8BAE\u5BA4\uFF08\u697C\u5C42 / \u8BBE\u5907 / \u4EBA\u6570 / \u5360\u7528\u4EFB\u4E00\u7EF4\u5EA6\u628A\u5B83\u7B5B\u6CA1\u4E86\uFF09\uFF1B\u5DF2\u505C\u6B62\u63A8\u8350\uFF0C\u8BF7\u6362\u697C\u5C42\u3001\u53BB\u6389\u8BBE\u5907\u8981\u6C42\uFF0C\u6216\u6539\u4F1A\u8BAE\u65F6\u95F4"
389
+ );
390
+ }
376
391
  }
377
392
  candidates.sort((left, right) => {
378
393
  if (right.score !== left.score) return right.score - left.score;
@@ -381,7 +396,7 @@ async function recommendRooms(env, input) {
381
396
  if (leftCap !== rightCap) return leftCap - rightCap;
382
397
  return left.name.localeCompare(right.name, "zh-Hans-CN");
383
398
  });
384
- if (candidates.length === 0 && roomData.fromCache && input.refreshRooms !== true) {
399
+ if (candidates.length === 0 && roomData.fromCache && input.refreshRooms !== true && !receptionBlocked) {
385
400
  const retried = await recommendRooms(env, { ...input, refreshRooms: true, refreshFrequent: true });
386
401
  return {
387
402
  ...retried,
@@ -2339,7 +2339,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2339
2339
  );
2340
2340
  }
2341
2341
  if (endpoint.interfacePk === "create_meeting") {
2342
- const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-72Q6DM4I.js");
2342
+ const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-D4GVAURN.js");
2343
2343
  assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2344
2344
  }
2345
2345
  const pkQuery = writePkQuery(endpoint, payload);
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-KJA7CRES.js";
5
+ } from "./chunk-7SQN5IZR.js";
6
6
 
7
7
  // src/shortcuts/meeting/operations/eb/cache.ts
8
8
  import { mkdir, readFile, writeFile } from "node:fs/promises";