weaver-work-cli 0.1.45 → 0.1.46

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 (110) hide show
  1. package/dist/chunks/{attachment-content-CE3GMWTS.js → attachment-content-MCXQBD6N.js} +3 -3
  2. package/dist/chunks/{chunk-VIMCY4DI.js → chunk-4RWS2YYL.js} +2 -2
  3. package/dist/chunks/{chunk-4EXOIQDI.js → chunk-6AXKWFKG.js} +4 -14
  4. package/dist/chunks/{chunk-JWWTI63L.js → chunk-6V5ZPKHV.js} +2 -8
  5. package/dist/chunks/{chunk-3ZMAQQ3W.js → chunk-76H3IKH6.js} +39 -26
  6. package/dist/chunks/{chunk-LGKWL4OH.js → chunk-AD46OMQK.js} +86 -25
  7. package/dist/chunks/{chunk-3WBIQLMB.js → chunk-GSZTA43P.js} +2 -2
  8. package/dist/chunks/{chunk-OAE3AZBQ.js → chunk-IP4CWQCF.js} +6 -6
  9. package/dist/chunks/{chunk-77YP6I52.js → chunk-IRMIEDXN.js} +1 -1
  10. package/dist/chunks/{chunk-T4MWQAQB.js → chunk-JFAWZX53.js} +128 -9
  11. package/dist/chunks/{chunk-DGMYACGJ.js → chunk-OXHHJWNC.js} +1 -1
  12. package/dist/chunks/{chunk-LXFVWZLM.js → chunk-PSOMGA3U.js} +3 -3
  13. package/dist/chunks/{chunk-LRCPNDZA.js → chunk-UFIFZ4YC.js} +10 -8
  14. package/dist/chunks/{conflict-IYJETSGT.js → conflict-H7EHQXYY.js} +2 -2
  15. package/dist/chunks/{create-flow-7JLC7UID.js → create-flow-VRVJEOBX.js} +6 -6
  16. package/dist/chunks/{ehr-MYRDCHZ4.js → ehr-SH2LM3NK.js} +528 -40
  17. package/dist/chunks/{env-3MBHAWBL.js → env-66FPSJDV.js} +2 -2
  18. package/dist/chunks/{factory-TZEVU4DU.js → factory-UH2TZBVA.js} +1 -1
  19. package/dist/chunks/{group-chat-KL3HFKRM.js → group-chat-CAKMMV7K.js} +3 -3
  20. package/dist/chunks/{lazy-dispatch-UH6HGK2I.js → lazy-dispatch-DD6ULZ3I.js} +1 -1
  21. package/dist/chunks/{meeting-C67EHQ4Z.js → meeting-VTBFW4HI.js} +10 -10
  22. package/dist/chunks/{recruit-stage-AHY5QAMF.js → recruit-stage-CAKZTUA7.js} +917 -85
  23. package/dist/chunks/{registry-XPWPGHYE.js → registry-JVQBLFQ5.js} +10 -10
  24. package/dist/chunks/{room-recommend-CNWE5WQK.js → room-recommend-5U55FMXZ.js} +4 -4
  25. package/dist/chunks/{schedule-YYNYBQIE.js → schedule-IDETODCA.js} +4 -4
  26. package/dist/cmd/action.js +14 -10
  27. package/dist/index.js +5 -5
  28. package/dist/shortcuts/ehr/host.js +2 -2
  29. package/dist/shortcuts/ehr/index.js +14 -3
  30. package/dist/shortcuts/ehr/manifest.js +5 -1
  31. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +40 -10
  32. package/dist/shortcuts/ehr/operations/recruit-interview-overview.js +258 -0
  33. package/dist/shortcuts/ehr/operations/recruit-position.js +10 -8
  34. package/dist/shortcuts/ehr/operations/recruit-stats.js +14 -1
  35. package/dist/shortcuts/ehr/operations/recruit-tag.js +173 -0
  36. package/dist/shortcuts/ehr/operations/recruit-write.js +137 -18
  37. package/dist/shortcuts/ehr/operations/recruit.js +180 -8
  38. package/dist/shortcuts/ehr/operations/registry.js +4 -0
  39. package/dist/shortcuts/ehr/operations.js +24 -0
  40. package/dist/shortcuts/ehr/recruit-stage/batch-store.js +78 -0
  41. package/dist/shortcuts/ehr/recruit-stage/context.js +231 -0
  42. package/dist/shortcuts/ehr/recruit-stage/continuation.js +74 -0
  43. package/dist/shortcuts/ehr/recruit-stage/errors.js +65 -0
  44. package/dist/shortcuts/ehr/recruit-stage/fs-scan.js +165 -0
  45. package/dist/shortcuts/ehr/recruit-stage/host.js +109 -0
  46. package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +1049 -0
  47. package/dist/shortcuts/ehr/recruit-stage/operations/interview-feedback.js +295 -0
  48. package/dist/shortcuts/ehr/recruit-stage/operations/jd-create.js +961 -0
  49. package/dist/shortcuts/ehr/recruit-stage/operations/list.js +431 -0
  50. package/dist/shortcuts/ehr/recruit-stage/operations/registry.js +50 -0
  51. package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +1647 -0
  52. package/dist/shortcuts/ehr/recruit-stage/operations/search.js +158 -0
  53. package/dist/shortcuts/ehr/recruit-stage/operations/types.js +34 -0
  54. package/dist/shortcuts/ehr/recruit-stage/runtime.js +31 -0
  55. package/dist/shortcuts/ehr/recruit-stage/school-tiers.json +318 -0
  56. package/dist/shortcuts/ehr/recruit-stage/shared.js +805 -0
  57. package/dist/shortcuts/meeting/operations/eb/create-flow.js +93 -18
  58. package/dist/shortcuts/meeting/operations/eb/factory.js +5 -8
  59. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +2 -13
  60. package/dist/shortcuts/meeting/operations/invitation.js +27 -4
  61. package/dist/shortcuts/recruit-stage/batch-store.js +78 -0
  62. package/dist/shortcuts/recruit-stage/fs-scan.js +165 -0
  63. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +277 -20
  64. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +31 -7
  65. package/dist/shortcuts/recruit-stage/operations/jd-create.js +106 -16
  66. package/dist/shortcuts/recruit-stage/operations/registry.js +12 -0
  67. package/dist/shortcuts/recruit-stage/operations/resume-import.js +273 -6
  68. package/dist/shortcuts/recruit-stage/operations/types.js +9 -0
  69. package/dist/shortcuts/recruit-stage/shared.js +60 -6
  70. package/package.json +1 -1
  71. package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +2 -2
  72. package/skills/weaver-e10-jucailin/SKILL.md +12 -3
  73. package/skills/weaver-e10-jucailin/archive/LEGACY-README.md +18 -0
  74. package/skills/weaver-e10-jucailin/archive/LEGACY-SKILL.md +239 -0
  75. package/skills/weaver-e10-jucailin/archive/LEGACY-openai.yaml +131 -0
  76. package/skills/weaver-e10-jucailin/archive/LEGACY-position-templates.md +221 -0
  77. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-arrange-interview.md +334 -0
  78. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-capability-check.md +127 -0
  79. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-check-install.md +65 -0
  80. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-detail-process.md +63 -0
  81. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-edit-interview-feedback.md +142 -0
  82. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-jd-create.md +114 -0
  83. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-jd-template.md +56 -0
  84. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-list-candidate.md +101 -0
  85. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-list-interview.md +148 -0
  86. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-match-candidates.md +77 -0
  87. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-output-links.md +72 -0
  88. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-creator.md +69 -0
  89. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-metadata.md +241 -0
  90. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-resume-import.md +457 -0
  91. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-resume-parse.md +128 -0
  92. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-search-candidate.md +146 -0
  93. package/skills/weaver-e10-jucailin/archive/LEGACY-recruit-urge-feedback.md +69 -0
  94. package/skills/weaver-e10-jucailin/lib/recruit-xiaoe-file.mjs +192 -0
  95. package/skills/weaver-e10-jucailin/lib/xiaoe-session.mjs +66 -0
  96. package/skills/weaver-e10-jucailin/references/recruit-create.md +19 -93
  97. package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +64 -0
  98. package/skills/weaver-e10-jucailin/references/recruit-read.md +63 -1
  99. package/skills/weaver-e10-jucailin/references/recruit-screening-to-interview-sop.md +95 -0
  100. package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +89 -0
  101. package/skills/weaver-e10-jucailin/references/recruit-tag.md +81 -0
  102. package/skills/weaver-e10-jucailin/references/recruit-write.md +53 -9
  103. package/skills/weaver-e10-meeting/SKILL.md +48 -4
  104. package/skills/weaver-e10-meeting/references/meeting-eb.md +1 -1
  105. package/skills/weaver-e10-recruit-stage/SKILL.md +8 -5
  106. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +16 -6
  107. package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +5 -1
  108. package/skills/weaver-e10-recruit-stage/references/position-templates.md +20 -1
  109. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +21 -0
  110. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +4 -0
