weaver-work-cli 0.1.48 → 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 (96) hide show
  1. package/dist/chunks/{archive-oa-EDJDU3V4.js → archive-oa-57R2FYHV.js} +111 -12
  2. package/dist/chunks/{attachment-content-4KSNBPRO.js → attachment-content-MU2LPI5P.js} +3 -3
  3. package/dist/chunks/{chunk-WMSAWAWZ.js → chunk-3NV2ETZR.js} +6 -6
  4. package/dist/chunks/{chunk-PSPOFLSU.js → chunk-3X7VOSBA.js} +1 -1
  5. package/dist/chunks/chunk-5QYE52LG.js +223 -0
  6. package/dist/chunks/{chunk-FEP6ELMR.js → chunk-6GWU63YF.js} +1 -1
  7. package/dist/chunks/{chunk-3YV7PKRL.js → chunk-6QYNE6HE.js} +12 -212
  8. package/dist/chunks/{chunk-EFOUMXIX.js → chunk-BRRW7CWA.js} +25 -25
  9. package/dist/chunks/{chunk-5B5JXTY2.js → chunk-D2QRZUW4.js} +209 -25
  10. package/dist/chunks/{chunk-OCYRVZGN.js → chunk-EJVA5ZVB.js} +2 -2
  11. package/dist/chunks/{chunk-BCACE6VV.js → chunk-GEOMANP7.js} +3 -3
  12. package/dist/chunks/{chunk-O6CMPO65.js → chunk-IW7A2IQY.js} +16 -146
  13. package/dist/chunks/chunk-JEQHNNSS.js +158 -0
  14. package/dist/chunks/{chunk-NK74RE5F.js → chunk-K3BT54CU.js} +3 -3
  15. package/dist/chunks/{chunk-R2HHLJNN.js → chunk-KV5SOWMS.js} +4 -4
  16. package/dist/chunks/{chunk-SVFG6EMV.js → chunk-ZKEUGS2U.js} +5 -5
  17. package/dist/chunks/{conflict-APGSD5E7.js → conflict-6347A7YK.js} +2 -2
  18. package/dist/chunks/{create-flow-5TXFOC7X.js → create-flow-7WG7LVX5.js} +6 -6
  19. package/dist/chunks/data-QO7QWOIV.js +2525 -0
  20. package/dist/chunks/{employee-NOHNXC46.js → employee-DR5Y64TI.js} +2 -1
  21. package/dist/chunks/{env-B6GKA2J3.js → env-LHRKSLG6.js} +2 -2
  22. package/dist/chunks/{factory-MFCKLUT6.js → factory-2H7Z4RWJ.js} +1 -1
  23. package/dist/chunks/{group-chat-YE7WIBFO.js → group-chat-EW6PNDDT.js} +3 -3
  24. package/dist/chunks/{hrm-UNKCCCGP.js → hrm-YGIR3HGF.js} +4 -2
  25. package/dist/chunks/{meeting-RYZV2JTQ.js → meeting-N2FQBHXI.js} +10 -10
  26. package/dist/chunks/org-NFE7X7FK.js +12 -0
  27. package/dist/chunks/{reception-VL6TKVAW.js → reception-MYOKJULO.js} +429 -94
  28. package/dist/chunks/{recruit-stage-ERZD3ZNB.js → recruit-stage-FKWS5UQF.js} +66 -13
  29. package/dist/chunks/{registry-VWXWPVAG.js → registry-3UGIWH53.js} +4 -2
  30. package/dist/chunks/{registry-22O6UG4I.js → registry-CKUVBS53.js} +10 -10
  31. package/dist/chunks/{room-recommend-IMZPJMYB.js → room-recommend-MBCYENQ2.js} +4 -4
  32. package/dist/chunks/{schedule-SPPAHER2.js → schedule-5IFMCXME.js} +4 -4
  33. package/dist/index.js +12 -7
  34. package/dist/shortcuts/archive-oa/operations/contract-modules.js +57 -0
  35. package/dist/shortcuts/archive-oa/operations/contract.js +23 -8
  36. package/dist/shortcuts/archive-oa/operations/registry.js +4 -1
  37. package/dist/shortcuts/archive-oa/operations/shared.js +41 -5
  38. package/dist/shortcuts/data/errors.js +64 -0
  39. package/dist/shortcuts/data/host.js +140 -0
  40. package/dist/shortcuts/data/index.js +429 -0
  41. package/dist/shortcuts/data/manifest.js +133 -0
  42. package/dist/shortcuts/data/operations/attend.js +62 -0
  43. package/dist/shortcuts/data/operations/conf.js +384 -0
  44. package/dist/shortcuts/data/operations/ds.js +686 -0
  45. package/dist/shortcuts/data/operations/field.js +68 -0
  46. package/dist/shortcuts/data/operations/index.js +65 -0
  47. package/dist/shortcuts/data/operations/module.js +383 -0
  48. package/dist/shortcuts/data/operations/noun.js +102 -0
  49. package/dist/shortcuts/data/operations/query.js +85 -0
  50. package/dist/shortcuts/data/operations/scene.js +235 -0
  51. package/dist/shortcuts/data/operations/shared.js +279 -0
  52. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +12 -5
  53. package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +21 -13
  54. package/dist/shortcuts/ehr/recruit-stage/shared.js +57 -0
  55. package/dist/shortcuts/index.js +5 -0
  56. package/dist/shortcuts/meeting/operations/eb/member-expand.js +200 -0
  57. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  58. package/dist/shortcuts/reception/constants.js +11 -0
  59. package/dist/shortcuts/reception/index.js +3 -1
  60. package/dist/shortcuts/reception/manifest.js +3 -2
  61. package/dist/shortcuts/reception/operations/ask.js +20 -2
  62. package/dist/shortcuts/reception/operations/compose.js +11 -0
  63. package/dist/shortcuts/reception/operations/doc.js +59 -0
  64. package/dist/shortcuts/reception/operations/docrender.js +25 -1
  65. package/dist/shortcuts/reception/operations/leads.js +1 -1
  66. package/dist/shortcuts/reception/operations/panels.js +84 -21
  67. package/dist/shortcuts/reception/operations/render.js +40 -0
  68. package/dist/shortcuts/reception/operations/restaurant.js +17 -4
  69. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +12 -5
  70. package/dist/shortcuts/recruit-stage/operations/resume-import.js +21 -13
  71. package/dist/shortcuts/recruit-stage/shared.js +57 -0
  72. package/docs/SKILL.md +1 -0
  73. package/docs/_catalog.md +3 -0
  74. package/docs/data.md +149 -0
  75. package/docs/reception.md +59 -5
  76. package/package.json +1 -1
  77. package/scripts/check-skill-sync.mjs +188 -0
  78. package/scripts/package-skill.mjs +17 -3
  79. package/skill-template/business-info.json +23 -0
  80. package/skill-template/domains/data.md +15 -0
  81. package/skills/weaver-e10-archive-oa/SKILL.md +7 -6
  82. package/skills/weaver-e10-archive-oa/references/contract-search.md +83 -14
  83. package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +1 -1
  84. package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +35 -11
  85. package/skills/weaver-e10-data/SKILL.md +118 -0
  86. package/skills/weaver-e10-data/references/config-center.md +90 -0
  87. package/skills/weaver-e10-data/references/datasource.md +136 -0
  88. package/skills/weaver-e10-data/references/scene-and-misc.md +82 -0
  89. package/skills/weaver-e10-meeting/SKILL.md +39 -7
  90. package/skills/weaver-e10-reception-flow/SKILL.md +30 -16
  91. package/skills/weaver-e10-reception-flow/references/guide.md +4 -3
  92. package/skills/weaver-e10-reception-flow/scripts/render.py +5 -3
  93. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +26 -6
  94. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +53 -11
  95. package/dist/chunks/{ebuilder-form-I5ZIX4WO.js → ebuilder-form-CBYI6CQ6.js} +4 -4
  96. package/dist/chunks/{workflow-WVEFJ6KC.js → workflow-2TRU2ZSP.js} +3 -3
