weaver-work-cli 0.1.47 → 0.1.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/chunks/{archive-oa-BBDP7AKJ.js → archive-oa-57R2FYHV.js} +565 -17
  2. package/dist/chunks/{attachment-content-MCXQBD6N.js → attachment-content-MU2LPI5P.js} +3 -3
  3. package/dist/chunks/{chunk-J2VEB5K3.js → chunk-2BQESR2U.js} +2 -2
  4. package/dist/chunks/{chunk-727FH2NI.js → chunk-2IGZUMNG.js} +15 -2
  5. package/dist/chunks/{chunk-IP4CWQCF.js → chunk-3NV2ETZR.js} +8 -8
  6. package/dist/chunks/{chunk-OXHHJWNC.js → chunk-3X7VOSBA.js} +1 -1
  7. package/dist/chunks/chunk-5QYE52LG.js +223 -0
  8. package/dist/chunks/{chunk-IRMIEDXN.js → chunk-6GWU63YF.js} +1 -1
  9. package/dist/chunks/{chunk-3YV7PKRL.js → chunk-6QYNE6HE.js} +12 -212
  10. package/dist/chunks/{chunk-Q4OYAQYH.js → chunk-72MI3MBX.js} +4 -0
  11. package/dist/chunks/{chunk-AD46OMQK.js → chunk-BRRW7CWA.js} +121 -46
  12. package/dist/chunks/{chunk-76H3IKH6.js → chunk-D2QRZUW4.js} +221 -37
  13. package/dist/chunks/{chunk-GSZTA43P.js → chunk-EJVA5ZVB.js} +2 -2
  14. package/dist/chunks/{chunk-4RWS2YYL.js → chunk-GEOMANP7.js} +3 -3
  15. package/dist/chunks/{chunk-LIEQJIGM.js → chunk-GR76ZDDX.js} +0 -3
  16. package/dist/chunks/{chunk-O6CMPO65.js → chunk-IW7A2IQY.js} +16 -146
  17. package/dist/chunks/chunk-JEQHNNSS.js +158 -0
  18. package/dist/chunks/{chunk-6V5ZPKHV.js → chunk-K3BT54CU.js} +4 -4
  19. package/dist/chunks/{chunk-6AXKWFKG.js → chunk-KV5SOWMS.js} +4 -4
  20. package/dist/chunks/{chunk-JB34OE7R.js → chunk-NBEWUR7L.js} +1 -1
  21. package/dist/chunks/{chunk-PSOMGA3U.js → chunk-ZKEUGS2U.js} +36 -7
  22. package/dist/chunks/{conflict-H7EHQXYY.js → conflict-6347A7YK.js} +2 -2
  23. package/dist/chunks/{contract-3QLAGYQL.js → contract-N6P2HIIE.js} +425 -187
  24. package/dist/chunks/{create-flow-VRVJEOBX.js → create-flow-7WG7LVX5.js} +6 -6
  25. package/dist/chunks/data-QO7QWOIV.js +2525 -0
  26. package/dist/chunks/{ehr-SH2LM3NK.js → ehr-XI4BIVR2.js} +16 -5
  27. package/dist/chunks/{employee-NOHNXC46.js → employee-DR5Y64TI.js} +2 -1
  28. package/dist/chunks/{env-66FPSJDV.js → env-LHRKSLG6.js} +2 -2
  29. package/dist/chunks/{factory-UH2TZBVA.js → factory-2H7Z4RWJ.js} +1 -1
  30. package/dist/chunks/{group-chat-CAKMMV7K.js → group-chat-EW6PNDDT.js} +3 -3
  31. package/dist/chunks/{hrm-UNKCCCGP.js → hrm-YGIR3HGF.js} +4 -2
  32. package/dist/chunks/{im-NJB7ZYMH.js → im-3RCNL5GT.js} +107 -1
  33. package/dist/chunks/{invoice-UEAHSYAE.js → invoice-FXWH5GPO.js} +2 -71
  34. package/dist/chunks/{lazy-dispatch-25XGTXLM.js → lazy-dispatch-XSAHDK6Z.js} +3 -3
  35. package/dist/chunks/{meeting-VTBFW4HI.js → meeting-N2FQBHXI.js} +10 -10
  36. package/dist/chunks/org-NFE7X7FK.js +12 -0
  37. package/dist/chunks/{reception-5WITA44R.js → reception-MYOKJULO.js} +905 -116
  38. package/dist/chunks/{recruit-stage-CAKZTUA7.js → recruit-stage-FKWS5UQF.js} +118 -29
  39. package/dist/chunks/{registry-VWXWPVAG.js → registry-3UGIWH53.js} +4 -2
  40. package/dist/chunks/{registry-AQVGHUM6.js → registry-7VZ6YJUF.js} +2 -2
  41. package/dist/chunks/{registry-PVUZQDDQ.js → registry-BUTEDK3C.js} +1 -1
  42. package/dist/chunks/{registry-JVQBLFQ5.js → registry-CKUVBS53.js} +10 -10
  43. package/dist/chunks/{room-recommend-5U55FMXZ.js → room-recommend-MBCYENQ2.js} +4 -4
  44. package/dist/chunks/{schedule-IDETODCA.js → schedule-5IFMCXME.js} +4 -4
  45. package/dist/chunks/{workflow-BSYT5TGL.js → workflow-2TRU2ZSP.js} +5 -5
  46. package/dist/core/refs.js +19 -2
  47. package/dist/index.js +20 -15
  48. package/dist/shortcuts/archive-oa/constants.js +42 -0
  49. package/dist/shortcuts/archive-oa/host.js +2 -2
  50. package/dist/shortcuts/archive-oa/index.js +38 -0
  51. package/dist/shortcuts/archive-oa/operations/borrow-car.js +117 -3
  52. package/dist/shortcuts/archive-oa/operations/contract-modules.js +57 -0
  53. package/dist/shortcuts/archive-oa/operations/contract.js +23 -8
  54. package/dist/shortcuts/archive-oa/operations/my-borrow-contract.js +271 -0
  55. package/dist/shortcuts/archive-oa/operations/registry.js +9 -4
  56. package/dist/shortcuts/archive-oa/operations/shared.js +41 -5
  57. package/dist/shortcuts/contract/index.js +9 -1
  58. package/dist/shortcuts/contract/manifest.js +14 -2
  59. package/dist/shortcuts/contract/operations/card.js +231 -0
  60. package/dist/shortcuts/contract/operations/registry.js +2 -0
  61. package/dist/shortcuts/contract/operations/review.js +16 -5
  62. package/dist/shortcuts/contract/operations/summary.js +25 -17
  63. package/dist/shortcuts/data/errors.js +64 -0
  64. package/dist/shortcuts/data/host.js +140 -0
  65. package/dist/shortcuts/data/index.js +429 -0
  66. package/dist/shortcuts/data/manifest.js +133 -0
  67. package/dist/shortcuts/data/operations/attend.js +62 -0
  68. package/dist/shortcuts/data/operations/conf.js +384 -0
  69. package/dist/shortcuts/data/operations/ds.js +686 -0
  70. package/dist/shortcuts/data/operations/field.js +68 -0
  71. package/dist/shortcuts/data/operations/index.js +65 -0
  72. package/dist/shortcuts/data/operations/module.js +383 -0
  73. package/dist/shortcuts/data/operations/noun.js +102 -0
  74. package/dist/shortcuts/data/operations/query.js +85 -0
  75. package/dist/shortcuts/data/operations/scene.js +235 -0
  76. package/dist/shortcuts/data/operations/shared.js +279 -0
  77. package/dist/shortcuts/ehr/operations/recruit-write.js +22 -5
  78. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +28 -12
  79. package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +21 -13
  80. package/dist/shortcuts/ehr/recruit-stage/shared.js +90 -8
  81. package/dist/shortcuts/im/index.js +128 -0
  82. package/dist/shortcuts/im/operations/session.js +6 -0
  83. package/dist/shortcuts/index.js +5 -0
  84. package/dist/shortcuts/invoice/host.js +0 -3
  85. package/dist/shortcuts/invoice/manifest.js +0 -1
  86. package/dist/shortcuts/invoice/operations/reim-subsidy.js +1 -71
  87. package/dist/shortcuts/meeting/operations/eb/conflict.js +26 -3
  88. package/dist/shortcuts/meeting/operations/eb/continuation-alias.js +63 -0
  89. package/dist/shortcuts/meeting/operations/eb/create-flow.js +71 -12
  90. package/dist/shortcuts/meeting/operations/eb/factory.js +5 -3
  91. package/dist/shortcuts/meeting/operations/eb/member-expand.js +200 -0
  92. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  93. package/dist/shortcuts/reception/constants.js +11 -0
  94. package/dist/shortcuts/reception/host.js +33 -1
  95. package/dist/shortcuts/reception/index.js +22 -1
  96. package/dist/shortcuts/reception/manifest.js +55 -2
  97. package/dist/shortcuts/reception/operations/ask.js +37 -1
  98. package/dist/shortcuts/reception/operations/compose.js +124 -3
  99. package/dist/shortcuts/reception/operations/doc.js +59 -0
  100. package/dist/shortcuts/reception/operations/docrender.js +25 -1
  101. package/dist/shortcuts/reception/operations/leads.js +245 -0
  102. package/dist/shortcuts/reception/operations/markdown.js +22 -0
  103. package/dist/shortcuts/reception/operations/panels.js +84 -21
  104. package/dist/shortcuts/reception/operations/registry.js +2 -0
  105. package/dist/shortcuts/reception/operations/render.js +76 -3
  106. package/dist/shortcuts/reception/operations/restaurant-rooms.js +118 -0
  107. package/dist/shortcuts/reception/operations/restaurant.js +264 -0
  108. package/dist/shortcuts/reception/operations/restaurantrooms.js +42 -0
  109. package/dist/shortcuts/reception/operations/schedule.js +7 -1
  110. package/dist/shortcuts/reception/upload.js +22 -6
  111. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +28 -12
  112. package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -13
  113. package/dist/shortcuts/recruit-stage/shared.js +99 -14
  114. package/docs/SKILL.md +1 -0
  115. package/docs/_catalog.md +3 -0
  116. package/docs/archive-oa.md +4 -2
  117. package/docs/data.md +149 -0
  118. package/docs/reception.md +59 -5
  119. package/package.json +1 -1
  120. package/scripts/check-skill-sync.mjs +188 -0
  121. package/scripts/package-skill.mjs +17 -3
  122. package/skill-template/business-info.json +23 -0
  123. package/skill-template/domains/archive-oa.md +2 -1
  124. package/skill-template/domains/data.md +15 -0
  125. package/skill-template/master-skill-template.md +1 -0
  126. package/skill-template/skill-template.md +1 -0
  127. package/skills/weaver-e10-archive-oa/SKILL.md +35 -7
  128. package/skills/weaver-e10-archive-oa/references/borrow-car.md +32 -7
  129. package/skills/weaver-e10-archive-oa/references/contract-search.md +105 -4
  130. package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +2 -2
  131. package/skills/weaver-e10-archive-oa/references/my-borrow-contract.md +97 -0
  132. package/skills/weaver-e10-archive-oa/references/my-borrow.md +6 -1
  133. package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +48 -2
  134. package/skills/weaver-e10-calendar/SKILL.md +1 -1
  135. package/skills/weaver-e10-calendar/references/calendar-query.md +1 -1
  136. package/skills/weaver-e10-calendar/references/calendar-write.md +9 -9
  137. package/skills/weaver-e10-cowork/SKILL.md +9 -6
  138. package/skills/weaver-e10-data/SKILL.md +118 -0
  139. package/skills/weaver-e10-data/references/config-center.md +90 -0
  140. package/skills/weaver-e10-data/references/datasource.md +136 -0
  141. package/skills/weaver-e10-data/references/scene-and-misc.md +82 -0
  142. package/skills/weaver-e10-jinchengda/SKILL.md +10 -7
  143. package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +17 -0
  144. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +263 -35
  145. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +8 -5
  146. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
  147. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +175 -22
  148. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
  149. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
  150. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +1 -1
  151. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +124 -19
  152. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +2 -2
  153. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +4 -4
  154. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +6 -0
  155. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
  156. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
  157. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +1 -1
  158. package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +178 -0
  159. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
  160. package/skills/weaver-e10-jinchengda/references/orchestration.md +7 -7
  161. package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +279 -0
  162. package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +450 -0
  163. package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +358 -0
  164. package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +505 -0
  165. package/skills/weaver-e10-jucailin/SKILL.md +7 -4
  166. package/skills/weaver-e10-jucailin/references/recruit-create.md +3 -2
  167. package/skills/weaver-e10-jucailin/references/recruit-read.md +2 -1
  168. package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +3 -3
  169. package/skills/weaver-e10-jucailin/references/safety-boundaries.md +30 -2
  170. package/skills/weaver-e10-mail/SKILL.md +17 -4
  171. package/skills/weaver-e10-meeting/SKILL.md +129 -412
  172. package/skills/weaver-e10-meeting/references/create-flow.md +188 -0
  173. package/skills/weaver-e10-meeting/references/create-guardrails.md +234 -0
  174. package/skills/weaver-e10-meeting/references/pitfalls.md +40 -0
  175. package/skills/weaver-e10-reception-flow/SKILL.md +77 -19
  176. package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +628 -26
  177. package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +96 -26
  178. package/skills/weaver-e10-reception-flow/references/guide.md +4 -3
  179. package/skills/weaver-e10-reception-flow/scripts/render.py +84 -3
  180. package/skills/weaver-e10-recruit-stage/SKILL.md +45 -12
  181. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +78 -8
  182. package/skills/weaver-e10-recruit-stage/references/position-templates.md +5 -0
  183. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +1 -1
  184. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +1 -1
  185. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +40 -11
  186. package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +1 -1
  187. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +1 -1
  188. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
  189. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +16 -0
  190. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +1 -1
  191. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +1 -1
  192. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +1 -1
  193. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +169 -0
  194. package/skills/weaver-e10-shijingran/SKILL.md +6 -2
  195. package/skills/weaver-e10-shijingran/references/source-manifest.json +5 -4
  196. package/skills/weaver-e10-workflow/SKILL.md +1 -1
  197. package/skills/weaver-e10-yepiaotong/SKILL.md +8 -4
  198. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +1 -1
  199. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
  200. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +2 -2
  201. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +1 -1
  202. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +1 -1
  203. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +1 -0
  204. package/skills/weaver-e10-yimiaoban/SKILL.md +2 -1
  205. package/skills/weaver-e10-yimiaoban/references/msg-write.md +32 -0
  206. package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +3 -0
  207. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
  208. package/dist/chunks/{ebuilder-form-GWDTKEI2.js → ebuilder-form-CBYI6CQ6.js} +3 -3
  209. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-README.md +0 -0
  210. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-SKILL.md +0 -0
  211. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-openai.yaml +0 -0
  212. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-position-templates.md +0 -0
  213. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-arrange-interview.md +0 -0
  214. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-capability-check.md +0 -0
  215. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-check-install.md +0 -0
  216. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-detail-process.md +0 -0
  217. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-edit-interview-feedback.md +0 -0
  218. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-create.md +0 -0
  219. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-template.md +0 -0
  220. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-candidate.md +0 -0
  221. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-interview.md +0 -0
  222. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-match-candidates.md +0 -0
  223. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-output-links.md +0 -0
  224. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-creator.md +0 -0
  225. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-metadata.md +0 -0
  226. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-import.md +0 -0
  227. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-parse.md +0 -0
  228. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-search-candidate.md +0 -0
  229. /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-urge-feedback.md +0 -0