@@ -34,5 +34,17 @@ export function getRecruitStageOperation(operation) {
34
34
  }
35
35
  export async function executeRecruitStageOperation(operation, input, env) {
36
36
  const definition = getRecruitStageOperation(operation);
37
+ // 拒绝未声明参数(2026-11-07):与 ehr 标准入口一致,防「参数名写错被静默忽略」。
38
+ // 例:candidate.interview.arrange.* 的时间参数是 startTime/endTime,stage.interview.arrange.* 是 start/end,
39
+ // 传错时摘要里的 time 会变成 null 而不报错。
40
+ const schema = definition.inputSchema;
41
+ if (schema && schema.additionalProperties === false) {
42
+ const known = Object.keys((schema.properties || {}));
43
+ const unknown = Object.keys(input || {}).filter((key) => !known.includes(key));
44
+ if (unknown.length > 0) {
45
+ throw new RecruitStageCliError('validation', 'unknown_argument', `未知参数:${unknown.join('、')}。本操作支持的参数:${known.length ? known.join('、') : '(无)'}。`
46
+ + '参数名写错会被静默忽略并返回看似正常的结果,请按上面的参数名重传。', { exitCode: 1 });
47
+ }
48
+ }
37
49
  return definition.handler(input, env);
38
50
  }
@@ -23,6 +23,8 @@ import schoolTiers from '../school-tiers.json';
23
23
  import { rsSuccess, schemaOf } from './types.js';
24
24
  import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