@@ -1,225 +1,25 @@
1
1
  import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ hrmEmployeeOperations
5
+ } from "./chunk-IW7A2IQY.js";
6
+ import {
7
+ hrmOrgOperations
8
+ } from "./chunk-5QYE52LG.js";
3
9
  import {
4
10
  READ,
5
11
  SCHEMA_ID,
6
- SCHEMA_PAGE,
7
12
  browserBaseBody,
8
- hrmEmployeeOperations,
9
13
  hrmSuccess,
10
14
  orgLink,
11
- pickDefined,
12
15
  positionLink,
13
16
  schemaOf,
14
- toNumber,
15
- toPositiveInt,
16
- toStringIdList
17
- } from "./chunk-O6CMPO65.js";
17
+ toNumber
18
+ } from "./chunk-JEQHNNSS.js";
18
19
  import {
19
20
  hrmValidationError
20
21
  } from "./chunk-56EZERK4.js";
21
22
 
22
- // src/shortcuts/hrm/operations/org.ts
23
- var ORG_TYPES = ["subcompany", "department"];
24
- var orgQuery = {
25
- name: "hrm.org.query",
26
- resource: "org",
27
- method: "org.query",
28
- action: "hrm.org.query",
29
- summary: "\u6309\u540D\u79F0/\u7F16\u53F7/\u4E0A\u7EA7\u7EC4\u7EC7\u67E5\u8BE2\u5206\u90E8\u6216\u90E8\u95E8\uFF08type \u533A\u5206\uFF1B\u4E0D\u4F20 type \u65F6\u9ED8\u8BA4\u90E8\u95E8\uFF0C\u53EF\u7528 type \u5207\u5206\u90E8\u5206\u90E8\uFF09",
30
- risk: READ,
31
- inputSchema: schemaOf({
32
- type: { type: "string", enum: [...ORG_TYPES], description: "subcompany \u5206\u90E8 / department \u90E8\u95E8\uFF1B\u4E0D\u4F20\u9ED8\u8BA4 department" },
33
- name: { type: "string", description: "\u540D\u79F0\uFF08\u6A21\u7CCA\u5305\u542B\u5339\u914D\uFF09" },
34
- code: { type: "string", description: "\u7F16\u53F7\uFF08\u6A21\u7CCA\u5305\u542B\u5339\u914D\uFF09" },
35
- parent: { type: "array", items: SCHEMA_ID, description: "\u4E0A\u7EA7\u90E8\u95E8 id \u6570\u7EC4\uFF08\u90E8\u95E8\u6302\u5728\u90E8\u95E8\u4E0B\uFF0Cdepartment\uFF09" },
36
- subcompany: { type: "array", items: SCHEMA_ID, description: "\u4E0A\u7EA7\u5206\u90E8 id \u6570\u7EC4\uFF08\u90E8\u95E8\u6302\u5728\u5206\u90E8\u4E0B\uFF0Cdepartment\uFF09" },
37
- supSubDepartment: { type: "array", items: SCHEMA_ID, description: "\u4E0A\u7EA7\u5206\u90E8 id \u6570\u7EC4\uFF08\u5206\u90E8\u6302\u5728\u5206\u90E8\u4E0B\uFF0Csubcompany\uFF09" },
38
- ...SCHEMA_PAGE
39
- }),
40
- handler: async (args, { host }) => {
41
- const type = args.type === void 0 ? "department" : String(args.type);
42
- if (!ORG_TYPES.includes(type)) {
43
- throw hrmValidationError("enum_invalid", `type \u53D6\u503C\u5FC5\u987B\u662F ${ORG_TYPES.join(" / ")} \u4E4B\u4E00`);
44
- }
45
- const name = args.name === void 0 ? "" : String(args.name).trim();
46
- const code = args.code === void 0 ? "" : String(args.code).trim();
47
- const parentIds = toStringIdList(args.parent, "parent");
48
- const subcompanyIds = toStringIdList(args.subcompany, "subcompany");
49
- const supSubDepartmentIds = toStringIdList(args.supSubDepartment, "supSubDepartment");
50
- const hasText = name !== "" || code !== "";
51
- const hasOrg = Boolean(parentIds?.length || subcompanyIds?.length || supSubDepartmentIds?.length);
52
- if (!hasText && !hasOrg) {
53
- throw hrmValidationError("empty_condition", "\u7EC4\u7EC7\u67E5\u8BE2\u5FC5\u987B\u643A\u5E26\u81F3\u5C11\u4E00\u4E2A\u6536\u655B\u6761\u4EF6\uFF1Aname / code / parent / subcompany / supSubDepartment");
54
- }
55
- const formDatas = {};
56
- if (name) formDatas.name = [{ nameCondition: { id: "in", content: "\u5305\u542B", disabled: false }, name }];
57
- if (code) formDatas.code = [{ codeCondition: { id: "in", content: "\u5305\u542B", disabled: false }, code }];
58
- if (parentIds?.length) {
59
- formDatas.parent = [{ parentCondition: { id: "eq", content: "\u7B49\u4E8E", disabled: false }, parent: parentIds.map((id) => ({ id })) }];
60
- }
61
- if (subcompanyIds?.length) {
62
- formDatas.subcompany = [{ subcompanyCondition: { id: "eq", content: "\u7B49\u4E8E", disabled: false }, subcompany: subcompanyIds.map((id) => ({ id })) }];
63
- }
64
- if (supSubDepartmentIds?.length) {
65
- formDatas.supSubDepartment = [{ supSubDepartmentCondition: { id: "eq", content: "\u7B49\u4E8E", disabled: false }, supSubDepartment: supSubDepartmentIds.map((id) => ({ id })) }];
66
- }
67
- const body = {
68
- ...browserBaseBody(),
69
- virtualType: "ALL",
70
- cmd: "list",
71
- formDatas,
72
- quickSearchDatas: {},
73
- type: "and",
74
- stopDepartment: false
75
- };
76
- const current = toPositiveInt(args.current, "current") ?? 1;
77
- const pageSize = toNumber(args.pageSize, "pageSize") ?? 200;
78
- body.current = current;
79
- body.pageSize = pageSize;
80
- const path = type === "subcompany" ? "/api/hrm/common/browser/data/subcompany" : "/api/hrm/common/browser/data/department";
81
- const resp = await host.request({ method: "POST", path, body });
82
- const d = resp?.data ?? {};
83
- const rawRows = Array.isArray(d.data) ? d.data : [];
84
- const session = await host.getSession();
85
- const baseUrl = session.baseUrl.replace(/\/+$/, "");
86
- const rows = rawRows.map((r) => ({ ...r, link: orgLink(baseUrl, r.id) }));
87
- return hrmSuccess("hrm.org.query", { rows, total: Number(d.total ?? rows.length), type }, { current, pageSize });
88
- }
89
- };
90
- var orgDetail = {
91
- name: "hrm.org.detail",
92
- resource: "org",
93
- method: "org.detail",
94
- action: "hrm.org.detail",
95
- summary: "\u6309\u7EC4\u7EC7\u8282\u70B9 id \u53D6\u90E8\u95E8/\u5206\u90E8\u8BE6\u60C5\u8868\u5355\uFF08\u7C7B\u578B\u7531\u670D\u52A1\u7AEF\u6309\u8BB0\u5F55\u81EA\u52A8\u5224\u65AD\uFF1B\u542B\u5168\u8DEF\u5F84 fullPath \u4E0E\u4EBA\u5458\u7EDF\u8BA1\uFF09",
96
- risk: READ,
97
- inputSchema: schemaOf(
98
- { id: SCHEMA_ID },
99
- { required: ["id"] }
100
- ),
101
- handler: async (args, { host }) => {
102
- const id = String(args.id).trim();
103
- if (!id) throw hrmValidationError("id_required", "id \u5FC5\u586B");
104
- const session = await host.getSession();
105
- const baseUrl = session.baseUrl.replace(/\/+$/, "");
106
- const resp = await host.request({
107
- method: "GET",
108
- path: "/api/bs/hrm/organization/getForm",
109
- query: { id, readOnly: true, includeSub: true, quote: true, isMobile: false },
110
- headers: { Referer: `${baseUrl}/sp/hrm/orgCard/${id}` }
111
- });
112
- const raw = resp?.data?.data ?? {};
113
- const parentName = Array.isArray(raw.parent) && raw.parent[0]?.name ? String(raw.parent[0].name) : "";
114
- const subcompanyName = Array.isArray(raw.subcompany) && raw.subcompany[0]?.name ? String(raw.subcompany[0].name) : "";
115
- return hrmSuccess("hrm.org.detail", {
116
- id,
117
- name: raw.name,
118
- type: raw.type,
119
- code: raw.code,
120
- fullPath: raw.fullPath,
121
- status: raw.status,
122
- ...parentName ? { parentName } : {},
123
- ...subcompanyName ? { subcompanyName } : {},
124
- ...pickDefined(raw, ["description", "remark"]),
125
- link: orgLink(baseUrl, id)
126
- });
127
- }
128
- };
129
- var orgLookup = {
130
- name: "hrm.org.lookup",
131
- resource: "org",
132
- method: "org.lookup",
133
- action: "hrm.org.lookup",
134
- summary: "\u7EC4\u7EC7\u6A21\u7CCA\u67E5\u627E\uFF1A\u5173\u952E\u8BCD**\u4E0D\u7528\u5199\u5168**\uFF0C\u4E00\u6B21\u8FD4\u56DE\u6240\u6709\u8FD1\u4F3C\u7684\u90E8\u95E8/\u5206\u90E8\uFF08\u542B\u5B8C\u6574\u8DEF\u5F84\u3001\u6309\u76F8\u4F3C\u5EA6\u6392\u5E8F\uFF09",
135
- risk: READ,
136
- inputSchema: schemaOf({
137
- keyword: { type: "string", minLength: 1, description: "\u90E8\u95E8/\u5206\u90E8\u540D\u79F0\u5173\u952E\u8BCD\uFF08\u53EF\u53EA\u5199\u4E00\u90E8\u5206\uFF0C\u5982\u300C\u4F1A\u8BAE\u7BA1\u7406\u300D\u300C\u7814\u53D1\u300D\uFF09" },
138
- type: { type: "string", enum: ["department", "subcompany", "both"], description: "\u9ED8\u8BA4 both\uFF08\u90E8\u95E8+\u5206\u90E8\u90FD\u67E5\uFF09" },
139
- limit: { type: "number", minimum: 1, maximum: 50, description: "\u6700\u591A\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4 10" }
140
- }, { required: ["keyword"] }),
141
- handler: async (args, { host }) => {
142
- const keyword = String(args.keyword ?? "").trim();
143
- if (!keyword) throw hrmValidationError("keyword_required", "keyword \u5FC5\u586B");
144
- const scope = args.type === "department" || args.type === "subcompany" ? String(args.type) : "both";
145
- const limit = Math.max(1, Math.min(50, Number(args.limit) || 10));
146
- const fetchOrg = async (type, text2) => {
147
- const body = {
148
- ...browserBaseBody(),
149
- virtualType: "ALL",
150
- cmd: "list",
151
- formDatas: { name: [{ nameCondition: { id: "in", content: "\u5305\u542B", disabled: false }, name: text2 }] },
152
- quickSearchDatas: {},
153
- type: "and",
154
- stopDepartment: false,
155
- current: 1,
156
- pageSize: 200
157
- };
158
- const path = type === "subcompany" ? "/api/hrm/common/browser/data/subcompany" : "/api/hrm/common/browser/data/department";
159
- const resp = await host.request({ method: "POST", path, body });
160
- const rows2 = resp?.data?.data ?? [];
161
- return rows2.map((r) => ({
162
- id: String(r.id ?? ""),
163
- name: String(r.name ?? ""),
164
- type,
165
- fullPath: String(r.fullPath ?? r.path ?? ""),
166
- ...r.subcompanyName ? { subcompanyName: String(r.subcompanyName) } : {},
167
- ...r.parentName ? { parentName: String(r.parentName) } : {}
168
- })).filter((r) => r.id);
169
- };
170
- const types = scope === "both" ? ["department", "subcompany"] : [scope];
171
- const collected = [];
172
- let requests = 0;
173
- const stripSuffix = (text2) => text2.replace(/(部门|事业部|中心|科室|组|部)$/u, "").trim();
174
- for (const type of types) {
175
- requests += 1;
176
- collected.push(...await fetchOrg(type, keyword));
177
- const stripped = stripSuffix(keyword);
178
- if (collected.length === 0 && stripped !== "" && stripped !== keyword) {
179
- const raws = await fetchOrg(type, stripped);
180
- collected.push(...raws.map((row) => ({ ...row, stripped: true })));
181
- requests += 1;
182
- }
183
- if (collected.length === 0) {
184
- for (let len = Math.min(keyword.length, 6) - 1; len >= 2; len -= 1) {
185
- const short = keyword.slice(0, len);
186
- const raws = await fetchOrg(type, short);
187
- requests += 1;
188
- if (raws.length > 0) {
189
- collected.push(...raws.map((row) => ({ ...row, shortened: short })));
190
- break;
191
- }
192
- }
193
- }
194
- }
195
- const scoreOf = (row) => {
196
- const name = String(row.name);
197
- const pathText = String(row.fullPath ?? "");
198
- let score = 0;
199
- if (name === keyword) score = 100;
200
- else if (name.startsWith(keyword)) score = 85;
201
- else if (name.includes(keyword)) score = 70;
202
- else if (pathText.includes(keyword)) score = 50;
203
- else score = 35;
204
- if (row.type === "department") score += 5;
205
- if (row.stripped) score -= 5;
206
- if (row.shortened) score -= 15;
207
- return score;
208
- };
209
- const rows = collected.map((row) => ({ ...row, score: scoreOf(row) })).sort((left, right) => Number(right.score) - Number(left.score) || String(left.name).localeCompare(String(right.name), "zh-Hans-CN")).slice(0, limit);
210
- return hrmSuccess("hrm.org.lookup", {
211
- rows,
212
- total: rows.length,
213
- ...rows.length === 0 ? { hint: `\u6CA1\u6709\u540D\u79F0\u542B\u300C${keyword}\u300D\u7684\u90E8\u95E8\u6216\u5206\u90E8\u3002\u6362\u66F4\u77ED\u7684\u5173\u952E\u8BCD\uFF08\u5982\u4E24\u4E2A\u5B57\uFF09\u518D\u8BD5\uFF0C\u6216\u7528 hrm.org.query \u6309 parent/subcompany \u9010\u7EA7\u627E\u3002` } : {}
214
- }, { requests, keyword });
215
- }
216
- };
217
- var hrmOrgOperations = [
218
- orgQuery,
219
- orgLookup,
220
- orgDetail
221
- ];
222
-
223
23
  // src/shortcuts/hrm/operations/position.ts
