weaver-work-cli 0.1.70 → 0.1.71

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 (214) hide show
  1. package/dist/chunks/{archive-VUTREF3P.js → archive-5P33NAUN.js} +22 -5
  2. package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-YTY5D7DG.js} +17 -5
  3. package/dist/chunks/{asset-45U6TY7I.js → asset-3Q5MFQBX.js} +22 -5
  4. package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-PQPNYIS7.js} +15 -5
  5. package/dist/chunks/{attachment-content-DMU7KNZ7.js → attachment-content-7CN7JB6B.js} +3 -3
  6. package/dist/chunks/{blog-5AML4WMG.js → blog-MFHHK6ZR.js} +25 -5
  7. package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-OZ435AYW.js} +22 -8
  8. package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-TNJXS5UC.js} +15 -5
  9. package/dist/chunks/{chunk-H2NRTGZR.js → chunk-2DNCKZRX.js} +3 -3
  10. package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
  11. package/dist/chunks/{chunk-HG6INLH6.js → chunk-6MMSLE6K.js} +23 -6
  12. package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-B4NINGP2.js} +3 -3
  13. package/dist/chunks/{chunk-LRKKKO5A.js → chunk-DRJYPXKC.js} +3 -4
  14. package/dist/chunks/{chunk-KDOJW5LH.js → chunk-EJLP63UO.js} +1 -1
  15. package/dist/chunks/{chunk-HAORST2G.js → chunk-FRMDHZSN.js} +11 -11
  16. package/dist/chunks/{chunk-GWM5TLIK.js → chunk-G7ZM2VOX.js} +34 -34
  17. package/dist/chunks/{chunk-LSVA7QA6.js → chunk-GB2MCJPG.js} +3 -1
  18. package/dist/chunks/{chunk-L2A3COWV.js → chunk-ICNUOWLL.js} +4 -4
  19. package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
  20. package/dist/chunks/{chunk-7CINV2BU.js → chunk-LU2SPJYY.js} +2 -2
  21. package/dist/chunks/{chunk-E7VWE2XI.js → chunk-MD5RXRI3.js} +3 -3
  22. package/dist/chunks/{chunk-VZUH3LKI.js → chunk-MZVQKQP5.js} +167 -157
  23. package/dist/chunks/{chunk-X6PMJQGO.js → chunk-OFCF23FY.js} +6 -6
  24. package/dist/chunks/{chunk-IVCOZCAW.js → chunk-OPTJ6IF7.js} +1 -1
  25. package/dist/chunks/{chunk-727VKJQK.js → chunk-OZ7CJC7W.js} +2 -2
  26. package/dist/chunks/{chunk-T24EBWAZ.js → chunk-P3AFNAJ6.js} +48 -21
  27. package/dist/chunks/{chunk-LJE7RZNC.js → chunk-Q3EXRNB4.js} +1 -1
  28. package/dist/chunks/{chunk-QYDSTYGG.js → chunk-SKWKCLJX.js} +3 -3
  29. package/dist/chunks/{chunk-DSBV4GRK.js → chunk-SSS75WXW.js} +3 -3
  30. package/dist/chunks/{chunk-I5XB4MZT.js → chunk-SUWR5QEG.js} +94 -65
  31. package/dist/chunks/{chunk-XIBMZEDB.js → chunk-VJWVB55R.js} +2 -2
  32. package/dist/chunks/{chunk-EHH363SP.js → chunk-VMVMEIL3.js} +4 -4
  33. package/dist/chunks/chunk-WM33BSIL.js +136 -0
  34. package/dist/chunks/{chunk-GFOFUH6O.js → chunk-X2C5CGGM.js} +52 -51
  35. package/dist/chunks/{chunk-4W6BSNIL.js → chunk-XLSJC6JZ.js} +6 -6
  36. package/dist/chunks/{chunk-U3OO3IZF.js → chunk-YN5SD4TX.js} +20 -7
  37. package/dist/chunks/{conflict-YW5BULJ3.js → conflict-Y4PXZ2YQ.js} +2 -2
  38. package/dist/chunks/{contract-3PMHUASH.js → contract-C3BGUMBM.js} +48 -5
  39. package/dist/chunks/{cowork-FZBTTBYX.js → cowork-2AWG4QLA.js} +37 -8
  40. package/dist/chunks/{create-flow-5OBS3B3V.js → create-flow-LOUOK46Z.js} +6 -6
  41. package/dist/chunks/{data-2YZ6A6TL.js → data-BSFYMXVO.js} +99 -184
  42. package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-LAAMTD2Y.js} +17 -7
  43. package/dist/chunks/{ehr-MNPR4TE5.js → ehr-36KEX5SH.js} +62 -13
  44. package/dist/chunks/{entry-mode-L65OWPFM.js → entry-mode-6N2IGCS4.js} +3 -3
  45. package/dist/chunks/{env-XW7LYIME.js → env-QYLS3EB3.js} +2 -2
  46. package/dist/chunks/{esb-GSB5QCEX.js → esb-PTYS3E67.js} +17 -7
  47. package/dist/chunks/{factory-MHFZZAGH.js → factory-LPFPKZ4T.js} +1 -1
  48. package/dist/chunks/{fna-XBSNUS2V.js → fna-JNHCLRDE.js} +15 -5
  49. package/dist/chunks/{group-chat-EEOLO5NM.js → group-chat-QP2WX4QJ.js} +3 -3
  50. package/dist/chunks/{host-2UMNXX5H.js → host-57LSRSE7.js} +4 -4
  51. package/dist/chunks/{host-NVDG3NC6.js → host-7BVR7CQ3.js} +4 -4
  52. package/dist/chunks/{host-SYPCA63D.js → host-C2BLBIID.js} +4 -4
  53. package/dist/chunks/{host-XVWBOSEN.js → host-K2ZKNXME.js} +4 -4
  54. package/dist/chunks/{host-R7BP3CTI.js → host-NS36QFLR.js} +6 -4
  55. package/dist/chunks/{host-BD44ASOD.js → host-QXFKQXNX.js} +4 -4
  56. package/dist/chunks/{hrm-FZUDJAND.js → hrm-FSGO4NSH.js} +15 -6
  57. package/dist/chunks/{im-F5NENPD7.js → im-2BFGS2XO.js} +16 -6
  58. package/dist/chunks/{invoice-DS6FLU55.js → invoice-JKLTTHSZ.js} +27 -6
  59. package/dist/chunks/{jiuchuanhui-JCBUR563.js → jiuchuanhui-PTABJE7V.js} +19 -6
  60. package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-YN2ZP3CS.js} +6 -6
  61. package/dist/chunks/{mail-ZEOSANEJ.js → mail-YNO7ZZUK.js} +116 -97
  62. package/dist/chunks/{meeting-PCD5EPBF.js → meeting-NIDHDBCB.js} +29 -16
  63. package/dist/chunks/{minute-doc-WTZJVCHG.js → minute-doc-G3QAT7DE.js} +4 -4
  64. package/dist/chunks/{okr-OZUMTMCL.js → okr-QC52G6AJ.js} +15 -5
  65. package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
  66. package/dist/chunks/{operations-UTUWFJTX.js → operations-MQV32ITT.js} +5 -5
  67. package/dist/chunks/{performance-SMVTPK6T.js → performance-3MQ3AHDQ.js} +92 -7
  68. package/dist/chunks/{plan-C2NENH42.js → plan-ISINIEPY.js} +15 -5
  69. package/dist/chunks/{project-FAJ2P3UR.js → project-IJ6DVKT7.js} +18 -5
  70. package/dist/chunks/{reception-NH6MJFPR.js → reception-3H5LUG2I.js} +17 -7
  71. package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-MIOJXP6W.js} +412 -85
  72. package/dist/chunks/{registry-ZQ7OONCB.js → registry-3GQRYP2R.js} +12 -12
  73. package/dist/chunks/{registry-3B3OAJYX.js → registry-3S7AVMXR.js} +4 -4
  74. package/dist/chunks/{registry-FTPUUHWC.js → registry-NHHKOEU3.js} +5 -5
  75. package/dist/chunks/{room-recommend-73NBN3RU.js → room-recommend-IOKBJVYP.js} +4 -4
  76. package/dist/chunks/{schedule-SDBOBBUQ.js → schedule-IB6EUARH.js} +4 -4
  77. package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-N2TK3CEF.js} +19 -6
  78. package/dist/chunks/{workflow-OWHWLAOX.js → workflow-RINBAL2M.js} +22 -8
  79. package/dist/cmd/auth/index.js +23 -0
  80. package/dist/cmd/e10/index.js +2 -1
  81. package/dist/cmd/index.js +2 -0
  82. package/dist/core/manifest-view.js +207 -0
  83. package/dist/core/output.js +38 -8
  84. package/dist/index.js +35 -35
  85. package/dist/internal/e10/auth/crypto.js +18 -8
  86. package/dist/internal/e10/auth/error-log.js +1 -2
  87. package/dist/internal/e10/auth/messages.js +2 -3
  88. package/dist/internal/e10/auth/xiaoe.js +1 -1
  89. package/dist/internal/e10/tls-policy.js +61 -13
  90. package/dist/shortcuts/archive/index.js +11 -2
  91. package/dist/shortcuts/archive/operations/download.js +1 -0
  92. package/dist/shortcuts/archive/operations/flow-url.js +3 -0
  93. package/dist/shortcuts/archive/operations/prelib.js +2 -0
  94. package/dist/shortcuts/archive/operations/upload.js +1 -0
  95. package/dist/shortcuts/archive-oa/index.js +11 -2
  96. package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
  97. package/dist/shortcuts/asset/index.js +11 -2
  98. package/dist/shortcuts/asset/manifest.js +7 -0
  99. package/dist/shortcuts/asset-idle/index.js +11 -2
  100. package/dist/shortcuts/blog/index.js +11 -2
  101. package/dist/shortcuts/blog/manifest.js +10 -0
  102. package/dist/shortcuts/caizhilian/host.js +20 -4
  103. package/dist/shortcuts/caizhilian/index.js +12 -2
  104. package/dist/shortcuts/caizhilian/manifest.js +4 -25
  105. package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
  106. package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
  107. package/dist/shortcuts/calendar/index.js +11 -2
  108. package/dist/shortcuts/contract/index.js +11 -2
  109. package/dist/shortcuts/contract/manifest.js +32 -0
  110. package/dist/shortcuts/contract/operations/write.js +3 -0
  111. package/dist/shortcuts/cowork/index.js +21 -5
  112. package/dist/shortcuts/cowork/manifest.js +3 -0
  113. package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
  114. package/dist/shortcuts/cowork/operations/item-write.js +3 -0
  115. package/dist/shortcuts/cowork/operations/member-write.js +2 -0
  116. package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
  117. package/dist/shortcuts/cowork/operations/review-write.js +1 -0
  118. package/dist/shortcuts/data/errors.js +16 -29
  119. package/dist/shortcuts/data/host.js +16 -7
  120. package/dist/shortcuts/data/index.js +12 -41
  121. package/dist/shortcuts/data/manifest.js +5 -44
  122. package/dist/shortcuts/data/operations/attend.js +2 -2
  123. package/dist/shortcuts/data/operations/conf.js +0 -88
  124. package/dist/shortcuts/data/operations/ds.js +4 -4
  125. package/dist/shortcuts/data/operations/index.js +1 -5
  126. package/dist/shortcuts/data/operations/module.js +40 -14
  127. package/dist/shortcuts/data/operations/query.js +2 -2
  128. package/dist/shortcuts/ebuilder-form/index.js +11 -2
  129. package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
  130. package/dist/shortcuts/ehr/index.js +11 -2
  131. package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
  132. package/dist/shortcuts/esb/index.js +11 -2
  133. package/dist/shortcuts/esb/manifest.js +2 -0
  134. package/dist/shortcuts/fna/index.js +11 -2
  135. package/dist/shortcuts/hrm/index.js +11 -1
  136. package/dist/shortcuts/im/index.js +11 -2
  137. package/dist/shortcuts/invoice/index.js +11 -2
  138. package/dist/shortcuts/invoice/manifest.js +8 -0
  139. package/dist/shortcuts/jiuchuanhui/index.js +15 -1
  140. package/dist/shortcuts/jiuchuanhui/manifest.js +2 -0
  141. package/dist/shortcuts/mail/errors.js +14 -0
  142. package/dist/shortcuts/mail/index.js +23 -6
  143. package/dist/shortcuts/mail/manifest.js +11 -4
  144. package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
  145. package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
  146. package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
  147. package/dist/shortcuts/mail/operations/mail-read.js +7 -25
  148. package/dist/shortcuts/mail/operations/mail-send.js +12 -12
  149. package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
  150. package/dist/shortcuts/mail/operations/mail-template.js +10 -10
  151. package/dist/shortcuts/meeting/index.js +11 -2
  152. package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
  153. package/dist/shortcuts/okr/index.js +11 -2
  154. package/dist/shortcuts/performance/index.js +62 -3
  155. package/dist/shortcuts/performance/scheme-validate.js +7 -0
  156. package/dist/shortcuts/performance/shared.js +40 -2
  157. package/dist/shortcuts/plan/index.js +11 -2
  158. package/dist/shortcuts/project/index.js +11 -2
  159. package/dist/shortcuts/project/operations/write.js +3 -0
  160. package/dist/shortcuts/reception/index.js +11 -2
  161. package/dist/shortcuts/reception/manifest.js +2 -2
  162. package/dist/shortcuts/reception/operations/ask.js +3 -0
  163. package/dist/shortcuts/recruit-stage/index.js +22 -3
  164. package/dist/shortcuts/recruit-stage/manifest.js +2 -0
  165. package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -16
  166. package/dist/shortcuts/recruit-stage/operations/profile.js +186 -0
  167. package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
  168. package/dist/shortcuts/recruit-stage/operations/resume-import.js +76 -47
  169. package/dist/shortcuts/recruit-stage/operations/search.js +151 -16
  170. package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
  171. package/dist/shortcuts/recruit-stage/shared.js +11 -1
  172. package/dist/shortcuts/smart-extract/index.js +11 -2
  173. package/dist/shortcuts/smart-extract/manifest.js +1 -0
  174. package/dist/shortcuts/smart-extract/operations/save.js +2 -0
  175. package/dist/shortcuts/workflow/index.js +21 -1
  176. package/dist/shortcuts/workflow/operations/read.js +2 -2
  177. package/dist/shortcuts/workflow/operations/write.js +1 -1
  178. package/docs/caizhilian.md +1 -1
  179. package/docs/contract.md +1 -0
  180. package/docs/data.md +22 -22
  181. package/docs/e10-auth.md +41 -33
  182. package/docs/ehr.md +2 -0
  183. package/docs/reception.md +4 -3
  184. package/package.json +1 -1
  185. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  186. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  187. package/scripts/pysite/sitecustomize.py +41 -0
  188. package/skill-template/domains/data.md +4 -4
  189. package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
  190. package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
  191. package/skills/weaver-e10-cowork/SKILL.md +3 -1
  192. package/skills/weaver-e10-data/SKILL.md +12 -16
  193. package/skills/weaver-e10-data/references/config-center.md +6 -7
  194. package/skills/weaver-e10-data/references/datasource.md +1 -1
  195. package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
  196. package/skills/weaver-e10-jiuchuanhui/SKILL.md +6 -4
  197. package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
  198. package/skills/weaver-e10-jiuchuanhui/references/customer.md +18 -8
  199. package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
  200. package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
  201. package/skills/weaver-e10-mail/SKILL.md +4 -1
  202. package/skills/weaver-e10-mail/references/mail-read.md +4 -2
  203. package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
  204. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  205. package/skills/weaver-e10-performance/SKILL.md +8 -6
  206. package/skills/weaver-e10-recruit-stage/SKILL.md +125 -20
  207. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +359 -0
  208. package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
  209. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +9 -2
  210. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -0
  211. package/skills/weaver-e10-recruit-stage/templates/match-report.html +177 -0
  212. package/skills/weaver-e10-shared/SKILL.md +22 -1
  213. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
  214. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
