weaver-work-cli 0.1.71 → 0.1.73

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 (140) hide show
  1. package/dist/chunks/{archive-5P33NAUN.js → archive-THZV4ND4.js} +2 -2
  2. package/dist/chunks/{archive-oa-YTY5D7DG.js → archive-oa-PQ23OLEV.js} +2 -2
  3. package/dist/chunks/{asset-3Q5MFQBX.js → asset-RGPROZYH.js} +2 -2
  4. package/dist/chunks/{asset-idle-PQPNYIS7.js → asset-idle-Z2PDX7NA.js} +2 -2
  5. package/dist/chunks/{attachment-content-7CN7JB6B.js → attachment-content-R3RPVOYE.js} +3 -3
  6. package/dist/chunks/{blog-MFHHK6ZR.js → blog-7U3QZPIF.js} +2 -2
  7. package/dist/chunks/{caizhilian-OZ435AYW.js → caizhilian-3AB42GCV.js} +4 -4
  8. package/dist/chunks/{calendar-TNJXS5UC.js → calendar-KINM64E4.js} +2 -2
  9. package/dist/chunks/{chunk-VMVMEIL3.js → chunk-2CHGUYMG.js} +4 -4
  10. package/dist/chunks/{chunk-G7ZM2VOX.js → chunk-2XED2FKY.js} +34 -34
  11. package/dist/chunks/{chunk-SKWKCLJX.js → chunk-4BXR6CNB.js} +2 -2
  12. package/dist/chunks/{chunk-EJLP63UO.js → chunk-4I26YMBY.js} +1 -1
  13. package/dist/chunks/{chunk-OFCF23FY.js → chunk-4YXAK6OA.js} +15 -4
  14. package/dist/chunks/{chunk-6MMSLE6K.js → chunk-54ST55IJ.js} +5 -1
  15. package/dist/chunks/{chunk-SSS75WXW.js → chunk-6HT73VOI.js} +2 -2
  16. package/dist/chunks/{chunk-XLSJC6JZ.js → chunk-7QFVXP2X.js} +6 -6
  17. package/dist/chunks/{chunk-SUWR5QEG.js → chunk-AMAPQVBT.js} +1 -0
  18. package/dist/chunks/{chunk-ICNUOWLL.js → chunk-BWYVS62Z.js} +4 -4
  19. package/dist/chunks/{chunk-UPVAQJKS.js → chunk-DRUND2PJ.js} +130 -79
  20. package/dist/chunks/{chunk-Q3EXRNB4.js → chunk-F4HM25K4.js} +1 -1
  21. package/dist/chunks/{chunk-P3AFNAJ6.js → chunk-GAMGDNTF.js} +1 -1
  22. package/dist/chunks/{chunk-2DNCKZRX.js → chunk-GWJLAF6B.js} +2 -2
  23. package/dist/chunks/{chunk-VJWVB55R.js → chunk-IBSJJGXL.js} +2 -2
  24. package/dist/chunks/{chunk-MZVQKQP5.js → chunk-ICP53R52.js} +4 -4
  25. package/dist/chunks/{chunk-DRJYPXKC.js → chunk-IU6UB2TD.js} +1 -1
  26. package/dist/chunks/{chunk-OZ7CJC7W.js → chunk-JMJBPP4B.js} +2 -2
  27. package/dist/chunks/{chunk-B4NINGP2.js → chunk-L7TYG5SN.js} +2 -2
  28. package/dist/chunks/{chunk-FRMDHZSN.js → chunk-LLCMOZ5L.js} +11 -11
  29. package/dist/chunks/{chunk-YN5SD4TX.js → chunk-NUP4RYZK.js} +2 -2
  30. package/dist/chunks/{chunk-OPTJ6IF7.js → chunk-PAFOLIYQ.js} +1 -1
  31. package/dist/chunks/{chunk-GB2MCJPG.js → chunk-R3MK2RBN.js} +1 -1
  32. package/dist/chunks/{chunk-X2C5CGGM.js → chunk-TV46Q4NY.js} +50 -50
  33. package/dist/chunks/{chunk-LU2SPJYY.js → chunk-XZBYRYWX.js} +2 -2
  34. package/dist/chunks/{chunk-MD5RXRI3.js → chunk-ZWLWXHJC.js} +2 -2
  35. package/dist/chunks/{conflict-Y4PXZ2YQ.js → conflict-VPAR7E6F.js} +2 -2
  36. package/dist/chunks/{contract-C3BGUMBM.js → contract-DDXAO2DZ.js} +2 -2
  37. package/dist/chunks/{cowork-2AWG4QLA.js → cowork-34QCHMDD.js} +2 -2
  38. package/dist/chunks/{create-flow-LOUOK46Z.js → create-flow-52PU2OBI.js} +6 -6
  39. package/dist/chunks/{data-BSFYMXVO.js → data-CLQ62QGD.js} +2 -2
  40. package/dist/chunks/{ebuilder-form-LAAMTD2Y.js → ebuilder-form-W5R7Q22S.js} +3 -3
  41. package/dist/chunks/{ehr-36KEX5SH.js → ehr-LCNAVMK5.js} +7 -6
  42. package/dist/chunks/{entry-mode-6N2IGCS4.js → entry-mode-6Z3ZV3DE.js} +3 -3
  43. package/dist/chunks/{env-QYLS3EB3.js → env-RDKWAARB.js} +2 -2
  44. package/dist/chunks/{esb-PTYS3E67.js → esb-ANKPUU65.js} +4 -4
  45. package/dist/chunks/{factory-LPFPKZ4T.js → factory-434B7RAT.js} +1 -1
  46. package/dist/chunks/{fna-JNHCLRDE.js → fna-AKBSG5HI.js} +2 -2
  47. package/dist/chunks/{group-chat-QP2WX4QJ.js → group-chat-PROTW22R.js} +3 -3
  48. package/dist/chunks/{host-7BVR7CQ3.js → host-5R2SNFWD.js} +3 -3
  49. package/dist/chunks/{host-57LSRSE7.js → host-7FJW4E7R.js} +3 -3
  50. package/dist/chunks/{host-K2ZKNXME.js → host-CGXUFQO4.js} +3 -3
  51. package/dist/chunks/{host-NS36QFLR.js → host-PDJAKCT7.js} +3 -3
  52. package/dist/chunks/{host-C2BLBIID.js → host-WO4L5G5I.js} +3 -3
  53. package/dist/chunks/{host-QXFKQXNX.js → host-XIYG4F4B.js} +3 -3
  54. package/dist/chunks/{hrm-FSGO4NSH.js → hrm-WGODDTEH.js} +3 -3
  55. package/dist/chunks/{im-2BFGS2XO.js → im-YKTKAJU3.js} +3 -3
  56. package/dist/chunks/{invoice-JKLTTHSZ.js → invoice-PVYCCCVM.js} +3 -3
  57. package/dist/chunks/{jiuchuanhui-PTABJE7V.js → jiuchuanhui-RKOQW7BY.js} +3 -3
  58. package/dist/chunks/{lazy-dispatch-YN2ZP3CS.js → lazy-dispatch-DW45AFQ5.js} +5 -5
  59. package/dist/chunks/{mail-YNO7ZZUK.js → mail-BNB5S4NW.js} +2 -2
  60. package/dist/chunks/{meeting-NIDHDBCB.js → meeting-O2KDJH66.js} +13 -13
  61. package/dist/chunks/{minute-doc-G3QAT7DE.js → minute-doc-JUCG56GY.js} +4 -4
  62. package/dist/chunks/{okr-QC52G6AJ.js → okr-LWFGWOE7.js} +2 -2
  63. package/dist/chunks/{operations-MQV32ITT.js → operations-532PN5OB.js} +4 -4
  64. package/dist/chunks/{performance-3MQ3AHDQ.js → performance-7W5COCFU.js} +2 -2
  65. package/dist/chunks/{plan-ISINIEPY.js → plan-ZVY3IYTL.js} +2 -2
  66. package/dist/chunks/{project-IJ6DVKT7.js → project-SA62B7MH.js} +2 -2
  67. package/dist/chunks/{reception-3H5LUG2I.js → reception-NGIONPQ3.js} +113 -44
  68. package/dist/chunks/{recruit-stage-MIOJXP6W.js → recruit-stage-WOSN6MGP.js} +868 -128
  69. package/dist/chunks/{registry-NHHKOEU3.js → registry-N7P3W2RD.js} +4 -4
  70. package/dist/chunks/{registry-3S7AVMXR.js → registry-R72GWXOG.js} +3 -3
  71. package/dist/chunks/{registry-3GQRYP2R.js → registry-RIQ67ZT7.js} +12 -12
  72. package/dist/chunks/{room-recommend-IOKBJVYP.js → room-recommend-KCGIVUFR.js} +4 -4
  73. package/dist/chunks/{schedule-IB6EUARH.js → schedule-6UP27HQ4.js} +4 -4
  74. package/dist/chunks/{smart-extract-N2TK3CEF.js → smart-extract-DDOQSPRB.js} +3 -3
  75. package/dist/chunks/{workflow-RINBAL2M.js → workflow-V5ALD6QZ.js} +5 -5
  76. package/dist/core/output.js +4 -0
  77. package/dist/index.js +34 -34
  78. package/dist/shortcuts/ehr/operations/recruit-position.js +4 -3
  79. package/dist/shortcuts/ehr/operations/recruit-short-cache.js +6 -2
  80. package/dist/shortcuts/ehr/operations/recruit-write.js +3 -3
  81. package/dist/shortcuts/ehr/operations/recruit.js +206 -82
  82. package/dist/shortcuts/ehr/operations/shared.js +31 -0
  83. package/dist/shortcuts/reception/constants.js +22 -0
  84. package/dist/shortcuts/reception/index.js +4 -0
  85. package/dist/shortcuts/reception/manifest.js +15 -1
  86. package/dist/shortcuts/reception/operations/doc.js +24 -11
  87. package/dist/shortcuts/reception/operations/docrender.js +18 -1
  88. package/dist/shortcuts/reception/operations/render-assets.js +93 -22
  89. package/dist/shortcuts/recruit-stage/context.js +12 -6
  90. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +19 -10
  91. package/dist/shortcuts/recruit-stage/operations/jd-create.js +454 -22
  92. package/dist/shortcuts/recruit-stage/operations/list.js +72 -1
  93. package/dist/shortcuts/recruit-stage/operations/profile.js +13 -5
  94. package/dist/shortcuts/recruit-stage/operations/registry.js +18 -2
  95. package/dist/shortcuts/recruit-stage/operations/resume-import.js +192 -26
  96. package/dist/shortcuts/recruit-stage/operations/search.js +78 -14
  97. package/dist/shortcuts/recruit-stage/operations/shortlist.js +122 -0
  98. package/dist/shortcuts/recruit-stage/shared.js +147 -3
  99. package/dist/shortcuts/workflow/operations/form.js +36 -2
  100. package/package.json +1 -1
  101. package/skills/weaver-e10-jucailin/SKILL.md +7 -3
  102. package/skills/weaver-e10-jucailin/references/recruit-output-links.md +33 -0
  103. package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -0
  104. package/skills/weaver-e10-reception-flow/SKILL.md +97 -41
  105. package/skills/weaver-e10-reception-flow/references/guide.md +3 -1
  106. package/skills/weaver-e10-recruit-stage/SKILL.md +499 -122
  107. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +67 -44
  108. package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +279 -0
  109. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +198 -0
  110. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +697 -0
  111. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +159 -11
  112. package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +2 -2
  113. package/skills/weaver-e10-recruit-stage/references/position-templates.md +19 -18
  114. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +19 -18
  115. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +1 -1
  116. package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +1 -1
  117. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +15 -2
  118. package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +37 -0
  119. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +4 -4
  120. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +62 -33
  121. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +43 -2
  122. package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +41 -0
  123. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -4
  124. package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +2 -2
  125. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +25 -7
  126. package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +51 -0
  127. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +63 -0
  128. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +4 -4
  129. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +2 -2
  130. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +58 -33
  131. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +4 -4
  132. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +5 -5
  133. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +2 -2
  134. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +10 -10
  135. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +2 -2
  136. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
  137. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +106 -0
  138. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +325 -0
  139. package/skills/weaver-e10-recruit-stage/templates/match-report.html +161 -73
  140. package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