25
25
  import { objIdOf, formIdOf, saveFormData, getFormLayoutMeta, runSaveButtonEsbActions, getTableMapping, invertTableMapping, datasetSaveFormData, datasetUpdateFormData, checkUnique, getCandidateByPhone, buildCardUrl, buildTalentViewUrl, talentLinkExtra, findMenuNode, randHex32, getDsOptions, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
26
+ import { scanResumeSource, findStructuredJson } from '../fs-scan.js';
27
+ import { saveBatchItems, loadBatchItems } from '../batch-store.js';
26
28
  // 更新时不允许简历覆盖的字段(人工判定/流程状态,简历无权改写)
27
29
  const PROTECTED_UPDATE_KEYS = ['is_blacklist', 'recruit_status', 'candidate_status', 'data_status'];
28
30
  // ── 上传简历文件(两步:preUploadCheck 取 preUploadId → module/upload 带 file)→ fileid ──
@@ -1011,14 +1013,16 @@ const baseInput = {
1011
1013
  noSchoolTags: { type: 'boolean', description: '关闭学校归属标签自动推导' },
1012
1014
  updateTalentId: { type: 'string', description: '按简历更新已有人才(主表全量覆盖+明细整表覆盖;先 prepare 看差异)' },
1013
1015
  };
1014
- async function prepare(args, env) {
1016
+ async function prepare(args, env, opts = {}) {
1015
1017
  const host = env.host;
1016
1018
  const session = await host.getSession();
1017
1019
  const ctx = { host, baseUrl: session.baseUrl.replace(/\/+$/, ''), appId: '', cache: await env.recruitContext() };
1018
1020
  ctx.appId = ctx.cache.appId;
1019
- const perm = await probeCreatePermission(ctx.host, objIdOf(ctx.cache, 'talent_pool'));
1020
- if (perm === 'denied')
1021
- throw rsFail('当前账号没有「人才库」表单的创建权限,已阻断(未写入任何数据)');
1021
+ if (!opts.skipPermissionProbe) {
1022
+ const perm = await probeCreatePermission(ctx.host, objIdOf(ctx.cache, 'talent_pool'));
1023
+ if (perm === 'denied')
1024
+ throw rsFail('当前账号没有「人才库」表单的创建权限,已阻断(未写入任何数据)');
1025
+ }
1022
1026
  const argsT = args;
1023
1027
  if (!argsT.structured && !argsT.structuredFile && !argsT.fileId && !argsT.resumeFile) {
1024
1028
  throw rsValidationError('input_required', '需要 structured/structuredFile/fileId/resumeFile 之一');
@@ -1079,7 +1083,22 @@ async function prepare(args, env) {
1079
1083
  const willSubmit = { updateTalentId, mainTable: fingerprintMainTable(upMain), details: built.detailsPayload };
1080
1084
  const fp = fingerprint(willSubmit);
1081
1085
  const continuation = await env.continuation.issue({ operation: 'recruit-stage.resume.import.apply', fingerprint: fp,
1082
- enumMaps: await dsOptionsSnapshot() });
1086
+ enumMaps: await dsOptionsSnapshot(),
1087
+ // 🔴 2026-11-07 修复(同 arrange / jd.create / position.create 的同类缺陷):apply 只带
1088
+ // confirm + continuation 时,buildImport 需要的简历来源参数必须能从快照恢复,
1089
+ // 否则会报 resume_source_required(文档写法跑不通)。
1090
+ argsSnapshot: {
1091
+ file: args.file ? String(args.file) : undefined,
1092
+ structuredFile: args.structuredFile ? String(args.structuredFile) : undefined,
1093
+ fileId: args.fileId ? String(args.fileId) : undefined,
1094
+ resumeFile: args.resumeFile ? String(args.resumeFile) : undefined,
1095
+ channel: args.channel ? String(args.channel) : undefined,
1096
+ updateTalentId: args.updateTalentId ? String(args.updateTalentId) : undefined,
1097
+ useOcr: args.useOcr === true,
1098
+ noSchoolTags: args.noSchoolTags === true,
1099
+ structured: args.structured,
1100
+ tags: args.tags,
1101
+ } });
1083
1102
  return rsSuccess('recruit-stage.resume.import.prepare', {
1084
1103
  mode: 'prepare-update',
1085
1104
  action: '按简历更新已有人才',
@@ -1093,6 +1112,16 @@ async function prepare(args, env) {
1093
1112
  protectedSkipped,
1094
1113
  talentViewUrl: viewUrl,
1095
1114
  note: '以上为将写入的差异。确认后 apply 执行;全量覆盖会改掉人工修正过的值',
1115
+ // 🔴 2026-11-07:本 op 此前无 preview(与 jd.create 同类缺陷)。更新场景最关键的是「改哪些字段、跳过哪些」。
1116
+ preview: {
1117
+ action: '按简历更新已有人才(全量覆盖)',
1118
+ talentId: updateTalentId,
1119
+ 变更字段数: Array.isArray(changed) ? changed.length : 0,
1120
+ 变更明细: changed,
1121
+ 未变字段数: fieldDiff.filter((x) => x.change === 'same').length,
1122
+ 保护未覆盖: protectedSkipped,
1123
+ note: '全量覆盖会改掉人工修正过的值;确认逐项变更后再 apply',
1124
+ },
1096
1125
  }, { continuation, fingerprint: fp, confirmHint: '用户明确确认后,携带 confirm:true 与 continuation 调用 apply' });
1097
1126
  }
1098
1127
  // 查重与标签预检互不依赖 → 并行(标签清单分页通常多 RTT,与查重力求重叠)。
@@ -1151,13 +1180,35 @@ async function prepare(args, env) {
1151
1180
  const willSubmit = { formId: built.formId, objId: built.objId, mainTable: fingerprintMainTable(toDatasetMainTable(built.dataDetails, built.fields)), details: built.detailsPayload };
1152
1181
  const fp = fingerprint(willSubmit);
1153
1182
  const continuation = await env.continuation.issue({ operation: 'recruit-stage.resume.import.apply', fingerprint: fp,
1154
- enumMaps: await dsOptionsSnapshot() });
1183
+ enumMaps: await dsOptionsSnapshot(),
1184
+ // 🔴 2026-11-07 修复(同 arrange / jd.create / position.create 的同类缺陷):apply 只带
1185
+ // confirm + continuation 时,buildImport 需要的简历来源参数必须能从快照恢复,
1186
+ // 否则会报 resume_source_required(文档写法跑不通)。
1187
+ argsSnapshot: {
1188
+ file: args.file ? String(args.file) : undefined,
1189
+ structuredFile: args.structuredFile ? String(args.structuredFile) : undefined,
1190
+ fileId: args.fileId ? String(args.fileId) : undefined,
1191
+ resumeFile: args.resumeFile ? String(args.resumeFile) : undefined,
1192
+ channel: args.channel ? String(args.channel) : undefined,
1193
+ updateTalentId: args.updateTalentId ? String(args.updateTalentId) : undefined,
1194
+ useOcr: args.useOcr === true,
1195
+ noSchoolTags: args.noSchoolTags === true,
1196
+ structured: args.structured,
1197
+ tags: args.tags,
1198
+ } });
1155
1199
  return rsSuccess('recruit-stage.resume.import.prepare', {
1156
1200
  mode: 'prepare', ...summary,
1157
1201
  willSubmit,
1158
1202
  tagCheck,
1159
1203
  schoolTags: built.schoolTagInfo,
1160
1204
  onCommit: '提交后将:① dataset/v2/saveFormData 建人才(主表+明细一次写入)② 初始化人才批次 ③ 触发人才自动标签规则匹配 ④ 按标签(含学校归属自动推导)写入平台标签 ⑤ 输出人才卡片/人才库定位链接',
1205
+ // 🔴 2026-11-07:本 op 此前无 preview(与 jd.create 同类缺陷)。新建场景要把「建档字段 + 标签预检结果」一起给出来。
1206
+ preview: {
1207
+ ...summary,
1208
+ tagCheck,
1209
+ schoolTags: built.schoolTagInfo,
1210
+ onCommit: '提交后将:建人才 → 初始化批次 → 自动标签匹配 → 写平台标签 → 输出卡片与人才库链接',
1211
+ },
1161
1212
  }, { continuation, fingerprint: fp, confirmHint: '用户明确确认后,携带 confirm:true 与 continuation 调用 apply' });
1162
1213
  }
1163
1214
  async function apply(args, env) {
@@ -1166,6 +1217,11 @@ async function apply(args, env) {
1166
1217
  if (!args.continuation)
1167
1218
  throw rsValidationError('continuation_required', '缺少 continuation(来自 prepare 的 meta)');
1168
1219
  const payload = await env.continuation.verify(String(args.continuation), 'recruit-stage.resume.import.apply');
1220
+ // 合并 prepare 快照(显式传的优先),使 apply 只带 confirm + continuation 也能执行
1221
+ return applyCore({ ...(payload.argsSnapshot || {}), ...args }, env, payload);
1222
+ }
1223
+ /** 单份简历的落库执行体(供单条 apply 与批量 apply 复用;payload 由调用方校验)。 */
1224
+ async function applyCore(args, env, payload) {
1169
1225
  restoreDsOptions(payload.enumMaps);
1170
1226
  const host = env.host;
1171
1227
  const session = await host.getSession();
@@ -1350,6 +1406,185 @@ async function apply(args, env) {
1350
1406
  },
1351
1407
  });
1352
1408
  }