@@ -0,0 +1,359 @@
1
+ /**
2
+ * recruit-write-helper.mjs — 招聘模块写操作 prepare→apply 链路辅助脚本
3
+ *
4
+ * 解决问题:
5
+ * ① PowerShell 传递超长 continuation token 会损坏 HMAC 签名(continuation_invalid)
6
+ * ② 中文 JSON 经 PowerShell 代码页改写后变空串(E-0003 不是合法 JSON)
7
+ * 方案:continuation 全程在 Node 进程内存传递,不接触 shell。
8
+ *
9
+ * 🔴 本脚本是**招聘技能私有**工具,不与其他技能共用;其他技能(jucailin/mail/cowork)
10
+ * 如需同类能力,各自在自己包内放一份副本,改 operation 前缀即可。
11
+ *
12
+ * 支持的写操作(自动补 .prepare / .apply 后缀):
13
+ * recruit-stage.jd.create / recruit-stage.resume.import / recruit-stage.resume.import.batch
14
+ * recruit-stage.interview.arrange / recruit-stage.interview.feedback.edit / recruit-stage.tag.attach
15
+ *
16
+ * 用法:
17
+ * prepare:node lib/recruit-write-helper.mjs prepare <operation> <params.json>
18
+ * apply :node lib/recruit-write-helper.mjs apply <operation>
19
+ *
20
+ * 状态文件按 operation 隔离(recruit-helper-state-<operation>.json),
21
+ * 因此可以交错跑多个不同 operation 的 prepare→apply,互不覆盖。
22
+ * 同一 operation 的两次 prepare 仍会互相覆盖(后一次生效),这是预期行为。
23
+ */
24
+
25
+ import { execFileSync } from 'node:child_process';
26
+ import { writeFileSync, readFileSync, existsSync, unlinkSync, mkdirSync, rmSync, renameSync, readdirSync } from 'node:fs';
27
+ import { join, dirname, resolve as resolvePath } from 'node:path';
28
+ import { fileURLToPath } from 'node:url';
29
+ import { homedir } from 'node:os';
30
+
31
+ const IS_WIN = process.platform === 'win32';
32
+ const CLI_REL = join('weaver-work-cli', 'dist', 'index.js');
33
+
34
+ // ── CLI 入口定位(跨平台,不写死任何机器专属路径)─────────────────────────────
35
+ // 🔴 原实现写死 'C:\\Users\\LW\\...\\weaver-work-cli.cmd',换机器/换用户/网页版(Linux) 全部失效。
36
+ // 🔴 第二版只补了 POSIX 标准全局根,仍漏掉 nvm / nvm-windows / PATH 里的 shim,
37
+ // 网页版沙箱(实测 Node v22.19.0,HOME=/home/sandbox)大概率装在 nvm 下 → 探测不到。
38
+ // 现按优先级探测,并且**直接用当前 node 执行 CLI 的 dist/index.js**,
39
+ // 绕开 Windows 下 spawn .cmd 需要 shell:true 的限制(Node 20+ 因 CVE-2024-27980 会报 EINVAL)。
40
+ function firstExisting(paths) {
41
+ for (const p of paths) {
42
+ if (!p) continue;
43
+ try { if (existsSync(p)) return p; } catch { /* 忽略不可读路径 */ }
44
+ }
45
+ return '';
46
+ }
47
+
48
+ /** ① 从 PATH 里的 npm shim 反推全局包位置(最通用:能跑 CLI 就说明 PATH 里有它)。 */
49
+ function fromPathShim() {
50
+ const pathEnv = process.env.PATH || process.env.Path || '';
51
+ const names = IS_WIN ? ['weaver-work-cli.cmd', 'weaver-work-cli.ps1', 'weaver-work-cli'] : ['weaver-work-cli'];
52
+ for (const dir of pathEnv.split(IS_WIN ? ';' : ':')) {
53
+ if (!dir) continue;
54
+ let hit = false;
55
+ for (const n of names) {
56
+ try { if (existsSync(join(dir, n))) { hit = true; break; } } catch { /* 忽略 */ }
57
+ }
58
+ if (!hit) continue;
59
+ // Windows: <prefix>\weaver-work-cli.cmd + <prefix>\node_modules\weaver-work-cli
60
+ // POSIX: <prefix>/bin/weaver-work-cli + <prefix>/lib/node_modules/weaver-work-cli
61
+ const found = firstExisting([
62
+ join(dir, 'node_modules', CLI_REL),
63
+ join(dir, '..', 'lib', 'node_modules', CLI_REL),
64
+ join(dir, '..', 'node_modules', CLI_REL),
65
+ join(dir, '..', '..', 'lib', 'node_modules', CLI_REL),
66
+ ]);
67
+ if (found) return found;
68
+ }
69
+ return '';
70
+ }
71
+
72
+ /** ② nvm / nvm-windows / Volta / fnm 等版本管理器的全局包位置。 */
73
+ function fromVersionManagers() {
74
+ const home = homedir();
75
+ const roots = [];
76
+ // nvm (POSIX):~/.nvm/versions/node/<ver>/lib/node_modules
77
+ const nvmDir = process.env.NVM_DIR || join(home, '.nvm');
78
+ roots.push(join(nvmDir, 'versions', 'node'));
79
+ // nvm-windows:%APPDATA%\nvm\<ver>\node_modules 与 NVM_SYMLINK
80
+ if (process.env.APPDATA) roots.push(join(process.env.APPDATA, 'nvm'));
81
+ if (process.env.NVM_SYMLINK) roots.push(process.env.NVM_SYMLINK);
82
+ // Volta:~/.volta/tools/image/packages/weaver-work-cli/lib/node_modules
83
+ roots.push(join(home, '.volta', 'tools', 'image', 'packages'));
84
+ // fnm:~/.local/share/fnm/node-versions
85
+ roots.push(join(home, '.local', 'share', 'fnm', 'node-versions'));
86
+
87
+ const out = [];
88
+ for (const root of roots) {
89
+ if (!root) continue;
90
+ let entries = [];
91
+ try { entries = readdirSync(root); } catch { continue; }
92
+ for (const e of entries) {
93
+ const base = join(root, e);
94
+ out.push(
95
+ join(base, 'lib', 'node_modules', CLI_REL), // nvm / fnm
96
+ join(base, 'node_modules', CLI_REL), // nvm-windows
97
+ join(base, 'installation', 'lib', 'node_modules', CLI_REL), // fnm installation 层
98
+ );
99
+ }
100
+ // Volta 结构不同:packages/weaver-work-cli/lib/node_modules/weaver-work-cli
101
+ out.push(join(root, 'weaver-work-cli', 'lib', 'node_modules', CLI_REL));
102
+ }
103
+ // 当前 node 自身的 lib/node_modules(沙箱把全局包与运行时装在一起时命中)
104
+ const execDir = dirname(process.execPath);
105
+ out.push(join(execDir, 'lib', 'node_modules', CLI_REL), join(execDir, 'node_modules', CLI_REL));
106
+ return firstExisting(out);
107
+ }
108
+
109
+ const CLI_ENTRY_CANDIDATES = [
110
+ // ⓪ 显式指定(最高优先级,便于测试与非常规部署)
111
+ () => process.env.WEAVER_WORK_CLI_ENTRY || '',
112
+ // ① PATH shim 反推
113
+ fromPathShim,
114
+ // ② 小E 客户端内置 node 旁的全局包(Windows 桌面端实测位置)
115
+ () => {
116
+ const localAppData = process.env.LOCALAPPDATA || '';
117
+ return localAppData ? join(localAppData, 'xiaoeUserData', 'node_js_exe', 'node_modules', CLI_REL) : '';
118
+ },
119
+ // ③ 版本管理器(nvm / nvm-windows / Volta / fnm)+ 当前 node 自身目录
120
+ fromVersionManagers,
121
+ // ④ npm 全局根常见固定位置
122
+ () => {
123
+ const prefix = process.env.npm_config_prefix || process.env.PREFIX || '';
124
+ const roots = prefix ? [join(prefix, 'lib', 'node_modules'), join(prefix, 'node_modules')] : [];
125
+ if (process.env.APPDATA) roots.push(join(process.env.APPDATA, 'npm', 'node_modules'));
126
+ roots.push(
127
+ '/usr/local/lib/node_modules', '/usr/lib/node_modules', '/opt/homebrew/lib/node_modules',
128
+ join(homedir(), '.npm-global', 'lib', 'node_modules'),
129
+ );
130
+ return firstExisting(roots.map((r) => join(r, CLI_REL)));
131
+ },
132
+ // ⑤ 从本脚本位置向上找 node_modules(技能被装进某个 node 工程时)
133
+ () => {
134
+ let dir = dirname(fileURLToPath(import.meta.url));
135
+ for (let i = 0; i < 8 && dir && dir !== dirname(dir); i++) {
136
+ const p = join(dir, 'node_modules', CLI_REL);
137
+ if (existsSync(p)) return p;
138
+ dir = dirname(dir);
139
+ }
140
+ return '';
141
+ },
142
+ ];
143
+
144
+ function resolveCliEntry() {
145
+ for (const cand of CLI_ENTRY_CANDIDATES) {
146
+ let p = '';
147
+ try { p = cand(); } catch { continue; }
148
+ if (p && existsSync(p)) return resolvePath(p);
149
+ }
150
+ return null;
151
+ }
152
+
153
+ const CLI_ENTRY = resolveCliEntry();
154
+
155
+ // ── 状态目录与文件(按 operation 隔离,避免并发/交错覆盖)──────────────────────
156
+ function stateDir() {
157
+ const base = process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || join(homedir(), '.weaver-work-cli');
158
+ return join(base, 'recruit-helper');
159
+ }
160
+
161
+ function stateFileFor(operation) {
162
+ // operation 形如 recruit-stage.jd.create → 文件名安全化
163
+ const safe = String(operation).replace(/[^A-Za-z0-9._-]/g, '_');
164
+ return join(stateDir(), `state-${safe}.json`);
165
+ }
166
+
167
+ function ensureDir(dir) {
168
+ if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
169
+ }
170
+
171
+ // ── 调 CLI(结构化错误透传,不吞不抛堆栈)────────────────────────────────────
172
+ function runCli(operation, input) {
173
+ if (!CLI_ENTRY) {
174
+ return {
175
+ ok: false,
176
+ error: {
177
+ type: 'environment',
178
+ subtype: 'cli_entry_not_found',
179
+ message: '未找到 weaver-work-cli 的 dist/index.js。请确认 CLI 已安装,或用环境变量 WEAVER_WORK_CLI_ENTRY 显式指定入口路径。',
180
+ },
181
+ };
182
+ }
183
+ const dir = stateDir();
184
+ ensureDir(dir);
185
+ const tmpInput = join(dir, `input-${process.pid}-${Date.now()}.json`);
186
+ writeFileSync(tmpInput, JSON.stringify(input), 'utf8');
187
+ const args = [CLI_ENTRY, '--json', 'recruit-stage', 'run', operation, '--input', tmpInput, '--allow-file-input'];
188
+ try {
189
+ // 用当前 node 直接跑 CLI 的 JS 入口:跨平台一致,不需要 shell,不受 .cmd 限制
190
+ const stdout = execFileSync(process.execPath, args, {
191
+ encoding: 'utf8',
192
+ timeout: 600000,
193
+ maxBuffer: 32 * 1024 * 1024,
194
+ windowsHide: true,
195
+ });
196
+ return JSON.parse(stdout);
197
+ } catch (e) {
198
+ // 🔴 CLI 业务报错时 exit code 非 0,结构化 JSON 在 stderr(部分在 stdout)。
199
+ // 原实现不 catch → 用户看到 Node 堆栈而不是「缺参数/无权限」这类可读原因。
200
+ const raw = String(e?.stdout || '') + String(e?.stderr || '');
201
+ const jsonStart = raw.indexOf('{');
202
+ if (jsonStart >= 0) {
203
+ try {
204
+ const parsed = JSON.parse(raw.slice(jsonStart));
205
+ if (parsed && (parsed.ok === false || parsed.error)) return parsed;
206
+ } catch { /* 非完整 JSON,落到下面的通用错误 */ }
207
+ }
208
+ return {
209
+ ok: false,
210
+ error: {
211
+ type: 'execution',
212
+ subtype: e?.code === 'ETIMEDOUT' ? 'timeout' : 'cli_failed',
213
+ message: e?.code === 'ETIMEDOUT'
214
+ ? 'CLI 执行超时(10 分钟),本次未确认写入结果,请先只读回查再决定是否重试'
215
+ : (raw.trim().slice(0, 600) || `CLI 执行失败:${e?.message || e}`),
216
+ },
217
+ };
218
+ } finally {
219
+ try { if (existsSync(tmpInput)) unlinkSync(tmpInput); } catch { /* 忽略清理失败 */ }
220
+ }
221
+ }
222
+
223
+ function emit(obj, exitCode) {
224
+ process.stdout.write(JSON.stringify(obj, null, 2));
225
+ if (exitCode) process.exit(exitCode);
226
+ }
227
+
228
+ // ── prepare ────────────────────────────────────────────────────────────────
229
+ function doPrepare(operation, paramsPath) {
230
+ let params;
231
+ try {
232
+ params = JSON.parse(readFileSync(resolvePath(paramsPath), 'utf8'));
233
+ } catch (e) {
234
+ return emit({ ok: false, error: { type: 'validation', subtype: 'params_unreadable', message: `参数文件读取或解析失败:${e?.message || e}` } }, 1);
235
+ }
236
+
237
+ const result = runCli(operation + '.prepare', params);
238
+ if (!result?.ok) {
239
+ // prepare 失败:不留状态文件,避免 apply 用到半截状态
240
+ emit(result, 1);
241
+ return;
242
+ }
243
+
244
+ const continuation = result?.meta?.continuation || result?.data?.continuation;
245
+ if (!continuation) {
246
+ emit({ ok: false, error: { type: 'validation', subtype: 'continuation_missing', message: 'prepare 成功但未返回 continuation,无法进入 apply;请把该 operation 的返回反馈给维护者' } }, 1);
247
+ return;
248
+ }
249
+
250
+ const dir = stateDir();
251
+ ensureDir(dir);
252
+ const state = {
253
+ operation,
254
+ params,
255
+ continuation,
256
+ fingerprint: result?.meta?.fingerprint || null,
257
+ savedAt: new Date().toISOString(),
258
+ };
259
+ // 原子写:先写临时文件再 rename,避免并发实例写出半截 JSON
260
+ const target = stateFileFor(operation);
261
+ const tmp = target + '.tmp';
262
+ writeFileSync(tmp, JSON.stringify(state), 'utf8');
263
+ try {
264
+ renameSync(tmp, target); // 同盘 rename 是原子的
265
+ } catch {
266
+ // rename 失败(跨盘/权限)时退回直接覆盖写,保证功能可用
267
+ writeFileSync(target, JSON.stringify(state), 'utf8');
268
+ try { rmSync(tmp, { force: true }); } catch { /* 忽略 */ }
269
+ }
270
+
271
+ emit({
272
+ ok: true,
273
+ phase: 'prepare',
274
+ operation,
275
+ stateSaved: true,
276
+ stateFile: target,
277
+ data: result.data,
278
+ });
279
+ }
280
+
281
+ // ── apply ──────────────────────────────────────────────────────────────────
282
+ function doApply(operation) {
283
+ const target = stateFileFor(operation);
284
+ if (!existsSync(target)) {
285
+ return emit({
286
+ ok: false,
287
+ error: {
288
+ type: 'validation',
289
+ subtype: 'state_not_found',
290
+ message: `未找到 ${operation} 的 prepare 状态文件,请先执行:node lib/recruit-write-helper.mjs prepare ${operation} <params.json>`,
291
+ },
292
+ }, 1);
293
+ }
294
+
295
+ let state;
296
+ try {
297
+ state = JSON.parse(readFileSync(target, 'utf8'));
298
+ } catch (e) {
299
+ return emit({ ok: false, error: { type: 'validation', subtype: 'state_corrupted', message: `状态文件损坏,请重新 prepare:${e?.message || e}` } }, 1);
300
+ }
301
+ if (state.operation !== operation) {
302
+ return emit({ ok: false, error: { type: 'validation', subtype: 'state_operation_mismatch', message: `状态文件属于 ${state.operation},不能用于 ${operation}` } }, 1);
303
+ }
304
+
305
+ const applyInput = { ...state.params, confirm: true, continuation: state.continuation };
306
+ const result = runCli(operation + '.apply', applyInput);
307
+
308
+ // 🔴 只在成功时删状态文件;失败保留以便排查或重试(continuation 有 TTL,过期需重新 prepare)。
309
+ // 原实现无条件删除 → 网络抖动一次就得从头 prepare(简历场景要重新上传+OCR)。
310
+ const succeeded = result?.ok === true;
311
+ if (succeeded) {
312
+ try { rmSync(target, { force: true }); } catch { /* 忽略 */ }
313
+ }
314
+
315
+ emit({
316
+ ...result,
317
+ helperStateCleared: succeeded,
318
+ ...(succeeded ? {} : { helperHint: '状态文件已保留,可修正参数后重试 apply;若 continuation 已过期需重新 prepare' }),
319
+ }, succeeded ? 0 : 1);
320
+ }
321
+
322
+ // ── 入口 ───────────────────────────────────────────────────────────────────
323
+ const USAGE = {
324
+ ok: false,
325
+ error: {
326
+ type: 'validation',
327
+ subtype: 'usage',
328
+ message: [
329
+ '用法:',
330
+ ' prepare: node lib/recruit-write-helper.mjs prepare <operation> <params.json>',
331
+ ' apply : node lib/recruit-write-helper.mjs apply <operation>',
332
+ '',
333
+ '示例:',
334
+ ' node lib/recruit-write-helper.mjs prepare recruit-stage.jd.create params.json',
335
+ ' node lib/recruit-write-helper.mjs apply recruit-stage.jd.create',
336
+ ].join('\n'),
337
+ },
338
+ };
339
+
340
+ // operation 白名单校验:只允许招聘模块的已知写操作前缀,防止拼错或注入
341
+ const ALLOWED_OPERATION_RE = /^recruit-stage\.[a-z0-9.]+$/;
342
+
343
+ const mode = process.argv[2];
344
+ const operation = process.argv[3];
345
+
346
+ if (mode === 'prepare') {
347
+ const paramsPath = process.argv[4];
348
+ if (!operation || !paramsPath) emit(USAGE, 1);
349
+ else if (!ALLOWED_OPERATION_RE.test(operation)) {
350
+ emit({ ok: false, error: { type: 'validation', subtype: 'operation_invalid', message: `operation 必须是 recruit-stage.* 形式,收到:${operation}` } }, 1);
351
+ } else doPrepare(operation, paramsPath);
352
+ } else if (mode === 'apply') {
353
+ if (!operation) emit(USAGE, 1);
354
+ else if (!ALLOWED_OPERATION_RE.test(operation)) {
355
+ emit({ ok: false, error: { type: 'validation', subtype: 'operation_invalid', message: `operation 必须是 recruit-stage.* 形式,收到:${operation}` } }, 1);
356
+ } else doApply(operation);
357
+ } else {
358
+ emit(USAGE, 1);
359
+ }
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: env-fixed-values
3
+ description: 自用环境结构元数据参考值(快路径)——objId/formId/listId/fieldId 等固定值,首次使用校验一次,命中即跳过运行时解析
4
+ ---
5
+
6
+ # 自用环境结构元数据参考值
7
+
8
+ > **背景**:招聘助手只在自用小E(www.e-cology.com.cn)使用,表单结构固定不变。
9
+ > 这些值作为**快路径**:命中即跳过运行时解析(省 2-3 HTTP),不一致时回退动态解析。
10
+ > 遵守 [`env-ziyong.md`](env-ziyong.md) §3 分层:结构元数据可预置,optionId/人员 id 绝不写死。
11
+ >
12
+ > ⚠️ **校验方式**:首次使用时用 `listInit(listId)` 的 `objid` 比对;不一致就回退动态解析。
13
+ > 环境升级后这些值可能变化,需要重新验证。
14
+
15
+ ## 1. 职位管理(jd.create 用)
16
+
17
+ | 项 | dataKey | 参考值 |
18
+ |---|---|---|
19
+ | objId | — | 840738302251515904 |
20
+ | formId | — | 840738302251515906 |
21
+ | position_name | position_name | 840762714812071936 |
22
+ | position_duty | position_duty | 840770011802124289 |
23
+ | work_request | work_request | 840770011802124291 |
24
+ | position_nature | position_nature | 840765837051969540 |
25
+ | recruit_count | recruit_count | 840765837051969541 |
26
+ | education | education | 840768568709890049 |
27
+ | work_years | work_years | 840767271797538818 |
28
+ | salary_min | salary_min | 840762714812071940 |
29
+ | salary_max | salary_max | 840765837051969537 |
30
+ | status | status | 840773800139440131 |
31
+ | recruit_flow | recruit_flow | 840772541495918598 |
32
+ | recr_principal | recr_principal | 840772541495918599 |
33
+ | employ_manager | employ_manager | 840770011802124292 |
34
+ | number_of_pay_months | number_of_pay_months | 840773800139440130 |
35
+ | salary_type | salary_type | 840770862205648897 |
36
+ | recruit_type | recruit_type | 840767271797538820 |
37
+ | work_location | work_location | 840768568709890051 |
38
+
39
+ **职位列表**:listId 见环境缓存 `lists.position.listId`
40
+
41
+ **默认招聘流程**(selfUse 兜底常量,已写在 context.ts):
42
+ - id: 874896524979806209
43
+ - name: 初筛+面试+offer阶段
44
+
45
+ ## 2. 人才库(resume.import / candidate.search / candidate.profile 用)
46
+
47
+ | 项 | dataKey | 参考值 |
48
+ |---|---|---|
49
+ | objId | — | 840741476223959040 |
50
+ | formId | — | 840741480284045314 |
51
+ | candidate_name | candidate_name | (见环境缓存 fields[objId]) |
52
+ | telephone | telephone | (见环境缓存 fields[objId]) |
53
+ | original_resume | original_resume | (见环境缓存 fields[objId]) |
54
+
55
+ **人才库列表**:listId 见环境缓存 `lists.talent.listId`
56
+
57
+ ## 3. 面试管理(interview.arrange / list type=interview 用)
58
+
59
+ | 项 | dataKey | 参考值 |
60
+ |---|---|---|
61
+ | objId | — | 840751242946035712 |
62
+ | formId | — | 840751242946035714 |
63
+ | 面试管理列表 listId | — | 840751268732616721 |
64
+
65
+ **面试类型枚举**(optionId 跨环境不同,此处仅记录自用环境实测值,运行时仍走 ds/options 解析):
66
+ - 841052191228968962 = 视频面试
67
+ - 841052191228968963 = 现场面试
68
+ - 841052191228968964 = AI面试
69
+
70
+ **面试状态枚举**:
71
+ - 841052191228968972 = 未开始
72
+ - 841052191228968973 = 待查看
73
+ - 841052191228968974 = 待反馈
74
+ - 841052191228968975 = 已反馈
75
+
76
+ ## 4. 固定页面路由(recruit-output-links.md §2 已有,此处不重复)
77
+
78
+ ## 5. 使用方式
79
+
80
+ Agent 不需要直接读这个文件。CLI 的环境缓存(`~/.weaver-work-cli/env-cache/recruit-ops/<host>/<appId>.json`)
81
+ 已包含这些值,命中时跳过运行时解析。这个文件的作用是:
82
+ 1. 人工核对环境缓存是否正确
83
+ 2. 环境缓存丢失时作为参考值快速重建
84
+ 3. 记录自用环境的已知结构,便于排查问题
85
+
86
+ > 🔴 **绝不写死的值**:optionId(DS选项/字典)、人员 id、标签 id、AI面试方案 id、办公地点记录 id。
87
+ > 这些值后端会变,写死后无效 optionId 会被静默丢弃仍返回 success。
@@ -78,7 +78,7 @@
78
78
  2. **生成 JD 初稿**:按 `recruit-jd-template.md` 的企业标准模板生成招聘启事 + 岗位 JD(职责 4~6 条、要求 4~6 条,贴合用户给的岗位描述)。**全文展示给用户**——这就是需求的"输出结果"。