@@ -3,13 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  readCache,
5
5
  writeCache
6
- } from "./chunk-OPTJ6IF7.js";
6
+ } from "./chunk-PAFOLIYQ.js";
7
7
  import {
8
8
  SCHEMA_DATETIME_MINUTE,
9
9
  meetingSuccess,
10
10
  meetingValidationError,
11
11
  schemaOf
12
- } from "./chunk-EJLP63UO.js";
12
+ } from "./chunk-4I26YMBY.js";
13
13
 
14
14
  // src/shortcuts/meeting/operations/eb/schedule.ts
15
15
  var SCHEDULE_TYPE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/queryAgendaType";
@@ -110,9 +110,9 @@ async function runScheduleConflictFlow(env, input) {
110
110
  if (!employeeId) {
111
111
  throw meetingValidationError("schedule_employee_required", "\u53D6\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u7528\u6237 id\uFF0C\u65E0\u6CD5\u89E6\u53D1 ESB \u65E5\u7A0B\u67E5\u8BE2");
112
112
  }
113
- const { createEsbHost } = await import("./host-57LSRSE7.js");
113
+ const { createEsbHost } = await import("./host-7FJW4E7R.js");
114
114
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
115
- const { getEsbOperation } = await import("./registry-NHHKOEU3.js");
115
+ const { getEsbOperation } = await import("./registry-N7P3W2RD.js");
116
116
  const esbEnv = {
117
117
  ctx: env.ctx,
118
118
  host: createEsbHost(env.ctx),
@@ -1,5 +1,8 @@
1
1
  import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ isXiaoECloudRuntime
5
+ } from "./chunk-AMAPQVBT.js";
3
6
  import {
4
7
  CliError
5
8
  } from "./chunk-UG5G54VL.js";
@@ -66,6 +69,16 @@ function asObject(value) {
66
69
  }
67
70
  return value;
68
71
  }
