weaver-work-cli 0.1.32 → 0.1.36

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 (211) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/{archive-UMGX72K6.js → archive-XBVH7JU7.js} +2 -2
  3. package/dist/chunks/{archive-oa-N2IYBLF3.js → archive-oa-MZM3EKFQ.js} +2 -2
  4. package/dist/chunks/{asset-GLEGKFG5.js → asset-4XO7UOUW.js} +2 -2
  5. package/dist/chunks/{attachment-content-AQNX5N3S.js → attachment-content-VXSWANAC.js} +3 -2
  6. package/dist/chunks/{blog-E44OTVDA.js → blog-PGZKOPSC.js} +2 -2
  7. package/dist/chunks/{caizhilian-DQUFZXZL.js → caizhilian-BH4ZVGUN.js} +2 -2
  8. package/dist/chunks/{calendar-JKPIRKFD.js → calendar-MXEMTIO4.js} +2 -2
  9. package/dist/chunks/{chunk-QWY6PGL6.js → chunk-2LV74IWP.js} +361 -56
  10. package/dist/chunks/chunk-3SO6QL6U.js +73 -0
  11. package/dist/chunks/chunk-5DQEEGCC.js +229 -0
  12. package/dist/chunks/{chunk-G3QJULO2.js → chunk-6LLJFKJE.js} +1 -1
  13. package/dist/chunks/{chunk-C6R3B2ML.js → chunk-BPE37FPB.js} +35 -7
  14. package/dist/chunks/chunk-BYATLLEF.js +68 -0
  15. package/dist/chunks/chunk-BYBSCN4X.js +932 -0
  16. package/dist/chunks/{chunk-CVZ2JOSW.js → chunk-F746NKNF.js} +1 -1
  17. package/dist/chunks/{chunk-GCG2NMWR.js → chunk-HXJQI5NM.js} +4 -2
  18. package/dist/chunks/{chunk-YRVDW4WN.js → chunk-I6QGIBDM.js} +2 -2
  19. package/dist/chunks/{chunk-H7J4DC5R.js → chunk-JCSN3JGM.js} +2 -2
  20. package/dist/chunks/{chunk-2GA5ZIQL.js → chunk-JNG42JKG.js} +30 -1
  21. package/dist/chunks/{chunk-DW6AUUKS.js → chunk-JUXVYKII.js} +9 -4
  22. package/dist/chunks/{chunk-6RKD4DRZ.js → chunk-JYKABYCV.js} +2 -2
  23. package/dist/chunks/{chunk-6EFWDL7Y.js → chunk-NCOVUAZK.js} +2 -2
  24. package/dist/chunks/{chunk-E4Z23GHM.js → chunk-QHFANTX7.js} +1114 -904
  25. package/dist/chunks/{ebuilder-form-V5FG2EHC.js → chunk-QYGO5EE2.js} +22 -1148
  26. package/dist/chunks/{chunk-IURUFGZK.js → chunk-T72N74ZT.js} +50 -33
  27. package/dist/chunks/{chunk-H6XSTSLM.js → chunk-TC6MZAO3.js} +137 -204
  28. package/dist/chunks/{chunk-WKI2FBIQ.js → chunk-VPUTVEMC.js} +737 -341
  29. package/dist/chunks/{chunk-WSKBSQ2U.js → chunk-VPXOPQJI.js} +2 -2
  30. package/dist/chunks/chunk-WXFPWCXG.js +774 -0
  31. package/dist/chunks/{chunk-4YC43QQ4.js → chunk-XMGSYD6S.js} +4 -4
  32. package/dist/chunks/conflict-JAB2LJEZ.js +21 -0
  33. package/dist/chunks/continuation-RN6PZN2M.js +11 -0
  34. package/dist/chunks/contract-XI2EEIZU.js +9110 -0
  35. package/dist/chunks/cowork-SCPGLBA4.js +2527 -0
  36. package/dist/chunks/ebuilder-form-EYLHNOTA.js +121 -0
  37. package/dist/chunks/{ehr-HMFY6VIL.js → ehr-EAP77IMT.js} +1344 -27
  38. package/dist/chunks/{esb-ZYSVB7SG.js → esb-2TGGXEE7.js} +4 -4
  39. package/dist/chunks/{fna-B7RKPAZD.js → fna-2X7ZE7BU.js} +13 -8
  40. package/dist/chunks/{host-OCH2BCCV.js → host-C6EL2RKL.js} +3 -3
  41. package/dist/chunks/{host-45WED2KK.js → host-I4NRK4MX.js} +3 -3
  42. package/dist/chunks/{host-I4Z6BFYX.js → host-Q4LZGCRU.js} +3 -3
  43. package/dist/chunks/host-UEI5FGDM.js +23 -0
  44. package/dist/chunks/{host-KNZ52LJZ.js → host-XCLDDXKQ.js} +3 -3
  45. package/dist/chunks/{hrm-2KAZGUHI.js → hrm-YXERJM76.js} +3 -3
  46. package/dist/chunks/{im-ACJJWH4U.js → im-A4VZN2TQ.js} +88 -12
  47. package/dist/chunks/{invoice-ZK3WCX2U.js → invoice-2Z6YPMIS.js} +3 -3
  48. package/dist/chunks/{jiuchuanhui-5PQD3IL2.js → jiuchuanhui-AR5GMKZB.js} +2 -2
  49. package/dist/chunks/{lazy-dispatch-JQXBW3GM.js → lazy-dispatch-QXW7P4X3.js} +4 -4
  50. package/dist/chunks/{mail-S2HDDXO2.js → mail-7GZ6CPBJ.js} +45 -24
  51. package/dist/chunks/{meeting-QVN3I37L.js → meeting-3NMGA3MB.js} +278 -43
  52. package/dist/chunks/{okr-QNG4VC2Q.js → okr-BZ6XUOAG.js} +2 -2
  53. package/dist/chunks/operations-5QL3AECO.js +11 -0
  54. package/dist/chunks/{plan-A25EMW6U.js → plan-DR5CMUYP.js} +2 -2
  55. package/dist/chunks/{project-G6XV66DZ.js → project-6J63MK33.js} +2 -2
  56. package/dist/chunks/{registry-DC6KR3NH.js → registry-KDD7DHNK.js} +4 -4
  57. package/dist/chunks/{registry-2VLUAESA.js → registry-OZSMDVPP.js} +2 -2
  58. package/dist/chunks/{registry-7C5UMIPL.js → registry-TKX2E7C7.js} +2 -2
  59. package/dist/chunks/{registry-TI3CIUXF.js → registry-VRTNC6UR.js} +8 -6
  60. package/dist/chunks/{room-recommend-WRTHO6Y2.js → room-recommend-XCWRMB5P.js} +4 -3
  61. package/dist/chunks/{schedule-KFIITGSK.js → schedule-IVBICP32.js} +4 -3
  62. package/dist/chunks/{workflow-DJ7SYWAF.js → workflow-D74NFK3C.js} +179 -6
  63. package/dist/index.js +35 -25
  64. package/dist/internal/e10/auth-recovery.js +14 -4
  65. package/dist/internal/e10/fetch-timing.js +31 -0
  66. package/dist/internal/e10/request-runtime.js +5 -0
  67. package/dist/shortcuts/contract/host.js +34 -59
  68. package/dist/shortcuts/cowork/continuation.js +70 -0
  69. package/dist/shortcuts/cowork/errors.js +59 -0
  70. package/dist/shortcuts/cowork/host.js +180 -0
  71. package/dist/shortcuts/cowork/index.js +166 -0
  72. package/dist/shortcuts/cowork/manifest.js +65 -0
  73. package/dist/shortcuts/cowork/operations/discuss-write.js +277 -0
  74. package/dist/shortcuts/cowork/operations/item-write.js +380 -0
  75. package/dist/shortcuts/cowork/operations/member-write.js +283 -0
  76. package/dist/shortcuts/cowork/operations/permission-write.js +286 -0
  77. package/dist/shortcuts/cowork/operations/read.js +423 -0
  78. package/dist/shortcuts/cowork/operations/registry.js +39 -0
  79. package/dist/shortcuts/cowork/operations/review-write.js +157 -0
  80. package/dist/shortcuts/cowork/operations/shared.js +215 -0
  81. package/dist/shortcuts/cowork/operations/types.js +39 -0
  82. package/dist/shortcuts/cowork/operations.js +19 -0
  83. package/dist/shortcuts/ehr/host.js +4 -1
  84. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +757 -0
  85. package/dist/shortcuts/ehr/operations/recruit-position.js +367 -0
  86. package/dist/shortcuts/ehr/operations/recruit-stats.js +133 -0
  87. package/dist/shortcuts/ehr/operations/recruit-write.js +43 -16
  88. package/dist/shortcuts/ehr/operations/recruit.js +182 -10
  89. package/dist/shortcuts/ehr/operations/registry.js +6 -0
  90. package/dist/shortcuts/fna/operations/expense-chart.js +19 -7
  91. package/dist/shortcuts/im/diagnostics.js +97 -0
  92. package/dist/shortcuts/im/host.js +58 -31
  93. package/dist/shortcuts/im/index.js +7 -2
  94. package/dist/shortcuts/im/operations/at-mention.js +127 -0
  95. package/dist/shortcuts/im/operations/file-user.js +10 -2
  96. package/dist/shortcuts/im/operations/group-read.js +26 -5
  97. package/dist/shortcuts/im/operations/group-write.js +35 -28
  98. package/dist/shortcuts/im/operations/msg-sync.js +7 -2
  99. package/dist/shortcuts/im/operations/msg-write.js +76 -10
  100. package/dist/shortcuts/im/operations/quote-mention.js +119 -0
  101. package/dist/shortcuts/im/operations/session.js +1 -1
  102. package/dist/shortcuts/im/operations/shared.js +10 -0
  103. package/dist/shortcuts/im/operations/types.js +13 -0
  104. package/dist/shortcuts/index.js +10 -0
  105. package/dist/shortcuts/mail/host.js +12 -1
  106. package/dist/shortcuts/mail/operations/types.js +17 -2
  107. package/dist/shortcuts/meeting/host.js +27 -34
  108. package/dist/shortcuts/meeting/index.js +79 -1
  109. package/dist/shortcuts/meeting/manifest.js +10 -0
  110. package/dist/shortcuts/meeting/operations/create.js +4 -1
  111. package/dist/shortcuts/meeting/operations/eb/catalog.js +10 -0
  112. package/dist/shortcuts/meeting/operations/eb/conflict.js +84 -8
  113. package/dist/shortcuts/meeting/operations/eb/create-flow.js +1195 -140
  114. package/dist/shortcuts/meeting/operations/eb/factory.js +170 -8
  115. package/dist/shortcuts/meeting/operations/eb/index.js +16 -3
  116. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +50 -5
  117. package/dist/shortcuts/meeting/operations/eb-fallback.js +163 -0
  118. package/dist/shortcuts/meeting/operations/env.js +99 -46
  119. package/dist/shortcuts/meeting/operations/form-fields.js +110 -0
  120. package/dist/shortcuts/meeting/operations/invitation.js +79 -20
  121. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  122. package/dist/shortcuts/meeting/operations/standard-guard.js +71 -0
  123. package/dist/shortcuts/meeting/operations.js +16 -0
  124. package/dist/shortcuts/workflow/endpoints.js +8 -3
  125. package/dist/shortcuts/workflow/index.js +110 -1
  126. package/dist/shortcuts/workflow/operations/form.js +204 -36
  127. package/dist/shortcuts/workflow/operations/read.js +104 -23
  128. package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +448 -0
  129. package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupStore.js +106 -0
  130. package/dist/shortcuts/workflow/operations/todoSmartConvert/businessRules.js +47 -0
  131. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +30 -23
  132. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +1 -0
  133. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
  134. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +2 -1
  135. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +2 -4
  136. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +138 -181
  137. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +12 -7
  138. package/dist/shortcuts/workflow/operations.js +23 -1
  139. package/docs/e10-auth.md +1 -1
  140. package/docs/ehr.md +1 -1
  141. package/docs/fna.md +2 -1
  142. package/docs/im.md +8 -1
  143. package/docs/todo-smart-convert/README.md +1 -1
  144. package/docs/todo-smart-convert/data-contract.md +2 -2
  145. package/docs/todo-smart-convert/subgroup-rules.md +6 -0
  146. package/package.json +1 -1
  147. package/skill-template/business-info.json +18 -0
  148. package/skill-template/domains/cowork.md +14 -0
  149. package/skill-template/domains/yimiaoban.md +3 -3
  150. package/skill-template/skill-template.md +1 -1
  151. package/skills/weaver-e10-blog/SKILL.md +5 -5
  152. package/skills/weaver-e10-caizhilian/SKILL.md +5 -5
  153. package/skills/weaver-e10-calendar/SKILL.md +5 -5
  154. package/skills/weaver-e10-cowork/SKILL.md +101 -0
  155. package/skills/weaver-e10-cowork/references/cowork-read.md +90 -0
  156. package/skills/weaver-e10-cowork/references/cowork-write.md +131 -0
  157. package/skills/weaver-e10-cowork/references/safety-boundaries.md +45 -0
  158. package/skills/weaver-e10-esb/SKILL.md +5 -5
  159. package/skills/weaver-e10-hrm/SKILL.md +5 -5
  160. package/skills/weaver-e10-jinchengda/SKILL.md +2 -2
  161. package/skills/weaver-e10-jiuchuanhui/SKILL.md +5 -5
  162. package/skills/weaver-e10-jucailin/SKILL.md +38 -14
  163. package/skills/weaver-e10-jucailin/references/recruit-create.md +104 -0
  164. package/skills/weaver-e10-jucailin/references/recruit-read.md +25 -0
  165. package/skills/weaver-e10-jucailin/references/recruit-write.md +13 -0
  166. package/skills/weaver-e10-jucailin/references/salary.md +15 -11
  167. package/skills/weaver-e10-mail/SKILL.md +17 -14
  168. package/skills/weaver-e10-meeting/SKILL.md +442 -46
  169. package/skills/weaver-e10-meeting/references/meeting-eb.md +135 -3
  170. package/skills/weaver-e10-meeting/references/meeting-invitation.md +28 -2
  171. package/skills/weaver-e10-meeting/references/meeting-queries.md +9 -6
  172. package/skills/weaver-e10-meeting/references/meeting-verification.md +8 -6
  173. package/skills/weaver-e10-meeting.zip +0 -0
  174. package/skills/weaver-e10-okr/SKILL.md +5 -5
  175. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  176. package/skills/weaver-e10-plan/SKILL.md +5 -5
  177. package/skills/weaver-e10-qiyecheng/SKILL.md +5 -2
  178. package/skills/weaver-e10-qiyecheng/references/catalog.md +2 -2
  179. package/skills/weaver-e10-qiyecheng/references/expense-chart.md +15 -1
  180. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +22 -21
  181. package/skills/weaver-e10-shared/SKILL.md +12 -12
  182. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +4 -4
  183. package/skills/weaver-e10-wenshuding/SKILL.md +5 -5
  184. package/skills/weaver-e10-workflow/SKILL.md +29 -5
  185. package/skills/weaver-e10-workflow/aigroup/default.json +88 -0
  186. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +66 -14
  187. package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +1 -1
  188. package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
  189. package/skills/weaver-e10-workflow/references/workflow-query.md +12 -10
  190. package/skills/weaver-e10-workflow/references/workflow-view.md +2 -2
  191. package/skills/weaver-e10-workflow/tools/todo-serve.cjs +239 -0
  192. package/skills/weaver-e10-workflow/{scripts → tools}/todo-summary.cjs +218 -28
  193. package/skills/weaver-e10-yepiaotong/SKILL.md +10 -8
  194. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +7 -7
  195. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +10 -10
  196. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +40 -37
  197. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +4 -4
  198. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +27 -38
  199. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +4 -4
  200. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +37 -29
  201. package/skills/weaver-e10-yimiaoban/SKILL.md +156 -33
  202. package/skills/weaver-e10-yimiaoban/references/ding-write.md +1 -1
  203. package/skills/weaver-e10-yimiaoban/references/error-codes.md +5 -1
  204. package/skills/weaver-e10-yimiaoban/references/group-read.md +5 -1
  205. package/skills/weaver-e10-yimiaoban/references/group-write.md +6 -4
  206. package/skills/weaver-e10-yimiaoban/references/msg-read.md +1 -0
  207. package/skills/weaver-e10-yimiaoban/references/msg-write.md +34 -2
  208. package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +5 -2
  209. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +79 -58
  210. package/skills/weaver-e10-yimiaoban/references/user-remind.md +2 -2
  211. package/skills/weaver-e10-ziguanjia/SKILL.md +5 -5
