weaver-work-cli 0.1.71 → 0.1.75
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 +37 -1
- package/dist/chunks/{archive-5P33NAUN.js → archive-OZJ6PYUR.js} +14 -9
- package/dist/chunks/{archive-oa-YTY5D7DG.js → archive-oa-BHL5RK2F.js} +10 -7
- package/dist/chunks/{asset-3Q5MFQBX.js → asset-HKRFRQR2.js} +10 -7
- package/dist/chunks/{asset-idle-PQPNYIS7.js → asset-idle-GGIR4KE7.js} +7 -4
- package/dist/chunks/{attachment-content-7CN7JB6B.js → attachment-content-4OV65NK5.js} +3 -3
- package/dist/chunks/{blog-MFHHK6ZR.js → blog-HYDP4DV3.js} +10 -7
- package/dist/chunks/{caizhilian-OZ435AYW.js → caizhilian-JS4RQZ6Z.js} +10 -7
- package/dist/chunks/{calendar-TNJXS5UC.js → calendar-SWRY4DIT.js} +10 -7
- package/dist/chunks/chunk-257JXJGD.js +30 -0
- package/dist/chunks/{chunk-FRMDHZSN.js → chunk-2AUFKU2D.js} +11 -11
- package/dist/chunks/chunk-2BZ7TY4M.js +49 -0
- package/dist/chunks/{chunk-WM33BSIL.js → chunk-2QCCXPNU.js} +1 -1
- package/dist/chunks/{chunk-X2C5CGGM.js → chunk-4FCBEWNB.js} +74 -68
- package/dist/chunks/{chunk-YN5SD4TX.js → chunk-5D2V7ZAN.js} +2 -2
- package/dist/chunks/{chunk-UPVAQJKS.js → chunk-5QUTQHXF.js} +282 -158
- package/dist/chunks/{chunk-SKWKCLJX.js → chunk-5ZJGPEIB.js} +2 -2
- package/dist/chunks/chunk-7DE3VMZD.js +35 -0
- package/dist/chunks/chunk-BNKUHN4N.js +1346 -0
- package/dist/chunks/{chunk-VMVMEIL3.js → chunk-BSR5TM7U.js} +4 -4
- package/dist/chunks/{chunk-EJLP63UO.js → chunk-ERZY6GYL.js} +7 -3
- package/dist/chunks/{chunk-OFCF23FY.js → chunk-FEZK536Z.js} +25 -9
- package/dist/chunks/{chunk-Q3EXRNB4.js → chunk-I6NOHKEK.js} +1 -1
- package/dist/chunks/{chunk-OZ7CJC7W.js → chunk-J7FAAHWH.js} +2 -2
- package/dist/chunks/{chunk-6MMSLE6K.js → chunk-JJONWB5N.js} +16 -2
- package/dist/chunks/chunk-JOY3HZXL.js +467 -0
- package/dist/chunks/{chunk-2DNCKZRX.js → chunk-JWF2R6EQ.js} +0 -462
- package/dist/chunks/{chunk-ICNUOWLL.js → chunk-KEA4XQPO.js} +4 -4
- package/dist/chunks/chunk-KINXYJXM.js +205 -0
- package/dist/chunks/{chunk-VJWVB55R.js → chunk-KWJEICD4.js} +2 -2
- package/dist/chunks/{chunk-P3AFNAJ6.js → chunk-LJI4N6FV.js} +1 -1
- package/dist/chunks/{chunk-DRJYPXKC.js → chunk-MXCRKXOP.js} +48 -6
- package/dist/chunks/{chunk-OPTJ6IF7.js → chunk-NWYHCZTY.js} +1 -1
- package/dist/chunks/chunk-OJ4JPD25.js +428 -0
- package/dist/chunks/{chunk-B4NINGP2.js → chunk-OQCK5SAU.js} +2 -2
- package/dist/chunks/chunk-PG5YSNYY.js +1166 -0
- package/dist/chunks/{chunk-LU2SPJYY.js → chunk-QJWVYOOV.js} +2 -2
- package/dist/chunks/{chunk-SUWR5QEG.js → chunk-QVKRNL7L.js} +287 -305
- package/dist/chunks/chunk-SU6IJD6D.js +49 -0
- package/dist/chunks/{chunk-MD5RXRI3.js → chunk-TA2RBUTH.js} +2 -2
- package/dist/chunks/{chunk-SSS75WXW.js → chunk-U6Y32KEV.js} +2 -2
- package/dist/chunks/chunk-UUJK76HV.js +209 -0
- package/dist/chunks/{chunk-GB2MCJPG.js → chunk-VOMDD2C5.js} +1 -1
- package/dist/chunks/chunk-Y3C6MDL7.js +28 -0
- package/dist/chunks/chunk-ZM7RN2IM.js +38 -0
- package/dist/chunks/{chunk-G7ZM2VOX.js → chunk-ZUB4M4N3.js} +38 -36
- package/dist/chunks/{chunk-XLSJC6JZ.js → chunk-ZWIMLT6P.js} +8 -7
- package/dist/chunks/cli-FULPXIKJ.js +226 -0
- package/dist/chunks/commands-BNWFNTD3.js +70 -0
- package/dist/chunks/{conflict-Y4PXZ2YQ.js → conflict-5BKCDV2F.js} +2 -2
- package/dist/chunks/{contract-C3BGUMBM.js → contract-WI23OXVC.js} +12446 -5964
- package/dist/chunks/{cowork-2AWG4QLA.js → cowork-DZBBVNMQ.js} +11 -8
- package/dist/chunks/{create-flow-LOUOK46Z.js → create-flow-7ZRBRKX7.js} +6 -6
- package/dist/chunks/{data-BSFYMXVO.js → data-PAZVE6QE.js} +6 -3
- package/dist/chunks/{ebuilder-form-LAAMTD2Y.js → ebuilder-form-5SQXIGXN.js} +9 -6
- package/dist/chunks/{ehr-36KEX5SH.js → ehr-CX5F4ZAU.js} +27 -19
- package/dist/chunks/{entry-mode-6N2IGCS4.js → entry-mode-I2BYNONZ.js} +3 -3
- package/dist/chunks/{env-QYLS3EB3.js → env-ZAQZ7EHN.js} +2 -2
- package/dist/chunks/{esb-PTYS3E67.js → esb-DQTXDIBF.js} +10 -7
- package/dist/chunks/{factory-LPFPKZ4T.js → factory-XRI6KZ7H.js} +1 -1
- package/dist/chunks/{fna-JNHCLRDE.js → fna-FK6HQVJL.js} +13 -8
- package/dist/chunks/{group-chat-QP2WX4QJ.js → group-chat-MLWNYM2P.js} +3 -3
- package/dist/chunks/{host-C2BLBIID.js → host-3EPREGXS.js} +6 -3
- package/dist/chunks/{host-QXFKQXNX.js → host-J74JGYAW.js} +6 -3
- package/dist/chunks/{host-57LSRSE7.js → host-KUMU3DDK.js} +6 -3
- package/dist/chunks/{host-7BVR7CQ3.js → host-MEC4VQZA.js} +6 -3
- package/dist/chunks/{host-NS36QFLR.js → host-T6NNQGVZ.js} +6 -3
- package/dist/chunks/{host-K2ZKNXME.js → host-VI7Q45PM.js} +6 -3
- package/dist/chunks/{hrm-FSGO4NSH.js → hrm-KKVAW4P5.js} +8 -5
- package/dist/chunks/{im-2BFGS2XO.js → im-47CIWQNL.js} +7 -4
- package/dist/chunks/{invoice-JKLTTHSZ.js → invoice-CDYRBNIG.js} +21 -16
- package/dist/chunks/{jiuchuanhui-PTABJE7V.js → jiuchuanhui-M7QTRHZK.js} +17 -10
- package/dist/chunks/{lazy-dispatch-YN2ZP3CS.js → lazy-dispatch-FKQJZFI5.js} +22 -8
- package/dist/chunks/{mail-YNO7ZZUK.js → mail-NRBS5N6Y.js} +11 -8
- package/dist/chunks/{meeting-NIDHDBCB.js → meeting-WC5LD3IO.js} +22 -18
- package/dist/chunks/{minute-doc-G3QAT7DE.js → minute-doc-OQUMDTKG.js} +4 -4
- package/dist/chunks/{okr-QC52G6AJ.js → okr-EHKSKMPL.js} +10 -7
- package/dist/chunks/{operations-MQV32ITT.js → operations-V5VM5MS2.js} +7 -4
- package/dist/chunks/{performance-3MQ3AHDQ.js → performance-ZJADXJPN.js} +6 -3
- package/dist/chunks/{plan-ISINIEPY.js → plan-OTDNBDJ7.js} +10 -7
- package/dist/chunks/{project-IJ6DVKT7.js → project-4XVBQ3HX.js} +10 -7
- package/dist/chunks/{reception-3H5LUG2I.js → reception-3FAHOOH7.js} +118 -45
- package/dist/chunks/{recruit-stage-MIOJXP6W.js → recruit-stage-3WTVWW2K.js} +1056 -191
- package/dist/chunks/register-SQOPIR2G.js +16 -0
- package/dist/chunks/{registry-3S7AVMXR.js → registry-F4YFZLOD.js} +7 -3
- package/dist/chunks/registry-NBTBXR4L.js +30 -0
- package/dist/chunks/{registry-NHHKOEU3.js → registry-TJGCVRCW.js} +7 -4
- package/dist/chunks/{room-recommend-IOKBJVYP.js → room-recommend-KL62XB2Y.js} +4 -4
- package/dist/chunks/root-YZG2TS5W.js +16 -0
- package/dist/chunks/{schedule-IB6EUARH.js → schedule-XOISYUPB.js} +4 -4
- package/dist/chunks/{smart-extract-N2TK3CEF.js → smart-extract-UYGNV3BM.js} +15 -7
- package/dist/chunks/update-AV5VOXGY.js +13 -0
- package/dist/chunks/{workflow-RINBAL2M.js → workflow-V54LJPXL.js} +15 -10
- package/dist/cli.js +40 -0
- package/dist/cmd/action.js +3 -1
- package/dist/cmd/doctor/index.js +1 -1
- package/dist/cmd/e10/index.js +1 -1
- package/dist/cmd/identity/index.js +5 -8
- package/dist/cmd/index.js +2 -0
- package/dist/cmd/setup/index.js +1 -1
- package/dist/cmd/update/index.js +38 -0
- package/dist/core/manifest-view.js +1 -1
- package/dist/core/output.js +12 -1
- package/dist/core/runtime-agent.js +13 -0
- package/dist/core/update-notice.js +23 -0
- package/dist/index.js +105 -198
- package/dist/internal/e10/auth/agent-host-key.js +16 -0
- package/dist/internal/e10/auth/agent-hosts.js +45 -9
- package/dist/internal/e10/auth/commands.js +66 -36
- package/dist/internal/e10/auth/session.js +30 -15
- package/dist/internal/e10/auth/xiaoe.js +4 -20
- package/dist/internal/e10/auth-recovery.js +44 -4
- package/dist/internal/e10/context.js +5 -2
- package/dist/internal/update/bootstrap.js +96 -0
- package/dist/internal/update/npm.js +78 -0
- package/dist/internal/update/service.js +252 -0
- package/dist/internal/update/store.js +135 -0
- package/dist/shortcuts/archive/index.js +2 -2
- package/dist/shortcuts/archive/manifest.js +1 -0
- package/dist/shortcuts/archive/operations/search.js +3 -1
- package/dist/shortcuts/archive-oa/index.js +1 -1
- package/dist/shortcuts/asset/index.js +1 -1
- package/dist/shortcuts/asset-idle/index.js +1 -1
- package/dist/shortcuts/blog/index.js +1 -1
- package/dist/shortcuts/caizhilian/index.js +1 -1
- package/dist/shortcuts/calendar/index.js +1 -1
- package/dist/shortcuts/contract/data/bi-config.js +156 -0
- package/dist/shortcuts/contract/data/collection-ledger-html.js +189 -0
- package/dist/shortcuts/contract/data/collection-node-catalog.js +226 -0
- package/dist/shortcuts/contract/data/metric-catalog.js +154 -20
- package/dist/shortcuts/contract/data/report-renderers.js +414 -0
- package/dist/shortcuts/contract/data/report-spec.js +132 -0
- package/dist/shortcuts/contract/error-actions.js +114 -0
- package/dist/shortcuts/contract/host.js +12 -3
- package/dist/shortcuts/contract/index.js +17 -1
- package/dist/shortcuts/contract/manifest.js +398 -3
- package/dist/shortcuts/contract/ooxml/docx-table.js +48 -0
- package/dist/shortcuts/contract/operations/bi-preview.js +131 -0
- package/dist/shortcuts/contract/operations/bizreview-report.js +496 -0
- package/dist/shortcuts/contract/operations/collection-node.js +229 -0
- package/dist/shortcuts/contract/operations/docx-slots.js +735 -16
- package/dist/shortcuts/contract/operations/draft-build.js +940 -0
- package/dist/shortcuts/contract/operations/draft-submit.js +229 -0
- package/dist/shortcuts/contract/operations/first-screen.js +3 -2
- package/dist/shortcuts/contract/operations/generated-submit.js +175 -0
- package/dist/shortcuts/contract/operations/ledger-report.js +233 -0
- package/dist/shortcuts/contract/operations/ledger-stat.js +1400 -0
- package/dist/shortcuts/contract/operations/ledger.js +4 -1
- package/dist/shortcuts/contract/operations/metrics.js +9 -3
- package/dist/shortcuts/contract/operations/ops-draft.js +527 -0
- package/dist/shortcuts/contract/operations/page.js +9 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +55 -229
- package/dist/shortcuts/contract/operations/registry.js +20 -0
- package/dist/shortcuts/contract/operations/sign-launch.js +256 -0
- package/dist/shortcuts/contract/operations/viewlink.js +334 -0
- package/dist/shortcuts/cowork/index.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +1 -1
- package/dist/shortcuts/ehr/index.js +2 -2
- package/dist/shortcuts/ehr/manifest.js +1 -1
- package/dist/shortcuts/ehr/operations/recruit-position.js +11 -5
- package/dist/shortcuts/ehr/operations/recruit-short-cache.js +6 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +10 -9
- package/dist/shortcuts/ehr/operations/recruit.js +390 -196
- package/dist/shortcuts/ehr/operations/shared.js +51 -0
- package/dist/shortcuts/esb/index.js +1 -1
- package/dist/shortcuts/fna/index.js +1 -1
- package/dist/shortcuts/fna/manifest.js +1 -0
- package/dist/shortcuts/fna/operations/expense-chart.js +3 -1
- package/dist/shortcuts/hrm/index.js +1 -1
- package/dist/shortcuts/invoice/index.js +1 -1
- package/dist/shortcuts/jiuchuanhui/index.js +2 -2
- package/dist/shortcuts/jiuchuanhui/manifest.js +3 -0
- package/dist/shortcuts/mail/index.js +2 -2
- package/dist/shortcuts/meeting/index.js +1 -1
- package/dist/shortcuts/meeting/manifest.js +1 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -3
- package/dist/shortcuts/meeting/operations/eb/conflict.js +3 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +10 -9
- package/dist/shortcuts/meeting/operations/eb/factory.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/member-expand.js +3 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +3 -3
- package/dist/shortcuts/meeting/operations/invitation.js +4 -4
- package/dist/shortcuts/meeting/operations/link.js +3 -1
- package/dist/shortcuts/okr/index.js +1 -1
- package/dist/shortcuts/performance/index.js +1 -1
- package/dist/shortcuts/plan/index.js +1 -1
- package/dist/shortcuts/project/index.js +1 -1
- package/dist/shortcuts/reception/constants.js +22 -0
- package/dist/shortcuts/reception/index.js +4 -0
- package/dist/shortcuts/reception/manifest.js +16 -2
- package/dist/shortcuts/reception/operations/doc.js +24 -11
- package/dist/shortcuts/reception/operations/docrender.js +18 -1
- package/dist/shortcuts/reception/operations/render-assets.js +93 -22
- package/dist/shortcuts/recruit-stage/context.js +22 -8
- package/dist/shortcuts/recruit-stage/index.js +16 -3
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +20 -11
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +467 -26
- package/dist/shortcuts/recruit-stage/operations/list.js +73 -2
- package/dist/shortcuts/recruit-stage/operations/profile.js +13 -5
- package/dist/shortcuts/recruit-stage/operations/registry.js +18 -2
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +363 -54
- package/dist/shortcuts/recruit-stage/operations/search.js +80 -16
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +124 -0
- package/dist/shortcuts/recruit-stage/shared.js +174 -56
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +7 -2
- package/dist/shortcuts/smart-extract/operations/validate.js +4 -1
- package/dist/shortcuts/workflow/index.js +2 -2
- package/dist/shortcuts/workflow/manifest.js +1 -0
- package/dist/shortcuts/workflow/operations/aiDeepRead/render.js +4 -1
- package/dist/shortcuts/workflow/operations/deepRead.js +23 -2
- package/dist/shortcuts/workflow/operations/form.js +44 -4
- package/docs/contract.md +6 -1
- package/docs/e10-auth.md +25 -7
- package/docs/operation-manual.md +15 -0
- package/package.json +2 -2
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
- package/skill-template/business-info.json +28 -0
- package/skill-template/domains/jinchengda.md +13 -1
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +3 -3
- package/skills/weaver-e10-caizhilian/references/auth-and-install.md +2 -1
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +3 -3
- package/skills/weaver-e10-esb/references/source-manifest.json +3 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +90 -32
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +45 -0
- package/skills/weaver-e10-jinchengda/references/contract-bizreview-report-template.html +68 -0
- package/skills/weaver-e10-jinchengda/references/contract-bizreview.md +216 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-negotiate.md +215 -0
- package/skills/weaver-e10-jinchengda/references/contract-collection-node.md +113 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +19 -3
- package/skills/weaver-e10-jinchengda/references/contract-decisions.md +114 -0
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +53 -44
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-firstscreen-guide.md +200 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +18 -1
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +138 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-report.md +158 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +3 -1
- package/skills/weaver-e10-jinchengda/references/contract-material-gap.md +139 -0
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +10 -3
- package/skills/weaver-e10-jinchengda/references/contract-ops-draft.md +106 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +176 -56
- package/skills/weaver-e10-jinchengda/references/contract-sign-launch.md +123 -0
- package/skills/weaver-e10-jinchengda/references/contract-smart-draft.md +410 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-viewlink.md +110 -0
- package/skills/weaver-e10-jinchengda/references/orchestration.md +38 -24
- package/skills/weaver-e10-jucailin/SKILL.md +7 -3
- package/skills/weaver-e10-jucailin/references/recruit-output-links.md +33 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -0
- package/skills/weaver-e10-meeting/SKILL.md +13 -0
- package/skills/weaver-e10-okr/SKILL.md +11 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +7 -6
- package/skills/weaver-e10-performance/SKILL.md +131 -39
- package/skills/weaver-e10-performance/agents/openai.yaml +48 -17
- package/skills/weaver-e10-performance/references/default-assembly.md +3 -0
- package/skills/weaver-e10-performance/references/extraction-guide.md +17 -3
- package/skills/weaver-e10-performance/references/flow-assess.md +38 -5
- package/skills/weaver-e10-performance/references/scheme-setting-page.md +20 -3
- package/skills/weaver-e10-performance/scripts/assemble_scheme.py +461 -0
- package/skills/weaver-e10-performance/scripts/parse_appraisal_doc.py +41 -0
- package/skills/weaver-e10-plan/SKILL.md +10 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
- package/skills/weaver-e10-qiyecheng/SKILL.md +2 -2
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
- package/skills/weaver-e10-reception-flow/SKILL.md +97 -41
- package/skills/weaver-e10-reception-flow/references/guide.md +3 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +533 -137
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +103 -62
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +282 -0
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +331 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +865 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +162 -11
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +15 -1
- package/skills/weaver-e10-recruit-stage/lib/report-attachment.mjs +38 -0
- package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +5 -1
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +26 -21
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +33 -27
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +11 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +22 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +42 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +11 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +87 -50
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +48 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +45 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +17 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +162 -31
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +55 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +75 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +80 -46
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +11 -7
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +10 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +15 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +7 -3
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +119 -0
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +322 -0
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +166 -76
- package/skills/weaver-e10-shared/SKILL.md +40 -5
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +11 -1
- package/skills/weaver-e10-shared/references/json-output-contract.md +144 -8
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +11 -0
- package/skills/weaver-e10-shijingran/references/source-manifest.json +3 -3
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/references/source-manifest.json +3 -3
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +5 -5
- package/dist/chunks/chunk-MZVQKQP5.js +0 -2849
- package/dist/chunks/registry-3GQRYP2R.js +0 -27
- package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
isXiaoECloudRuntime
|
|
5
|
+
} from "./chunk-QVKRNL7L.js";
|
|
3
6
|
import {
|
|
4
7
|
CliError
|
|
5
8
|
} from "./chunk-UG5G54VL.js";
|
|
@@ -66,6 +69,26 @@ function asObject(value) {
|
|
|
66
69
|
}
|
|
67
70
|
return value;
|
|
68
71
|
}
|
|
72
|
+
var MENU_CONTAINER_KEYS = ["cusAppMenus", "menus", "allMenus", "data", "list"];
|
|
73
|
+
function toMenuList(value) {
|
|
74
|
+
if (Array.isArray(value)) return value;
|
|
75
|
+
if (value && typeof value === "object") {
|
|
76
|
+
const obj = value;
|
|
77
|
+
for (const key of MENU_CONTAINER_KEYS) {
|
|
78
|
+
if (Array.isArray(obj[key])) return obj[key];
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
function menuShapeOf(value) {
|
|
84
|
+
if (Array.isArray(value)) return "array";
|
|
85
|
+
if (!value || typeof value !== "object") return "unavailable";
|
|
86
|
+
const obj = value;
|
|
87
|
+
for (const key of MENU_CONTAINER_KEYS) {
|
|
88
|
+
if (Array.isArray(obj[key])) return key;
|
|
89
|
+
}
|
|
90
|
+
return "unknown";
|
|
91
|
+
}
|
|
69
92
|
function assertNoForbiddenKeys(input) {
|
|
70
93
|
for (const key of Object.keys(input)) {
|
|
71
94
|
if (FORBIDDEN_KEYS.has(key)) {
|
|
@@ -250,7 +273,7 @@ function addDays(date, delta) {
|
|
|
250
273
|
|
|
251
274
|
// src/shortcuts/ehr/operations/recruit.ts
|
|
252
275
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
253
|
-
import { existsSync, mkdirSync, readFileSync,
|
|
276
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
254
277
|
import { homedir } from "node:os";
|
|
255
278
|
import { join, resolve } from "node:path";
|
|
256
279
|
|
|
@@ -279,7 +302,17 @@ var SCHEMA_STRING_LIST = { type: "array", items: { type: "string" } };
|
|
|
279
302
|
|
|
280
303
|
// src/shortcuts/ehr/operations/recruit.ts
|
|
281
304
|
var RECRUIT_APP_TAG = "weaver-recruit-service";
|
|
282
|
-
var
|
|
305
|
+
var SELF_TENANT_KEYS = /* @__PURE__ */ new Set(["t7akvdnf84"]);
|
|
306
|
+
function isSelfTenant(tenantKey) {
|
|
307
|
+
const key = String(tenantKey || "").trim();
|
|
308
|
+
return !!key && SELF_TENANT_KEYS.has(key);
|
|
309
|
+
}
|
|
310
|
+
var RECRUIT_CACHE_VERSION = 8;
|
|
311
|
+
var RECRUIT_CACHE_TTL_DEFAULT_MS = 12 * 60 * 60 * 1e3;
|
|
312
|
+
function recruitCacheTtlMs() {
|
|
313
|
+
const raw = Number(process.env.E10_RS_RECRUIT_CACHE_TTL_MS || "");
|
|
314
|
+
return Number.isFinite(raw) && raw > 0 ? raw : RECRUIT_CACHE_TTL_DEFAULT_MS;
|
|
315
|
+
}
|
|
283
316
|
var RECRUIT_CRITICAL_FORMS = /* @__PURE__ */ new Set(["position_manage", "talent_pool", "interview_plan"]);
|
|
284
317
|
var RECRUIT_CRITICAL_FORM_LABELS = {
|
|
285
318
|
position_manage: "\u62DB\u8058\u804C\u4F4D",
|
|
@@ -293,6 +326,9 @@ function hasCriticalFields(cache) {
|
|
|
293
326
|
const fmap = cache?.fields?.[objId] || {};
|
|
294
327
|
if (!Object.keys(fmap).length) return false;
|
|
295
328
|
}
|
|
329
|
+
if (Array.isArray(cache?.degraded) && cache.degraded.length) return false;
|
|
330
|
+
const dictByName = cache?.dict?.by_name;
|
|
331
|
+
if (!dictByName || typeof dictByName !== "object" || !Object.keys(dictByName).length) return false;
|
|
296
332
|
return true;
|
|
297
333
|
}
|
|
298
334
|
var RECRUIT_TAGS = {
|
|
@@ -365,17 +401,17 @@ function cacheDirFor(baseUrl) {
|
|
|
365
401
|
const home = process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(homedir(), ".weaver-work-cli");
|
|
366
402
|
return join(home, "env-cache", "recruit-ops", host);
|
|
367
403
|
}
|
|
368
|
-
var CONTEXT_SNAPSHOT_TTL_MS = 12 * 60 * 60 * 1e3;
|
|
369
404
|
function snapshotPathFor(baseUrl) {
|
|
370
405
|
const url = new URL(baseUrl);
|
|
371
406
|
const host = url.hostname + (url.port ? `_${url.port}` : "");
|
|
372
407
|
return join(cacheDirFor(baseUrl), "..", "_recruit-stage", `context-snapshot-${host}.json`);
|
|
373
408
|
}
|
|
374
409
|
function readContextSnapshot(baseUrl) {
|
|
410
|
+
if (isXiaoECloudRuntime()) return null;
|
|
375
411
|
try {
|
|
376
412
|
const raw = JSON.parse(readFileSync(snapshotPathFor(baseUrl), "utf8"));
|
|
377
413
|
if (!raw?.at || raw.cacheVersion !== RECRUIT_CACHE_VERSION) return null;
|
|
378
|
-
if (Date.now() - raw.at >
|
|
414
|
+
if (Date.now() - raw.at > recruitCacheTtlMs()) return null;
|
|
379
415
|
if (!raw.resolved || !hasCriticalFields({ ...raw.resolved, appId: raw.appId })) return null;
|
|
380
416
|
return raw;
|
|
381
417
|
} catch {
|
|
@@ -383,6 +419,8 @@ function readContextSnapshot(baseUrl) {
|
|
|
383
419
|
}
|
|
384
420
|
}
|
|
385
421
|
function writeContextSnapshot(baseUrl, appId, resolved) {
|
|
422
|
+
if (Array.isArray(resolved?.degraded) && resolved.degraded.length) return;
|
|
423
|
+
if (isXiaoECloudRuntime()) return;
|
|
386
424
|
try {
|
|
387
425
|
const path = snapshotPathFor(baseUrl);
|
|
388
426
|
mkdirSync(join(path, ".."), { recursive: true });
|
|
@@ -412,9 +450,12 @@ function isPlainId(value) {
|
|
|
412
450
|
return value != null && /^\d+$/.test(String(value).trim());
|
|
413
451
|
}
|
|
414
452
|
var RecruitContextError = class extends Error {
|
|
453
|
+
type;
|
|
415
454
|
subtype;
|
|
416
|
-
|
|
455
|
+
retryable = false;
|
|
456
|
+
constructor(subtype, message, type = "upstream") {
|
|
417
457
|
super(message);
|
|
458
|
+
this.type = type;
|
|
418
459
|
this.subtype = subtype;
|
|
419
460
|
}
|
|
420
461
|
};
|
|
@@ -464,7 +505,33 @@ async function fetchFormFields(host, appId, objId) {
|
|
|
464
505
|
}
|
|
465
506
|
return { fmap, omap };
|
|
466
507
|
}
|
|
508
|
+
function datasetPageSize(fallback) {
|
|
509
|
+
const raw = Number(process.env.E10_RS_RECRUIT_B_PAGE_SIZE || "");
|
|
510
|
+
return Number.isInteger(raw) && raw > 0 ? Math.min(raw, fallback) : fallback;
|
|
511
|
+
}
|
|
512
|
+
async function fetchAllDatasetRows(host, objId, options) {
|
|
513
|
+
const rows = [];
|
|
514
|
+
const maxPages = Math.max(1, Math.ceil(options.maxRows / Math.max(1, options.pageSize)));
|
|
515
|
+
let pageNo = 1;
|
|
516
|
+
for (; ; ) {
|
|
517
|
+
if (pageNo > maxPages) return { rows, pages: pageNo - 1, truncated: true };
|
|
518
|
+
const response = await host.request({
|
|
519
|
+
method: "POST",
|
|
520
|
+
path: "/api/ebuilder/form/dataset/v2/getAllData",
|
|
521
|
+
// header.objId + pageInfo 必带(不传 pageSize 平台默认只返 10 条);
|
|
522
|
+
// 顶层无 code/status,必须 skipBusinessCheck,由 datajson.datas 自行判成功。
|
|
523
|
+
body: { datajson: { header: { objId }, mainTable: {}, pageInfo: { pageNo, pageSize: options.pageSize } } },
|
|
524
|
+
skipBusinessCheck: true
|
|
525
|
+
});
|
|
526
|
+
const pageRows = response?.data?.datajson?.datas || [];
|
|
527
|
+
if (!pageRows.length) return { rows, pages: pageNo, truncated: false };
|
|
528
|
+
rows.push(...pageRows);
|
|
529
|
+
pageNo += 1;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
467
532
|
async function resolveRecruitEnv(host, appId) {
|
|
533
|
+
const degraded = [];
|
|
534
|
+
const warn = [];
|
|
468
535
|
const forms = {};
|
|
469
536
|
let tenantKey = "";
|
|
470
537
|
const tagEntries = Object.entries(RECRUIT_TAGS);
|
|
@@ -489,21 +556,29 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
489
556
|
`\u5F53\u524D\u73AF\u5883\u672A\u89E3\u6790\u5230\u300C${RECRUIT_CRITICAL_FORM_LABELS[logic] || logic}\u300D\u8868\u5355\uFF08getObjsByTag \u8FD4\u56DE\u7A7A\uFF09\uFF0C\u5DF2\u4E2D\u6B62\u4E14\u672A\u5199\u5165\u7F13\u5B58\uFF1B\u8BF7\u786E\u8BA4\u62DB\u8058\u5E94\u7528\u5DF2\u5B89\u88C5\u3001\u8D26\u53F7\u5BF9\u8BE5\u8868\u5355\u6709\u6743\u9650\u540E\u91CD\u8BD5\u3002`
|
|
490
557
|
);
|
|
491
558
|
}
|
|
492
|
-
|
|
493
|
-
path: "/api/cusapp/app/allMenus",
|
|
494
|
-
query: { isFront: 1, appId, terminalType: "PC" }
|
|
495
|
-
});
|
|
559
|
+
if (!forms.dictionary?.objId) degraded.push("dict");
|
|
496
560
|
const flat = [];
|
|
497
561
|
const walk = (nodes) => {
|
|
498
|
-
for (const node of nodes
|
|
562
|
+
for (const node of toMenuList(nodes)) {
|
|
499
563
|
if (node && typeof node === "object") {
|
|
500
564
|
flat.push(node);
|
|
501
|
-
walk(node.children
|
|
565
|
+
walk(node.children ?? node.childs);
|
|
502
566
|
}
|
|
503
567
|
}
|
|
504
568
|
};
|
|
505
|
-
|
|
506
|
-
|
|
569
|
+
let menuFailed = false;
|
|
570
|
+
let menuShape = "unavailable";
|
|
571
|
+
try {
|
|
572
|
+
const menuResponse = await host.request({
|
|
573
|
+
path: "/api/cusapp/app/allMenus",
|
|
574
|
+
query: { isFront: 1, appId, terminalType: "PC" }
|
|
575
|
+
});
|
|
576
|
+
menuShape = menuShapeOf(menuResponse?.data);
|
|
577
|
+
walk(menuResponse?.data);
|
|
578
|
+
} catch {
|
|
579
|
+
menuFailed = true;
|
|
580
|
+
}
|
|
581
|
+
if (menuFailed || !flat.length) warn.push("menus");
|
|
507
582
|
const searchMenus = [];
|
|
508
583
|
const pages = [];
|
|
509
584
|
for (const node of flat) {
|
|
@@ -529,119 +604,88 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
529
604
|
}));
|
|
530
605
|
const dictByName = {};
|
|
531
606
|
const dictRaw = [];
|
|
532
|
-
const dictMenu = searchMenus.find((m) => (m.menuName || "").trim() === "\u6570\u636E\u5B57\u5178") || null;
|
|
533
607
|
const dictObjId = forms.dictionary?.objId || "";
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
listId: dictMenu.listId,
|
|
544
|
-
searchParamData: { searchType: "3", type: "and" },
|
|
545
|
-
terminal: "PC",
|
|
546
|
-
browser: "Chrome",
|
|
547
|
-
requiredMatch: 1,
|
|
548
|
-
mapResult: 1,
|
|
549
|
-
recheckQuery: 1,
|
|
550
|
-
isFollow: 0,
|
|
551
|
-
isShareToMe: 0,
|
|
552
|
-
filterCondition: {},
|
|
553
|
-
cusMenuId: dictMenu.cusMenuId,
|
|
554
|
-
urlPageTitle: "\u6570\u636E\u5B57\u5178",
|
|
555
|
-
menuName: "\u6570\u636E\u5B57\u5178"
|
|
556
|
-
},
|
|
557
|
-
headers: { ebBusinessId: dictMenu.listId }
|
|
558
|
-
});
|
|
559
|
-
let pageNo = 1;
|
|
560
|
-
let reachedEnd = false;
|
|
561
|
-
while (!reachedEnd) {
|
|
562
|
-
const batchPages = Array.from({ length: CONCURRENCY }, (_, i) => pageNo + i);
|
|
563
|
-
const responses = await Promise.all(batchPages.map((p) => fetchDictPage(p)));
|
|
564
|
-
for (const response of responses) {
|
|
565
|
-
const rows = response?.data?.data || [];
|
|
566
|
-
for (const row of rows) {
|
|
567
|
-
const name = row.selection_name;
|
|
568
|
-
const optionId = row.form_data_id;
|
|
608
|
+
const loadDict = async () => {
|
|
609
|
+
if (dictObjId) {
|
|
610
|
+
try {
|
|
611
|
+
const page = await fetchAllDatasetRows(host, dictObjId, { pageSize: datasetPageSize(500), maxRows: 2e4 });
|
|
612
|
+
if (page.truncated) warn.push("dict-truncated");
|
|
613
|
+
for (const row of page.rows) {
|
|
614
|
+
const main = row?.mainTable || {};
|
|
615
|
+
const name = main.selection_name?.fieldValue;
|
|
616
|
+
const optionId = main.id?.fieldValue;
|
|
569
617
|
if (name && optionId) {
|
|
570
618
|
(dictByName[String(name)] ||= []).push(String(optionId));
|
|
571
|
-
|
|
619
|
+
const dictType = Array.isArray(main.dict_type) ? main.dict_type[0]?.fieldOptionId ?? "" : main.dict_type?.fieldValue ?? main.dict_type ?? "";
|
|
620
|
+
dictRaw.push({
|
|
621
|
+
selection_name: String(name),
|
|
622
|
+
option_id: String(optionId),
|
|
623
|
+
dict_type: String(dictType),
|
|
624
|
+
browser_key: String(main.browser_key?.fieldValue || "")
|
|
625
|
+
});
|
|
572
626
|
}
|
|
573
627
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
628
|
+
} catch (error) {
|
|
629
|
+
if (process.env.WEAVER_CLI_DEBUG_CACHE) {
|
|
630
|
+
console.error("[recruit-context] \u5B57\u5178\u8BFB\u53D6\u5931\u8D25:", error instanceof Error ? error.message : String(error));
|
|
577
631
|
}
|
|
632
|
+
degraded.push("dict");
|
|
578
633
|
}
|
|
579
|
-
|
|
634
|
+
if (!Object.keys(dictByName).length) degraded.push("dict");
|
|
580
635
|
}
|
|
581
|
-
}
|
|
636
|
+
};
|
|
582
637
|
let ebdDetailPageId = "";
|
|
583
638
|
let selfUse = "0";
|
|
584
639
|
const bizConfig = forms.biz_config || { objId: "", formId: "", objName: "" };
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
bizEnd = true;
|
|
625
|
-
break;
|
|
626
|
-
}
|
|
627
|
-
for (const row of rows) {
|
|
628
|
-
if (String(row.config_key || "") === "28" && row.config) {
|
|
629
|
-
const match = String(row.config).match(/\/sp\/ebdpage\/view\/(\d+)/);
|
|
630
|
-
if (match) ebdDetailPageId = match[1];
|
|
631
|
-
}
|
|
632
|
-
if (String(row.config_key || "") === "-9999" && String(row.config) === "1") selfUse = "1";
|
|
633
|
-
}
|
|
634
|
-
if (rows.length < bizSize) {
|
|
635
|
-
bizEnd = true;
|
|
636
|
-
break;
|
|
640
|
+
const loadBizConfig = async () => {
|
|
641
|
+
if (bizConfig.objId) {
|
|
642
|
+
try {
|
|
643
|
+
const page = await fetchAllDatasetRows(host, bizConfig.objId, { pageSize: datasetPageSize(100), maxRows: 5e3 });
|
|
644
|
+
if (page.truncated) warn.push("biz_config-truncated");
|
|
645
|
+
for (const row of page.rows) {
|
|
646
|
+
const main = row?.mainTable || {};
|
|
647
|
+
const keyRaw = main.config_key;
|
|
648
|
+
const key = Array.isArray(keyRaw) ? keyRaw[0]?.fieldOptionId ?? "" : keyRaw?.fieldValue ?? keyRaw ?? "";
|
|
649
|
+
const config = String(main.config?.fieldValue ?? "");
|
|
650
|
+
if (String(key) === "28" && config) {
|
|
651
|
+
const match = config.match(/\/sp\/ebdpage\/view\/(\d+)/);
|
|
652
|
+
if (match) ebdDetailPageId = match[1];
|
|
653
|
+
}
|
|
654
|
+
if (String(key) === "-9999" && config === "1") selfUse = "1";
|
|
655
|
+
}
|
|
656
|
+
} catch (error) {
|
|
657
|
+
if (process.env.WEAVER_CLI_DEBUG_CACHE) {
|
|
658
|
+
console.error("[recruit-context] \u4E1A\u52A1\u914D\u7F6E\u8868\u8BFB\u53D6\u5931\u8D25:", error instanceof Error ? error.message : String(error));
|
|
659
|
+
}
|
|
660
|
+
warn.push("biz_config");
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
const options = {};
|
|
665
|
+
const loadDsOptions = async () => {
|
|
666
|
+
for (const [dataKey, logic] of [["recruit_status", "talent_pool"], ["channel", "talent_pool"]]) {
|
|
667
|
+
const entry = forms[logic] || { objId: "", formId: "", objName: "" };
|
|
668
|
+
const fieldId = (fields[entry.objId] || {})[dataKey] || "";
|
|
669
|
+
if (fieldId && entry.objId) {
|
|
670
|
+
try {
|
|
671
|
+
const response = await host.request({
|
|
672
|
+
path: "/api/ebuilder/common/ds/options",
|
|
673
|
+
query: { fieldName: fieldId, objId: entry.objId, sourceType: "FORM", groupId: appId }
|
|
674
|
+
});
|
|
675
|
+
if (Array.isArray(response?.data)) {
|
|
676
|
+
options[dataKey] = {};
|
|
677
|
+
for (const option of response.data) {
|
|
678
|
+
if (option?.id) options[dataKey][String(option.id)] = option.name;
|
|
637
679
|
}
|
|
638
680
|
}
|
|
639
|
-
|
|
681
|
+
} catch {
|
|
682
|
+
warn.push(`options:${dataKey}`);
|
|
640
683
|
}
|
|
641
684
|
}
|
|
642
|
-
} catch {
|
|
643
685
|
}
|
|
644
|
-
}
|
|
686
|
+
};
|
|
687
|
+
await Promise.all([loadDict(), loadBizConfig(), loadDsOptions()]);
|
|
688
|
+
if (isSelfTenant(tenantKey)) selfUse = "1";
|
|
645
689
|
if (!ebdDetailPageId) {
|
|
646
690
|
try {
|
|
647
691
|
const response = await host.request({
|
|
@@ -657,33 +701,18 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
657
701
|
} catch {
|
|
658
702
|
}
|
|
659
703
|
}
|
|
660
|
-
const options = {};
|
|
661
|
-
for (const [dataKey, logic] of [["recruit_status", "talent_pool"], ["channel", "talent_pool"]]) {
|
|
662
|
-
const entry = forms[logic] || { objId: "", formId: "", objName: "" };
|
|
663
|
-
const fieldId = (fields[entry.objId] || {})[dataKey] || "";
|
|
664
|
-
if (fieldId && entry.objId) {
|
|
665
|
-
const response = await host.request({
|
|
666
|
-
path: "/api/ebuilder/common/ds/options",
|
|
667
|
-
query: { fieldName: fieldId, objId: entry.objId, sourceType: "FORM", groupId: appId }
|
|
668
|
-
});
|
|
669
|
-
if (Array.isArray(response?.data)) {
|
|
670
|
-
options[dataKey] = {};
|
|
671
|
-
for (const option of response.data) {
|
|
672
|
-
if (option?.id) options[dataKey][String(option.id)] = option.name;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
704
|
const lists = {
|
|
678
705
|
talent: null,
|
|
679
706
|
demand: null,
|
|
680
707
|
position: null,
|
|
681
708
|
entry: null,
|
|
682
709
|
offer: null,
|
|
710
|
+
// dict / biz_config 仅作为菜单元数据保留(供 describeTargets 诊断);
|
|
711
|
+
// 字典与业务配置的实际读取已改走 dataset/v2 B 通道,不再依赖这两个菜单项。
|
|
683
712
|
interview: null,
|
|
684
713
|
candidate: null,
|
|
685
|
-
dict:
|
|
686
|
-
biz_config:
|
|
714
|
+
dict: searchMenus.find((m) => (m.menuName || "").trim() === "\u6570\u636E\u5B57\u5178") || null,
|
|
715
|
+
biz_config: searchMenus.find((m) => (m.menuName || "").trim() === "\u4E1A\u52A1\u914D\u7F6E\u6620\u5C04\u8868") || null,
|
|
687
716
|
all_search: searchMenus,
|
|
688
717
|
pages
|
|
689
718
|
};
|
|
@@ -695,9 +724,16 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
695
724
|
}
|
|
696
725
|
}
|
|
697
726
|
}
|
|
727
|
+
if (!menuFailed && flat.length > 0 && Object.keys(LIST_KEYWORDS).filter((k) => k !== "biz_config").every((k) => !lists[k])) {
|
|
728
|
+
warn.push("menus-renamed");
|
|
729
|
+
}
|
|
730
|
+
const dedupe = (list) => [...new Set(list)];
|
|
698
731
|
return {
|
|
699
732
|
appId,
|
|
700
733
|
tenantKey,
|
|
734
|
+
degraded: dedupe(degraded),
|
|
735
|
+
warn: dedupe(warn),
|
|
736
|
+
menuShape,
|
|
701
737
|
forms,
|
|
702
738
|
lists,
|
|
703
739
|
fields,
|
|
@@ -708,31 +744,57 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
708
744
|
selfUse
|
|
709
745
|
};
|
|
710
746
|
}
|
|
747
|
+
function listUnavailableHint(cache) {
|
|
748
|
+
const warnList = Array.isArray(cache?.warn) ? cache.warn : [];
|
|
749
|
+
if (warnList.includes("menus")) {
|
|
750
|
+
return "\u672C\u6B21\u672A\u53D6\u5230\u83DC\u5355\u6811\uFF08warn=[menus]\uFF09\uFF1A\u5F53\u524D\u8D26\u53F7\u53EF\u80FD\u770B\u4E0D\u5230\u62DB\u8058\u76F8\u5173\u83DC\u5355\u3002\u8BF7\u5728\u300C\u5E94\u7528 \u2192 \u83DC\u5355\u6743\u9650\u300D\u4E2D\u4E3A\u672C\u8D26\u53F7\u52FE\u9009\u62DB\u8058\u83DC\u5355\u540E\u91CD\u8BD5\uFF1B\u6570\u636E\u8BFB\u53D6\uFF08\u8868\u5355/\u5B57\u5178/\u914D\u7F6E\uFF09\u4E0D\u53D7\u6B64\u5F71\u54CD\u3002";
|
|
751
|
+
}
|
|
752
|
+
return "\u83DC\u5355\u6811\u53EF\u8BFB\u4F46\u672A\u5339\u914D\u5230\u8BE5\u5217\u8868\u5165\u53E3\uFF1A\u53EF\u80FD\u662F\u79DF\u6237\u6539\u4E86\u83DC\u5355\u540D\uFF0C\u6216\u8BE5\u529F\u80FD\u672A\u542F\u7528\u3002\u53EF\u8FD0\u884C ehr.recruit.context.resolve \u67E5\u770B targets / warn \u5B9A\u4F4D\u3002";
|
|
753
|
+
}
|
|
754
|
+
function describeTargets(cache) {
|
|
755
|
+
const lists = cache?.lists || {};
|
|
756
|
+
const targets = {};
|
|
757
|
+
for (const key of ["talent", "demand", "position", "entry", "offer", "interview", "candidate", "dict", "biz_config"]) {
|
|
758
|
+
targets[key] = !!lists[key];
|
|
759
|
+
}
|
|
760
|
+
targets.all_search = Array.isArray(lists.all_search) && lists.all_search.length > 0;
|
|
761
|
+
targets.pages = Array.isArray(lists.pages) && lists.pages.length > 0;
|
|
762
|
+
return targets;
|
|
763
|
+
}
|
|
764
|
+
function toCacheMeta(cache, source, savedAt, persisted = true) {
|
|
765
|
+
const saved = persisted ? Number(savedAt || cache?.savedAt || 0) || (source === "rebuild" ? Date.now() : 0) : 0;
|
|
766
|
+
return {
|
|
767
|
+
hit: source !== "rebuild",
|
|
768
|
+
source,
|
|
769
|
+
persisted,
|
|
770
|
+
...saved > 0 ? { savedAt: saved, ageMs: srcAge(saved, source) } : {},
|
|
771
|
+
degraded: Array.isArray(cache?.degraded) ? cache.degraded : [],
|
|
772
|
+
warn: Array.isArray(cache?.warn) ? cache.warn : [],
|
|
773
|
+
...cache?.menuShape ? { menuShape: String(cache.menuShape) } : {},
|
|
774
|
+
targets: describeTargets(cache)
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
function srcAge(saved, source) {
|
|
778
|
+
return source === "rebuild" ? 0 : Math.max(0, Date.now() - saved);
|
|
779
|
+
}
|
|
711
780
|
function createRecruitContextLoader() {
|
|
712
781
|
const memo = /* @__PURE__ */ new Map();
|
|
782
|
+
let last = null;
|
|
713
783
|
async function load(host) {
|
|
714
784
|
const session = await host.getSession();
|
|
715
785
|
const baseUrl = session.baseUrl.replace(/\/+$/, "");
|
|
716
786
|
const memoKey = baseUrl;
|
|
717
|
-
|
|
718
|
-
if (cached)
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
const files = readdirSync(dir).filter((file) => file.endsWith(".json") && !file.startsWith("_"));
|
|
725
|
-
if (files.length === 1) {
|
|
726
|
-
appId = files[0].replace(/\.json$/, "");
|
|
727
|
-
diskCache = JSON.parse(readFileSync(join(dir, files[0]), "utf8"));
|
|
728
|
-
}
|
|
787
|
+
const cached = memo.get(memoKey);
|
|
788
|
+
if (cached) {
|
|
789
|
+
const memoAge = Date.now() - Number(cached.savedAt || 0);
|
|
790
|
+
const memoUsable = Number(cached.savedAt || 0) > 0 && memoAge <= recruitCacheTtlMs() && !(Array.isArray(cached.degraded) && cached.degraded.length) && hasCriticalFields(cached);
|
|
791
|
+
if (memoUsable) {
|
|
792
|
+
last = toCacheMeta(cached, "memo", cached.savedAt, !isXiaoECloudRuntime());
|
|
793
|
+
return cached;
|
|
729
794
|
}
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
if (diskCache && diskCache.cacheVersion === RECRUIT_CACHE_VERSION && hasCriticalFields(diskCache)) {
|
|
733
|
-
memo.set(memoKey, diskCache);
|
|
734
|
-
return diskCache;
|
|
795
|
+
memo.delete(memoKey);
|
|
735
796
|
}
|
|
797
|
+
const cloudRuntime = isXiaoECloudRuntime();
|
|
736
798
|
const gate = await host.request({
|
|
737
799
|
path: "/api/bs/ebuilder/app/tags/getAppIds",
|
|
738
800
|
query: { tag: RECRUIT_APP_TAG }
|
|
@@ -744,7 +806,23 @@ function createRecruitContextLoader() {
|
|
|
744
806
|
"\u5F53\u524D\u79DF\u6237\u672A\u5B89\u88C5\u62DB\u8058\u670D\u52A1\uFF08weaver-recruit-service\uFF09\uFF0C\u65E0\u6CD5\u4F7F\u7528\u62DB\u8058\u80FD\u529B\u3002\u8BF7\u5148\u5728 E10 \u5E94\u7528\u5E02\u573A\u5B89\u88C5\u300C\u62DB\u8058\u300D\u5E94\u7528\u3002"
|
|
745
807
|
);
|
|
746
808
|
}
|
|
747
|
-
appId = String(appIds[0]);
|
|
809
|
+
const appId = String(appIds[0]);
|
|
810
|
+
if (!cloudRuntime) {
|
|
811
|
+
try {
|
|
812
|
+
const file = join(cacheDirFor(baseUrl), `${appId}.json`);
|
|
813
|
+
if (existsSync(file)) {
|
|
814
|
+
const candidate = JSON.parse(readFileSync(file, "utf8"));
|
|
815
|
+
const savedAt = Number(candidate?.savedAt || 0);
|
|
816
|
+
const fresh = savedAt > 0 && Date.now() - savedAt <= recruitCacheTtlMs();
|
|
817
|
+
if (candidate && candidate.cacheVersion === RECRUIT_CACHE_VERSION && fresh && hasCriticalFields(candidate)) {
|
|
818
|
+
memo.set(memoKey, candidate);
|
|
819
|
+
last = toCacheMeta(candidate, "disk", savedAt);
|
|
820
|
+
return candidate;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
} catch {
|
|
824
|
+
}
|
|
825
|
+
}
|
|
748
826
|
const snapshot = readContextSnapshot(baseUrl);
|
|
749
827
|
if (snapshot && snapshot.appId === appId && !process.env.E10_RS_NO_CTX_SNAPSHOT) {
|
|
750
828
|
let tagStillMatches = false;
|
|
@@ -759,38 +837,65 @@ function createRecruitContextLoader() {
|
|
|
759
837
|
tagStillMatches = false;
|
|
760
838
|
}
|
|
761
839
|
if (tagStillMatches) {
|
|
762
|
-
const adopted = { ...snapshot.resolved, cacheVersion: RECRUIT_CACHE_VERSION };
|
|
840
|
+
const adopted = { ...snapshot.resolved, cacheVersion: RECRUIT_CACHE_VERSION, savedAt: Date.now() };
|
|
763
841
|
persistContextCache(baseUrl, appId, adopted);
|
|
764
842
|
memo.set(memoKey, adopted);
|
|
843
|
+
last = toCacheMeta(adopted, "snapshot", adopted.savedAt);
|
|
765
844
|
return adopted;
|
|
766
845
|
}
|
|
767
846
|
}
|
|
768
847
|
const resolved = await resolveRecruitEnv(host, appId);
|
|
848
|
+
const degradedNow = Array.isArray(resolved.degraded) && resolved.degraded.length > 0;
|
|
849
|
+
const persisted = !degradedNow && !cloudRuntime;
|
|
769
850
|
persistContextCache(baseUrl, appId, { ...resolved, cacheVersion: RECRUIT_CACHE_VERSION });
|
|
770
851
|
writeContextSnapshot(baseUrl, appId, resolved);
|
|
771
|
-
|
|
772
|
-
|
|
852
|
+
const withStamp = { ...resolved, savedAt: Date.now() };
|
|
853
|
+
if (!degradedNow) memo.set(memoKey, withStamp);
|
|
854
|
+
last = toCacheMeta(withStamp, "rebuild", withStamp.savedAt, persisted);
|
|
855
|
+
return withStamp;
|
|
773
856
|
}
|
|
774
|
-
return { load };
|
|
857
|
+
return { load, lastMeta: () => last };
|
|
775
858
|
}
|
|
776
859
|
function persistContextCache(baseUrl, appId, cache) {
|
|
860
|
+
if (Array.isArray(cache?.degraded) && cache.degraded.length) {
|
|
861
|
+
if (process.env.WEAVER_CLI_DEBUG_CACHE) {
|
|
862
|
+
console.error("[recruit-context] \u89E3\u6790\u5B58\u5728\u81F4\u547D\u964D\u7EA7\uFF08", cache.degraded.join(","), "\uFF09\uFF0C\u672C\u6B21\u4E0D\u843D\u76D8\uFF0C\u4E0B\u6B21\u8C03\u7528\u5C06\u5168\u91CF\u91CD\u5EFA");
|
|
863
|
+
}
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
if (process.env.WEAVER_CLI_DEBUG_CACHE && Array.isArray(cache?.warn) && cache.warn.length) {
|
|
867
|
+
console.error("[recruit-context] \u975E\u81F4\u547D\u63D0\u793A\uFF08", cache.warn.join(","), "\uFF09menuShape=", String(cache.menuShape || ""), "\uFF0C\u7167\u5E38\u843D\u76D8");
|
|
868
|
+
}
|
|
869
|
+
if (isXiaoECloudRuntime()) return;
|
|
870
|
+
let tmp = "";
|
|
777
871
|
try {
|
|
778
872
|
const dir = cacheDirFor(baseUrl);
|
|
779
873
|
mkdirSync(dir, { recursive: true });
|
|
874
|
+
const file = join(dir, `${appId}.json`);
|
|
875
|
+
tmp = `${file}.${process.pid}.${randHex6()}.tmp`;
|
|
780
876
|
writeFileSync(
|
|
781
|
-
|
|
877
|
+
tmp,
|
|
782
878
|
JSON.stringify({
|
|
783
879
|
__meta__: {
|
|
784
880
|
capturedAt: (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").substring(0, 19),
|
|
785
881
|
note: "recruit-ops \u73AF\u5883\u53C2\u6570\u7F13\u5B58\uFF08weaver-work-cli \u8FD0\u884C\u65F6\u89E3\u6790\u4EA7\u7269\uFF0C\u4E0D\u542B\u8BA4\u8BC1\u5B57\u6BB5\uFF09"
|
|
786
882
|
},
|
|
787
883
|
envKey: `${dir.split(/[\\/]/).pop()}|${appId}`,
|
|
884
|
+
...cache,
|
|
788
885
|
cacheVersion: RECRUIT_CACHE_VERSION,
|
|
789
|
-
...cache
|
|
886
|
+
// 🔴 savedAt 必须在 ...cache 之后:防止调用方携带旧 savedAt 把新写入标成过期
|
|
887
|
+
savedAt: Date.now()
|
|
790
888
|
}, null, 2),
|
|
791
889
|
"utf8"
|
|
792
890
|
);
|
|
891
|
+
renameSync(tmp, file);
|
|
793
892
|
} catch (error) {
|
|
893
|
+
if (tmp) {
|
|
894
|
+
try {
|
|
895
|
+
unlinkSync(tmp);
|
|
896
|
+
} catch {
|
|
897
|
+
}
|
|
898
|
+
}
|
|
794
899
|
if (process.env.WEAVER_CLI_DEBUG_CACHE) {
|
|
795
900
|
console.error("[recruit-context] \u7F13\u5B58\u843D\u76D8\u5931\u8D25:", error instanceof Error ? error.message : String(error));
|
|
796
901
|
}
|
|
@@ -909,11 +1014,25 @@ var candidateSearch = {
|
|
|
909
1014
|
const talentList = cache.lists.talent;
|
|
910
1015
|
const talentObjId = cache.forms.talent_pool?.objId;
|
|
911
1016
|
if (!talentList?.listId || !talentObjId) {
|
|
912
|
-
throw new RecruitContextError("recruit_context_missing",
|
|
1017
|
+
throw new RecruitContextError("recruit_context_missing", `\u5F53\u524D\u73AF\u5883\u672A\u89E3\u6790\u5230\u300C\u4EBA\u624D\u5E93\u300D\u5217\u8868\u5165\u53E3\uFF0C\u65E0\u6CD5\u641C\u7D22\u4EBA\u624D\u3002${listUnavailableHint(cache)}`, "permission");
|
|
913
1018
|
}
|
|
914
1019
|
const fields = cache.fields[talentObjId] || {};
|
|
915
|
-
const
|
|
916
|
-
const
|
|
1020
|
+
const nameKey = fields.candidate_name || fields.name;
|
|
1021
|
+
const mobileKey = fields.telephone;
|
|
1022
|
+
if (args.name && !nameKey) {
|
|
1023
|
+
throw new RecruitContextError(
|
|
1024
|
+
"recruit_field_missing",
|
|
1025
|
+
"\u4EBA\u624D\u5E93\u8868\u5355\u672A\u89E3\u6790\u5230\u300C\u59D3\u540D\u300D\u5B57\u6BB5\uFF08candidate_name/name\uFF09\uFF0C\u65E0\u6CD5\u6309\u59D3\u540D\u641C\u7D22\uFF1B\u53EF\u6539\u7528\u624B\u673A\u53F7\u641C\u7D22\u3002"
|
|
1026
|
+
);
|
|
1027
|
+
}
|
|
1028
|
+
if (args.mobile && !mobileKey) {
|
|
1029
|
+
throw new RecruitContextError(
|
|
1030
|
+
"recruit_field_missing",
|
|
1031
|
+
"\u4EBA\u624D\u5E93\u8868\u5355\u672A\u89E3\u6790\u5230\u300C\u624B\u673A\u53F7\u300D\u5B57\u6BB5\uFF08telephone\uFF09\uFF0C\u65E0\u6CD5\u6309\u624B\u673A\u53F7\u641C\u7D22\uFF1B\u53EF\u6539\u7528\u59D3\u540D\u641C\u7D22\u3002"
|
|
1032
|
+
);
|
|
1033
|
+
}
|
|
1034
|
+
const nameField = nameKey ? "field_" + nameKey : "";
|
|
1035
|
+
const mobileField = mobileKey ? "field_" + mobileKey : "";
|
|
917
1036
|
const conditions = {};
|
|
918
1037
|
if (args.name) conditions[nameField] = [{ [nameField]: args.name, [`${nameField}_condition_type`]: "like" }];
|
|
919
1038
|
if (args.mobile) conditions[mobileField] = [{ [mobileField]: args.mobile, [`${mobileField}_condition_type`]: "like" }];
|
|
@@ -1005,7 +1124,8 @@ var candidateList = {
|
|
|
1005
1124
|
if (!listParam?.listId) {
|
|
1006
1125
|
throw new RecruitContextError(
|
|
1007
1126
|
"recruit_list_unavailable",
|
|
1008
|
-
`\
|
|
1127
|
+
`\u672A\u5B9A\u4F4D\u5230\u300C${listType.title}\u300D\u7684\u5217\u8868\u5165\u53E3\uFF0C\u65E0\u6CD5\u67E5\u8BE2\u3002${listUnavailableHint(cache)}`,
|
|
1128
|
+
"permission"
|
|
1009
1129
|
);
|
|
1010
1130
|
}
|
|
1011
1131
|
const formObjId = cache.forms[listType.formType]?.objId;
|
|
@@ -1138,7 +1258,8 @@ var interviewFeedbackTodo = {
|
|
|
1138
1258
|
if (!listParam?.listId || !form?.objId) {
|
|
1139
1259
|
throw new RecruitContextError(
|
|
1140
1260
|
"recruit_list_unavailable",
|
|
1141
|
-
|
|
1261
|
+
`\u672A\u5B9A\u4F4D\u5230\u300C\u9762\u8BD5\u7BA1\u7406\u300D\u7684\u5217\u8868\u5165\u53E3\uFF0C\u65E0\u6CD5\u67E5\u8BE2\u5F85\u529E\u3002${listUnavailableHint(cache)}`,
|
|
1262
|
+
"permission"
|
|
1142
1263
|
);
|
|
1143
1264
|
}
|
|
1144
1265
|
const pageSize = toNumber(args.pageSize, "pageSize") ?? 200;
|
|
@@ -1485,6 +1606,7 @@ export {
|
|
|
1485
1606
|
SCHEMA_ID_LIST,
|
|
1486
1607
|
SCHEMA_STRING_LIST,
|
|
1487
1608
|
asObject,
|
|
1609
|
+
toMenuList,
|
|
1488
1610
|
assertNoForbiddenKeys,
|
|
1489
1611
|
assertMonth,
|
|
1490
1612
|
toNumber,
|
|
@@ -1501,8 +1623,10 @@ export {
|
|
|
1501
1623
|
EHR_PAGES,
|
|
1502
1624
|
ehrPageUrl,
|
|
1503
1625
|
addDays,
|
|
1626
|
+
isSelfTenant,
|
|
1504
1627
|
LIST_TYPES,
|
|
1505
1628
|
namesOf,
|
|
1629
|
+
RecruitContextError,
|
|
1506
1630
|
createRecruitContextLoader,
|
|
1507
1631
|
buildListBody,
|
|
1508
1632
|
fetchListRows,
|