1409
+ // ── 批量简历导入(2026-11-06)────────────────────────────────────────────────
1410
+ // 输入可以是「一个文件夹」或「一个 zip 包」,也可以直接给 items(每项自带 structured)。
1411
+ // 逐份走与单条完全相同的 prepare → apply(上传原件 / 查重 / 明细写入 / 标签 / 回查),
1412
+ // 最后汇总成一张结果表。解析口径不变:structured 优先,useOcr 只在显式开启时兜底。
1413
+ const IMPORT_BATCH_MAX = 50;
1414
+ async function batchPrepare(args, env) {
1415
+ const explicit = Array.isArray(args.items) ? args.items : null;
1416
+ const scan = !explicit && args.source ? scanResumeSource(String(args.source)) : null;
1417
+ if (!explicit && !scan) {
1418
+ throw rsValidationError('source_required', '需要 source(文件夹或 .zip 路径)或 items([{file, structured?}])之一');
1419
+ }
1420
+ const structuredDir = args.structuredDir ? String(args.structuredDir) : undefined;
1421
+ const shared = {};
1422
+ for (const k of ['channel', 'useOcr', 'noSchoolTags'])
1423
+ if (args[k] !== undefined)
1424
+ shared[k] = args[k];
1425
+ if (Array.isArray(args.tags))
1426
+ shared.tags = args.tags;
1427
+ const entries = (explicit || scan.files).map((x, i) => {
1428
+ if (explicit) {
1429
+ const file = x?.file ? path.resolve(String(x.file)) : '';
1430
+ return {
1431
+ file, name: file ? path.basename(file) : `第${i + 1}项`,
1432
+ structured: x?.structured, structuredFile: x?.structuredFile,
1433
+ };
1434
+ }
1435
+ return { file: x.path, name: x.name, structured: undefined, structuredFile: undefined };
1436
+ });
1437
+ if (entries.length > IMPORT_BATCH_MAX) {
1438
+ throw rsValidationError('batch_too_many', `一次最多 ${IMPORT_BATCH_MAX} 份(当前 ${entries.length} 份);请分批执行`);
1439
+ }
1440
+ if (!entries.length) {
1441
+ throw rsValidationError('no_resume_files', '没有找到简历文件(支持 pdf/doc/docx/rtf/txt/wps;目录最多向下 4 层)');
1442
+ }
1443
+ const items = [];
1444
+ const ready = [];
1445
+ for (let i = 0; i < entries.length; i++) {
1446
+ const e = entries[i];
1447
+ const row = { index: i + 1, file: e.name, path: e.file || undefined };
1448
+ try {
1449
+ let structured = e.structured;
1450
+ let structuredFile = e.structuredFile ? path.resolve(String(e.structuredFile)) : '';
1451
+ if (!structured && !structuredFile && e.file) {
1452
+ const hit = findStructuredJson({ path: e.file, name: e.name, size: 0 }, structuredDir);
1453
+ if (hit)
1454
+ structuredFile = hit;
1455
+ }
1456
+ if (!structured && !structuredFile && !shared.useOcr) {
1457
+ row.status = 'needs_parse';
1458
+ row.message = '缺少结构化数据:请由大模型解析后以 items[].structured(或同名 .json)提供;扫描件可显式 useOcr:true';
1459
+ items.push(row);
1460
+ continue;
1461
+ }
1462
+ const r = await prepare({ ...shared, resumeFile: e.file || undefined, structured, structuredFile: structuredFile || undefined }, env, { skipPermissionProbe: i > 0 });
1463
+ const d = r.data || {};
1464
+ const meta = r.meta || {};
1465
+ const dup = d.duplicate || {};
1466
+ const blocked = dup.unique === false;
1467
+ row.name = d.parsed?.name;
1468
+ row.mobile = d.parsed?.mobile;
1469
+ row.hasStructured = !!(structured || structuredFile);
1470
+ row.duplicateNote = dup.note;
1471
+ if (blocked) {
1472
+ row.status = 'blocked';
1473
+ row.message = '查重未通过:' + (dup.note || '已存在同手机号人才');
1474
+ items.push(row);
1475
+ continue;
1476
+ }
1477
+ row.status = 'ready';
1478
+ items.push(row);
1479
+ ready.push({ index: i + 1, label: row.name || e.name, file: e.file, args: { ...shared, resumeFile: e.file || undefined, structured, structuredFile: structuredFile || undefined }, fingerprint: String(meta.fingerprint || '') });
1480
+ }
1481
+ catch (err) {
1482
+ row.status = 'failed';
1483
+ row.message = err?.message || 'prepare 失败';
1484
+ items.push(row);
1485
+ }
1486
+ }
1487
+ if (!ready.length) {
1488
+ return rsSuccess('recruit-stage.resume.import.batch.prepare', {
1489
+ mode: 'batch-prepare',
1490
+ total: items.length, ready: 0,
1491
+ blocked: items.filter((x) => x.status === 'blocked').length,
1492
+ needsParse: items.filter((x) => x.status === 'needs_parse').length,
1493
+ failed: items.filter((x) => x.status === 'failed').length,
1494
+ scanned: scan ? { root: scan.root, files: scan.files.length, warnings: scan.warnings } : undefined,
1495
+ items,
1496
+ hint: '没有可执行项,逐条看 items[].message(常见:缺少结构化 JSON、查重命中、格式不支持)',
1497
+ // 🔴 2026-11-07:本 op 此前无 preview。文件清单可能很大,preview 只保留「文件 + 状态 + 原因」。
1498
+ preview: {
1499
+ action: '批量简历导入 — 无可执行项',
1500
+ total: items.length,
1501
+ blocked: items.filter((x) => x.status === 'blocked').length,
1502
+ needsParse: items.filter((x) => x.status === 'needs_parse').length,
1503
+ failed: items.filter((x) => x.status === 'failed').length,
1504
+ reasons: items.map((x) => `${x.file}:${x.message || x.status}`),
1505
+ },
1506
+ });
1507
+ }
1508
+ const fp = createHash('sha256').update(JSON.stringify(ready.map((x) => [x.file, x.fingerprint]))).digest('hex');
1509
+ // 清单可能很大(每项带 structured),落盘暂存;token 只带路径与内容指纹
1510
+ const store = saveBatchItems('resume-import', ready);
1511
+ const continuation = await env.continuation.issue({
1512
+ operation: 'recruit-stage.resume.import.batch.apply',
1513
+ fingerprint: fp,
1514
+ enumMaps: await dsOptionsSnapshot(),
1515
+ batchFile: store.file,
1516
+ batchFingerprint: store.fingerprint,
1517
+ });
1518
+ return rsSuccess('recruit-stage.resume.import.batch.prepare', {
1519
+ mode: 'batch-prepare',
1520
+ total: items.length,
1521
+ ready: ready.length,
1522
+ blocked: items.filter((x) => x.status === 'blocked').length,
1523
+ needsParse: items.filter((x) => x.status === 'needs_parse').length,
1524
+ failed: items.filter((x) => x.status === 'failed').length,
1525
+ scanned: scan ? { root: scan.root, files: scan.files.length, warnings: scan.warnings } : undefined,
1526
+ items,
1527
+ note: '确认后带 confirm:true 与 meta.continuation 调 batch.apply;逐份建档,可能是 partial',
1528
+ // 🔴 2026-11-07:本 op 此前无 preview。preview 只列「文件 + 状态」,不复制 structured(体积会爆)。
1529
+ preview: {
1530
+ action: '批量简历导入(逐份建档,结果可能 partial)',
1531
+ total: items.length,
1532
+ ready: ready.length,
1533
+ blocked: items.filter((x) => x.status === 'blocked').length,
1534
+ needsParse: items.filter((x) => x.status === 'needs_parse').length,
1535
+ failed: items.filter((x) => x.status === 'failed').length,
1536
+ files: items.map((x) => `${x.file} — ${x.status}${x.message ? ':' + x.message : ''}`),
1537
+ scanned: scan ? { root: scan.root, files: scan.files.length, warnings: scan.warnings } : undefined,
1538
+ },
1539
+ }, {
1540
+ continuation,
1541
+ fingerprint: fp,
1542
+ confirmHint: '用户确认整批名单后,携带 confirm:true 与本 continuation 调用 recruit-stage.resume.import.batch.apply',
1543
+ });
1544
+ }
1545
+ async function batchApply(args, env) {
1546
+ if (args.confirm !== true) {
1547
+ throw rsConfirmationError('recruit-stage.resume.import.batch.apply', { hint: '批量写操作必须显式 confirm:true' });
1548
+ }
1549
+ if (!args.continuation)
1550
+ throw rsValidationError('continuation_required', '缺少 continuation(来自 batch.prepare 的 meta)');
1551
+ const batch = await env.continuation.verify(String(args.continuation), 'recruit-stage.resume.import.batch.apply');
1552
+ const items = loadBatchItems(batch.batchFile, batch.batchFingerprint);
1553
+ if (!items.length)
1554
+ throw rsValidationError('batch_empty', 'continuation 中没有可执行的简历');
1555
+ const results = [];
1556
+ for (const it of items) {
1557
+ try {
1558
+ const r = await applyCore({ ...(it.args || {}), confirm: true }, env, { fingerprint: it.fingerprint, enumMaps: batch.enumMaps });
1559
+ const d = r.data || {};
1560
+ results.push({
1561
+ index: it.index, file: path.basename(String(it.file || '')), name: it.label,
1562
+ status: d.result === 'partial' ? 'partial' : 'success',
1563
+ talentId: d.talentId, cardUrl: d.talentCardUrl, viewLink: d.viewLink,
1564
+ warnings: d.verifyWarnings && d.verifyWarnings.length ? d.verifyWarnings : undefined,
1565
+ });
1566
+ }
1567
+ catch (e) {
1568
+ results.push({ index: it.index, file: path.basename(String(it.file || '')), name: it.label, status: 'failed', message: e?.message || '执行失败' });
1569
+ }
1570
+ }
1571
+ const ok = results.filter((x) => x.status === 'success').length;
1572
+ const partial = results.filter((x) => x.status === 'partial').length;
1573
+ const failed = results.filter((x) => x.status === 'failed').length;
1574
+ const lines = [
1575
+ '| # | 文件 | 姓名 | 结果 | 说明 |',
1576
+ '|---|---|---|---|---|',
1577
+ ...results.map((x) => `| ${x.index} | ${x.file} | ${x.name || '-'} | ${x.status === 'success' ? '成功' : x.status === 'partial' ? '部分成功' : '失败'} | ${x.message || (x.warnings?.length ? x.warnings.join(';') : x.cardUrl ? '已建档' : '')} |`),
1578
+ ];
1579
+ return rsSuccess('recruit-stage.resume.import.batch.apply', {
1580
+ mode: 'batch-apply',
1581
+ result: failed || partial ? 'partial' : 'success',
1582
+ total: results.length, succeeded: ok, partial, failed,
1583
+ items: results,
1584
+ resultTable: lines.join('\n'),
1585
+ agentNote: '把 resultTable 原样放回答正文;失败/部分成功的条目要带 message 说明原因,不要只报总数。',
1586
+ });
1587
+ }
1353
1588
  export const resumeImportOperations = [
1354
1589
  {
1355
1590
  name: 'recruit-stage.resume.import.prepare',
@@ -1375,6 +1610,38 @@ export const resumeImportOperations = [
1375
1610
  inputSchema: schemaOf({ ...baseInput, confirm: { type: 'boolean' }, continuation: { type: 'string' } }, {}),
1376
1611
  handler: apply,
1377
1612
  },
1613
+ {
1614
+ name: 'recruit-stage.resume.import.batch.prepare',
1615
+ resource: 'recruit.resume',
1616
+ method: 'prepare',
1617
+ action: 'resume.import.batch.prepare',
1618
+ summary: '批量简历导入确认摘要:扫描文件夹或 zip、逐份上传/查重/字段映射,输出可执行/查重拦截/待解析清单(不建档);一次最多 50 份',
1619
+ capability: 'recruit.resume.import',
1620
+ risk: 'write',
1621
+ requiresConfirmation: true,
1622
+ inputSchema: schemaOf({
1623
+ source: { type: 'string', description: '简历文件夹或 .zip 包路径(与 items 二选一)' },
1624
+ items: { type: 'array', description: '显式清单 [{file, structured?, structuredFile?}],与 source 二选一', items: { type: 'object' } },
1625
+ structuredDir: { type: 'string', description: '结构化 JSON 目录(按同名 .json 自动匹配,可选)' },
1626
+ tags: { type: 'array', description: '统一追加的标签名', items: { type: 'string' } },
1627
+ channel: { type: 'string', description: '渠道(可选)' },
1628
+ useOcr: { type: 'boolean', description: '显式开启 OCR 兜底解析(闸门=checkResumeExtraction)' },
1629
+ noSchoolTags: { type: 'boolean', description: '不自动推导学校归属标签' },
1630
+ }, {}),
1631
+ handler: batchPrepare,
1632
+ },
1633
+ {
1634
+ name: 'recruit-stage.resume.import.batch.apply',
1635
+ resource: 'recruit.resume',
1636
+ method: 'apply',
1637
+ action: 'resume.import.batch.apply',
1638
+ summary: '用户确认后逐份建档(上传原件+主表明细+批次+标签+回查),返回逐份结果与 Markdown 表格;非原子批量,结果可能为 partial',
1639
+ capability: 'recruit.resume.import',
1640
+ risk: 'write',
1641
+ requiresConfirmation: true,
1642
+ inputSchema: schemaOf({ confirm: { type: 'boolean' }, continuation: { type: 'string' } }, { required: ['confirm', 'continuation'] }),
1643
+ handler: batchApply,
1644
+ },
1378
1645
  ];
1379
1646
  void findMenuNode;
1380
1647
  void randHex32;
@@ -5,6 +5,15 @@ export function rsSuccess(action, data, meta) {
5
5
  const payload = { ok: true, action, data };
6
6
  if (meta && Object.keys(meta).length > 0)
7
7
  payload.meta = meta;
8
+ // 兼容两套读法:常规组(candidate.*)把 continuation 放在 data.continuation,
9
+ // stage.* 组放在顶层 meta.continuation。这里把 meta 里的 continuation 镜像到 data,
10
+ // 使「读 data.continuation」与「读 meta.continuation」都能取到同一个值。
11
+ const cont = meta?.continuation;
12
+ if (typeof cont === 'string' && data && typeof data === 'object' && !Array.isArray(data)) {
13
+ const obj = data;
14
+ if (!(typeof obj.continuation === 'string' && obj.continuation))
15
+ obj.continuation = cont;
16
+ }
8
17
  return payload;
9
18
  }
10
19
  /** 构造「对象类型 + 严格禁止额外字段」的 JSON Schema。 */
@@ -16,6 +16,7 @@ import { randomUUID } from 'node:crypto';
16
16
  import { unlinkSync } from 'node:fs';
17
17
  import { homedir } from 'node:os';
18
18
  import { join, resolve as resolvePath } from 'node:path';
19
+ import { ehrValidationError } from '../ehr/errors.js';
19
20
  import { rsFail } from './errors.js';
20
21
  export function randHex32() {
21
22
  return randomUUID().replace(/-/g, '');
@@ -350,14 +351,67 @@ export async function resolveCurrentUser(host) {
350
351
  return null;
351
352
  }
352
353
  }
353
- // 人员名称 → userId(门户字段 browser/complete/resource)
354
- export async function resolvePersonId(host, fieldId, keyword) {
354
+ // 人员名称 → userId
355
+ /**
356
+ * 主通道:`POST /api/hrm/common/browser/data/resource`——真正按关键词过滤的人员搜索
357
+ * (2026-11-07 实测:搜「李伟」返回 4 人;搜「顾梦瑶」返回 0 条,确认它确实按关键字过滤)。
358
+ * 不要退回 `browser/complete/resource`:该接口无完整选择器上下文时**不按关键词过滤**,
359
+ * 只返回默认人员前 10 位,第一条恰好是当前登录用户。旧实现取 list[0],导致面试官一律被写成当前用户。
360
+ * 匹配规则:姓名完全相等且唯一 → 用它;无完全匹配时包含匹配唯一 → 用它;命中多个 → 抛 person_ambiguous;
361
+ * 完全没有命中返回 null,由调用方报"找不到"。**绝不静默取第一条。**
362
+ */
363
+ export async function resolvePersonId(host, _fieldId, keyword) {
364
+ const kw = String(keyword || '').trim();
365
+ if (!kw)
366
+ return null;
367
+ const formDatas = {
368
+ status: [{ statusSelect: ['normal'] }],
369
+ subcompany: [{ subcompanyOpt: 'in' }],
370
+ department: [{ departmentOpt: 'in' }],
371
+ role: [{ roleOpt: 'in' }],
372
+ position: [{ positionOpt: 'in' }],
373
+ superior: [{ superiorOpt: 'in' }],
374
+ };
375
+ if (/@/.test(kw))
376
+ formDatas.email = [{ emailOpt: 'in', emailInput: kw }];
377
+ else if (/^\d{11}$/.test(kw))
378
+ formDatas.mobile = [{ mobileOpt: 'in', mobileInput: kw }];
379
+ else
380
+ formDatas.username = [{ usernameOpt: 'in', usernameInput: kw }];
355
381
  const r = await host.request({
356
- path: '/api/ebuilder/form/common/browser/complete/resource',
357
- body: { formParam: { fieldId, searchValue: keyword }, 'formParam.fieldId': fieldId, 'formParam.searchValue': keyword },
382
+ path: '/api/hrm/common/browser/data/resource',
383
+ body: {
384
+ browserMultiple: true, authWecahtBook: false,
385
+ wxDepNeedConvertCount: 0, wxEmpNeedConvertCount: 0, wxTotalNeedConvertCount: 0,
386
+ ...formDatas,
387
+ cmd: 'all', formDatas, quickSearchDatas: {}, type: 'and', current: 1, pageSize: 200,
388
+ containsNoneAccount: false, containsPartTimeEmployee: false, containsDls: false,
389
+ },
358
390
  });
359
- const list = r?.data?.data || r?.data || [];
360
- return list[0]?.id || list[0]?.value || null;
391
+ const rows = (r?.data?.data ?? [])
392
+ .filter((x) => x && (x.id || x.value) && x.name);
393
+ if (!rows.length)
394
+ return null;
395
+ const nameOf = (x) => String(x.name || '').trim();
396
+ const idOf = (x) => String(x.id ?? x.value ?? '');
397
+ const exact = rows.filter((x) => nameOf(x) === kw);
398
+ if (exact.length === 1)
399
+ return idOf(exact[0]) || null;
400
+ if (exact.length > 1)
401
+ throw ambiguousPerson(kw, exact);
402
+ if (rows.length === 1)
403
+ return idOf(rows[0]) || null;
404
+ throw ambiguousPerson(kw, rows);
405
+ }
406
+ /** 多人命中:把候选摆出来让用户选,禁止自动取第一条。 */
407
+ function ambiguousPerson(keyword, rows) {
408
+ const candidates = rows.slice(0, 20).map((r) => ({
409
+ id: String(r.id ?? r.value ?? ''),
410
+ name: String(r.name ?? ''),
411
+ department: String(r.department ?? ''),
412
+ position: String(r.position ?? ''),
413
+ }));
414
+ return ehrValidationError('person_ambiguous', `人员「${keyword}」命中 ${rows.length} 人,请指明具体是哪一位:${candidates.map((c) => `${c.name}${c.department ? `(${c.department})` : ''}`).join('、')}`, { candidates });
361
415
  }
362
416
  /**
363
417
  * ds/options 是单选枚举的**权威真源**(后端 ebselect 枚举常量)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weaver-work-cli",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "面向泛微工作工具链的可扩展 TypeScript CLI 基础框架(E10 业票通等能力)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  .rp .who .row{display:flex;gap:10px;margin-bottom:8px;align-items:flex-start}
29
29
  .rp .who .row:last-child{margin-bottom:0}
30
30
  .rp .who .lab{flex:0 0 92px;color:#8a939e;font-size:12.5px}
31
- .rp .who .val{flex:1;font-weight:600;word-break:break-all}
31
+ .rp .who .val{flex:1;font-weight:600;word-wrap:break-word}
32
32
  .rp .who .arrow{flex:0 0 auto;color:#1a56b8;font-weight:700}
33
33
  .rp .stats{display:flex;gap:10px;margin-bottom:14px;flex-wrap:wrap}
34
34
  .rp .stat{flex:1 1 96px;background:#fff;border:1px solid #e3e6eb;border-radius:10px;padding:12px 14px;text-align:center}
@@ -43,7 +43,7 @@
43
43
  .rp .diff tr:last-child td,.rp .diff2 tr:last-child td{border-bottom:none}
44
44
  .rp .num{width:38px;color:#a0a8b3;text-align:center}
45
45
  .rp .tag{display:inline-block;font-size:11.5px;padding:1px 9px;border-radius:999px;border:1px solid;white-space:nowrap}
46
- .rp .cell{font-size:13px;line-height:1.8;word-break:break-all}
46
+ .rp .cell{font-size:13px;line-height:1.8;word-wrap:break-word}
47
47
  .rp .base{background:#fcfcfd}
48
48
  .rp .cmp{background:#fbfdff}
49
49
  .rp .clause{font-weight:600;font-size:13px}
@@ -7,7 +7,7 @@ description: 泛微E10聚才林人事管理,帮您处理人事日常事宜:[
7
7
  description_zh: 泛微E10聚才林人事管理,帮您处理人事日常事宜:[出勤]-查考勤数据做报表统计、考勤打卡(PC端签到签退)、发考勤流程处理考勤异常;[薪酬]-查工资、社保公积金、调薪记录;[招聘]-帮您找人才、管招聘需求、生成职位JD、导入简历建人才、查应聘者台账、安排面试、发Offer、办入职、看招聘统计;[人事基础]-查员工信息、组织编制及从不同维度汇总人事报表。
8
8
  description_en: "Weaver E10 Jucailin HR Management: your assistant for daily HR tasks. [Attendance] Check attendance data, generate reports & statistics, clock in/out on PC, and start attendance workflows to handle attendance exceptions. [Payroll] View pay slips, social security & housing fund, and salary adjustment records. [Recruitment] Find candidates, manage recruitment requisitions, generate job descriptions (JD), import resumes to build candidate profiles, view candidate pipeline records, arrange interviews, send offers, handle onboarding, and view recruitment statistics. [HR Basics] Look up employee information, organizational headcount, and compile HR reports from various dimensions."
9
9
  category: business
10
- version: 2.0.7
10
+ version: 2.0.11
11
11
  author: 泛微网络科技股份有限公司
12
12
  permissions: [network]
13
13
  execution:
@@ -37,6 +37,8 @@ weaver-work-cli --json ehr run <operation> --input -
37
37
 
38
38
  `schema` 是可用能力的唯一事实来源。禁止把本技能或源文档里的接口路径当成可直接调用的地址,也禁止把未出现在 `schema` 中的能力当作可用 operation。
39
39
 
40
+ 🔴 **招聘三件套已回到独立技能(2026-11-07)**:JD 生成 / 简历解析建档 / AI 面试邀约与反馈(含批量)共 17 个能力,重新由 `weaver-e10-recruit-stage` 技能承载(`weaver-work-cli recruit-stage run recruit-stage.*`)。**本技能不再暴露 `ehr.recruit.stage.*`**,招聘侧只保留通用查询与写操作(`ehr.recruit.candidate.*`、`ehr.recruit.interview.*`)。需要 JD 模板、简历结构化解析、面试 prefill/rounds、批量约面时改读 `weaver-e10-recruit-stage`。
41
+
40
42
  ## 认证
41
43
 
42
44
  所有请求复用 `weaver-work-cli` 托管的 E10 会话,业务输入只描述业务对象和意图。禁止读取、列出、打印或解析 `.e10-cli` 等认证目录和文件;认证诊断只能通过 `weaver-work-cli auth` 系列命令、`weaver-work-cli doctor --e10` 和业务命令返回的 JSON 错误完成。
@@ -54,8 +56,14 @@ weaver-work-cli --json ehr run <operation> --input -
54
56
  | HR 数据源:历史时点名册、离职名册、历史曾在职、编制、流动分析、人员情况合计 | [`references/hr-datasource.md`](references/hr-datasource.md) |
55
57
  | 部门/岗位/职务/职类人数、流失离职、占编人员、人员流动明细、属性合计 | [`references/hr-report.md`](references/hr-report.md) |
56
58
  | 人才库搜索、招聘需求/职位/入职/录用列表、人才详情卡片、**我待填的面试反馈(AI 面试已录)** | [`references/recruit-read.md`](references/recruit-read.md) |
57
- | 新建人才、安排面试、发送 Offer、办理入职、面试反馈编辑/催评(写,prepare→apply) | [`references/recruit-write.md`](references/recruit-write.md) |
58
- | 生成职位 JD 并建职位、简历导入建人才(含附件与标签)、招聘统计 | [`references/recruit-create.md`](references/recruit-create.md) |
59
+ | **面试进展全局汇总**(这周面了多少场、多少人待反馈/待查看、按面试官分组)、"我还有多少面试评价没填" | [`references/recruit-interview-overview.md`](references/recruit-interview-overview.md) |
60
+ | **标签库检索**(标签池里有哪些标签、按名字/组找标签、为什么标签看起来杂) | [`references/recruit-tag.md`](references/recruit-tag.md) |
61
+ | 发送 Offer、办理入职(写,prepare→apply) | [`references/recruit-write.md`](references/recruit-write.md) |
62
+ | **招聘统计**(发了多少职位、招了多少人、渠道效果、各阶段转化) | [`references/recruit-create.md`](references/recruit-create.md) |
63
+ | **标签库**:标签太多/混入非 HR 标签、按名称找标签、按标签组找标签、标签池有没有分组 | [`references/recruit-tag.md`](references/recruit-tag.md) |
64
+ | **闭环串场**:搜人 → 汇总反馈,"把上周投后端的人捞出来,然后告诉我谁还没反馈" | [`references/recruit-screening-to-interview-sop.md`](references/recruit-screening-to-interview-sop.md) |
65
+ | **生成 JD / 建职位 / 建人才 / 约面 / 面试反馈**(含批量、prefill、模板、学校标签)——这类说法一律**不在本技能**处理 | 改读 `weaver-e10-recruit-stage` 技能;典型说法:"生成一份技术研发的JD""创建个销售的职位""把这个简历建档""帮我约个初试" |
66
+ | 并入期(2026-11-06)的历史命令清单与路由分工——**仅作归档参考,不是运行时依据**;2026-11-07 已恢复独立技能 | [`references/recruit-stage-ops.md`](references/recruit-stage-ops.md) |
59
67
  | 招聘撤销类写操作、移动端打卡、能力边界与禁止项 | [`references/safety-boundaries.md`](references/safety-boundaries.md) |
60
68
 
61
69
  ## 高频写操作速查(免读 references 即可用;完整协议/错误处理见 references/recruit-write.md)
@@ -113,6 +121,7 @@ weaver-work-cli --json ehr run ehr.recruit.candidate.interview.arrange.prepare -
113
121
  - 首次认证且非 XiaoE 时不得执行 `auth xiaoe`;取得用户确认的真实 E10 登录域名后,执行 `weaver-work-cli auth login --base-url "<用户确认的 E10 登录域名>" --agent_type "<当前智能体名称>"`。
114
122
  - 显式登录后读操作可重新执行;写操作不得复用旧 continuation,必须重新 prepare 并重新确认。已返回 `partial/write_uncertain` 时先只读回查,禁止直接重放写入。
115
123
  - 业务失败看 stderr JSON 的 `error.type` / `error.subtype` / `error.message`,不要用退出码 `0` 判断成功。
124
+ - **连续失败的话术红线**:接口连续失败(含只读也失败)时,按上面的错误信封判断认证 / 网络 / 权限 / 业务 / 未知,如实转告并给对应下一步;写入状态只说「本次未写入」。**不得**臆断「某模块本身故障」「登录状态和运行环境都正常」「稍后重试 / 服务端临时波动」,不得引导用户绕开技能手工操作。认证类按本节认证条目处置;小E 会话换票仍失败时,按 CLI 公共认证层的已知缺陷如实上报(2026-11-04 实测:换票链 `tokens.py` 优先,客户端无 python 时先报「没设置 PATH」),**不引导用户配置 python**。
116
125
 
117
126
  ## 平台兼容
118
127
 
@@ -0,0 +1,18 @@
1
+ # 历史归档:原「泛微E10招聘助手」文档
2
+
3
+ > ⚠️ **这段并入只存在了一天**:2026-11-06 曾把招聘助手并入 jucailin(命令 `ehr.recruit.stage.*`);
4
+ > **2026-11-07 已恢复独立技能** `weaver-e10-recruit-stage`,命令重新为
5
+ > `weaver-work-cli recruit-stage run recruit-stage.*`,本技能(jucailin)不再暴露这些 operation。
6
+ > 本 `archive/` 目录保留的是当时的接口事实、字段映射、JD 模板与历史坑,**命令名一律以现在为准,不要照本目录调用**。
7
+ > 目录内文档里出现的 `ehr.recruit.stage.*` 与具体环境域名、租户标识均为历史快照,已失效,不得复用。
8
+
9
+ 🔴 **本目录内容仅供接口事实、字段映射、JD 模板、标签策略与历史坑参考,不是运行时依据。**
10
+ 运行时的唯一事实来源依次是:
11
+
12
+ 1. `weaver-e10-recruit-stage` 技能的 `SKILL.md` / `references/` — 命令清单、必填参数、路由分工
13
+ 2. `weaver-work-cli recruit-stage schema` — operation 名单与入参 schema
14
+ 3. 本技能 `SKILL.md` 第 40 行 — 招聘三件套的边界声明
15
+ 3. 本技能 [`../SKILL.md`](../../SKILL.md) — 路由表与安全边界
16
+
17
+ `LEGACY-SKILL.md` / `LEGACY-openai.yaml` 是原技能的总纲与编排快照,保留用于追溯,
18
+ 其中提到的 `lib/`、`<artifact>`、`browsertool`、旧产物形态均以 `recruit-stage-ops.md` 的新口径为准。