@@ -10,11 +10,11 @@ import {
10
10
  E10ApiError,
11
11
  createE10RequestRuntime,
12
12
  requireE10Session
13
- } from "./chunk-DW6AUUKS.js";
13
+ } from "./chunk-JUXVYKII.js";
14
14
  import {
15
15
  E10_SESSION_EXPIRED_MESSAGE,
16
16
  getActiveProfile
17
- } from "./chunk-2GA5ZIQL.js";
17
+ } from "./chunk-JNG42JKG.js";
18
18
 
19
19
  // src/shortcuts/im/host.ts
20
20
  import { createHash } from "node:crypto";
@@ -113,7 +113,8 @@ function createImHost(ctx, dependencies = {}) {
113
113
  async function runtime() {
114
114
  return createE10RequestRuntime(ctx, await ensureSession(), {
115
115
  interceptors: dependencies.interceptors,
116
- fetch: dependencies.fetch
116
+ fetch: dependencies.fetch,
117
+ recoverAuthentication: dependencies.recoverAuthentication
117
118
  });
118
119
  }
119
120
  async function request(request2) {
@@ -172,38 +173,48 @@ function createImHost(ctx, dependencies = {}) {
172
173
  }
173
174
  async function requestBinary(url, headers = {}) {
174
175
  const session = await ensureSession();
175
- const controller = new AbortController();
176
- const timer = setTimeout(() => controller.abort(), 6e4);
176
+ const baseUrl = new URL(session.getBaseUrl());
177
+ let target;
177
178
  try {
178
- const resp = await (dependencies.fetch || globalThis.fetch)(url, {
179
- headers: {
180
- accept: "application/json, text/plain, */*",
181
- cookie: session.cookieHeader(),
182
- eteamsid: session.eteamsId,
183
- "user-agent": session.uaHeader(),
184
- origin: session.getBaseUrl(),
185
- ...headers
186
- },
187
- redirect: "manual",
188
- signal: controller.signal
179
+ target = new URL(url, baseUrl);
180
+ } catch {
181
+ throw imValidationError("download_url_invalid", "\u4E0B\u8F7D\u5730\u5740\u4E0D\u662F\u5408\u6CD5 URL");
182
+ }
183
+ if (target.origin !== baseUrl.origin) {
184
+ throw imValidationError("download_url_cross_origin", "\u4E0B\u8F7D\u5730\u5740\u4E0D\u5141\u8BB8\u8DE8 E10 \u73AF\u5883");
185
+ }
186
+ assertPath(target.pathname);
187
+ const query = {};
188
+ for (const [key, value] of target.searchParams) {
189
+ const previous = query[key];
190
+ if (previous === void 0) query[key] = value;
191
+ else if (Array.isArray(previous)) previous.push(value);
192
+ else query[key] = [previous, value];
193
+ }
194
+ let response;
195
+ try {
196
+ response = await (await runtime()).requestBinary({
197
+ module: "im",
198
+ operation: "im.file.download",
199
+ method: "GET",
200
+ path: target.pathname,
201
+ query,
202
+ headers,
203
+ timeoutMs: 6e4
189
204
  });
190
- if (resp.status === 401 || resp.status === 302) {
191
- throw imAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE);
192
- }
193
- if (resp.status !== 200) {
194
- throw new ImCliError("api", "download_failed", `\u4E0B\u8F7D\u5931\u8D25 HTTP ${resp.status}`, {
195
- code: resp.status,
196
- exitCode: 1
197
- });
198
- }
199
- return Buffer.from(await resp.arrayBuffer());
200
205
  } catch (error) {
201
- if (error instanceof ImCliError) throw error;
202
- const message = error instanceof Error ? error.message : String(error);
203
- throw imNetworkError("transport", `\u4E0B\u8F7D\u5931\u8D25\uFF1A${message}`, { retryable: true });
204
- } finally {
205
- clearTimeout(timer);
206
+ mapRuntimeNetworkError(error);
207
+ }
208
+ if (response.status === 401 || response.status === 302) {
209
+ throw imAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE);
206
210
  }
211
+ if (response.status !== 200) {
212
+ throw new ImCliError("api", "download_failed", `\u4E0B\u8F7D\u5931\u8D25 HTTP ${response.status}`, {
213
+ code: response.status,
214
+ exitCode: 1
215
+ });
216
+ }
217
+ return response.content;
207
218
  }
208
219
  async function getSelfIdentity() {
209
220
  if (selfIdentity) return selfIdentity;
@@ -265,11 +276,17 @@ function createImHost(ctx, dependencies = {}) {
265
276
  timeoutMs: 15e3
266
277
  });
267
278
  const preData = preRes?.data || {};
279
+ const preInfo = preData.imUploadInfoDto || preData;
280
+ const preFileObj = preInfo?.fileObj && (preInfo.fileObj.id || preInfo.fileObj.fileid) ? preInfo.fileObj : null;
281
+ const preUploadType = String(preData.uploadType || preInfo?.uploadType || "");
282
+ if (preFileObj && (!preData.preUploadId || preUploadType === "second")) {
283
+ return preFileObj;
284
+ }
268
285
  if (!preData.preUploadId) {
269
- throw new ImCliError("api", "upload_check_failed", `preUploadCheck \u5931\u8D25`, { details: preRes, exitCode: 1 });
286
+ throw new ImCliError("api", "upload_check_failed", `preUploadCheck \u5931\u8D25\uFF08\u672A\u8FD4\u56DE preUploadId\uFF0C\u4E5F\u6CA1\u6709\u53EF\u590D\u7528\u7684\u79D2\u4F20 fileObj\uFF09`, { details: preRes, exitCode: 1 });
270
287
  }
271
288
  const preUploadId = String(preData.preUploadId);
272
- const uploadType = preData.uploadType || "common";
289
+ const uploadType = preUploadType || "common";
273
290
  const upForm = new FormData();
274
291
  upForm.append("data", new Blob([data], { type: mime }), name);
275
292
  for (const [k, v] of Object.entries({ module: "im", permission, shareUsers, shareGroups, shareExternals: "", uploadType, preUploadId, MD5: md5 })) {
@@ -85,9 +85,6 @@ var SCHEMA_ID_LIST = { type: "array", items: SCHEMA_ID };
85
85
  var SCHEMA_DATETIME_MINUTE = { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$" };
86
86
  var SCHEMA_DATE = { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2}$" };
87
87
 
88
- // src/shortcuts/meeting/operations/eb/factory.ts
89
- import { createHash } from "node:crypto";
90
-
91
88
  // src/shortcuts/meeting/operations/shared.ts
92
89
  var FORBIDDEN_KEYS = /* @__PURE__ */ new Set([
93
90
  "cookie",
@@ -197,6 +194,9 @@ async function assertMeetingExists(id, host, operation) {
197
194
  }
198
195
  }
199
196
 
197
+ // src/shortcuts/meeting/operations/eb/factory.ts
198
+ import { createHash } from "node:crypto";
199
+
200
200
  // src/shortcuts/meeting/operations/eb/attendance-summary.ts
201
201
  function toText(value) {
202
202
  return value === void 0 || value === null ? "" : String(value).trim();
@@ -774,8 +774,14 @@ var EB_ENDPOINTS = [
774
774
  interfacePk: "query_meeting_room_list",
775
775
  countPk: "query_meeting_room_count",
776
776
  queryParams: ["manager", "departmentId", "mr_type", "room_attr"],
777
+ // 按 e-builder openApi 文档:这些是 `mainTable` 节点的传入字段,服务端据此过滤。
778
+ // ⚠️ 2026-10-30 实测(用户刚在后端把「会议室名称」配成传入字段后):
779
+ // 服务端是**精确匹配** —— room_name=测试会议室1 → 1 条;room_name=测试 / 重庆 → 0 条
780
+ // (全量里明明有「重庆会议室一/二」)。模糊由 factory 的 fallback 在本地兜底。
781
+ mainTableParams: ["room_name", "status", "place", "org_id", "hrm_ids"],
777
782
  summarizeRows: summarizeRoomRows,
778
783
  summary: "EB \u7248\u4F1A\u8BAE\u5BA4\u5217\u8868\uFF08query_meeting_room_list + count\uFF09\uFF1A\u81EA\u5E26 statusText \u4E0E\u72B6\u6001\u5B57\u5178",
784
+ emptyHint: 'EB \u4F1A\u8BAE\u5BA4\u8868\uFF08`uf_mt_room_base`\uFF09\u67E5\u4E0D\u5230\u4EFB\u4F55\u8BB0\u5F55\u3002\u53EF\u80FD\u662F\uFF1A\u2460 \u8BE5\u73AF\u5883\u786E\u5B9E\u8FD8\u6CA1\u5EFA\u8FC7\u4F1A\u8BAE\u5BA4\uFF1B\u2461 \u4F1A\u8BAE\u5E94\u7528\u7684\u300C\u4F1A\u8BAE\u5BA4\u5217\u8868\u300D\u63A5\u53E3/\u89C6\u56FE\u672A\u914D\u7F6E\u597D\uFF08`query_meeting_room_list` \u8BFB\u4E0D\u5230\u6570\u636E\uFF0C\u4F46\u8868\u91CC\u6709\u6570\u636E\uFF09\u3002**\u8FD9\u4E0D\u4EE3\u8868"\u73AF\u5883\u662F\u6807\u51C6\u7248"\u2014\u2014\u7EDD\u5BF9\u4E0D\u8981\u6539\u7528 `meeting.room.list`**\uFF1A\u90A3\u662F\u6807\u51C6\u7248\u4F1A\u8BAE\u5E94\u7528\u7684\u4F1A\u8BAE\u5BA4\uFF0C\u4E0E EB \u5B8C\u5168\u662F\u4E24\u5957\u6570\u636E\uFF0C\u62FF\u7ED9\u7528\u6237\u5C31\u662F\u51ED\u7A7A\u634F\u9020\u623F\u95F4\u3002\u8BF7\u5982\u5B9E\u544A\u8BC9\u7528\u6237"EB \u4F1A\u8BAE\u5BA4\u67E5\u4E0D\u5230"\uFF0C\u5E76\u8BF7\u7BA1\u7406\u5458\u68C0\u67E5\u4F1A\u8BAE\u5E94\u7528\u7684\u4F1A\u8BAE\u5BA4\u914D\u7F6E\u3002',
779
785
  notes: [
780
786
  '**status\uFF1A`0` = \u6B63\u5E38\uFF08\u53EF\u7528\uFF09\u3001`1` = \u5C01\u5B58\uFF08\u4E0D\u53EF\u7528\uFF09** \u2014\u2014 \u4E0D\u662F"\u542F\u7528/\u505C\u7528"\uFF0C`0` \u624D\u662F\u6B63\u5E38\u3002',
781
787
  "\u660E\u7EC6\u5728 `data.progress.items[]`\uFF1A`statusText` \u5DF2\u628A\u7F16\u7801\u7FFB\u6210\u4E2D\u6587\uFF0C`summary.unusable` \u76F4\u63A5\u5217\u51FA\u4E0D\u53EF\u7528\u7684\u623F\u95F4\u540D\uFF1B\u9700\u8981\u539F\u59CB\u7F16\u7801\u65F6\u770B `status`\u3002",
@@ -1561,10 +1567,12 @@ async function verifyLease(args, action, env) {
1561
1567
  function isNetworkError(error) {
1562
1568
  return error instanceof Error && error.type === "network";
1563
1569
  }
1564
- function queryBody(userId, page) {
1570
+ function queryBody(userId, page, mainTable) {
1565
1571
  return {
1566
1572
  datajson: {
1567
- mainTable: {},
1573
+ // 传入字段即过滤条件(e-builder openApi 文档:getFormDataList 的传入字段挂 mainTable 节点)。
1574
+ // 空对象 = 不过滤。
1575
+ mainTable: mainTable ?? {},
1568
1576
  // ⚠️ 分页必须放在 body 的 pageInfo 里(值为字符串):只放 URL query 时 EB 会忽略,
1569
1577
  // 恒定返回首页 10 条(2026-09-21 真机暴露:pageSize=60 仍只回 10 条)。
1570
1578
  ...page ? { pageInfo: { pageNo: String(page.pageNo), pageSize: String(page.pageSize) } } : {},
@@ -1572,6 +1580,20 @@ function queryBody(userId, page) {
1572
1580
  }
1573
1581
  };
1574
1582
  }
1583
+ function readFallbackMaxPages() {
1584
+ const raw = Number(process.env.WEAVER_MEETING_EB_FALLBACK_MAX_PAGES ?? "");
1585
+ if (Number.isFinite(raw) && raw >= 1) return Math.min(Math.floor(raw), 100);
1586
+ return 30;
1587
+ }
1588
+ function pickMainTableFilters(args, names) {
1589
+ const out = {};
1590
+ for (const name of names ?? []) {
1591
+ const value = args[name];
1592
+ if (value === void 0 || value === null || value === "") continue;
1593
+ out[name] = typeof value === "string" ? value : String(value);
1594
+ }
1595
+ return out;
1596
+ }
1575
1597
  function detailBody(userId, id) {
1576
1598
  return { datajson: { mainTable: { id }, header: { operator: userId } } };
1577
1599
  }
@@ -1617,11 +1639,23 @@ function buildReadInputSchema(endpoint) {
1617
1639
  for (const param of endpoint.queryParams ?? []) {
1618
1640
  properties[param] = { type: "string", description: `EB \u7B5B\u9009\u53C2\u6570\uFF08URL \u5360\u4F4D\u7B26\u540D ${param}\uFF09` };
1619
1641
  }
1642
+ for (const param of endpoint.mainTableParams ?? []) {
1643
+ properties[param] = {
1644
+ type: "string",
1645
+ description: `\u6309 ${param} \u8FC7\u6EE4\uFF08\u8D70 body datajson.mainTable\uFF0C\u670D\u52A1\u7AEF**\u7CBE\u786E\u5339\u914D**\uFF1B\u4F20\u90E8\u5206\u8BCD\u65F6\u670D\u52A1\u7AEF\u4F1A\u8FD4\u56DE 0 \u6761\uFF0CCLI \u4F1A\u81EA\u52A8\u7FFB\u9875\u626B\u5168\u91CF\u5E76\u6309\u300C\u5305\u542B\u300D\u91CD\u65B0\u7B5B\uFF0C\u7ED3\u679C\u4E00\u6837\u662F\u6A21\u7CCA\u7684\uFF09`
1646
+ };
1647
+ }
1620
1648
  properties.pageNo = { type: "integer", minimum: 1, description: "\u9875\u7801\uFF0C\u9ED8\u8BA4 1" };
1621
1649
  properties.pageSize = { type: "integer", minimum: 1, maximum: 200, description: "\u6BCF\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 20" };
1622
1650
  if (endpoint.countPk) {
1623
1651
  properties.withCount = { type: "boolean", description: "\u662F\u5426\u5148\u67E5\u603B\u6570\uFF08\u9ED8\u8BA4 true\uFF0C\u6761\u4EF6\u4E0E\u5217\u8868\u4E00\u81F4\uFF09" };
1624
1652
  }
1653
+ if ((endpoint.mainTableParams ?? []).length > 0) {
1654
+ properties.noFallback = {
1655
+ type: "boolean",
1656
+ description: "\u8DF3\u8FC7\u300C\u6A21\u7CCA\u515C\u5E95\u300D\uFF1A\u670D\u52A1\u7AEF\u7CBE\u786E\u5339\u914D\u4E0D\u5230\u65F6\uFF0C\u4E0D\u518D\u7FFB\u9875\u626B\u5168\u91CF\uFF08\u9ED8\u8BA4 false=\u4F1A\u626B\uFF0C\u4FDD\u8BC1\u90E8\u5206\u8BCD\u4E5F\u80FD\u67E5\u5230\uFF09"
1657
+ };
1658
+ }
1625
1659
  }
1626
1660
  return {
1627
1661
  type: "object",
@@ -1696,6 +1730,7 @@ function buildReadOperation(endpoint) {
1696
1730
  }
1697
1731
  const pageNo = typeof args.pageNo === "number" ? args.pageNo : 1;
1698
1732
  const pageSize = typeof args.pageSize === "number" ? args.pageSize : 20;
1733
+ const mainTableFilters = pickMainTableFilters(args, endpoint.mainTableParams);
1699
1734
  let total;
1700
1735
  if (endpoint.countPk && args.withCount !== false) {
1701
1736
  const countResponse = await env.host.request({
@@ -1703,7 +1738,7 @@ function buildReadOperation(endpoint) {
1703
1738
  path: `${EB_BASE}/getFormDataCount/${endpoint.countPk}`,
1704
1739
  operation: endpoint.operation,
1705
1740
  query,
1706
- body: queryBody(session.userId),
1741
+ body: queryBody(session.userId, void 0, mainTableFilters),
1707
1742
  acceptBusiness
1708
1743
  });
1709
1744
  total = extractEbCount(countResponse);
@@ -1714,16 +1749,52 @@ function buildReadOperation(endpoint) {
1714
1749
  operation: endpoint.operation,
1715
1750
  query: { ...query, pageNo, pageSize },
1716
1751
  // 分页同时进 body.pageInfo:EB 只认 body 里的 pageInfo,仅放 URL query 会被忽略。
1717
- body: queryBody(session.userId, { pageNo, pageSize }),
1752
+ body: queryBody(session.userId, { pageNo, pageSize }, mainTableFilters),
1718
1753
  acceptBusiness
1719
1754
  });
1720
- const { rows, total: listTotal } = extractEbRows(response);
1721
- const resolvedTotal = total ?? listTotal ?? rows.length;
1755
+ const { rows: rawRows, total: listTotal } = extractEbRows(response);
1756
+ const filterKeys = Object.keys(mainTableFilters);
1757
+ const matchesFilters = (row) => {
1758
+ const main = row?.mainTable ?? row ?? {};
1759
+ return filterKeys.every((key) => {
1760
+ const cell = main[key];
1761
+ if (cell === void 0 || cell === null) return false;
1762
+ return String(cell).includes(String(mainTableFilters[key]));
1763
+ });
1764
+ };
1765
+ let rows = filterKeys.length === 0 ? rawRows : rawRows.filter(matchesFilters);
1766
+ let fallback;
1767
+ if (filterKeys.length > 0 && rows.length === 0 && args.noFallback !== true) {
1768
+ const maxPages = readFallbackMaxPages();
1769
+ const collected = [];
1770
+ let pages = 0;
1771
+ for (let p = 1; p <= maxPages; p += 1) {
1772
+ const pageResponse = await env.host.request({
1773
+ method: "POST",
1774
+ path,
1775
+ operation: endpoint.operation,
1776
+ query: { ...query, pageNo: p, pageSize },
1777
+ // 不带 mainTableFilters:服务端只会做精确匹配,带上就又变成 0 条了
1778
+ body: queryBody(session.userId, { pageNo: p, pageSize }),
1779
+ acceptBusiness
1780
+ });
1781
+ const { rows: pageRows } = extractEbRows(pageResponse);
1782
+ pages = p;
1783
+ if (pageRows.length === 0) break;
1784
+ collected.push(...pageRows);
1785
+ if (p >= maxPages) break;
1786
+ }
1787
+ fallback = { pages, scanned: collected.length };
1788
+ rows = collected.filter(matchesFilters);
1789
+ }
1790
+ const resolvedTotal = filterKeys.length > 0 ? rows.length : total ?? listTotal ?? rawRows.length;
1722
1791
  const pageMeta = {
1723
1792
  pageNo,
1724
1793
  pageSize,
1725
1794
  pageCount: rows.length,
1726
- total: Math.max(resolvedTotal, rows.length)
1795
+ total: Math.max(resolvedTotal, rows.length),
1796
+ // 模糊回退时告知调用方:结果是客户端筛出来的,扫了多少条
1797
+ ...fallback ? { fallback } : {}
1727
1798
  };
1728
1799
  const summarized = endpoint.summarizeRows ? endpoint.summarizeRows(rows, {
1729
1800
  pageCount: rows.length,
@@ -1734,12 +1805,20 @@ function buildReadOperation(endpoint) {
1734
1805
  const progress = summarized === void 0 ? void 0 : summarized !== null && typeof summarized === "object" ? { ...summarized, page: pageMeta } : { value: summarized, page: pageMeta };
1735
1806
  const effectiveTotal = Math.max(resolvedTotal, rows.length);
1736
1807
  const pageWarnings = [];
1808
+ if (effectiveTotal === 0 && endpoint.emptyHint) {
1809
+ pageWarnings.push(endpoint.emptyHint);
1810
+ }
1737
1811
  if (effectiveTotal > rows.length) {
1738
1812
  const missing = effectiveTotal - rows.length;
1739
1813
  pageWarnings.push(
1740
1814
  `\u672C\u9875\u8FD4\u56DE ${rows.length} \u6761\uFF0C\u5171 ${effectiveTotal} \u6761\uFF1A\u8FD8\u6709 ${missing} \u6761\u672A\u53D6\u5230\u3002\u9700\u8981\u5168\u91CF\u8BF7\u7FFB\u9875\uFF08pageNo=${pageNo + 1} \u8D77\uFF09\u6216\u52A0\u5927 pageSize\uFF0C\u6216\u6536\u7A84\u7B5B\u9009\u6761\u4EF6`
1741
1815
  );
1742
1816
  }
1817
+ if (fallback) {
1818
+ pageWarnings.push(
1819
+ `\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`
1820
+ );
1821
+ }
1743
1822
  return meetingSuccess(
1744
1823
  endpoint.operation,
1745
1824
  {
@@ -1749,7 +1828,7 @@ function buildReadOperation(endpoint) {
1749
1828
  count: rows.length,
1750
1829
  ...progress ? { progress } : {},
1751
1830
  rows,
1752
- filters: query
1831
+ filters: { ...query, ...mainTableFilters }
1753
1832
  },
1754
1833
  {
1755
1834
  ...endpoint.notes ? { meta: { notes: endpoint.notes } } : {},
@@ -1855,6 +1934,21 @@ function normalizeEbWrite(endpoint, args, userId) {
1855
1934
  const hours = typeof mainTable.begin_datetime === "string" && typeof mainTable.end_datetime === "string" ? diffHours(mainTable.begin_datetime, mainTable.end_datetime) : void 0;
1856
1935
  if (hours !== void 0) mainTable.mt_hours = hours;
1857
1936
  }
1937
+ let extraApplied = [];
1938
+ let extraSkipped = [];
1939
+ const extra = args.extraFields;
1940
+ if (extra && typeof extra === "object" && !Array.isArray(extra)) {
1941
+ for (const [rawKey, value] of Object.entries(extra)) {
1942
+ const key = String(rawKey).trim();
1943
+ if (!key) continue;
1944
+ if (mainTable[key] !== void 0) {
1945
+ extraSkipped.push(key);
1946
+ continue;
1947
+ }
1948
+ mainTable[key] = value;
1949
+ extraApplied.push(key);
1950
+ }
1951
+ }
1858
1952
  const required = endpoint.kind === "delete" ? endpoint.batchDeleteFields ?? ["id"] : endpoint.requiredFields ?? [];
1859
1953
  const missing = required.filter((field) => mainTable[field] === void 0);
1860
1954
  if (missing.length > 0) {
@@ -1919,7 +2013,12 @@ function normalizeEbWrite(endpoint, args, userId) {
1919
2013
  for (const node of Object.keys(details)) operateType[node] = "cover";
1920
2014
  }
1921
2015
  }
1922
- return { mainTable, details, operateType };
2016
+ return {
2017
+ mainTable,
2018
+ details,
2019
+ operateType,
2020
+ ...extraApplied.length > 0 || extraSkipped.length > 0 ? { extraFields: { applied: extraApplied, skipped: extraSkipped } } : {}
2021
+ };
1923
2022
  }
1924
2023
  function buildWriteInputSchema(endpoint, includeConfirm) {
1925
2024
  const properties = {};
@@ -1927,6 +2026,12 @@ function buildWriteInputSchema(endpoint, includeConfirm) {
1927
2026
  properties.confirm = { const: true };
1928
2027
  properties.continuation = { type: "string", minLength: 1 };
1929
2028
  }
2029
+ if (endpoint.interfacePk === "create_meeting" || endpoint.interfacePk === "change_meeting") {
2030
+ properties.conflictAck = {
2031
+ type: "boolean",
2032
+ description: "\u53C2\u4F1A\u4EBA\u65F6\u95F4\u51B2\u7A81\u65F6\u4ECD\u6309\u539F\u65F6\u95F4\u5EFA\u4F1A/\u6539\u671F\uFF08\u9ED8\u8BA4 false\uFF09\u3002\u51B2\u7A81\u65F6 CLI \u4F1A\u5148\u62D2\u7EDD\u5E76\u8FD4\u56DE\u51B2\u7A81\u660E\u7EC6\u4E0E\u5F53\u5929\u53EF\u9009\u65F6\u6BB5\uFF0C\u8BF7**\u7528\u9009\u9879\u65B9\u5F0F\u8BA9\u7528\u6237\u786E\u8BA4**\uFF1B\u7528\u6237\u786E\u8BA4\u7EE7\u7EED\u540E\u624D\u5E26 conflictAck=true \u91CD\u65B0\u63D0\u4EA4\u3002"
2033
+ };
2034
+ }
1930
2035
  if (endpoint.kind === "delete") {
1931
2036
  if (endpoint.batchDeleteFields && endpoint.batchDeleteFields.length > 0) {
1932
2037
  for (const field of endpoint.batchDeleteFields) {
@@ -1960,6 +2065,10 @@ function buildWriteInputSchema(endpoint, includeConfirm) {
1960
2065
  }
1961
2066
  };
1962
2067
  }
2068
+ properties.extraFields = {
2069
+ type: "object",
2070
+ description: '\u81EA\u5B9A\u4E49\u5B57\u6BB5\u900F\u4F20\uFF0C\u5F62\u5982 {"\u5B57\u6BB5\u540D": \u503C}\uFF1A\u7528\u4E8E\u79DF\u6237\u5728\u8868\u5355\u4E0A\u65B0\u589E\u3001\u4E0D\u5728\u672C\u63A5\u53E3\u5185\u7F6E\u5B57\u6BB5\u6E05\u5355\u91CC\u7684\u5B57\u6BB5\uFF08\u4F8B\u5982\u53C2\u4F1A\u5BA2\u6237 crm_members\u3001\u81EA\u5EFA\u7684\u8054\u7CFB\u65B9\u5F0F\u5B57\u6BB5\uFF09\u3002\u5B57\u6BB5\u540D\u5FC5\u987B\u662F\u8868\u5355\u771F\u5B9E dataKey \u6216\u5B57\u6BB5 id\uFF08\u7528 meeting.form.fields \u67E5\uFF09\uFF1B\u4E0E\u5185\u7F6E\u5B57\u6BB5\u540C\u540D\u65F6\u4EE5\u5185\u7F6E\u5B57\u6BB5\u4E3A\u51C6\uFF0C\u5E76\u5728 warnings \u91CC\u8BF4\u660E'
2071
+ };
1963
2072
  if (endpoint.detailCover) {
1964
2073
  properties.detail1Mode = {
1965
2074
  type: "string",
@@ -2023,6 +2132,17 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2023
2132
  }
2024
2133
  const extras = {};
2025
2134
  const warnings = preflight ? await preflight({ endpoint, args, payload, env, extras }) : [];
2135
+ const extraInfo = payload.extraFields;
2136
+ if (extraInfo && extraInfo.applied.length > 0) {
2137
+ warnings.push(
2138
+ `\u5DF2\u900F\u4F20 ${extraInfo.applied.length} \u4E2A\u81EA\u5B9A\u4E49\u5B57\u6BB5\uFF1A${extraInfo.applied.join("\u3001")}\u2014\u2014\u8FD9\u4E9B\u4E0D\u5728\u5185\u7F6E\u5B57\u6BB5\u6E05\u5355\u91CC\uFF0C\u6309\u4F60\u7ED9\u7684\u539F\u6837\u63D0\u4EA4\uFF1B\u82E5\u670D\u52A1\u7AEF\u8868\u5355\u6CA1\u914D\u8FD9\u4E2A\u5B57\u6BB5\u4F1A\u88AB\u9759\u9ED8\u4E22\u5F03\uFF0C\u63D0\u4EA4\u540E\u8BF7\u56DE\u8BFB\u786E\u8BA4\uFF08\u53EF\u7528 meeting.form.fields \u6838\u5BF9\u771F\u5B9E\u5B57\u6BB5\u540D\uFF09`
2139
+ );
2140
+ }
2141
+ if (extraInfo && extraInfo.skipped.length > 0) {
2142
+ warnings.push(
2143
+ `\u8FD9\u4E9B\u81EA\u5B9A\u4E49\u5B57\u6BB5\u4E0E\u5185\u7F6E\u5B57\u6BB5\u91CD\u540D\uFF0C\u5DF2\u5FFD\u7565\u4F60\u7684\u53D6\u503C\u3001\u6CBF\u7528\u5185\u7F6E\u5B57\u6BB5\uFF1A${extraInfo.skipped.join("\u3001")}\uFF08\u8981\u4F20\u81EA\u5B9A\u4E49\u53E3\u5F84\u8BF7\u6539\u7528\u4E0D\u51B2\u7A81\u7684\u5B57\u6BB5\u540D\uFF09`
2144
+ );
2145
+ }
2026
2146
  if (endpoint.detailCover && Object.keys(payload.details).length > 0 && payload.operateType.detail1 !== "cover") {
2027
2147
  warnings.push(
2028
2148
  'detail1 \u9ED8\u8BA4\u662F\u300C\u66F4\u65B0\u8FFD\u52A0\u300D\uFF1A\u672C\u6B21\u4F1A\u65B0\u589E\u660E\u7EC6\u884C\uFF0C**\u4E0D\u4F1A**\u8986\u76D6 sort_number \u76F8\u540C\u7684\u65E7\u884C\uFF08\u771F\u673A\u5B9E\u6D4B\uFF1A2 \u884C \u2192 \u4F20 1 \u884C \u2192 \u53D8 3 \u884C\uFF09\u3002\u8981\u6574\u7EC4\u66FF\u6362\u8BF7\u4F20 detail1Mode: "cover"'
@@ -2080,6 +2200,10 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2080
2200
  { expected: lease.payload, actual: payload }
2081
2201
  );
2082
2202
  }
2203
+ if (endpoint.interfacePk === "create_meeting") {
2204
+ const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-JAB2LJEZ.js");
2205
+ assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2206
+ }
2083
2207
  const pkQuery = writePkQuery(endpoint, payload);
2084
2208
  let response;
2085
2209
  try {
@@ -2127,194 +2251,6 @@ function buildEbOperations(endpoints, options = {}) {
2127
2251
  return endpoints.flatMap((endpoint) => isWriteKind(endpoint.kind) ? buildWriteOperations(endpoint, options.preflight, options.afterWrite) : [buildReadOperation(endpoint)]);
2128
2252
  }
2129
2253
 
2130
- // src/shortcuts/meeting/operations/env.ts
2131
- import { existsSync } from "node:fs";
2132
- import { mkdir, readFile, writeFile } from "node:fs/promises";
2133
- import { homedir } from "node:os";
2134
- import { resolve } from "node:path";
2135
- var EB_SMOKE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/query_meeting_baseset";
2136
- var STD_CALENDAR_PATH = "/api/meeting/detail/getCalendarBaseData";
2137
- function stateRoot(ctx) {
2138
- const configured = ctx?.config?.path();
2139
- if (configured) return resolve(configured, "..");
2140
- return process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(homedir(), ".weaver-work-cli");
2141
- }
2142
- function meetingStateDir(ctx) {
2143
- return resolve(stateRoot(ctx), "meeting");
2144
- }
2145
- function cacheFile(ctx) {
2146
- return resolve(stateRoot(ctx), "meeting", "env-mode.json");
2147
- }
2148
- function emptyCache() {
2149
- return { schemaVersion: 1, environments: {} };
2150
- }
2151
- async function readCache(ctx) {
2152
- const file = cacheFile(ctx);
2153
- if (!existsSync(file)) return emptyCache();
2154
- try {
2155
- const parsed = JSON.parse(await readFile(file, "utf8"));
2156
- if (!parsed || typeof parsed !== "object" || !parsed.environments) return emptyCache();
2157
- return parsed;
2158
- } catch {
2159
- return emptyCache();
2160
- }
2161
- }
2162
- async function writeCache(ctx, baseUrl, mode, smokePath) {
2163
- try {
2164
- const file = cacheFile(ctx);
2165
- await mkdir(resolve(file, ".."), { recursive: true });
2166
- const cache = await readCache(ctx);
2167
- cache.environments[baseUrl] = { mode, smokePath, detectedAt: (/* @__PURE__ */ new Date()).toISOString() };
2168
- await writeFile(file, JSON.stringify(cache, null, 2), "utf8");
2169
- return void 0;
2170
- } catch (error) {
2171
- return `\u73AF\u5883\u6A21\u5F0F\u7F13\u5B58\u5199\u5165\u5931\u8D25\uFF08\u4E0D\u5F71\u54CD\u672C\u6B21\u7ED3\u679C\uFF0C\u4E0B\u6B21\u4F1A\u91CD\u65B0\u5192\u70DF\uFF09\uFF1A${error instanceof Error ? error.message : String(error)}`;
2172
- }
2173
- }
2174
- async function resolveMeetingEnvMode(host, ctx, options = {}) {
2175
- const session = await host.getSession();
2176
- if (options.refresh !== true) {
2177
- const cache = await readCache(ctx);
2178
- const cached = cache.environments[session.baseUrl];
2179
- if (cached && (cached.mode === "eb" || cached.mode === "standard")) {
2180
- return {
2181
- mode: cached.mode,
2182
- smokePath: cached.smokePath,
2183
- fromCache: true,
2184
- detectedAt: cached.detectedAt
2185
- };
2186
- }
2187
- }
2188
- let ebError;
2189
- try {
2190
- await host.request({
2191
- method: "POST",
2192
- path: EB_SMOKE_PATH,
2193
- operation: "meeting.env.detect",
2194
- // EB list 的 datajson 内必须出现 mainTable 节点(空对象即可):缺失时服务端报
2195
- // “mainTable解析异常,请参照文档修正数据格式”,冒烟会**假失败**并把 EB 环境误判为
2196
- // 标准版(2026-09-20 真机复现)。
2197
- body: { datajson: { mainTable: {}, header: { operator: session.userId } } },
2198
- // EB 响应不含 code/status(形如 {datajson:{datas:[...]}}),默认的 isBusinessSuccess
2199
- // 会判为 false → 冒烟假失败 → EB 环境被误判为标准版。
2200
- acceptBusiness: ebBusinessSuccess
2201
- });
2202
- const warning = await writeCache(ctx, session.baseUrl, "eb", EB_SMOKE_PATH);
2203
- return { mode: "eb", smokePath: EB_SMOKE_PATH, fromCache: false, warning };
2204
- } catch (error) {
2205
- ebError = error;
2206
- }
2207
- try {
2208
- await host.request({
2209
- method: "GET",
2210
- path: STD_CALENDAR_PATH,
2211
- operation: "meeting.env.detect"
2212
- });
2213
- const ebDetail = ebError instanceof Error ? `${ebError.type ?? "api"}/${ebError.subtype ?? "error"}: ${ebError.message}` : String(ebError);
2214
- const warning = await writeCache(ctx, session.baseUrl, "standard", STD_CALENDAR_PATH);
2215
- return {
2216
- mode: "standard",
2217
- smokePath: STD_CALENDAR_PATH,
2218
- fromCache: false,
2219
- ebSmokeFailed: true,
2220
- ebSmokeError: ebDetail,
2221
- warning
2222
- };
2223
- } catch (stdError) {
2224
- throw meetingValidationError(
2225
- "env_unavailable",
2226
- "\u5F53\u524D\u73AF\u5883 EB \u7248\u4E0E\u6807\u51C6\u7248\u4F1A\u8BAE\u63A5\u53E3\u5192\u70DF\u5747\u672A\u901A\u8FC7\uFF0C\u8BF7\u786E\u8BA4\u4F1A\u8BAE\u5E94\u7528\u5DF2\u5B89\u88C5\u4E14\u63A5\u53E3\u5DF2\u914D\u7F6E\u5B8C\u6574",
2227
- {
2228
- eb: ebError instanceof Error ? ebError.message : String(ebError),
2229
- standard: stdError instanceof Error ? stdError.message : String(stdError)
2230
- }
2231
- );
2232
- }
2233
- }
2234
- var meetingEnvDetect = {
2235
- name: "meeting.env.detect",
2236
- resource: "env",
2237
- method: "detect",
2238
- action: "meeting.env.detect",
2239
- summary: "\u63A2\u6D4B\u5F53\u524D\u73AF\u5883\u4F1A\u8BAE\u6A21\u5F0F\uFF1A\u9ED8\u8BA4\u6309 baseUrl \u8BFB\u7F13\u5B58\uFF1B\u672A\u547D\u4E2D\u6216 refresh=true \u65F6 EB \u7248\u5192\u70DF\u4F18\u5148\u3001\u5931\u8D25\u56DE\u9000\u6807\u51C6\u7248\uFF0C\u6210\u529F\u540E\u56FA\u5316\u7F13\u5B58",
2240
- capability: "env",
2241
- risk: "read",
2242
- inputSchema: {
2243
- type: "object",
2244
- additionalProperties: false,
2245
- properties: {
2246
- refresh: { type: "boolean", description: 'true=\u5FFD\u7565\u7F13\u5B58\u5F3A\u5236\u91CD\u65B0\u5192\u70DF\u5E76\u66F4\u65B0\u7F13\u5B58\uFF08\u7528\u6237\u8BF4"\u91CD\u65B0\u63A2\u6D4B/\u5237\u65B0\u6A21\u5F0F"\u65F6\u4F7F\u7528\uFF09' },
2247
- profileId: SCHEMA_ID
2248
- }
2249
- },
2250
- handler: async (args, { host, ctx }) => {
2251
- const result = await resolveMeetingEnvMode(host, ctx, { refresh: args.refresh === true });
2252
- const { warning, ...data } = result;
2253
- return meetingSuccess(
2254
- "meeting.env.detect",
2255
- data,
2256
- warning ? { warnings: [warning] } : void 0
2257
- );
2258
- }
2259
- };
2260
- var meetingCalendarBase = {
2261
- name: "meeting.calendar.base",
2262
- resource: "env",
2263
- method: "calendar.base",
2264
- action: "meeting.calendar.base",
2265
- summary: "\u67E5\u8BE2\u65E5\u5386/\u5EFA\u4F1A\u57FA\u7840\u4FE1\u606F\uFF08getCalendarBaseData\uFF09\uFF1AonlyFlowCreate / workFlowBaseIds / repeatWorkFlowBaseIds / existWorkFlow",
2266
- capability: "env",
2267
- risk: "read",
2268
- inputSchema: { type: "object", additionalProperties: false, properties: {} },
2269
- handler: async (_args, { host }) => {
2270
- const response = await host.request({
2271
- method: "GET",
2272
- path: STD_CALENDAR_PATH,
2273
- operation: "meeting.calendar.base"
2274
- });
2275
- const createBaseData = response?.data?.createBaseData ?? response?.createBaseData ?? null;
2276
- return meetingSuccess("meeting.calendar.base", { createBaseData, raw: response });
2277
- }
2278
- };
2279
- var meetingDetailField = {
2280
- name: "meeting.detail.field",
2281
- resource: "meeting",
2282
- method: "detail.field",
2283
- action: "meeting.detail.field",
2284
- summary: "\u67E5\u8BE2\u4F1A\u8BAE\u8BE6\u60C5\u8868\u5355\u7ED3\u6784\u4E0E options\uFF08getMeetingDetailField\uFF09\uFF1Aid / operateType / fromWorkflow / isReadOnly",
2285
- capability: "meeting",
2286
- risk: "read",
2287
- inputSchema: {
2288
- type: "object",
2289
- additionalProperties: false,
2290
- properties: {
2291
- id: SCHEMA_ID,
2292
- operateType: { type: "string", description: "\u64CD\u4F5C\u7C7B\u578B\uFF0C\u5982 SUBMIT/UPDATE/CHANGE" },
2293
- fromWorkflow: { type: "integer", enum: [0, 1] },
2294
- isReadOnly: { type: "integer", enum: [0, 1] }
2295
- },
2296
- required: ["id"]
2297
- },
2298
- handler: async (args, { host }) => {
2299
- const query = { id: String(args.id) };
2300
- if (args.operateType !== void 0) query.operateType = args.operateType;
2301
- if (args.fromWorkflow !== void 0) query.fromWorkflow = args.fromWorkflow;
2302
- if (args.isReadOnly !== void 0) query.isReadOnly = args.isReadOnly;
2303
- const response = await host.request({
2304
- method: "GET",
2305
- path: "/api/meeting/detail/getMeetingDetailField",
2306
- operation: "meeting.detail.field",
2307
- query
2308
- });
2309
- return meetingSuccess("meeting.detail.field", { data: response?.data ?? response });
2310
- }
2311
- };
2312
- var meetingEnvOperations = [
2313
- meetingEnvDetect,
2314
- meetingCalendarBase,
2315
- meetingDetailField
2316
- ];
2317
-
2318
2254
  export {
2319
2255
  MeetingCliError,
2320
2256
  meetingValidationError,
@@ -2350,8 +2286,5 @@ export {
2350
2286
  writeBody,
2351
2287
  extractEbRows,
2352
2288
  normalizeEbWrite,
2353
- buildEbOperations,
2354
- meetingStateDir,
2355
- resolveMeetingEnvMode,
2356
- meetingEnvOperations
2289
+ buildEbOperations
2357
2290
  };