79
79
  3. **字段推导**:从需求 + JD 推导职位管理字段值;不确定的列出来问用户。
80
80
  4. **`recruit-stage.jd.create.prepare`(只读,不写库)**:CLI 自动补全必填默认值(状态=招聘中、招聘流程=环境默认流程、招聘负责人/用人经理=当前登录人等),输出确认摘要。把摘要**用中文复述**给用户(不展示字段 key 与内部 id)。
81
- 5. **用户明确确认后**才跑 `recruit-stage.jd.create.apply`(写真实数据,带 `confirm:true` + continuation)。
81
+ 5. **用户明确确认后**才跑 `recruit-stage.jd.create.apply`(写真实数据)。🔴 **apply 必须传与 prepare 完全相同的全部业务参数**(`positionName` + `positionDuty` + `workRequest` + `sets`),外加 `confirm:true` + `continuation`。只传 confirm+continuation 不传 sets 会报 `fingerprint_mismatch`——continuation 漏签了 sets,apply 不传 sets 时 buildJd 产出空 sets 导致指纹不一致。规避方法:把 prepare 的输入参数原样传给 apply。
82
82
  6. **输出产物**:正文放**两个 Markdown 链接**——① `viewLink`(新建职位详情单页,CLI 产出原样搬运)
83
83
  ② **固定地址**「我创建的职位」`/sp/ebdfpage/list/1336818376305820044`(origin 取回包完整 URL / 会话 baseUrl);