72
+ function toMenuList(value) {
73
+ if (Array.isArray(value)) return value;
74
+ if (value && typeof value === "object") {
75
+ const obj = value;
76
+ for (const key of ["cusAppMenus", "menus", "allMenus", "data", "list"]) {
77
+ if (Array.isArray(obj[key])) return obj[key];
78
+ }
79
+ }
80
+ return [];
81
+ }
69
82
  function assertNoForbiddenKeys(input) {
70
83
  for (const key of Object.keys(input)) {
71
84
  if (FORBIDDEN_KEYS.has(key)) {
@@ -250,7 +263,7 @@ function addDays(date, delta) {
250
263
 
251
264
  // src/shortcuts/ehr/operations/recruit.ts
252
265
  import { randomBytes, randomUUID } from "node:crypto";
253
- import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
266
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
254
267
  import { homedir } from "node:os";
255
268
  import { join, resolve } from "node:path";
256
269
 
@@ -279,7 +292,13 @@ var SCHEMA_STRING_LIST = { type: "array", items: { type: "string" } };
279
292
 
280
293
  // src/shortcuts/ehr/operations/recruit.ts
281
294
  var RECRUIT_APP_TAG = "weaver-recruit-service";
282
- var RECRUIT_CACHE_VERSION = 4;
295
+ var SELF_TENANT_KEYS = /* @__PURE__ */ new Set(["t7akvdnf84"]);
296
+ function isSelfTenant(tenantKey) {
297
+ const key = String(tenantKey || "").trim();
298
+ return !!key && SELF_TENANT_KEYS.has(key);
299
+ }
300
+ var RECRUIT_CACHE_VERSION = 5;
301
+ var RECRUIT_CACHE_TTL_MS = 12 * 60 * 60 * 1e3;
283
302
  var RECRUIT_CRITICAL_FORMS = /* @__PURE__ */ new Set(["position_manage", "talent_pool", "interview_plan"]);
284
303
  var RECRUIT_CRITICAL_FORM_LABELS = {
285
304
  position_manage: "\u62DB\u8058\u804C\u4F4D",
@@ -293,6 +312,7 @@ function hasCriticalFields(cache) {
293
312
  const fmap = cache?.fields?.[objId] || {};
294
313
  if (!Object.keys(fmap).length) return false;
295
314
  }
315
+ if (Array.isArray(cache?.degraded) && cache.degraded.length) return false;
296
316
  return true;
297
317
  }
298
318
  var RECRUIT_TAGS = {
@@ -372,6 +392,7 @@ function snapshotPathFor(baseUrl) {
372
392
  return join(cacheDirFor(baseUrl), "..", "_recruit-stage", `context-snapshot-${host}.json`);
373
393
  }
374
394
  function readContextSnapshot(baseUrl) {
395
+ if (isXiaoECloudRuntime()) return null;
375
396
  try {
376
397
  const raw = JSON.parse(readFileSync(snapshotPathFor(baseUrl), "utf8"));
377
398
  if (!raw?.at || raw.cacheVersion !== RECRUIT_CACHE_VERSION) return null;
@@ -383,6 +404,8 @@ function readContextSnapshot(baseUrl) {
383
404
  }
384
405
  }
385
406
  function writeContextSnapshot(baseUrl, appId, resolved) {
407
+ if (Array.isArray(resolved?.degraded) && resolved.degraded.length) return;
408
+ if (isXiaoECloudRuntime()) return;
386
409
  try {
387
410
  const path = snapshotPathFor(baseUrl);
388
411
  mkdirSync(join(path, ".."), { recursive: true });
@@ -465,6 +488,7 @@ async function fetchFormFields(host, appId, objId) {
465
488
  return { fmap, omap };
466
489
  }
467
490
  async function resolveRecruitEnv(host, appId) {
491
+ const degraded = [];
468
492
  const forms = {};
469
493
  let tenantKey = "";
470
494
  const tagEntries = Object.entries(RECRUIT_TAGS);
@@ -489,21 +513,27 @@ async function resolveRecruitEnv(host, appId) {
489
513
  `\u5F53\u524D\u73AF\u5883\u672A\u89E3\u6790\u5230\u300C${RECRUIT_CRITICAL_FORM_LABELS[logic] || logic}\u300D\u8868\u5355\uFF08getObjsByTag \u8FD4\u56DE\u7A7A\uFF09\uFF0C\u5DF2\u4E2D\u6B62\u4E14\u672A\u5199\u5165\u7F13\u5B58\uFF1B\u8BF7\u786E\u8BA4\u62DB\u8058\u5E94\u7528\u5DF2\u5B89\u88C5\u3001\u8D26\u53F7\u5BF9\u8BE5\u8868\u5355\u6709\u6743\u9650\u540E\u91CD\u8BD5\u3002`
490
514
  );
491
515
  }
492
- const menuResponse = await host.request({
493
- path: "/api/cusapp/app/allMenus",
494
- query: { isFront: 1, appId, terminalType: "PC" }
495
- });
516
+ if (!forms.dictionary?.objId) degraded.push("dict");
496
517
  const flat = [];
497
518
  const walk = (nodes) => {
498
- for (const node of nodes || []) {
519
+ for (const node of toMenuList(nodes)) {
499
520
  if (node && typeof node === "object") {
500
521
  flat.push(node);
501
- walk(node.children || node.childs);
522
+ walk(node.children ?? node.childs);
502
523
  }
503
524
  }
504
525
  };
505
- const menuData = menuResponse?.data;
506
- walk(typeof menuData === "object" && menuData ? menuData.cusAppMenus || menuData : menuData);
526
+ let menuFailed = false;
527
+ try {
528
+ const menuResponse = await host.request({
529
+ path: "/api/cusapp/app/allMenus",
530
+ query: { isFront: 1, appId, terminalType: "PC" }
531
+ });
532
+ walk(menuResponse?.data);
533
+ } catch {
534
+ menuFailed = true;
535
+ }
536
+ if (menuFailed || !flat.length) degraded.push("menus");
507
537
  const searchMenus = [];
508
538
  const pages = [];
509
539
  for (const node of flat) {
@@ -532,52 +562,57 @@ async function resolveRecruitEnv(host, appId) {
532
562
  const dictMenu = searchMenus.find((m) => (m.menuName || "").trim() === "\u6570\u636E\u5B57\u5178") || null;
533
563
  const dictObjId = forms.dictionary?.objId || "";
534
564
  if (dictObjId && dictMenu) {
535
- const size = 500;
536
- const CONCURRENCY = 6;
537
- const fetchDictPage = (pageNo2) => host.request({
538
- path: `/api/ebuilder/form/list/getListDatas?passid=${dictObjId}&cid=${dictObjId}`,
539
- body: {
540
- current: pageNo2,
541
- pageSize: size,
542
- tableuid: randHex32(),
543
- listId: dictMenu.listId,
544
- searchParamData: { searchType: "3", type: "and" },
545
- terminal: "PC",
546
- browser: "Chrome",
547
- requiredMatch: 1,
548
- mapResult: 1,
549
- recheckQuery: 1,
550
- isFollow: 0,
551
- isShareToMe: 0,
552
- filterCondition: {},
553
- cusMenuId: dictMenu.cusMenuId,
554
- urlPageTitle: "\u6570\u636E\u5B57\u5178",
555
- menuName: "\u6570\u636E\u5B57\u5178"
556
- },
557
- headers: { ebBusinessId: dictMenu.listId }
558
- });
559
- let pageNo = 1;
560
- let reachedEnd = false;
561
- while (!reachedEnd) {
562
- const batchPages = Array.from({ length: CONCURRENCY }, (_, i) => pageNo + i);
563
- const responses = await Promise.all(batchPages.map((p) => fetchDictPage(p)));
564
- for (const response of responses) {
565
- const rows = response?.data?.data || [];
566
- for (const row of rows) {
567
- const name = row.selection_name;
568
- const optionId = row.form_data_id;
569
- if (name && optionId) {
570
- (dictByName[String(name)] ||= []).push(String(optionId));
571
- dictRaw.push({ selection_name: String(name), option_id: String(optionId), dict_type: row.dict_type, browser_key: row.browser_key });
565
+ try {
566
+ const size = 500;
567
+ const CONCURRENCY = 6;
568
+ const fetchDictPage = (pageNo2) => host.request({
569
+ path: `/api/ebuilder/form/list/getListDatas?passid=${dictObjId}&cid=${dictObjId}`,
570
+ body: {
571
+ current: pageNo2,
572
+ pageSize: size,
573
+ tableuid: randHex32(),
574
+ listId: dictMenu.listId,
575
+ searchParamData: { searchType: "3", type: "and" },
576
+ terminal: "PC",
577
+ browser: "Chrome",
578
+ requiredMatch: 1,
579
+ mapResult: 1,
580
+ recheckQuery: 1,
581
+ isFollow: 0,
582
+ isShareToMe: 0,
583
+ filterCondition: {},
584
+ cusMenuId: dictMenu.cusMenuId,
585
+ urlPageTitle: "\u6570\u636E\u5B57\u5178",
586
+ menuName: "\u6570\u636E\u5B57\u5178"
587
+ },
588
+ headers: { ebBusinessId: dictMenu.listId }
589
+ });
590
+ let pageNo = 1;
591
+ let reachedEnd = false;
592
+ while (!reachedEnd) {
593
+ const batchPages = Array.from({ length: CONCURRENCY }, (_, i) => pageNo + i);
594
+ const responses = await Promise.all(batchPages.map((p) => fetchDictPage(p)));
595
+ for (const response of responses) {
596
+ const rows = response?.data?.data || [];
597
+ for (const row of rows) {
598
+ const name = row.selection_name;
599
+ const optionId = row.form_data_id;
600
+ if (name && optionId) {
601
+ (dictByName[String(name)] ||= []).push(String(optionId));
602
+ dictRaw.push({ selection_name: String(name), option_id: String(optionId), dict_type: row.dict_type, browser_key: row.browser_key });
603
+ }
604
+ }
605
+ if (rows.length < size) {
606
+ reachedEnd = true;
607
+ break;
572
608
  }
573
609
  }
574
- if (rows.length < size) {
575
- reachedEnd = true;
576
- break;
577
- }
610
+ pageNo += CONCURRENCY;
578
611
  }
579
- pageNo += CONCURRENCY;
612
+ } catch {
613
+ degraded.push("dict");
580
614
  }
615
+ if (!Object.keys(dictByName).length) degraded.push("dict");
581
616
  }
582
617
  let ebdDetailPageId = "";
583
618
  let selfUse = "0";
@@ -642,6 +677,7 @@ async function resolveRecruitEnv(host, appId) {
642
677
  } catch {
643
678
  }
644
679
  }
680
+ if (isSelfTenant(tenantKey)) selfUse = "1";
645
681
  if (!ebdDetailPageId) {
646
682
  try {
647
683
  const response = await host.request({
@@ -662,15 +698,19 @@ async function resolveRecruitEnv(host, appId) {
662
698
  const entry = forms[logic] || { objId: "", formId: "", objName: "" };
663
699
  const fieldId = (fields[entry.objId] || {})[dataKey] || "";
664
700
  if (fieldId && entry.objId) {
665
- const response = await host.request({
666
- path: "/api/ebuilder/common/ds/options",
667
- query: { fieldName: fieldId, objId: entry.objId, sourceType: "FORM", groupId: appId }
668
- });
669
- if (Array.isArray(response?.data)) {
670
- options[dataKey] = {};
671
- for (const option of response.data) {
672
- if (option?.id) options[dataKey][String(option.id)] = option.name;
701
+ try {
702
+ const response = await host.request({
703
+ path: "/api/ebuilder/common/ds/options",
704
+ query: { fieldName: fieldId, objId: entry.objId, sourceType: "FORM", groupId: appId }
705
+ });
706
+ if (Array.isArray(response?.data)) {
707
+ options[dataKey] = {};
708
+ for (const option of response.data) {
709
+ if (option?.id) options[dataKey][String(option.id)] = option.name;
710
+ }
673
711
  }
712
+ } catch {
713
+ degraded.push(`options:${dataKey}`);
674
714
  }
675
715
  }
676
716
  }
@@ -698,6 +738,7 @@ async function resolveRecruitEnv(host, appId) {
698
738
  return {
699
739
  appId,
700
740
  tenantKey,
741
+ degraded,
701
742
  forms,
702
743
  lists,
703
744
  fields,
@@ -716,23 +757,7 @@ function createRecruitContextLoader() {
716
757
  const memoKey = baseUrl;
717
758
  let cached = memo.get(memoKey);
718
759
  if (cached) return cached;
719
- let appId = "";
720
- let diskCache = null;
721
- try {
722
- const dir = cacheDirFor(baseUrl);
723
- if (existsSync(dir)) {
724
- const files = readdirSync(dir).filter((file) => file.endsWith(".json") && !file.startsWith("_"));
725
- if (files.length === 1) {
726
- appId = files[0].replace(/\.json$/, "");
727
- diskCache = JSON.parse(readFileSync(join(dir, files[0]), "utf8"));
728
- }
729
- }
730
- } catch {
731
- }
732
- if (diskCache && diskCache.cacheVersion === RECRUIT_CACHE_VERSION && hasCriticalFields(diskCache)) {
733
- memo.set(memoKey, diskCache);
734
- return diskCache;
735
- }
760
+ const cloudRuntime = isXiaoECloudRuntime();
736
761
  const gate = await host.request({
737
762
  path: "/api/bs/ebuilder/app/tags/getAppIds",
738
763
  query: { tag: RECRUIT_APP_TAG }
@@ -744,7 +769,22 @@ function createRecruitContextLoader() {
744
769
  "\u5F53\u524D\u79DF\u6237\u672A\u5B89\u88C5\u62DB\u8058\u670D\u52A1\uFF08weaver-recruit-service\uFF09\uFF0C\u65E0\u6CD5\u4F7F\u7528\u62DB\u8058\u80FD\u529B\u3002\u8BF7\u5148\u5728 E10 \u5E94\u7528\u5E02\u573A\u5B89\u88C5\u300C\u62DB\u8058\u300D\u5E94\u7528\u3002"
745
770
  );
746
771
  }
747
- appId = String(appIds[0]);
772
+ const appId = String(appIds[0]);
773
+ if (!cloudRuntime) {
774
+ try {
775
+ const file = join(cacheDirFor(baseUrl), `${appId}.json`);
776
+ if (existsSync(file)) {
777
+ const candidate = JSON.parse(readFileSync(file, "utf8"));
778
+ const savedAt = Number(candidate?.savedAt || 0);
779
+ const fresh = savedAt > 0 && Date.now() - savedAt <= RECRUIT_CACHE_TTL_MS;
780
+ if (candidate && candidate.cacheVersion === RECRUIT_CACHE_VERSION && fresh && hasCriticalFields(candidate)) {
781
+ memo.set(memoKey, candidate);
782
+ return candidate;
783
+ }
784
+ }
785
+ } catch {
786
+ }
787
+ }
748
788
  const snapshot = readContextSnapshot(baseUrl);
749
789
  if (snapshot && snapshot.appId === appId && !process.env.E10_RS_NO_CTX_SNAPSHOT) {
750
790
  let tagStillMatches = false;
@@ -774,6 +814,13 @@ function createRecruitContextLoader() {
774
814
  return { load };
775
815
  }
776
816
  function persistContextCache(baseUrl, appId, cache) {
817
+ if (Array.isArray(cache?.degraded) && cache.degraded.length) {
818
+ if (process.env.WEAVER_CLI_DEBUG_CACHE) {
819
+ console.error("[recruit-context] \u89E3\u6790\u5B58\u5728\u964D\u7EA7\uFF08", cache.degraded.join(","), "\uFF09\uFF0C\u672C\u6B21\u4E0D\u843D\u76D8\uFF0C\u4E0B\u6B21\u8C03\u7528\u5C06\u5168\u91CF\u91CD\u5EFA");
820
+ }
821
+ return;
822
+ }
823
+ if (isXiaoECloudRuntime()) return;
777
824
  try {
778
825
  const dir = cacheDirFor(baseUrl);
779
826
  mkdirSync(dir, { recursive: true });
@@ -785,8 +832,10 @@ function persistContextCache(baseUrl, appId, cache) {
785
832
  note: "recruit-ops \u73AF\u5883\u53C2\u6570\u7F13\u5B58\uFF08weaver-work-cli \u8FD0\u884C\u65F6\u89E3\u6790\u4EA7\u7269\uFF0C\u4E0D\u542B\u8BA4\u8BC1\u5B57\u6BB5\uFF09"
786
833
  },
787
834
  envKey: `${dir.split(/[\\/]/).pop()}|${appId}`,
835
+ ...cache,
788
836
  cacheVersion: RECRUIT_CACHE_VERSION,
789
- ...cache
837
+ // 🔴 savedAt 必须在 ...cache 之后:防止调用方携带旧 savedAt 把新写入标成过期
838
+ savedAt: Date.now()
790
839
  }, null, 2),
791
840
  "utf8"
792
841
  );
@@ -1485,6 +1534,7 @@ export {
1485
1534
  SCHEMA_ID_LIST,
1486
1535
  SCHEMA_STRING_LIST,
1487
1536
  asObject,
1537
+ toMenuList,
1488
1538
  assertNoForbiddenKeys,
1489
1539
  assertMonth,
1490
1540
  toNumber,
@@ -1501,6 +1551,7 @@ export {
1501
1551
  EHR_PAGES,
1502
1552
  ehrPageUrl,
1503
1553
  addDays,
1554
+ isSelfTenant,
1504
1555
  LIST_TYPES,
1505
1556
  namesOf,
1506
1557
  createRecruitContextLoader,
@@ -5,7 +5,7 @@ import {
5
5
  ebBusinessSuccess,
6
6
  meetingSuccess,
7
7
  meetingValidationError
8
- } from "./chunk-EJLP63UO.js";
8
+ } from "./chunk-4I26YMBY.js";
9
9
 
10
10
  // src/shortcuts/meeting/operations/env.ts
11
11
  import { existsSync } from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE,
7
7
  caizhilianBusinessMessage,
8
8
  isCaizhilianBusinessSuccess
9
- } from "./chunk-YN5SD4TX.js";
9
+ } from "./chunk-NUP4RYZK.js";
10
10
  import {
11
11
  CaizhilianCliError,
12
12
  caizhilianAuthError,
@@ -4,14 +4,14 @@ import {
4
4
  createE10RequestRuntime,
5
5
  isE10SessionExpiredResponse,
6
6
  requireE10Session
7
- } from "./chunk-DRJYPXKC.js";
7
+ } from "./chunk-IU6UB2TD.js";
8
8
  import {
9
9
  E10_REAUTH_GUIDANCE,
10
10
  E10_SESSION_EXPIRED_MESSAGE
11
11
  } from "./chunk-IZCQU5D5.js";
12
12
  import {
13
13
  getActiveProfile
14
- } from "./chunk-SUWR5QEG.js";
14
+ } from "./chunk-AMAPQVBT.js";
15
15
  import {
16
16
  CliError
17
17
  } from "./chunk-UG5G54VL.js";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-WMRNO6IU.js";
6
6
  import {
7
7
  meetingStateDir
8
- } from "./chunk-Q3EXRNB4.js";
8
+ } from "./chunk-F4HM25K4.js";
9
9
  import {
10
10
  SCHEMA_ID,
11
11
  meetingSuccess,
12
12
  meetingValidationError,
13
13
  schemaOf
14
- } from "./chunk-EJLP63UO.js";
14
+ } from "./chunk-4I26YMBY.js";
15
15
 
16
16
  // src/shortcuts/meeting/operations/attachment-content.ts
17
17
  import { mkdir, writeFile } from "node:fs/promises";
@@ -15,14 +15,14 @@ import {
15
15
  refMaxCount,
16
16
  resolveRefInput,
17
17
  resultThresholdChars
18
- } from "./chunk-6MMSLE6K.js";
18
+ } from "./chunk-54ST55IJ.js";
19
19
  import {
20
20
  refsDir
21
21
  } from "./chunk-AJ62BGAW.js";
22
22
  import {
23
23
  Command,
24
24
  clearInvoiceTokenForSession
25
- } from "./chunk-2DNCKZRX.js";
25
+ } from "./chunk-GWJLAF6B.js";
26
26
  import {
27
27
  shouldReportPlatformError,
28
28
  toPlatformError
@@ -34,7 +34,7 @@ import {
34
34
  normalizeXiaoEAuthErrorLogLimit,
35
35
  readXiaoEAuthErrorLog,
36
36
  xiaoEAuthLogSecrets
37
- } from "./chunk-DRJYPXKC.js";
37
+ } from "./chunk-IU6UB2TD.js";
38
38
  import {
39
39
  E10AuthSession,
40
40
  XIAOE_AGENT_TYPE,
@@ -70,7 +70,7 @@ import {
70
70
  switchActiveProfile,
71
71
  tryXiaoEUnifiedLogin,
72
72
  upsertAgentHost
73
- } from "./chunk-SUWR5QEG.js";
73
+ } from "./chunk-AMAPQVBT.js";
74
74
  import {
75
75
  CliError,
76
76
  isCliError,
@@ -24,7 +24,7 @@ import {
24
24
  summarizeE10TlsPolicy,
25
25
  summarizeXiaoEFailureKind,
26
26
  tryXiaoEUnifiedLogin
27
- } from "./chunk-SUWR5QEG.js";
27
+ } from "./chunk-AMAPQVBT.js";
28
28
  import {
29
29
  CliError,
30
30
  toErrorEnvelope
@@ -10,10 +10,10 @@ import {
10
10
  createE10RequestRuntime,
11
11
  isE10SessionExpiredResponse,
12
12
  requireE10Session
13
- } from "./chunk-DRJYPXKC.js";
13
+ } from "./chunk-IU6UB2TD.js";
14
14
  import {
15
15
  getActiveProfile
16
- } from "./chunk-SUWR5QEG.js";
16
+ } from "./chunk-AMAPQVBT.js";
17
17
 
18
18
  // src/shortcuts/ebuilder-form/host.ts
19
19
  import { randomUUID } from "node:crypto";
@@ -14,13 +14,13 @@ import {
14
14
  createE10RequestRuntime,
15
15
  isE10SessionExpiredResponse,
16
16
  requireE10Session
17
- } from "./chunk-DRJYPXKC.js";
17
+ } from "./chunk-IU6UB2TD.js";
18
18
  import {
19
19
  E10_SESSION_EXPIRED_MESSAGE
20
20
  } from "./chunk-IZCQU5D5.js";
21
21
  import {
22
22
  getActiveProfile
23
- } from "./chunk-SUWR5QEG.js";
23
+ } from "./chunk-AMAPQVBT.js";
24
24
 
25
25
  // src/shortcuts/esb/host.ts
26
26
  var ESB_PATHS = {
@@ -2,12 +2,12 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-Q3EXRNB4.js";
5
+ } from "./chunk-F4HM25K4.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError,
9
9
  schemaOf
10
- } from "./chunk-EJLP63UO.js";
10
+ } from "./chunk-4I26YMBY.js";
11
11
 
12
12
  // src/shortcuts/meeting/operations/eb/group-chat.ts
13
13
  import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -16,17 +16,17 @@ var DEFAULT_MEETING_GROUP_FLOW_ID = "1333212605456498718";
16
16
  var GROUP_FIELD = "imchat_groupid";
17
17
  var PENDING_DIR = "pending-forms";
18
18
  async function buildEsbEnv(env) {
19
- const { createEsbHost } = await import("./host-57LSRSE7.js");
19
+ const { createEsbHost } = await import("./host-7FJW4E7R.js");
20
20
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
21
21
  return { ctx: env.ctx, host: createEsbHost(env.ctx), continuation: createEsbContinuationSigner(env.ctx) };
22
22
  }
23
23
  async function buildImEnv(env) {
24
- const { createImHost } = await import("./host-QXFKQXNX.js");
24
+ const { createImHost } = await import("./host-XIYG4F4B.js");
25
25
  const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
26
26
  return { ctx: env.ctx, host: createImHost(env.ctx), continuation: createImContinuationSigner(env.ctx) };
27
27
  }
28
28
  async function buildWorkflowEnv(env) {
29
- const { createWorkflowHost } = await import("./host-7BVR7CQ3.js");
29
+ const { createWorkflowHost } = await import("./host-5R2SNFWD.js");
30
30
  const { createWorkflowContinuationSigner } = await import("./continuation-HFW2YT5S.js");
31
31
  return { ctx: env.ctx, host: createWorkflowHost(env.ctx), continuation: createWorkflowContinuationSigner(env.ctx) };
32
32
  }
@@ -159,7 +159,7 @@ async function triggerGroupFlow(env, input, meetingName, memberIds) {
159
159
  if (addressText === "[object Object]") addressText = "";
160
160
  if (addressText) {
161
161
  try {
162
- const { resolveAddressRoom } = await import("./create-flow-LOUOK46Z.js");
162
+ const { resolveAddressRoom } = await import("./create-flow-52PU2OBI.js");
163
163
  const room = await resolveAddressRoom(env, addressText);
164
164
  if (room?.name) addressText = room.name;
165
165
  } catch {
@@ -168,7 +168,7 @@ async function triggerGroupFlow(env, input, meetingName, memberIds) {
168
168
  if (addressText) mainTable.address = addressText;
169
169
  }
170
170
  try {
171
- const { getEsbOperation } = await import("./registry-NHHKOEU3.js");
171
+ const { getEsbOperation } = await import("./registry-N7P3W2RD.js");
172
172
  const esbEnv = await buildEsbEnv(env);
173
173
  const prepare = getEsbOperation("esb.trigger.prepare");
174
174
  const apply = getEsbOperation("esb.trigger.apply");
@@ -201,7 +201,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
201
201
  const group = String(groupId).trim();
202
202
  if (id === "" || group === "") return { ok: false, error: "\u6CA1\u6709\u4F1A\u8BAE id \u6216\u7FA4 id" };
203
203
  try {
204
- const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-LPFPKZ4T.js");
204
+ const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-434B7RAT.js");
205
205
  const session = await env.host.getSession();
206
206
  await env.host.request({
207
207
  method: "POST",
@@ -219,7 +219,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
219
219
  return { ok: false, error: String(error?.message ?? error).slice(0, 300) };
220
220
  }
221
221
  try {
222
- const { getMeetingOperation } = await import("./registry-3GQRYP2R.js");
222
+ const { getMeetingOperation } = await import("./registry-RIQ67ZT7.js");
223
223
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
224
224
  const read = await detail.handler({ id }, env);
225
225
  const main = read?.data?.data ?? read?.data?.main ?? {};
@@ -235,7 +235,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
235
235
  }
236
236
  async function searchMyRequests(env, options = {}) {
237
237
  try {
238
- const { getWorkflowOperation } = await import("./registry-3S7AVMXR.js");
238
+ const { getWorkflowOperation } = await import("./registry-R72GWXOG.js");
239
239
  const op = getWorkflowOperation("workflow.search");
240
240
  const wfEnv = await buildWorkflowEnv(env);
241
241
  const args = { category: "mine", pageSize: 20, sort: "createTime:desc" };
@@ -267,7 +267,7 @@ async function resolveMeetingByRequestId(env, requestId, sinceMs) {
267
267
  const target = String(requestId).trim();
268
268
  if (target === "") return null;
269
269
  try {
270
- const { getMeetingOperation } = await import("./registry-3GQRYP2R.js");
270
+ const { getMeetingOperation } = await import("./registry-RIQ67ZT7.js");
271
271
  const list = getMeetingOperation("meeting.eb.meeting.list");
272
272
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
273
273
  const page = await list.handler({ pageSize: 30 }, env);
@@ -11,13 +11,13 @@ import {
11
11
  createE10RequestRuntime,
12
12
  isE10SessionExpiredResponse,
13
13
  requireE10Session
14
- } from "./chunk-DRJYPXKC.js";
14
+ } from "./chunk-IU6UB2TD.js";
15
15
  import {
16
16
  E10_SESSION_EXPIRED_MESSAGE
17
17
  } from "./chunk-IZCQU5D5.js";
18
18
  import {
19
19
  getActiveProfile
20
- } from "./chunk-SUWR5QEG.js";
20
+ } from "./chunk-AMAPQVBT.js";
21
21
 
22
22
  // src/shortcuts/caizhilian/host.ts
23
23
  var CAIZHILAN_TIMEOUT_MS = 12e3;
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-Q3EXRNB4.js";
5
+ } from "./chunk-F4HM25K4.js";
6
6
 
7
7
  // src/shortcuts/meeting/operations/eb/cache.ts
8
8
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  isEsbFlowUnavailable
5
- } from "./chunk-B4NINGP2.js";
5
+ } from "./chunk-L7TYG5SN.js";
6
6
  import {
7
7
  esbValidationError
8
8
  } from "./chunk-TXUG266F.js";