224
24
  function positionFormDatas() {
225
25
  const d = {};
@@ -405,7 +205,7 @@ var hrmPositionOperations = [
405
205
  // src/shortcuts/hrm/operations/resolve.ts
406
206
  var VIRTUAL_PATH = "/api/bs/hrm/companyVirtual/listCompanyVirtual";
407
207
  var ORG_DETAIL_PATH = "/api/bs/hrm/organization/getForm";
408
- var ORG_TYPES2 = ["department", "subcompany"];
208
+ var ORG_TYPES = ["department", "subcompany"];
409
209
  var DEFAULT_MAX_CANDIDATES = 20;
410
210
  var MAX_CANDIDATES = 200;
411
211
  var MAX_SUGGESTIONS = 5;
@@ -672,7 +472,7 @@ var orgResolve = {
672
472
  virtualId: SCHEMA_ID,
673
473
  name: { type: "string", minLength: 1, description: "\u7EC4\u7EC7\u540D\u79F0\uFF1B\u4E0E orgId \u81F3\u5C11\u4F20\u4E00\u4E2A" },
674
474
  orgId: SCHEMA_ID,
675
- type: { type: "string", enum: [...ORG_TYPES2] },
475
+ type: { type: "string", enum: [...ORG_TYPES] },
676
476
  maxCandidates: { type: "integer", minimum: 1, maximum: MAX_CANDIDATES, default: DEFAULT_MAX_CANDIDATES }
677
477
  }),
678
478
  handler: async (args, { host }) => {
@@ -688,8 +488,8 @@ var orgResolve = {
688
488
  }
689
489
  const explicitType = args.type !== void 0;
690
490
  const requestedType = explicitType ? text(args.type) : "";
691
- if (explicitType && !ORG_TYPES2.includes(requestedType)) {
692
- throw hrmValidationError("enum_invalid", `type \u53D6\u503C\u5FC5\u987B\u662F ${ORG_TYPES2.join(" / ")} \u4E4B\u4E00`);
491
+ if (explicitType && !ORG_TYPES.includes(requestedType)) {
492
+ throw hrmValidationError("enum_invalid", `type \u53D6\u503C\u5FC5\u987B\u662F ${ORG_TYPES.join(" / ")} \u4E4B\u4E00`);
693
493
  }
694
494
  const types = explicitType ? [requestedType] : ["department", "subcompany"];
695
495
  const maxCandidates = maxCandidatesValue(args.maxCandidates);
@@ -3,7 +3,7 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  fetchEbAppSettings,
5
5
  findCommonFreeSlots
6
- } from "./chunk-SVFG6EMV.js";
6
+ } from "./chunk-ZKEUGS2U.js";
7
7
  import {
8
8
  dayOf,
9
9
  filterUsages,
@@ -12,12 +12,12 @@ import {
12
12
  loadDayUsages,
13
13
  loadRooms,
14
14
  recommendRooms
15
- } from "./chunk-R2HHLJNN.js";
15
+ } from "./chunk-KV5SOWMS.js";
16
16
  import {
17
17
  cacheScopeSuffix,
18
18
  readCache,
19
19
  writeCache
20
- } from "./chunk-PSPOFLSU.js";
20
+ } from "./chunk-3X7VOSBA.js";
21
21
  import {
22
22
  EB_BASE,
23
23
  SCHEMA_DATETIME_MINUTE,
@@ -26,7 +26,7 @@ import {
26
26
  meetingValidationError,
27
27
  schemaOf,
28
28
  writeBody
29
- } from "./chunk-NK74RE5F.js";
29
+ } from "./chunk-K3BT54CU.js";
30
30
  import {
31
31
  CONTINUATION_TTL_MS,
32
32
  CONTINUATION_TTL_SECONDS
@@ -209,7 +209,7 @@ async function resolvePersonsCached(env, ids, options = {}) {
209
209
  for (let index = 0; index < missing.length; index += BATCH_MAX) {
210
210
  const chunk = missing.slice(index, index + BATCH_MAX);
211
211
  try {
212
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
212
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
213
213
  const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
214
214
  if (!batch) break;
215
215
  const result = await batch.handler({ ids: chunk }, env);
@@ -315,7 +315,7 @@ async function resolvePersonTokens(env, tokens) {
315
315
  }
316
316
  if (nameLike.length > 0) {
317
317
  try {
318
- const { hrmEmployeeOperations } = await import("./employee-NOHNXC46.js");
318
+ const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
319
319
  const query = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.query");
320
320
  for (const name of nameLike) {
321
321
  if (!query) break;
@@ -378,7 +378,7 @@ async function resolveAddressRoom(env, input) {
378
378
  const text = String(input ?? "").trim();
379
379
  if (!text) return null;
380
380
  const ref = parseRoomRef(text);
381
- const { loadRooms: loadRooms2 } = await import("./room-recommend-IMZPJMYB.js");
381
+ const { loadRooms: loadRooms2 } = await import("./room-recommend-MBCYENQ2.js");
382
382
  let rooms = [];
383
383
  try {
384
384
  rooms = (await loadRooms2(env, {})).rooms;
@@ -409,7 +409,7 @@ async function resolveRoomValue(env, input) {
409
409
  const ref = parseRoomRef(text);
410
410
  if (ref.id) {
411
411
  try {
412
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
412
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
413
413
  const detail = await getMeetingOperation("meeting.eb.room.detail").handler({ id: ref.id }, env);
414
414
  const main = detail?.data?.mainTable ?? detail?.data?.data?.mainTable ?? {};
415
415
  const name = String(main.room_name ?? "").trim() || ref.name || "";
@@ -521,7 +521,7 @@ async function shapeBrowserValues(env, values) {
521
521
  const nameOnly = rows.filter((row) => row.id === "" && row.name !== "");
522
522
  if (nameOnly.length > 0) {
523
523
  try {
524
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
524
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
525
525
  const search = getMeetingOperation("meeting.eb.crm.search");
526
526
  for (const row of nameOnly) {
527
527
  const found = await search.handler({ keyword: row.name, limit: 5 }, env).catch(() => null);
@@ -715,7 +715,7 @@ async function resolveAutoCrmDetailRows(env, raw) {
715
715
  const missing = [];
716
716
  if (entries.length > 0) {
717
717
  try {
718
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
718
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
719
719
  const search = getMeetingOperation("meeting.eb.crm.search");
720
720
  for (const entry of entries) {
721
721
  if (entry.contacts.length > 0) continue;
@@ -974,7 +974,7 @@ function shouldAutoPickFlow(args) {
974
974
  async function sendInvitationToGroup(env, groupId, filePath, warnings) {
975
975
  const started = Date.now();
976
976
  try {
977
- const { buildImEnv } = await import("./group-chat-YE7WIBFO.js");
977
+ const { buildImEnv } = await import("./group-chat-EW6PNDDT.js");
978
978
  const { getImOperation } = await import("./registry-BUTEDK3C.js");
979
979
  const imEnv = await buildImEnv(env);
980
980
  const prepared = await getImOperation("im.msg.send.group.prepare").handler(
@@ -1223,7 +1223,7 @@ var ebMeetingCreateFlowPrepare = {
1223
1223
  }
1224
1224
  }
1225
1225
  const nameLike = rawMembers.filter((item) => !/^\d+$/.test(item));
1226
- const nameToId = nameLike.length > 0 ? await import("./schedule-SPPAHER2.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
1226
+ const nameToId = nameLike.length > 0 ? await import("./schedule-5IFMCXME.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
1227
1227
  const memberIds = rawMembers.map((item) => nameToId.get(item) ?? item);
1228
1228
  let timeConfirmed = args.timeConfirmed === true || slotConfirmed;
1229
1229
  const draft = await loadMeetingDraft(env, String(args.mt_name ?? "")).catch(() => null);
@@ -1252,7 +1252,7 @@ var ebMeetingCreateFlowPrepare = {
1252
1252
  if (!beginHasTime || !timeConfirmed) {
1253
1253
  const day2 = /^\d{4}-\d{2}-\d{2}/.test(beginText) ? beginText.slice(0, 10) : String(args.dateFrom ?? "").trim().slice(0, 10) || tomorrowIso();
1254
1254
  const duration = Number(args.durationMinutes) > 0 ? Math.round(Number(args.durationMinutes)) : 60;
1255
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
1255
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
1256
1256
  const suggested = await getMeetingOperation("meeting.eb.meeting.create.suggest").handler(
1257
1257
  {
1258
1258
  dateFrom: day2,
@@ -1422,7 +1422,7 @@ var ebMeetingCreateFlowPrepare = {
1422
1422
  usageFromCache: usageData.fromCache
1423
1423
  };
1424
1424
  }
1425
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
1425
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
1426
1426
  const result = await getMeetingOperation("meeting.eb.conflict.room").handler(
1427
1427
  { beginDatetime: beginText, endDatetime: endText, address: room.id },
1428
1428
  env
@@ -1430,7 +1430,7 @@ var ebMeetingCreateFlowPrepare = {
1430
1430
  return { room, ...result?.data ?? {} };
1431
1431
  })().catch(noteFailure("\u4F1A\u8BAE\u5BA4**\u5360\u7528**\u68C0\u6D4B")) : Promise.resolve(null);
1432
1432
  const conflictTask = cachedChecks ? Promise.resolve({ data: { conflicts: cachedChecks.memberConflicts } }) : enrich && beginText && endText && memberIds.length > 0 ? (async () => {
1433
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
1433
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
1434
1434
  return getMeetingOperation("meeting.eb.conflict.member").handler(
1435
1435
  { beginDatetime: beginText, endDatetime: endText, hrmMembers: memberIds.join(",") },
1436
1436
  env
@@ -1814,7 +1814,7 @@ var ebMeetingCreateFlowPrepare = {
1814
1814
  invitationDocInfo = { docId: cachedDoc.docId, name: cachedDoc.name };
1815
1815
  } else {
1816
1816
  try {
1817
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
1817
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
1818
1818
  const publish = getMeetingOperation("meeting.invitation.publish");
1819
1819
  const renderExtra = {};
1820
1820
  if (String(args.guest_org ?? "").trim()) renderExtra.guest_org = String(args.guest_org).trim();
@@ -2135,7 +2135,7 @@ async function patchMeetingCrmMembers(env, meetingId, ids, count, settleMsList =
2135
2135
  });
2136
2136
  };
2137
2137
  const readBack = async () => {
2138
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
2138
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
2139
2139
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
2140
2140
  const read = await detail.handler({ id: String(meetingId).trim() }, env);
2141
2141
  return String(read?.data?.data?.crm_members ?? "").trim();
@@ -2162,7 +2162,7 @@ async function renderPreInvitation(payload, env) {
2162
2162
  const fields = payload?.invitationFields ?? {};
2163
2163
  const started = Date.now();
2164
2164
  try {
2165
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
2165
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
2166
2166
  const render = getMeetingOperation("meeting.invitation.render");
2167
2167
  const rendered = await render.handler(
2168
2168
  {
@@ -2290,7 +2290,7 @@ var ebMeetingCreateFlowApply = {
2290
2290
  const groupPayload2 = payload?.groupChat;
2291
2291
  if (groupPayload2) {
2292
2292
  try {
2293
- const { ensureMeetingGroupChat } = await import("./group-chat-YE7WIBFO.js");
2293
+ const { ensureMeetingGroupChat } = await import("./group-chat-EW6PNDDT.js");
2294
2294
  groupChat2 = {
2295
2295
  ...await ensureMeetingGroupChat(env, {
2296
2296
  meetingName: String(payload.mtName ?? ""),
@@ -2306,7 +2306,7 @@ var ebMeetingCreateFlowApply = {
2306
2306
  }
2307
2307
  if (groupChat2 && groupChat2.ok) {
2308
2308
  try {
2309
- const { savePendingForm } = await import("./group-chat-YE7WIBFO.js");
2309
+ const { savePendingForm } = await import("./group-chat-EW6PNDDT.js");
2310
2310
  await savePendingForm(env, {
2311
2311
  workflowId: String(payload.workflowId ?? ""),
2312
2312
  workflowName: String(payload.workflowName ?? ""),
@@ -2373,7 +2373,7 @@ var ebMeetingCreateFlowApply = {
2373
2373
  let meetingId = "";
2374
2374
  const timings = { submitMs: Date.now() - submitStartedAt };
2375
2375
  if (waitSeconds > 0) {
2376
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
2376
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
2377
2377
  const list = getMeetingOperation("meeting.eb.meeting.list");
2378
2378
  const deadline = Date.now() + Math.min(waitSeconds, 30) * 1e3;
2379
2379
  const pollStart = Date.now();
@@ -2423,7 +2423,7 @@ var ebMeetingCreateFlowApply = {
2423
2423
  if (groupPayload) {
2424
2424
  const groupStart = Date.now();
2425
2425
  try {
2426
- const { ensureMeetingGroupChat } = await import("./group-chat-YE7WIBFO.js");
2426
+ const { ensureMeetingGroupChat } = await import("./group-chat-EW6PNDDT.js");
2427
2427
  const group = await ensureMeetingGroupChat(env, {
2428
2428
  meetingName: String(payload.mtName ?? ""),
2429
2429
  beginDatetime: String(groupPayload.beginDatetime ?? ""),
@@ -2455,7 +2455,7 @@ var ebMeetingCreateFlowApply = {
2455
2455
  if (meetingId) {
2456
2456
  const invitationStart = Date.now();
2457
2457
  try {
2458
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
2458
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
2459
2459
  const render = getMeetingOperation("meeting.invitation.render");
2460
2460
  const rendered = await render.handler(
2461
2461
  {
@@ -2627,7 +2627,7 @@ var ebMeetingCreateFlowQuick = {
2627
2627
  `\u4F1A\u8BAE\u540D\u79F0/\u5185\u5BB9\u91CC\u63D0\u5230\u5BA2\u6237\u300C${crmMentioned}\u300D\uFF0C\u4F46\u6CA1\u4F20 crm_members \u2014\u2014 \u63D0\u4EA4\u540E\u300C\u53C2\u4F1A\u5BA2\u6237\u300D\u4F1A\u662F\u7A7A\u7684\u3002\u5148 meeting.eb.crm.search {"keyword":"${crmMentioned}"} \u62FF items[].customerId\uFF0C\u518D\u628A crm_members:[{"id":"<customerId>","name":"<\u5B8C\u6574\u5BA2\u6237\u540D>"}] \u4E00\u8D77\u4F20\uFF08\u5FC5\u987B\u5E26\u540D\u79F0\uFF0C\u53EA\u7ED9 id \u4F1A\u88AB\u9759\u9ED8\u5B58\u7A7A\uFF09\uFF1B\u786E\u5B9E\u4E0D\u9700\u8981\u586B\u53C2\u4F1A\u5BA2\u6237\u5C31\u4F20 crm_skip:true\u3002`
2628
2628
  );
2629
2629
  }
2630
- const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
2630
+ const { getMeetingOperation } = await import("./registry-CKUVBS53.js");
2631
2631
  const prepareStartedAt = Date.now();
2632
2632
  const { submit_mode: _submitMode, confirm: _confirm, ...prepareArgs } = args;
2633
2633
  const prepared = await getMeetingOperation("meeting.eb.meeting.create.flow.prepare").handler(
@@ -2725,7 +2725,7 @@ var ebMeetingCreateSuggest = {
2725
2725
  const topN = Math.max(1, Math.min(5, Number(args.topN) || 3));
2726
2726
  const rawMembers = String(args.hrm_members ?? "").split(/[,;,;\s]+/).map((item) => item.trim()).filter((item) => item !== "");
2727
2727
  const nameLike = rawMembers.filter((item) => !/^\d+$/.test(item));
2728
- const nameToId = nameLike.length > 0 ? await import("./schedule-SPPAHER2.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
2728
+ const nameToId = nameLike.length > 0 ? await import("./schedule-5IFMCXME.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
2729
2729
  const memberIds = rawMembers.map((item) => nameToId.get(item) ?? item);
2730
2730
  const unresolved = rawMembers.filter((item) => nameToId.get(item) === void 0 && !/^\d+$/.test(item));
2731
2731
  const selfId = await env.host.getSession().then((s) => String(s?.userId ?? "")).catch(() => "");