84
84
  🔴 **忽略 CLI 输出的 `listLocateLink`**(那是运行时解析的职位列表,不是这个固定入口),规则见 `recruit-output-links.md` §2/§4。
@@ -96,9 +96,13 @@ weaver-work-cli --json recruit-stage run recruit-stage.jd.create.prepare --input
96
96
  "sets":[{"key":"<字段dataKey>","value":"<值>"}]
97
97
  }'
98
98
 
99
- # ② 用户确认后写库(带 prepare 回包的 meta.continuation)
99
+ # ② 用户确认后写库(🔴 必须传与 prepare 相同的全部参数,包括 sets!)
100
+ # continuation 只签了 positionName 等 5 个基础参数,漏签了 sets;
101
+ # apply 不传 sets → buildJd 产出空 sets → 指纹不一致 → fingerprint_mismatch。
102
+ # 规避方法:把 prepare 的输入参数原样传给 apply,只加 confirm + continuation。
100
103
  weaver-work-cli --json recruit-stage run recruit-stage.jd.create.apply --input-json '{
101
104
  "positionName":"Java开发工程师","positionDuty":"<...>","workRequest":"<...>",
105
+ "sets":[{"key":"position_nature","value":"全职"},{"key":"education","value":"本科"},{"key":"work_years","value":"不限"},{"key":"salary_min","value":18000},{"key":"salary_max","value":30000}],
102
106
  "confirm":true,"continuation":"<prepare 的 meta.continuation>"