@@ -0,0 +1,158 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ hrmValidationError
5
+ } from "./chunk-56EZERK4.js";
6
+
7
+ // src/shortcuts/hrm/operations/types.ts
8
+ var READ = "read";
9
+ function hrmSuccess(action, data, meta) {
10
+ const payload = { ok: true, action, data };
11
+ if (meta && Object.keys(meta).length > 0) payload.meta = meta;
12
+ return payload;
13
+ }
14
+ function schemaOf(properties, options = {}) {
15
+ return {
16
+ type: "object",
17
+ additionalProperties: false,
18
+ properties,
19
+ ...options.required?.length ? { required: options.required } : {},
20
+ ...options.description ? { description: options.description } : {}
21
+ };
22
+ }
23
+ var SCHEMA_ID = { oneOf: [{ type: "integer" }, { type: "string", pattern: "^\\d+$" }] };
24
+ var SCHEMA_ID_LIST = { type: "array", items: SCHEMA_ID };
25
+ var SCHEMA_PAGE = {
26
+ current: SCHEMA_ID,
27
+ pageSize: SCHEMA_ID
28
+ };
29
+
30
+ // src/shortcuts/hrm/operations/shared.ts
31
+ var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
32
+ function asObject(value) {
33
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
34
+ throw hrmValidationError("input_not_object", "\u8F93\u5165\u5FC5\u987B\u662F JSON \u5BF9\u8C61");
35
+ }
36
+ return value;
37
+ }
38
+ function assertNoForbiddenKeys(input) {
39
+ for (const key of Object.keys(input)) {
40
+ if (FORBIDDEN_KEYS.has(key)) {
41
+ throw hrmValidationError("forbidden_key", `\u8F93\u5165\u5305\u542B\u975E\u6CD5\u5B57\u6BB5\uFF1A${key}`);
42
+ }
43
+ }
44
+ }
45
+ function toNumber(value, field) {
46
+ if (value === void 0 || value === null || value === "") return void 0;
47
+ const numeric = Number(value);
48
+ if (!Number.isFinite(numeric)) {
49
+ throw hrmValidationError("number_invalid", `${field} \u5FC5\u987B\u662F\u6570\u5B57`);
50
+ }
51
+ return numeric;
52
+ }
53
+ function toPositiveInt(value, field) {
54
+ if (value === void 0 || value === null || value === "") return void 0;
55
+ const numeric = Number(value);
56
+ if (!Number.isFinite(numeric)) {
57
+ throw hrmValidationError("number_invalid", `${field} \u5FC5\u987B\u662F\u6570\u5B57`);
58
+ }
59
+ const truncated = Math.trunc(numeric);
60
+ if (truncated !== numeric || truncated <= 0) {
61
+ throw hrmValidationError("number_invalid", `${field} \u5FC5\u987B\u662F\u6B63\u6574\u6570`);
62
+ }
63
+ return truncated;
64
+ }
65
+ function toStringIdList(value, field) {
66
+ if (value === void 0 || value === null) return void 0;
67
+ const list = Array.isArray(value) ? value : [value];
68
+ if (list.length === 0) return void 0;
69
+ return list.map((item, index) => {
70
+ if (item === void 0 || item === null || item === "") {
71
+ throw hrmValidationError("id_list_invalid", `${field}[${index}] \u4E0D\u80FD\u4E3A\u7A7A`);
72
+ }
73
+ const text = String(item);
74
+ if (!/^\d+$/.test(text)) {
75
+ throw hrmValidationError("id_list_invalid", `${field}[${index}] \u5FC5\u987B\u662F\u6570\u5B57 ID`);
76
+ }
77
+ return text;
78
+ });
79
+ }
80
+ function pickDefined(value, keys) {
81
+ const result = {};
82
+ for (const key of keys) {
83
+ if (value[key] !== void 0) result[key] = value[key];
84
+ }
85
+ return result;
86
+ }
87
+ function browserBaseBody() {
88
+ return {
89
+ browserMultiple: true,
90
+ authWecahtBook: false,
91
+ wxDepNeedConvertCount: 0,
92
+ wxEmpNeedConvertCount: 0,
93
+ wxTotalNeedConvertCount: 0
94
+ };
95
+ }
96
+ function personLink(baseUrl, id) {
97
+ return `${baseUrl}/sp/hrm/profileInfo/${String(id)}`;
98
+ }
99
+ function orgLink(baseUrl, id) {
100
+ return `${baseUrl}/sp/hrm/orgCard/${String(id)}`;
101
+ }
102
+ function positionLink(baseUrl, id) {
103
+ return `${baseUrl}/sp/hrm/positionCard/${String(id)}`;
104
+ }
105
+ function inferEmployeeField(target) {
106
+ if (/@/.test(target)) return { key: "email", value: target };
107
+ if (/^\d{11}$/.test(target)) return { key: "mobile", value: target };
108
+ if (/^\d+$/.test(target) || /^[A-Za-z][A-Za-z0-9]*\d[A-Za-z0-9]*$/.test(target)) {
109
+ return { key: "job_num", value: target };
110
+ }
111
+ return { key: "username", value: target };
112
+ }
113
+ async function resolveDepartmentIdByName(host, name) {
114
+ const resp = await host.request({
115
+ method: "POST",
116
+ path: "/api/hrm/common/browser/data/department",
117
+ body: {
118
+ ...browserBaseBody(),
119
+ virtualType: "ALL",
120
+ cmd: "list",
121
+ current: 1,
122
+ pageSize: 200,
123
+ formDatas: { name: [{ nameCondition: { id: "eq", content: "\u7B49\u4E8E", disabled: false }, name }] },
124
+ quickSearchDatas: {},
125
+ type: "and",
126
+ stopDepartment: false
127
+ }
128
+ });
129
+ const rows = resp?.data?.data ?? [];
130
+ if (rows.length === 0) {
131
+ throw hrmValidationError("dept_not_found", `\u672A\u627E\u5230\u90E8\u95E8\uFF1A${name}\uFF08\u8BF7\u786E\u8BA4\u90E8\u95E8\u540D\u79F0\uFF09`);
132
+ }
133
+ if (rows.length > 1) {
134
+ throw hrmValidationError("dept_ambiguous", `\u90E8\u95E8\u91CD\u540D\uFF08${rows.length} \u4E2A\u5019\u9009\uFF09\uFF1A${rows.map((x) => x.name).join("\u3001")}\uFF0C\u8BF7\u6539\u7528\u90E8\u95E8 id`);
135
+ }
136
+ return rows[0];
137
+ }
138
+
139
+ export {
140
+ READ,
141
+ hrmSuccess,
142
+ schemaOf,
143
+ SCHEMA_ID,
144
+ SCHEMA_ID_LIST,
145
+ SCHEMA_PAGE,
146
+ asObject,
147
+ assertNoForbiddenKeys,
148
+ toNumber,
149
+ toPositiveInt,
150
+ toStringIdList,
151
+ pickDefined,
152
+ browserBaseBody,
153
+ personLink,
154
+ orgLink,
155
+ positionLink,
156
+ inferEmployeeField,
157
+ resolveDepartmentIdByName
158
+ };
@@ -1562,7 +1562,7 @@ async function buildPersonnelText(env, data) {
1562
1562
  if (ids.length === 0) return {};
1563
1563
  const names = /* @__PURE__ */ new Map();
1564
1564
  try {
1565
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
1565
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
1566
1566
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
1567
1567
  if (batch) {
1568
1568
  const result = await batch.handler({ ids: [...new Set(ids)] }, env);
@@ -1944,7 +1944,7 @@ function buildReadOperation(endpoint) {
1944
1944
  }
1945
1945
  if (fallback) {
1946
1946
  pageWarnings.push(
1947
- `\u670D\u52A1\u7AEF\u53EA\u652F\u6301\u300C\u7CBE\u786E\u5339\u914D\u300D\uFF0C\u6309 ${filterKeys.join("/")} \u8FC7\u6EE4\u540E 0 \u6761\uFF1B\u5DF2\u7FFB\u9875\u626B\u63CF\u5168\u91CF ${fallback.scanned} \u6761\uFF08${fallback.pages} \u9875\uFF09\u5728\u5BA2\u6237\u7AEF\u6309\u300C\u5305\u542B\u300D\u91CD\u65B0\u7B5B\u9009\uFF0C\u547D\u4E2D ${rows.length} \u6761\u3002\u4F20 noFallback:true \u53EF\u8DF3\u8FC7\u8FD9\u6B21\u626B\u63CF`
1947
+ rows.length > 0 ? `\u5DF2\u547D\u4E2D ${rows.length} \u6761\uFF08\u670D\u52A1\u7AEF\u7CBE\u786E\u5339\u914D 0 \u6761\uFF0CCLI \u81EA\u52A8\u7FFB\u9875\u626B\u63CF ${fallback.scanned} \u6761 / ${fallback.pages} \u9875\u540E\u6309\u300C\u5305\u542B\u300D\u7B5B\u51FA\uFF09` : `\u672A\u547D\u4E2D\uFF1A\u670D\u52A1\u7AEF\u7CBE\u786E\u5339\u914D 0 \u6761\uFF0C\u4E14\u7FFB\u9875\u626B\u63CF ${fallback.scanned} \u6761\uFF08${fallback.pages} \u9875\uFF09\u540E\u6309\u300C\u5305\u542B\u300D\u4E5F\u6CA1\u627E\u5230 \u2014\u2014 \u8FD9\u4E2A\u540D\u79F0\u53EF\u80FD\u786E\u5B9E\u4E0D\u5B58\u5728`
1948
1948
  );
1949
1949
  }
1950
1950
  return meetingSuccess(
@@ -2220,7 +2220,7 @@ function buildWriteInputSchema(endpoint, includeConfirm) {
2220
2220
  }
2221
2221
  async function lookupEmployeeDepartmentId(env, userId) {
2222
2222
  try {
2223
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
2223
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
2224
2224
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
2225
2225
  if (!batch) return null;
2226
2226
  const result = await batch.handler({ ids: [userId] }, env);
@@ -2329,7 +2329,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2329
2329
  );
2330
2330
  }
2331
2331
  if (endpoint.interfacePk === "create_meeting") {
2332
- const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-H7EHQXYY.js");
2332
+ const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-6347A7YK.js");
2333
2333
  assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2334
2334
  }
2335
2335
  const pkQuery = writePkQuery(endpoint, payload);
@@ -4,7 +4,7 @@ import {
4
4
  cacheScopeSuffix,
5
5
  readCache,
6
6
  writeCache
7
- } from "./chunk-OXHHJWNC.js";
7
+ } from "./chunk-3X7VOSBA.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-6V5ZPKHV.js";
16
+ } from "./chunk-K3BT54CU.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-66FPSJDV.js");
91
+ const { meetingStateDir } = await import("./env-LHRKSLG6.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-JVQBLFQ5.js");
224
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
225
225
  const listOp = getMeetingOperation("meeting.eb.meeting.list");
226
226
  let seen = 0;
227
227
  let total = 0;
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-WRXSAVKO.js";
16
16
  import {
17
17
  stringifyForStdout
18
- } from "./chunk-727FH2NI.js";
18
+ } from "./chunk-2IGZUMNG.js";
19
19
  import {
20
20
  stateRoot
21
21
  } from "./chunk-AJ62BGAW.js";
