weaver-work-cli 0.1.78 → 0.1.81
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.
- package/README.md +3 -1
- package/dist/chunks/{archive-ENBSUMHV.js → archive-KVV4SM7J.js} +3 -3
- package/dist/chunks/{archive-oa-7BFPQ6M5.js → archive-oa-VRSPNLY4.js} +3 -3
- package/dist/chunks/{asset-V5SUD3PW.js → asset-JZ5MN6OL.js} +306 -10
- package/dist/chunks/{asset-idle-3CEL7WFX.js → asset-idle-B4SAL43V.js} +3 -3
- package/dist/chunks/{attachment-content-TFOC3Y3X.js → attachment-content-7W4XQTA7.js} +3 -3
- package/dist/chunks/{blog-FLI4SS3P.js → blog-XCBM467O.js} +3 -3
- package/dist/chunks/{caizhilian-7WCTKCCP.js → caizhilian-NZVUKCZD.js} +5 -5
- package/dist/chunks/{calendar-G726HUUH.js → calendar-OVM2SGYJ.js} +3 -3
- package/dist/chunks/{chunk-XNN5PZTI.js → chunk-3WZMDOI3.js} +1 -1
- package/dist/chunks/{chunk-FAC4IFGQ.js → chunk-56F2GGE4.js} +5 -5
- package/dist/chunks/{chunk-LCM5SSGJ.js → chunk-5MM2IZ27.js} +423 -36
- package/dist/chunks/{chunk-BWFCTE43.js → chunk-5NQZO3CO.js} +48 -5
- package/dist/chunks/{chunk-ZOTXXGUM.js → chunk-5RIK6OLF.js} +7 -7
- package/dist/chunks/{chunk-5E2FDXBU.js → chunk-64RYQOXA.js} +1 -1
- package/dist/chunks/{chunk-Z44YFIN6.js → chunk-7BP3HU74.js} +2 -2
- package/dist/chunks/{chunk-3Q5F4C5B.js → chunk-AW3HQUOC.js} +5 -5
- package/dist/chunks/{chunk-7M5OYRK2.js → chunk-BD3M2YVN.js} +3 -3
- package/dist/chunks/{chunk-JEQHNNSS.js → chunk-BFVUBCYO.js} +14 -0
- package/dist/chunks/{chunk-PAWXVT6H.js → chunk-CLVEXDEJ.js} +4 -5
- package/dist/chunks/{chunk-TBCKK6LH.js → chunk-DWCMKEMO.js} +2 -2
- package/dist/chunks/{chunk-USYFVIUR.js → chunk-E3XUYWYA.js} +4 -4
- package/dist/chunks/{chunk-E2EY3DMS.js → chunk-FIPTUAOW.js} +2 -2
- package/dist/chunks/{chunk-IBTGXLOT.js → chunk-GQEIHXY5.js} +6 -6
- package/dist/chunks/{chunk-TD5IOEGN.js → chunk-JUPKXW4P.js} +1 -1
- package/dist/chunks/{chunk-UZ2E3VNI.js → chunk-KZ3JR3GE.js} +3 -3
- package/dist/chunks/{chunk-4PBN7NJY.js → chunk-L2PKMZIU.js} +1 -1
- package/dist/chunks/{chunk-DACQKJ6O.js → chunk-LXWWOHM6.js} +4 -4
- package/dist/chunks/{chunk-7DE3VMZD.js → chunk-LYFPWZBD.js} +6 -1
- package/dist/chunks/{chunk-2UV4IZIT.js → chunk-MTIV6JEN.js} +2 -2
- package/dist/chunks/{chunk-5VQ7JHV4.js → chunk-MWFKLXVU.js} +68 -46
- package/dist/chunks/{chunk-PMRNIGKZ.js → chunk-RVVRTW4P.js} +2 -2
- package/dist/chunks/{chunk-FPWCCRKT.js → chunk-UASZW22U.js} +3 -3
- package/dist/chunks/{chunk-RVEKGVZU.js → chunk-VMUVVTT4.js} +2 -2
- package/dist/chunks/{chunk-7SQN5IZR.js → chunk-W4BGNYKR.js} +12 -2
- package/dist/chunks/{chunk-OVTCWLNQ.js → chunk-W4R3SXJV.js} +15 -7
- package/dist/chunks/{chunk-UDBQJLQF.js → chunk-WF5G5SV3.js} +2 -2
- package/dist/chunks/{chunk-VNEU7OUN.js → chunk-WM5ZE67G.js} +1 -1
- package/dist/chunks/{chunk-QVKRNL7L.js → chunk-WQ4ZHAEZ.js} +10 -2
- package/dist/chunks/{chunk-SWFTWNWL.js → chunk-X7OZKI6F.js} +12 -12
- package/dist/chunks/{chunk-WNFDR5PC.js → chunk-Y6HRTEDD.js} +21 -11
- package/dist/chunks/{chunk-2KW7AI6P.js → chunk-YFDKTTYX.js} +8 -5
- package/dist/chunks/{chunk-BP7BONZO.js → chunk-YLPGCOAM.js} +76 -69
- package/dist/chunks/{chunk-LQLIXBJF.js → chunk-YXIPZFMX.js} +1 -1
- package/dist/chunks/{cli-WA7FOQKC.js → cli-VCQIDBDQ.js} +37 -37
- package/dist/chunks/{commands-J52MJ6NF.js → commands-THGXVOEL.js} +9 -5
- package/dist/chunks/{conflict-D4GVAURN.js → conflict-T7URCNS6.js} +2 -2
- package/dist/chunks/{contract-GW7US3UF.js → contract-ZLGLQ45G.js} +3 -3
- package/dist/chunks/{cowork-GZDODGKF.js → cowork-2MBNOUYS.js} +21 -8
- package/dist/chunks/{create-flow-ERDGW3FZ.js → create-flow-OFZC36MV.js} +6 -6
- package/dist/chunks/{data-HTQZRPPI.js → data-6O7ANJVT.js} +3 -3
- package/dist/chunks/{ebuilder-form-GHNIZ7ET.js → ebuilder-form-OJ3KJVQI.js} +4 -4
- package/dist/chunks/{ehr-P6T7OAAV.js → ehr-NWMI5Q7S.js} +8 -32
- package/dist/chunks/{employee-QX57HEWS.js → employee-O2EPUYIH.js} +2 -2
- package/dist/chunks/{entry-mode-SQU5WTX6.js → entry-mode-TVACGU7K.js} +3 -3
- package/dist/chunks/{env-DASBNSEM.js → env-EWG4ZAWP.js} +2 -2
- package/dist/chunks/{esb-ATRKVHCD.js → esb-56FV2PIA.js} +5 -5
- package/dist/chunks/{factory-A3NAKZAA.js → factory-GQSEJRDY.js} +1 -1
- package/dist/chunks/{fna-IKYI3SST.js → fna-YLA3RKRW.js} +3 -3
- package/dist/chunks/{group-chat-7SEAVAJR.js → group-chat-5R6L3LCG.js} +3 -3
- package/dist/chunks/{host-UY4LQPN4.js → host-42MLO4KX.js} +4 -4
- package/dist/chunks/{host-XXGDQM7D.js → host-J72VEDW5.js} +4 -4
- package/dist/chunks/{host-EJSJSLVK.js → host-QKCRQS2C.js} +4 -4
- package/dist/chunks/{host-EYNLB6S4.js → host-W3BVEATN.js} +4 -4
- package/dist/chunks/{host-OT4KNR3G.js → host-YJINI5GG.js} +4 -4
- package/dist/chunks/{host-6UOXYOOY.js → host-ZVGBZOHY.js} +4 -4
- package/dist/chunks/{hrm-5JQ7QZ6A.js → hrm-3JFZNB42.js} +66 -26
- package/dist/chunks/{im-2YJW3EI5.js → im-HKIRPCGD.js} +5 -5
- package/dist/chunks/{invoice-37HR6L3W.js → invoice-4PREIOTG.js} +185 -49
- package/dist/chunks/{jiuchuanhui-KBWUZ7WT.js → jiuchuanhui-K3PLNENZ.js} +3 -3
- package/dist/chunks/{lazy-dispatch-ZDKLS5MR.js → lazy-dispatch-MKGEWZNM.js} +8 -8
- package/dist/chunks/{mail-YBKUM6HM.js → mail-6QPVWKXM.js} +3 -3
- package/dist/chunks/{meeting-7AEQGBAT.js → meeting-QPPEPBSN.js} +20 -16
- package/dist/chunks/{minute-doc-REI6RUE4.js → minute-doc-JMIDZK5D.js} +1 -1
- package/dist/chunks/{okr-HW7IULIR.js → okr-67C5LQYD.js} +3 -3
- package/dist/chunks/{operations-4P2UYVLH.js → operations-YLKRNAPI.js} +5 -5
- package/dist/chunks/{org-MWWIFNAO.js → org-L5XDM2RQ.js} +2 -2
- package/dist/chunks/{performance-PM2G6L3E.js → performance-33QZZR4I.js} +3 -3
- package/dist/chunks/{plan-3YYGZ7ZM.js → plan-W4BPONRL.js} +3 -3
- package/dist/chunks/{project-6PRGBLO2.js → project-OKSEH6AF.js} +3 -3
- package/dist/chunks/{reception-7G3J2MA6.js → reception-H5M7SPHT.js} +3 -3
- package/dist/chunks/{recruit-stage-TLZJUFHD.js → recruit-stage-O2JGNVMO.js} +16 -86
- package/dist/chunks/{registry-4S3RXXWS.js → registry-45VEUYTC.js} +4 -4
- package/dist/chunks/{registry-3VTB3KLV.js → registry-BMTQ55G5.js} +5 -5
- package/dist/chunks/{registry-KQ4TNUWO.js → registry-PYONXFUF.js} +3 -3
- package/dist/chunks/{registry-UVTI323K.js → registry-SAMJ4VH2.js} +14 -14
- package/dist/chunks/{registry-AC33ZZVH.js → registry-YY62OFKQ.js} +1 -1
- package/dist/chunks/{room-recommend-ELEJUYBN.js → room-recommend-NRLAZJCI.js} +4 -4
- package/dist/chunks/{schedule-XBKY7VEA.js → schedule-LNBOCBP5.js} +4 -4
- package/dist/chunks/{smart-extract-T5Z4AULN.js → smart-extract-JOTX6UZC.js} +3 -3
- package/dist/chunks/{update-77ZUIYSG.js → update-BERR64TI.js} +3 -3
- package/dist/chunks/{workflow-SYCBS5XD.js → workflow-ZDQY3TI7.js} +5 -5
- package/dist/core/runtime-agent.js +19 -3
- package/dist/index.js +4 -4
- package/dist/internal/e10/auth/agent-host-key.js +10 -1
- package/dist/internal/e10/auth/commands.js +20 -4
- package/dist/internal/e10/auth/xiaoe.js +15 -3
- package/dist/shortcuts/asset/host.js +39 -1
- package/dist/shortcuts/asset/index.js +16 -2
- package/dist/shortcuts/asset/manifest.js +115 -1
- package/dist/shortcuts/asset/operations/audit-report.js +144 -0
- package/dist/shortcuts/asset/operations/registry.js +4 -0
- package/dist/shortcuts/asset/operations/write.js +7 -1
- package/dist/shortcuts/cowork/operations/read.js +13 -6
- package/dist/shortcuts/cowork/operations/shared.js +15 -0
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +1 -14
- package/dist/shortcuts/ehr/operations/recruit-write.js +4 -24
- package/dist/shortcuts/ehr/operations/recruit.js +23 -13
- package/dist/shortcuts/hrm/host.js +51 -4
- package/dist/shortcuts/hrm/index.js +45 -26
- package/dist/shortcuts/hrm/manifest.js +17 -0
- package/dist/shortcuts/hrm/operations/employee.js +3 -7
- package/dist/shortcuts/hrm/operations/org.js +2 -4
- package/dist/shortcuts/hrm/operations/position.js +2 -4
- package/dist/shortcuts/hrm/operations/shared.js +21 -0
- package/dist/shortcuts/hrm/operations.js +34 -0
- package/dist/shortcuts/im/constants.js +163 -0
- package/dist/shortcuts/im/host.js +12 -5
- package/dist/shortcuts/im/operations/at-mention.js +4 -2
- package/dist/shortcuts/im/operations/file-user.js +3 -1
- package/dist/shortcuts/im/operations/msg-sync.js +219 -2
- package/dist/shortcuts/im/operations/msg-write.js +70 -30
- package/dist/shortcuts/invoice/invoice-record.js +20 -1
- package/dist/shortcuts/invoice/manifest.js +13 -7
- package/dist/shortcuts/invoice/operations/reim-auto.js +94 -36
- package/dist/shortcuts/invoice/projection.js +7 -3
- package/dist/shortcuts/invoice/read-enrichment.js +78 -8
- package/dist/shortcuts/meeting/host.js +4 -0
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +45 -5
- package/dist/shortcuts/meeting/operations/env.js +15 -1
- package/dist/shortcuts/meeting/operations/rooms.js +7 -0
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +3 -22
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -5
- package/dist/shortcuts/recruit-stage/operations/list.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/profile.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +8 -55
- package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/tag.js +5 -0
- package/dist/shortcuts/recruit-stage/shared.js +3 -11
- package/dist/shortcuts/workflow/operations/form.js +2 -1
- package/docs/agent-invoice.md +26 -8
- package/docs/e10-auth.md +14 -1
- package/docs/hrm.md +5 -1
- package/docs/invoice.md +28 -8
- package/docs/operation-manual.md +6 -4
- package/docs/ziguanjia.md +5 -1
- package/package.json +1 -1
- package/scripts/package-skill.mjs +14 -2
- package/skill-template/business-info.json +6 -1
- package/skill-template/domains/hrm.md +1 -1
- package/skill-template/domains/yepiaotong.md +29 -11
- package/skill-template/domains/ziguanjia.md +7 -2
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +3 -3
- package/skills/weaver-e10-cowork/SKILL.md +13 -1
- package/skills/weaver-e10-hrm/SKILL.md +16 -2
- package/skills/weaver-e10-hrm/references/org.md +1 -1
- package/skills/weaver-e10-jucailin/SKILL.md +11 -12
- package/skills/weaver-e10-jucailin/agents/openai.yaml +4 -4
- package/skills/weaver-e10-jucailin/references/recruit-implement-consult-sop.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-implement-kb-data-update-channels.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-implement-kb-talent-base-form.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-output-links.md +1 -2
- package/skills/weaver-e10-jucailin/references/recruit-read.md +5 -27
- package/skills/weaver-e10-jucailin/references/recruit-write.md +19 -21
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +2 -2
- package/skills/weaver-e10-mail/SKILL.md +11 -3
- package/skills/weaver-e10-mail/references/mail-agent-entry.md +1 -1
- package/skills/weaver-e10-meeting/SKILL.md +39 -1
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-plan/references/source-manifest.json +3 -3
- package/skills/weaver-e10-recruit-stage/SKILL.md +57 -42
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +27 -22
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +1 -1
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +20 -5
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +96 -22
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +8 -3
- package/skills/weaver-e10-recruit-stage/lib/report-attachment.mjs +7 -6
- package/skills/weaver-e10-recruit-stage/lib/resume-import-once.mjs +308 -0
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +6 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +5 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +4 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +2 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +0 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +1 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +7 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +20 -21
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +12 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +2 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +1 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +75 -52
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +11 -17
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +3 -4
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +456 -93
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +2 -2
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +1 -1
- package/skills/weaver-e10-shared/SKILL.md +1 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +1 -1
- package/skills/weaver-e10-shared-report.html +874 -0
- package/skills/weaver-e10-shijingran/references/source-manifest.json +3 -3
- package/skills/weaver-e10-skill-maker/references/post-generation-install.md +6 -0
- package/skills/weaver-e10-workflow/SKILL.md +4 -4
- package/skills/weaver-e10-workflow/aiDeepRead/config.json +138 -142
- package/skills/weaver-e10-workflow/references/workflow-deep-read.md +7 -7
- package/skills/weaver-e10-yepiaotong/SKILL.md +33 -21
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +5 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +30 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +8 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +4 -4
- package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +3 -3
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +19 -9
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +25 -32
- package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +70 -21
- package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +23 -12
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +52 -17
- package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +23 -19
- package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +6 -4
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +127 -63
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +89 -71
- package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +28 -20
- package/skills/weaver-e10-yepiaotong.zip +0 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +12 -9
- package/skills/weaver-e10-yimiaoban/references/constants.md +291 -0
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/group-read.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/group-write.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +10 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +3 -1
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +175 -36
- package/skills/weaver-e10-ziguanjia/SKILL.md +26 -6
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +1373 -96
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-audit.md +63 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +5 -1
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-idle.md +52 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-report.md +59 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
- package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +0 -89
|
@@ -60,8 +60,10 @@ function isRuntimeBundledCli(p) {
|
|
|
60
60
|
|
|
61
61
|
/** CLI 入口发现:环境变量 → 当前 node 同级 node_modules → npm 全局根。禁止 <span>.cmd</span>。 */
|
|
62
62
|
function resolveCliEntry() {
|
|
63
|
+
const tried = [];
|
|
63
64
|
const fromEnv = process.env.WEAVER_WORK_CLI_ENTRY;
|
|
64
|
-
if (fromEnv
|
|
65
|
+
if (fromEnv) tried.push(fromEnv);
|
|
66
|
+
if (fromEnv && existsSync(fromEnv)) return { entry: fromEnv, tried };
|
|
65
67
|
|
|
66
68
|
const execDir = dirname(process.execPath);
|
|
67
69
|
// 🔴 全局根优先:node 自带 node_modules 里可能躺着旧版 weaver-work-cli(实测 WorkBuddy 运行时
|
|
@@ -79,9 +81,10 @@ function resolveCliEntry() {
|
|
|
79
81
|
join(execDir, '..', 'lib', 'node_modules', 'weaver-work-cli', 'dist', 'index.js'),
|
|
80
82
|
);
|
|
81
83
|
for (const c of candidates) {
|
|
82
|
-
if (c
|
|
84
|
+
if (c) tried.push(c);
|
|
85
|
+
if (c && existsSync(c) && !isRuntimeBundledCli(c)) return { entry: c, tried };
|
|
83
86
|
}
|
|
84
|
-
return null;
|
|
87
|
+
return { entry: null, tried };
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
function parseArgs(argv) {
|
|
@@ -237,10 +240,11 @@ function countBy(rows, key) {
|
|
|
237
240
|
async function main() {
|
|
238
241
|
const opts = parseArgs(process.argv.slice(2));
|
|
239
242
|
|
|
240
|
-
const cliEntry = resolveCliEntry();
|
|
243
|
+
const { entry: cliEntry, tried: cliTried } = resolveCliEntry();
|
|
241
244
|
if (!cliEntry) {
|
|
242
245
|
fail('未找到 weaver-work-cli 的 dist/index.js', {
|
|
243
246
|
hint: '设置 WEAVER_WORK_CLI_ENTRY 指向 dist/index.js,或确认 CLI 已安装',
|
|
247
|
+
tried: cliTried, // 排障:探测过的候选路径(2026-12-01 加)
|
|
244
248
|
});
|
|
245
249
|
}
|
|
246
250
|
|
|
@@ -304,8 +308,19 @@ async function main() {
|
|
|
304
308
|
// 此前未转义,候选人姓名/岗位里出现 "</script>" 会让整页脚本断掉(白屏,且无任何报错提示)。
|
|
305
309
|
const payload = JSON.stringify(summaryData).replace(/</g, '\\u003c');
|
|
306
310
|
const html = tpl.includes('__SUMMARY_DATA_PLACEHOLDER__')
|
|
307
|
-
? tpl.replace('__SUMMARY_DATA_PLACEHOLDER__', payload)
|
|
311
|
+
? tpl.replace('__SUMMARY_DATA_PLACEHOLDER__', () => payload)
|
|
308
312
|
: tpl;
|
|
313
|
+
// 防提前闭合:模板或成品里 script 开闭标签数必须相等(本模块原先没有自校验,
|
|
314
|
+
// 模板注释写出字面结束序列会让整页脚本断掉且无人察觉;判据见 recruit-shortlist.mjs 同名注释)。
|
|
315
|
+
const tagsOf = (s) => ({
|
|
316
|
+
open: (s.match(/<script\b/gi) || []).length,
|
|
317
|
+
close: (s.match(/<\/script>/gi) || []).length,
|
|
318
|
+
});
|
|
319
|
+
const tplTags = tagsOf(tpl);
|
|
320
|
+
const htmlTags = tagsOf(html);
|
|
321
|
+
if (tplTags.open !== tplTags.close || htmlTags.open !== htmlTags.close) {
|
|
322
|
+
throw new Error(`面试汇总模板 script 标签开闭不等(模板 ${tplTags.open}/${tplTags.close},成品 ${htmlTags.open}/${htmlTags.close}):模板内可能有字面的脚本结束序列,会提前闭合脚本块`);
|
|
323
|
+
}
|
|
309
324
|
reportFile = join(opts.outDir, `面试安排汇总_${ts}.html`);
|
|
310
325
|
writeFileSync(reportFile, html, 'utf8');
|
|
311
326
|
}
|
|
@@ -164,6 +164,7 @@ function isRuntimeBundledCli(p) {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
function resolveCliEntry(explicit) {
|
|
167
|
+
const tried = [];
|
|
167
168
|
const candidates = [
|
|
168
169
|
() => explicit || "", // ⓪ --cli 显式指定(测试/非常规部署)
|
|
169
170
|
() => process.env.WEAVER_WORK_CLI_ENTRY || "", // ① 环境变量
|
|
@@ -177,9 +178,10 @@ function resolveCliEntry(explicit) {
|
|
|
177
178
|
try { p = cand(); } catch { continue; }
|
|
178
179
|
// ⓪/① 是显式指定,不受“运行时自带旧包”排除规则限制
|
|
179
180
|
const explicitLike = i === 0 || i === 1;
|
|
180
|
-
if (p
|
|
181
|
+
if (p) tried.push(p);
|
|
182
|
+
if (p && existsSync(p) && (explicitLike || !isRuntimeBundledCli(p))) return { entry: p, tried };
|
|
181
183
|
}
|
|
182
|
-
return null;
|
|
184
|
+
return { entry: null, tried };
|
|
183
185
|
}
|
|
184
186
|
|
|
185
187
|
/* ══════════════════════ CLI 调用(参数走临时文件,不经 shell)══════════════════════ */
|
|
@@ -446,8 +448,8 @@ async function cmdFetchByPosition(a) {
|
|
|
446
448
|
const concurrency = Math.min(10, Math.max(1, Number(a.concurrency || 10)));
|
|
447
449
|
const outDir = a["out-dir"] || path.join(os.tmpdir(), "recruit-shortlist-out");
|
|
448
450
|
const brief = a.brief === true || String(a.brief || "") === "true";
|
|
449
|
-
const cliEntry = resolveCliEntry(a.cli);
|
|
450
|
-
if (!cliEntry) throw new Error("未找到 weaver-work-cli 的 dist/index.js。请确认 CLI 已安装,或用 --cli / 环境变量 WEAVER_WORK_CLI_ENTRY 指定入口。");
|
|
451
|
+
const { entry: cliEntry, tried: cliTried } = resolveCliEntry(a.cli);
|
|
452
|
+
if (!cliEntry) throw Object.assign(new Error("未找到 weaver-work-cli 的 dist/index.js。请确认 CLI 已安装,或用 --cli / 环境变量 WEAVER_WORK_CLI_ENTRY 指定入口。"), { tried: cliTried });
|
|
451
453
|
|
|
452
454
|
const timing = {};
|
|
453
455
|
const errors = [];
|
|
@@ -553,16 +555,19 @@ async function cmdFetch(a) {
|
|
|
553
555
|
const outDir = a["out-dir"] || path.join(os.tmpdir(), "recruit-shortlist-out");
|
|
554
556
|
// --precision:精确探针关键词(通常为「行业+职能」合成词,如「制造业解决方案」)。
|
|
555
557
|
// 非空时与主关键词并发发出,用于补回只在合成词下才命中的高精度人选。
|
|
558
|
+
// 2026-12-01 扩展:支持逗号分隔多词(中英文逗号均可,最多 3 个)——「行业+职能 → 行业 → 职能」
|
|
559
|
+
// 多角度拆槽一次调用内全部并发,不再靠 Agent 串行多次调用(每省一次往返就是省一整轮)。
|
|
556
560
|
const precision = String(a.precision || "").trim();
|
|
561
|
+
const precisionList = precision.split(/[,,]/).map((s) => s.trim()).filter(Boolean).slice(0, 3);
|
|
557
562
|
// --brief:stdout 只回摘要(姓名/岗位/学历/年限/公司岗位列表),完整素材见 draft 文件
|
|
558
563
|
const brief = a.brief === true || String(a.brief || "") === "true";
|
|
559
564
|
// --no-fill:精确探针命中但主力池没有的人,**不补拉 profile**,改用检索行构最小骨架并标记待补档。
|
|
560
565
|
// 省的是那 1.2 秒补档案(实测 precisionFillMs 1115~1330ms),代价是该候选人没有工作/项目经历,
|
|
561
566
|
// 不足以支撑评分依据——仅在「只要名单、不要评估」或极致速度场景使用。
|
|
562
567
|
const noFill = a["no-fill"] === true || String(a["no-fill"] || "") === "true";
|
|
563
|
-
const cliEntry = resolveCliEntry(a.cli);
|
|
568
|
+
const { entry: cliEntry, tried: cliTried } = resolveCliEntry(a.cli);
|
|
564
569
|
if (!cliEntry) {
|
|
565
|
-
throw new Error("未找到 weaver-work-cli 的 dist/index.js。请确认 CLI 已安装,或用 --cli / 环境变量 WEAVER_WORK_CLI_ENTRY 指定入口。");
|
|
570
|
+
throw Object.assign(new Error("未找到 weaver-work-cli 的 dist/index.js。请确认 CLI 已安装,或用 --cli / 环境变量 WEAVER_WORK_CLI_ENTRY 指定入口。"), { tried: cliTried });
|
|
566
571
|
}
|
|
567
572
|
|
|
568
573
|
const timing = {};
|
|
@@ -575,6 +580,7 @@ async function cmdFetch(a) {
|
|
|
575
580
|
let candidates = [];
|
|
576
581
|
let precisionRows = [];
|
|
577
582
|
let precisionHit = 0;
|
|
583
|
+
const precisionProbeHits = []; // 每个探针词的命中数/失败原因(回包 precisionProbes)
|
|
578
584
|
let needProfileCount = 0;
|
|
579
585
|
let overflowCount = 0; // precision 补充后超出 limit 被截掉的人数(0 表示未截)
|
|
580
586
|
const errors = [];
|
|
@@ -619,20 +625,25 @@ async function cmdFetch(a) {
|
|
|
619
625
|
// · 实测:search+补档 3406ms(补档 1095ms 纯浪费)→ 双 shortlist 并发约 2.3 秒,省 1.1 秒。
|
|
620
626
|
// · 两个探针耗时完全重叠,不是相加;串行做则要 4 秒以上。
|
|
621
627
|
const probeTasks = [runOp(cliEntry, "recruit-stage.candidate.shortlist", { keyword, limit, concurrency })];
|
|
622
|
-
|
|
628
|
+
for (const pw of precisionList) probeTasks.push(runOp(cliEntry, "recruit-stage.candidate.shortlist", { keyword: pw, limit, concurrency }));
|
|
623
629
|
const probes = await Promise.allSettled(probeTasks);
|
|
624
630
|
if (probes[0].status !== "fulfilled") throw probes[0].reason;
|
|
625
631
|
const res = probes[0].value;
|
|
626
632
|
timing.shortlistMs = Date.now() - t;
|
|
627
633
|
timing.probesMs = timing.shortlistMs;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
634
|
+
for (let pi = 0; pi < precisionList.length; pi++) {
|
|
635
|
+
const pr = probes[pi + 1];
|
|
636
|
+
if (pr && pr.status === "fulfilled") {
|
|
637
|
+
const pd = pr.value.data || {};
|
|
631
638
|
const pRows = pd.listRows || [];
|
|
632
|
-
|
|
639
|
+
const pCands = (pd.candidates || []).map((c, i) => slimToCandidate(c, pRows[i]));
|
|
640
|
+
precisionRows.push(...pCands);
|
|
641
|
+
precisionProbeHits.push({ keyword: precisionList[pi], hit: pCands.length });
|
|
633
642
|
} else {
|
|
634
|
-
const rr = (
|
|
635
|
-
|
|
643
|
+
const rr = (pr && pr.reason) || {};
|
|
644
|
+
const msg = String(rr.message || rr || "精确探针失败,已忽略");
|
|
645
|
+
precisionProbeHits.push({ keyword: precisionList[pi], hit: 0, error: msg });
|
|
646
|
+
errors.push({ stage: "precision-probe", message: msg });
|
|
636
647
|
}
|
|
637
648
|
}
|
|
638
649
|
const d = res.data || {};
|
|
@@ -646,11 +657,18 @@ async function cmdFetch(a) {
|
|
|
646
657
|
candidates = (d.candidates || []).map((c, i) => slimToCandidate(c, rows[i]));
|
|
647
658
|
|
|
648
659
|
// ── 双探针合并:精确探针命中优先前移;池里没有的补一次 profile(实测通常仅 1 人)──
|
|
649
|
-
if (
|
|
650
|
-
precisionHit = precisionRows.length;
|
|
660
|
+
if (precisionRows.length) {
|
|
651
661
|
const precIds = new Set(precisionRows.map((r) => r.talentId).filter(Boolean));
|
|
662
|
+
precisionHit = precIds.size;
|
|
652
663
|
const have = new Set(candidates.map((c) => c.talentId).filter(Boolean));
|
|
653
|
-
|
|
664
|
+
// 🔴 2026-12-01:--precision 支持多词后,同一人可能被多个探针命中——按 talentId 去重,防止并入重复行
|
|
665
|
+
const seenPrec = new Set();
|
|
666
|
+
const lacks = [];
|
|
667
|
+
for (const r of precisionRows) {
|
|
668
|
+
if (!r.talentId || have.has(r.talentId) || seenPrec.has(r.talentId)) continue;
|
|
669
|
+
seenPrec.add(r.talentId);
|
|
670
|
+
lacks.push(r);
|
|
671
|
+
}
|
|
654
672
|
// 🔴 2026-11-28 修正:--precision 已改为 shortlist,precisionRows 元素本身就是完整候选对象
|
|
655
673
|
// (自带 works/projs)。此处直接并入即可,**禁止再发 profile 请求**——
|
|
656
674
|
// 实测旧写法白花 1.1 秒补档(precisionFillMs 1095~1120ms),档案本来就有。
|
|
@@ -744,8 +762,42 @@ async function cmdFetch(a) {
|
|
|
744
762
|
}
|
|
745
763
|
|
|
746
764
|
if (!candidates.length) {
|
|
765
|
+
// 🔴 池子信号(2026-12-01):关键词零命中时补 1 次轻量台账探测(懒探测,命中路径零开销),
|
|
766
|
+
// 回包带 poolTotal;池子 <10 条时附全量骨架 poolPreview——Agent 据此判断「换词有没有意义」,
|
|
767
|
+
// 不再盲试第二轮、也不用手动拉全量台账交叉验证(小E 实测 152s 教训:池子仅 3 条仍走了两轮探针+交叉校验)。
|
|
768
|
+
let poolTotal = null;
|
|
769
|
+
let poolPreview = null;
|
|
770
|
+
let poolProbeError = "";
|
|
771
|
+
if (!total) {
|
|
772
|
+
try {
|
|
773
|
+
// 🔴 探测对象是**人才库**(与匹配检索同源,空关键词即列全库);不能用 type=candidate
|
|
774
|
+
// 应聘者台账——那是招聘流程台账,自用仅 10 条,池子信号会严重失真(2026-12-01 实测教训)。
|
|
775
|
+
const pool = await runOp(cliEntry, "recruit-stage.candidate.search", { pageSize: 10 });
|
|
776
|
+
const pd = pool.data || {};
|
|
777
|
+
poolTotal = Number(pd.total) || (Array.isArray(pd.rows) ? pd.rows.length : 0);
|
|
778
|
+
const prows = Array.isArray(pd.rows) ? pd.rows : [];
|
|
779
|
+
if (poolTotal > 0 && poolTotal < 10) {
|
|
780
|
+
poolPreview = prows.slice(0, 10).map((r) => ({
|
|
781
|
+
name: r.name || r.candidate_name || null,
|
|
782
|
+
talentId: r.talentId || r.talent_id || null,
|
|
783
|
+
expect: r.expect_position || r.expect_job || r.hope_position || r.position_name || null,
|
|
784
|
+
direction: r.direction || r.industry || r.expect_industry || null,
|
|
785
|
+
}));
|
|
786
|
+
}
|
|
787
|
+
} catch (pe) {
|
|
788
|
+
poolProbeError = String((pe && pe.message) || pe).slice(0, 160);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
let poolHint = "";
|
|
792
|
+
if (poolTotal === 0) poolHint = "人才台账为空:直接如实说明无数据,不要换词重试";
|
|
793
|
+
else if (poolPreview) poolHint = "池子过小(<10 条),poolPreview 即全量骨架:方向不匹配就直接终止如实说明,不要换词重试";
|
|
794
|
+
else if (poolTotal !== null && poolTotal >= 10) poolHint = "池子充足,零命中是关键词问题:按拆槽规则换核心岗位词再试(最多两轮)";
|
|
747
795
|
console.log(JSON.stringify({
|
|
748
796
|
ok: false, reason: "no_match", keyword, total, via, cliEntry,
|
|
797
|
+
...(poolTotal !== null ? { poolTotal } : {}),
|
|
798
|
+
...(poolPreview ? { poolPreview } : {}),
|
|
799
|
+
...(poolHint ? { poolHint } : {}),
|
|
800
|
+
...(poolProbeError ? { poolProbeError } : {}),
|
|
749
801
|
hint: total > 0 ? "命中但档案全部拉取失败,见 errors" : "关键词零命中:换核心岗位词再试(最多两轮),仍为 0 则如实说明无匹配",
|
|
750
802
|
errors,
|
|
751
803
|
}));
|
|
@@ -767,7 +819,7 @@ async function cmdFetch(a) {
|
|
|
767
819
|
keyword,
|
|
768
820
|
total,
|
|
769
821
|
shown: candidates.length,
|
|
770
|
-
...(
|
|
822
|
+
...(precisionList.length ? { precision, precisionHit, precisionProbes: precisionProbeHits } : {}),
|
|
771
823
|
...(overflowCount > 0 ? { overflowDropped: overflowCount } : {}),
|
|
772
824
|
...(searchNote ? { searchNote } : {}),
|
|
773
825
|
candidates,
|
|
@@ -792,7 +844,7 @@ async function cmdFetch(a) {
|
|
|
792
844
|
baseUrl,
|
|
793
845
|
...(cardUrlCount < candidates.length ? { cardUrlMissing: candidates.length - cardUrlCount, cardUrlHint: "部分候选人未生成卡片链接:talentId 为空,或当前不是自用域名(非自用属正常,正文给纯文本姓名即可,不要填自用壳页 ID)" } : {}),
|
|
794
846
|
timing,
|
|
795
|
-
...(
|
|
847
|
+
...(precisionList.length ? { precision, precisionHit, precisionProbes: precisionProbeHits } : {}),
|
|
796
848
|
...(needProfileCount ? { needProfile: needProfileCount, needProfileHint: "以下候选人未补档案(--no-fill),仅有姓名/岗位/渠道,评分依据不足,需在结论中标注「档案待补」" } : {}),
|
|
797
849
|
...(errors.length ? { errors } : {}),
|
|
798
850
|
candidates: list,
|
|
@@ -926,7 +978,18 @@ async function cmdBuild(a) {
|
|
|
926
978
|
|
|
927
979
|
// 防 </script> 提前闭合:JSON 里的 < 统一转义
|
|
928
980
|
const payload = JSON.stringify(data).replace(/</g, "\\u003c");
|
|
929
|
-
|
|
981
|
+
// 用函数式替换:字符串替换会把数据里的 $& / $' / $` 当成替换模式,造成数据被改写
|
|
982
|
+
const html = tplText.replace(tpl.placeholder, () => payload);
|
|
983
|
+
// 防 「</script> 提前闭合」的假绿:必须单独数开闭标签。
|
|
984
|
+
// 典型事故(2026-12-01):模板 script 块内的注释写了字面结束序列,HTML 解析器在此提前闭合,
|
|
985
|
+
// 后续 JS 沦为正文;而下面按 <script>…</script> 非贪婪截取时,截断点恰落在注释末尾,
|
|
986
|
+
// new Function 语法检查照样通过 → 必须靠开闭数量不等来拦。
|
|
987
|
+
const countScriptTags = (s) => ({
|
|
988
|
+
open: (s.match(/<script\b/gi) || []).length,
|
|
989
|
+
close: (s.match(/<\/script>/gi) || []).length,
|
|
990
|
+
});
|
|
991
|
+
const tplTags = countScriptTags(tplText);
|
|
992
|
+
const htmlTags = countScriptTags(html);
|
|
930
993
|
const outHtml = path.resolve(a["out-html"]);
|
|
931
994
|
await mkdir(path.dirname(outHtml), { recursive: true });
|
|
932
995
|
await writeFile(outHtml, html, "utf8");
|
|
@@ -946,6 +1009,11 @@ async function cmdBuild(a) {
|
|
|
946
1009
|
for (const s of scripts) {
|
|
947
1010
|
try { new Function(s); } catch (e) { syntaxOk = false; syntaxErr = String(e.message).slice(0, 160); }
|
|
948
1011
|
}
|
|
1012
|
+
// 🔴 开闭标签数不等 = 模板内存在提前闭合序列,此时上面的语法检查会「假绿」(截断点落在注释末尾仍可解析)
|
|
1013
|
+
if (tplTags.open !== tplTags.close || htmlTags.open !== htmlTags.close) {
|
|
1014
|
+
syntaxOk = false;
|
|
1015
|
+
syntaxErr = `script 标签开闭不等(模板 ${tplTags.open}/${tplTags.close},成品 ${htmlTags.open}/${htmlTags.close}):模板内可能有字面的脚本结束序列,会提前闭合脚本块`;
|
|
1016
|
+
}
|
|
949
1017
|
const cs = data.candidates || [];
|
|
950
1018
|
const isMatch = tpl.kind === "match";
|
|
951
1019
|
const numOverall = cs.filter((c) => Number.isFinite(Number(c.overall))).length;
|
|
@@ -961,6 +1029,7 @@ async function cmdBuild(a) {
|
|
|
961
1029
|
template: tpl.name,
|
|
962
1030
|
placeholderReplaced: !html.includes(tpl.placeholder),
|
|
963
1031
|
scriptBlocks: scripts.length,
|
|
1032
|
+
scriptTags: `${htmlTags.open}/${htmlTags.close}`,
|
|
964
1033
|
syntaxOk,
|
|
965
1034
|
...(syntaxErr ? { syntaxErr } : {}),
|
|
966
1035
|
candidateCount: cs.length,
|
|
@@ -1024,9 +1093,9 @@ function parseArgv(argv) {
|
|
|
1024
1093
|
|
|
1025
1094
|
const USAGE = [
|
|
1026
1095
|
"用法:",
|
|
1027
|
-
" node lib/recruit-shortlist.mjs fetch --keyword <关键词> [--precision
|
|
1096
|
+
" node lib/recruit-shortlist.mjs fetch --keyword <关键词> [--precision <探针词1,探针词2,探针词3>] [--limit 5] [--concurrency 10] [--brief] [--no-fill] [--max-output 6144] [--out-dir <目录>] [--position <岗位名>] [--base-url <url>] [--card-page-id <人才卡片页id>] [--cli <dist/index.js>]",
|
|
1028
1097
|
" node lib/recruit-shortlist.mjs fetch --position-id <职位id> [--limit 5] [--concurrency 10] [--brief] [--out-dir <目录>] [--position <岗位名>] [--base-url <url>] [--card-page-id <人才卡片页id>] [--cli <dist/index.js>]",
|
|
1029
|
-
" --precision 与 --keyword
|
|
1098
|
+
" --precision 与 --keyword 并发发出的精确探针:逗号分隔最多 3 个词(中英文逗号均可),一次调用完成多角度拆槽;推荐「行业+职能,行业兜底」。回包 precisionProbes 给每个词的命中数",
|
|
1030
1099
|
" --brief stdout 只回摘要(姓名/岗位/学历/年限/公司岗位列表),完整素材见 draft 文件",
|
|
1031
1100
|
" --no-fill 精确探针命中的人不补拉档案(省约 1.2 秒),改用检索行骨架并标 needProfile;评分依据会缺失",
|
|
1032
1101
|
" --position-id 按职位取投递候选人前 N 条(不翻全页),再并发拉档案;与 --keyword 二选一",
|
|
@@ -1043,7 +1112,12 @@ try {
|
|
|
1043
1112
|
else if (cmd === "build") process.exitCode = await cmdBuild(argv);
|
|
1044
1113
|
else { console.error(USAGE); process.exitCode = 2; }
|
|
1045
1114
|
} catch (e) {
|
|
1046
|
-
console.log(JSON.stringify({
|
|
1115
|
+
console.log(JSON.stringify({
|
|
1116
|
+
ok: false,
|
|
1117
|
+
error: String((e && e.message) || e).slice(0, 400),
|
|
1118
|
+
subtype: (e && e.subtype) || "",
|
|
1119
|
+
...(Array.isArray(e && e.tried) && e.tried.length ? { tried: e.tried, triedHint: "CLI 入口探测过的候选路径;确认实际安装路径后用 --cli 或 WEAVER_WORK_CLI_ENTRY 固定(2026-12-01 加)" } : {}),
|
|
1120
|
+
}));
|
|
1047
1121
|
process.exitCode = 2;
|
|
1048
1122
|
}
|
|
1049
1123
|
|
|
@@ -153,17 +153,21 @@ const CLI_ENTRY_CANDIDATES = [
|
|
|
153
153
|
];
|
|
154
154
|
|
|
155
155
|
function resolveCliEntry() {
|
|
156
|
+
const tried = [];
|
|
156
157
|
for (const cand of CLI_ENTRY_CANDIDATES) {
|
|
157
158
|
let p = '';
|
|
158
159
|
try { p = cand(); } catch { continue; }
|
|
159
160
|
// 排除 WorkBuddy/node 运行时自带的旧 CLI;显式指定的入口不受此限制
|
|
160
161
|
const explicit = process.env.WEAVER_WORK_CLI_ENTRY || '';
|
|
161
|
-
if (p
|
|
162
|
+
if (p) tried.push(p);
|
|
163
|
+
if (p && existsSync(p) && (p === explicit || !isRuntimeBundledCli(p))) return { entry: resolvePath(p), tried };
|
|
162
164
|
}
|
|
163
|
-
return null;
|
|
165
|
+
return { entry: null, tried };
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
const
|
|
168
|
+
const CLI_ENTRY_RES = resolveCliEntry();
|
|
169
|
+
const CLI_ENTRY = CLI_ENTRY_RES.entry;
|
|
170
|
+
const CLI_ENTRY_TRIED = CLI_ENTRY_RES.tried; // 排障:探测过的候选路径,入口找不到时随错误回包带出(2026-12-01 加)
|
|
167
171
|
|
|
168
172
|
// 🔴 2026-11-30 用户拍板:安排面试未指定方式时,技能层默认 AI 面试。
|
|
169
173
|
// 只在本 helper 进入 CLI 前补值,不改 CLI 基座自身的默认(CLI 默认仍是现场面试)。
|
|
@@ -241,6 +245,7 @@ function runCli(operation, input) {
|
|
|
241
245
|
type: 'environment',
|
|
242
246
|
subtype: 'cli_entry_not_found',
|
|
243
247
|
message: '未找到 weaver-work-cli 的 dist/index.js。请确认 CLI 已安装,或用环境变量 WEAVER_WORK_CLI_ENTRY 显式指定入口路径。',
|
|
248
|
+
...(CLI_ENTRY_TRIED.length ? { tried: CLI_ENTRY_TRIED } : {}),
|
|
244
249
|
},
|
|
245
250
|
};
|
|
246
251
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* 报告附件发布器。
|
|
4
4
|
*
|
|
5
5
|
* 用法:
|
|
6
6
|
* node lib/report-attachment.mjs --file <报告.html>
|
|
7
7
|
* → 校验报告存在,stdout 回 {"ok":true,"reportFile":"<绝对路径>","bytes":N}
|
|
8
|
-
* →
|
|
8
|
+
* → Agent 用 present_files 登记 reportFile,平台自动在右侧预览(客户端与网页版一致);
|
|
9
|
+
* 不启动服务、不生成任何 URL、不输出 open_web 卡片
|
|
9
10
|
*/
|
|
10
11
|
import { existsSync, statSync } from "node:fs";
|
|
11
12
|
import { resolve } from "node:path";
|
|
@@ -14,7 +15,10 @@ import { fileURLToPath } from "node:url";
|
|
|
14
15
|
export function publishReport(file) {
|
|
15
16
|
const reportFile = resolve(file);
|
|
16
17
|
if (!existsSync(reportFile)) throw new Error(`报告文件不存在:${reportFile}`);
|
|
17
|
-
return {
|
|
18
|
+
return {
|
|
19
|
+
reportFile,
|
|
20
|
+
bytes: statSync(reportFile).size,
|
|
21
|
+
};
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
const SELF = fileURLToPath(import.meta.url);
|
|
@@ -33,6 +37,3 @@ if (isMain) {
|
|
|
33
37
|
process.exit(1);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|