103
107
  }'
104
108
  ```
@@ -145,9 +149,12 @@ weaver-work-cli --json recruit-stage run recruit-stage.jd.create.apply --input-j
145
149
  4. **不输出凭证**:不展示 Cookie / ETEAMSID / token。
146
150
  5. **产物纪律**:① `viewLink` 原样搬运;② 列表链接**取固定地址表**、忽略 `listLocateLink`;不要包 browsertool 标签;url 缺失时只给另一个,不输出半截。
147
151
  6. **环境自适应**:baseUrl / appId / 字段 id 一律来自会话与环境解析,**任何文件不得写死 IP / 域名 / 端口**;目标环境未部署招聘应用时 CLI 会给出友好提示,如实转告。
152
+ 7. **apply 参数必须与 prepare 一致**:apply 必须传与 prepare 完全相同的 `positionName` + `positionDuty` + `workRequest` + `sets`,外加 `confirm:true` + `continuation`。continuation 的 argsSnapshot 漏签了 `sets`,apply 不传 sets 会导致 buildJd 产出空 sets → 指纹不一致 → `fingerprint_mismatch`。规避方法:把 prepare 的输入参数原样传给 apply,只加 confirm + continuation。
153
+ 8. **apply 后不查列表验证**:apply 返回 `formDataId` 非空 + `viewLink` 存在 = 职位已创建成功,**禁止跑 `recruit-stage.list type=position` 扫几百条记录来确认**。`result=success` 直接给两个 Markdown 链接结束;`result=failed` 但 `formDataId` 非空时看 `verification.mismatches`——只有 `salary_min`/`salary_max` 的 `"18"` vs `"18.00"` 这类纯数值格式差异是已知假报(整数 vs 小数,字符串比较不等),职位实际已创建成功,按 `formDataId` 有值 + `viewLink` 存在判定为成功;`result=partial` 且关键字段(position_name/position_duty/work_request)有 mismatch 时,用 `viewLink` 打开详情核对,仍不需要扫列表。
148
154
 
149
155
  ## 薪资单位与结果判定(2026-11-06 加固)
150
156
 
151
157
  - 薪资字段 `salary_min`/`salary_max` 单位是**千元**(页面 15.00 = 15K)。`sets` 里按「元/月」传(如 `salary_min=18000`),CLI 自动 ÷1000 提交为 `18`;从历史职位继承的值已是千元,不再换算。
152
158
  - `addPosition` 成功判定不再依赖 `positionPostId`(页面响应可能没有该字段),改为外层 `status/fail` + 落库回查记录。
153
159
  - apply 返回 `result: partial` 表示关键字段未落库,须如实告知用户并建议到页面核对;`verification.mismatches` 是内部明细,不进回答。
160
+ - 🔴 **result=failed 的已知假报(2026-11-27 实测)**:`verifySubmitted` 对薪资做字符串比较,提交 `"18"` vs 回查 `"18.00"` 不等就报 mismatch → `result=failed`,但职位实际已创建成功(`formDataId` 非空、`viewLink` 有值、列表能查到)。**判定规则**:`formDataId` 非空 + `mismatches` 只有 `salary_min`/`salary_max` 的数值格式差异 → 判为成功,不跑列表验证;`mismatches` 含 `position_name`/`position_duty`/`work_request` 才是真失败,用 `viewLink` 核对。
@@ -161,6 +161,7 @@ tag.attach.prepare {talentId, tags:[{name, prefer:"public"}]}
161
161
  - 默认 **0 个勾选**,用户点选才写;一次默认 5 个、最多 8 个。
162
162
  - 公共标签名→id 缓存:localStorage,命中 24h / 未命中 6h;命中不回查接口,管理员改库最迟 24h 生效。
163
163
  - 卡片端**不做公共标签自动挂载**:普通 HR 没有公共标签新建/改归属权限,公共扩容走 §8 的“只挂已有、先摘要确认”或管理员建公共;卡片只展示已挂标签 + 按 `tagModules` 过滤。
164
+ - **「不用了」按人才持久化**:点「不用了」把该人才整体标记为不再推荐(localStorage `rt_tag_dismiss_v1`,按 talentId 记 `{all:true,names:[...]}`);刷新/重开页面不再展示;保留被拒绝的标签名便于排查。
164
165
 
165
166
  **公共标签池查询(CLI / 卡片共用)**
166
167