@@ -12,7 +12,7 @@ import {
12
12
  meetingValidationError,
13
13
  queryBody,
14
14
  toIdCsv
15
- } from "./chunk-6V5ZPKHV.js";
15
+ } from "./chunk-K3BT54CU.js";
16
16
 
17
17
  // src/shortcuts/meeting/operations/eb/conflict.ts
18
18
  var ACTIVE_MT_STATUS = "1,2,8,9";
@@ -296,7 +296,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
296
296
  const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
297
297
  const nameLike = items.filter((item) => !/^\d+$/u.test(item));
298
298
  if (nameLike.length > 0) {
299
- const { resolveMemberIdsByName } = await import("./schedule-IDETODCA.js");
299
+ const { resolveMemberIdsByName } = await import("./schedule-5IFMCXME.js");
300
300
  const idsByName = await resolveMemberIdsByName(env, nameLike);
301
301
  const resolved = items.map((item) => idsByName.get(item) ?? item);
302
302
  payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
@@ -419,17 +419,44 @@ var ebConflictRoom = {
419
419
  properties: {
420
420
  beginDatetime: { ...SCHEMA_DATETIME_MINUTE, description: "\u5F00\u59CB\u65F6\u95F4\uFF08\u5FC5\u586B\uFF0Cyyyy-MM-dd HH:mm\uFF09" },
421
421
  endDatetime: { ...SCHEMA_DATETIME_MINUTE, description: "\u7ED3\u675F\u65F6\u95F4\uFF08\u5FC5\u586B\uFF0Cyyyy-MM-dd HH:mm\uFF09" },
422
- address: { ...SCHEMA_ID, description: "\u4F1A\u8BAE\u5BA4 id\uFF08\u5FC5\u586B\uFF09" },
422
+ address: { ...SCHEMA_ID, description: "\u4F1A\u8BAE\u5BA4 id\uFF1B\u4E0E room_name \u4E8C\u9009\u4E00\uFF08\u63A8\u8350\u76F4\u63A5\u4F20 room_name\uFF09" },
423
+ room_name: { type: "string", description: "\u4F1A\u8BAE\u5BA4\u540D\u79F0\uFF08\u5982\u300C317\u300D\u300C317\u4F1A\u8BAE\u5BA4\u300D\uFF09\uFF1A\u5185\u90E8\u89E3\u6790\u6210 id\uFF0C\u7701\u6389\u5148\u67E5\u5217\u8868\u8FD9\u4E00\u6B65" },
423
424
  mtId: { ...SCHEMA_ID, description: "\u53D8\u66F4\u4F1A\u8BAE\u65F6\u6392\u9664\u81EA\u8EAB" }
424
425
  },
425
- required: ["beginDatetime", "endDatetime", "address"]
426
+ required: ["beginDatetime", "endDatetime"]
426
427
  },
427
428
  handler: async (args, env) => {
429
+ let addressId = String(args.address ?? "").trim();
430
+ let resolvedRoom = null;
431
+ if (!addressId && String(args.room_name ?? "").trim()) {
432
+ const { resolveAddressRoom } = await import("./create-flow-7WG7LVX5.js");
433
+ const resolved = await resolveAddressRoom(env, String(args.room_name));
434
+ if (!resolved?.id) {
435
+ throw meetingValidationError(
436
+ "room_not_found",
437
+ `\u627E\u4E0D\u5230\u540D\u4E3A\u300C${String(args.room_name)}\u300D\u7684\u4F1A\u8BAE\u5BA4\uFF0C\u8BF7\u7528 meeting.eb.room.list \u6838\u5BF9\u540D\u79F0`
438
+ );
439
+ }
440
+ addressId = String(resolved.id);
441
+ resolvedRoom = { id: String(resolved.id), name: String(resolved.name ?? ""), ...resolved.status ? { status: String(resolved.status) } : {} };
442
+ }
443
+ if (!addressId) {
444
+ throw meetingValidationError(
445
+ "room_ambiguous",
446
+ `\u300C${String(args.room_name ?? "")}\u300D\u5339\u914D\u4E0D\u5230\u552F\u4E00\u4F1A\u8BAE\u5BA4\uFF1A\u8BF7\u7528 meeting.eb.room.list \u67E5\u5230\u51C6\u786E\u540D\u79F0/ID\uFF0C\u6216\u6539\u7528 address \u4F20 id`
447
+ );
448
+ }
449
+ if (!String(args.address ?? "").trim() && resolvedRoom?.status === "unknown") {
450
+ throw meetingValidationError(
451
+ "room_unresolved",
452
+ `\u300C${String(args.room_name ?? "")}\u300D\u5728\u53F0\u8D26\u91CC\u627E\u4E0D\u5230\u5BF9\u5E94\u4F1A\u8BAE\u5BA4\uFF08\u89E3\u6790\u5230 id=${addressId}\uFF09\uFF0C\u4E0D\u80FD\u636E\u6B64\u5224\u65AD\u7A7A\u95F2`
453
+ );
454
+ }
428
455
  const outcome = await runEbConflictCheck(
429
456
  {
430
457
  beginDatetime: args.beginDatetime,
431
458
  endDatetime: args.endDatetime,
432
- address: String(args.address),
459
+ address: addressId,
433
460
  ...args.mtId !== void 0 ? { excludeMtId: String(args.mtId) } : {}
434
461
  },
435
462
  env,
@@ -441,6 +468,8 @@ var ebConflictRoom = {
441
468
  return meetingSuccess(
442
469
  "meeting.eb.conflict.room",
443
470
  {
471
+ // 透明化:告诉调用方 room_name 到底解析成了哪一间,避免「查了别间还以为查对了」
472
+ resolvedRoom,
444
473
  verdict,
445
474
  hasConflict: room.hasConflict,
446
475
  skipped: room.skipped,
@@ -535,7 +564,7 @@ async function resolveMemberNames(env, ids) {
535
564
  const unique = [...new Set(ids.filter((id) => id !== ""))];
536
565
  if (unique.length === 0) return map;
537
566
  try {
538
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
567
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
539
568
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
540
569
  if (!batch) return map;
541
570
  const result = await batch.handler({ ids: unique }, env);
@@ -610,7 +639,7 @@ async function findCommonFreeSlots(env, input) {
610
639
  const scheduleItems = [];
611
640
  if (includeSchedule) {
612
641
  try {
613
- const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-IDETODCA.js");
642
+ const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-5IFMCXME.js");
614
643
  const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
615
644
  const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
616
645
  const flow = await runScheduleConflictFlow(env, {
@@ -7,8 +7,8 @@ import {
7
7
  findCommonFreeSlots,
8
8
  meetingEbConflictOperations,
9
9
  runEbConflictCheck
10
- } from "./chunk-PSOMGA3U.js";
11
- import "./chunk-6V5ZPKHV.js";
10
+ } from "./chunk-ZKEUGS2U.js";
11
+ import "./chunk-K3BT54CU.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";