weaver-work-cli 0.1.73 → 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-THZV4ND4.js → archive-OZJ6PYUR.js} +14 -9
- package/dist/chunks/{archive-oa-PQ23OLEV.js → archive-oa-BHL5RK2F.js} +10 -7
- package/dist/chunks/{asset-RGPROZYH.js → asset-HKRFRQR2.js} +10 -7
- package/dist/chunks/{asset-idle-Z2PDX7NA.js → asset-idle-GGIR4KE7.js} +7 -4
- package/dist/chunks/{attachment-content-R3RPVOYE.js → attachment-content-4OV65NK5.js} +3 -3
- package/dist/chunks/{blog-7U3QZPIF.js → blog-HYDP4DV3.js} +10 -7
- package/dist/chunks/{caizhilian-3AB42GCV.js → caizhilian-JS4RQZ6Z.js} +10 -7
- package/dist/chunks/{calendar-KINM64E4.js → calendar-SWRY4DIT.js} +10 -7
- package/dist/chunks/chunk-257JXJGD.js +30 -0
- package/dist/chunks/{chunk-LLCMOZ5L.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-TV46Q4NY.js → chunk-4FCBEWNB.js} +74 -68
- package/dist/chunks/{chunk-NUP4RYZK.js → chunk-5D2V7ZAN.js} +2 -2
- package/dist/chunks/{chunk-DRUND2PJ.js → chunk-5QUTQHXF.js} +225 -152
- package/dist/chunks/{chunk-4BXR6CNB.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-2CHGUYMG.js → chunk-BSR5TM7U.js} +4 -4
- package/dist/chunks/{chunk-4I26YMBY.js → chunk-ERZY6GYL.js} +7 -3
- package/dist/chunks/{chunk-4YXAK6OA.js → chunk-FEZK536Z.js} +12 -7
- package/dist/chunks/{chunk-F4HM25K4.js → chunk-I6NOHKEK.js} +1 -1
- package/dist/chunks/{chunk-JMJBPP4B.js → chunk-J7FAAHWH.js} +2 -2
- package/dist/chunks/{chunk-54ST55IJ.js → chunk-JJONWB5N.js} +11 -1
- package/dist/chunks/chunk-JOY3HZXL.js +467 -0
- package/dist/chunks/{chunk-GWJLAF6B.js → chunk-JWF2R6EQ.js} +0 -462
- package/dist/chunks/{chunk-BWYVS62Z.js → chunk-KEA4XQPO.js} +4 -4
- package/dist/chunks/chunk-KINXYJXM.js +205 -0
- package/dist/chunks/{chunk-IBSJJGXL.js → chunk-KWJEICD4.js} +2 -2
- package/dist/chunks/{chunk-GAMGDNTF.js → chunk-LJI4N6FV.js} +1 -1
- package/dist/chunks/{chunk-IU6UB2TD.js → chunk-MXCRKXOP.js} +48 -6
- package/dist/chunks/{chunk-PAFOLIYQ.js → chunk-NWYHCZTY.js} +1 -1
- package/dist/chunks/chunk-OJ4JPD25.js +428 -0
- package/dist/chunks/{chunk-L7TYG5SN.js → chunk-OQCK5SAU.js} +2 -2
- package/dist/chunks/chunk-PG5YSNYY.js +1166 -0
- package/dist/chunks/{chunk-XZBYRYWX.js → chunk-QJWVYOOV.js} +2 -2
- package/dist/chunks/{chunk-AMAPQVBT.js → chunk-QVKRNL7L.js} +286 -305
- package/dist/chunks/chunk-SU6IJD6D.js +49 -0
- package/dist/chunks/{chunk-ZWLWXHJC.js → chunk-TA2RBUTH.js} +2 -2
- package/dist/chunks/{chunk-6HT73VOI.js → chunk-U6Y32KEV.js} +2 -2
- package/dist/chunks/chunk-UUJK76HV.js +209 -0
- package/dist/chunks/{chunk-R3MK2RBN.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-2XED2FKY.js → chunk-ZUB4M4N3.js} +38 -36
- package/dist/chunks/{chunk-7QFVXP2X.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-VPAR7E6F.js → conflict-5BKCDV2F.js} +2 -2
- package/dist/chunks/{contract-DDXAO2DZ.js → contract-WI23OXVC.js} +12446 -5964
- package/dist/chunks/{cowork-34QCHMDD.js → cowork-DZBBVNMQ.js} +11 -8
- package/dist/chunks/{create-flow-52PU2OBI.js → create-flow-7ZRBRKX7.js} +6 -6
- package/dist/chunks/{data-CLQ62QGD.js → data-PAZVE6QE.js} +6 -3
- package/dist/chunks/{ebuilder-form-W5R7Q22S.js → ebuilder-form-5SQXIGXN.js} +9 -6
- package/dist/chunks/{ehr-LCNAVMK5.js → ehr-CX5F4ZAU.js} +23 -16
- package/dist/chunks/{entry-mode-6Z3ZV3DE.js → entry-mode-I2BYNONZ.js} +3 -3
- package/dist/chunks/{env-RDKWAARB.js → env-ZAQZ7EHN.js} +2 -2
- package/dist/chunks/{esb-ANKPUU65.js → esb-DQTXDIBF.js} +10 -7
- package/dist/chunks/{factory-434B7RAT.js → factory-XRI6KZ7H.js} +1 -1
- package/dist/chunks/{fna-AKBSG5HI.js → fna-FK6HQVJL.js} +13 -8
- package/dist/chunks/{group-chat-PROTW22R.js → group-chat-MLWNYM2P.js} +3 -3
- package/dist/chunks/{host-WO4L5G5I.js → host-3EPREGXS.js} +6 -3
- package/dist/chunks/{host-XIYG4F4B.js → host-J74JGYAW.js} +6 -3
- package/dist/chunks/{host-7FJW4E7R.js → host-KUMU3DDK.js} +6 -3
- package/dist/chunks/{host-5R2SNFWD.js → host-MEC4VQZA.js} +6 -3
- package/dist/chunks/{host-PDJAKCT7.js → host-T6NNQGVZ.js} +6 -3
- package/dist/chunks/{host-CGXUFQO4.js → host-VI7Q45PM.js} +6 -3
- package/dist/chunks/{hrm-WGODDTEH.js → hrm-KKVAW4P5.js} +8 -5
- package/dist/chunks/{im-YKTKAJU3.js → im-47CIWQNL.js} +7 -4
- package/dist/chunks/{invoice-PVYCCCVM.js → invoice-CDYRBNIG.js} +21 -16
- package/dist/chunks/{jiuchuanhui-RKOQW7BY.js → jiuchuanhui-M7QTRHZK.js} +17 -10
- package/dist/chunks/{lazy-dispatch-DW45AFQ5.js → lazy-dispatch-FKQJZFI5.js} +22 -8
- package/dist/chunks/{mail-BNB5S4NW.js → mail-NRBS5N6Y.js} +11 -8
- package/dist/chunks/{meeting-O2KDJH66.js → meeting-WC5LD3IO.js} +22 -18
- package/dist/chunks/{minute-doc-JUCG56GY.js → minute-doc-OQUMDTKG.js} +4 -4
- package/dist/chunks/{okr-LWFGWOE7.js → okr-EHKSKMPL.js} +10 -7
- package/dist/chunks/{operations-532PN5OB.js → operations-V5VM5MS2.js} +7 -4
- package/dist/chunks/{performance-7W5COCFU.js → performance-ZJADXJPN.js} +6 -3
- package/dist/chunks/{plan-ZVY3IYTL.js → plan-OTDNBDJ7.js} +10 -7
- package/dist/chunks/{project-SA62B7MH.js → project-4XVBQ3HX.js} +10 -7
- package/dist/chunks/{reception-NGIONPQ3.js → reception-3FAHOOH7.js} +8 -4
- package/dist/chunks/{recruit-stage-WOSN6MGP.js → recruit-stage-3WTVWW2K.js} +199 -74
- package/dist/chunks/register-SQOPIR2G.js +16 -0
- package/dist/chunks/{registry-R72GWXOG.js → registry-F4YFZLOD.js} +7 -3
- package/dist/chunks/registry-NBTBXR4L.js +30 -0
- package/dist/chunks/{registry-N7P3W2RD.js → registry-TJGCVRCW.js} +7 -4
- package/dist/chunks/{room-recommend-KCGIVUFR.js → room-recommend-KL62XB2Y.js} +4 -4
- package/dist/chunks/root-YZG2TS5W.js +16 -0
- package/dist/chunks/{schedule-6UP27HQ4.js → schedule-XOISYUPB.js} +4 -4
- package/dist/chunks/{smart-extract-DDOQSPRB.js → smart-extract-UYGNV3BM.js} +15 -7
- package/dist/chunks/update-AV5VOXGY.js +13 -0
- package/dist/chunks/{workflow-V5ALD6QZ.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 +8 -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 +7 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +7 -6
- package/dist/shortcuts/ehr/operations/recruit.js +318 -248
- package/dist/shortcuts/ehr/operations/shared.js +22 -2
- 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/manifest.js +2 -2
- package/dist/shortcuts/recruit-stage/context.js +10 -2
- package/dist/shortcuts/recruit-stage/index.js +16 -3
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +17 -8
- package/dist/shortcuts/recruit-stage/operations/list.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +178 -35
- package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +4 -2
- package/dist/shortcuts/recruit-stage/shared.js +27 -53
- 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 +8 -2
- 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-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-recruit-stage/SKILL.md +188 -169
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +55 -37
- package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +3 -0
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +168 -35
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +175 -7
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +3 -0
- 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 +4 -0
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +12 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +16 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +10 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +6 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +31 -23
- 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 +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +16 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +147 -34
- package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +16 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +4 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +6 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +24 -15
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +7 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +8 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +5 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +5 -1
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +41 -28
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +23 -26
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +32 -30
- 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-ICP53R52.js +0 -2849
- package/dist/chunks/registry-RIQ67ZT7.js +0 -27
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
isXiaoECloudRuntime
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QVKRNL7L.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
8
|
} from "./chunk-UG5G54VL.js";
|
|
@@ -69,16 +69,26 @@ function asObject(value) {
|
|
|
69
69
|
}
|
|
70
70
|
return value;
|
|
71
71
|
}
|
|
72
|
+
var MENU_CONTAINER_KEYS = ["cusAppMenus", "menus", "allMenus", "data", "list"];
|
|
72
73
|
function toMenuList(value) {
|
|
73
74
|
if (Array.isArray(value)) return value;
|
|
74
75
|
if (value && typeof value === "object") {
|
|
75
76
|
const obj = value;
|
|
76
|
-
for (const key of
|
|
77
|
+
for (const key of MENU_CONTAINER_KEYS) {
|
|
77
78
|
if (Array.isArray(obj[key])) return obj[key];
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
return [];
|
|
81
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
|
+
}
|
|
82
92
|
function assertNoForbiddenKeys(input) {
|
|
83
93
|
for (const key of Object.keys(input)) {
|
|
84
94
|
if (FORBIDDEN_KEYS.has(key)) {
|
|
@@ -263,7 +273,7 @@ function addDays(date, delta) {
|
|
|
263
273
|
|
|
264
274
|
// src/shortcuts/ehr/operations/recruit.ts
|
|
265
275
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
266
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
276
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
267
277
|
import { homedir } from "node:os";
|
|
268
278
|
import { join, resolve } from "node:path";
|
|
269
279
|
|
|
@@ -297,8 +307,12 @@ function isSelfTenant(tenantKey) {
|
|
|
297
307
|
const key = String(tenantKey || "").trim();
|
|
298
308
|
return !!key && SELF_TENANT_KEYS.has(key);
|
|
299
309
|
}
|
|
300
|
-
var RECRUIT_CACHE_VERSION =
|
|
301
|
-
var
|
|
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
|
+
}
|
|
302
316
|
var RECRUIT_CRITICAL_FORMS = /* @__PURE__ */ new Set(["position_manage", "talent_pool", "interview_plan"]);
|
|
303
317
|
var RECRUIT_CRITICAL_FORM_LABELS = {
|
|
304
318
|
position_manage: "\u62DB\u8058\u804C\u4F4D",
|
|
@@ -313,6 +327,8 @@ function hasCriticalFields(cache) {
|
|
|
313
327
|
if (!Object.keys(fmap).length) return false;
|
|
314
328
|
}
|
|
315
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;
|
|
316
332
|
return true;
|
|
317
333
|
}
|
|
318
334
|
var RECRUIT_TAGS = {
|
|
@@ -385,7 +401,6 @@ function cacheDirFor(baseUrl) {
|
|
|
385
401
|
const home = process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(homedir(), ".weaver-work-cli");
|
|
386
402
|
return join(home, "env-cache", "recruit-ops", host);
|
|
387
403
|
}
|
|
388
|
-
var CONTEXT_SNAPSHOT_TTL_MS = 12 * 60 * 60 * 1e3;
|
|
389
404
|
function snapshotPathFor(baseUrl) {
|
|
390
405
|
const url = new URL(baseUrl);
|
|
391
406
|
const host = url.hostname + (url.port ? `_${url.port}` : "");
|
|
@@ -396,7 +411,7 @@ function readContextSnapshot(baseUrl) {
|
|
|
396
411
|
try {
|
|
397
412
|
const raw = JSON.parse(readFileSync(snapshotPathFor(baseUrl), "utf8"));
|
|
398
413
|
if (!raw?.at || raw.cacheVersion !== RECRUIT_CACHE_VERSION) return null;
|
|
399
|
-
if (Date.now() - raw.at >
|
|
414
|
+
if (Date.now() - raw.at > recruitCacheTtlMs()) return null;
|
|
400
415
|
if (!raw.resolved || !hasCriticalFields({ ...raw.resolved, appId: raw.appId })) return null;
|
|
401
416
|
return raw;
|
|
402
417
|
} catch {
|
|
@@ -435,9 +450,12 @@ function isPlainId(value) {
|
|
|
435
450
|
return value != null && /^\d+$/.test(String(value).trim());
|
|
436
451
|
}
|
|
437
452
|
var RecruitContextError = class extends Error {
|
|
453
|
+
type;
|
|
438
454
|
subtype;
|
|
439
|
-
|
|
455
|
+
retryable = false;
|
|
456
|
+
constructor(subtype, message, type = "upstream") {
|
|
440
457
|
super(message);
|
|
458
|
+
this.type = type;
|
|
441
459
|
this.subtype = subtype;
|
|
442
460
|
}
|
|
443
461
|
};
|
|
@@ -487,8 +505,33 @@ async function fetchFormFields(host, appId, objId) {
|
|
|
487
505
|
}
|
|
488
506
|
return { fmap, omap };
|
|
489
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
|
+
}
|
|
490
532
|
async function resolveRecruitEnv(host, appId) {
|
|
491
533
|
const degraded = [];
|
|
534
|
+
const warn = [];
|
|
492
535
|
const forms = {};
|
|
493
536
|
let tenantKey = "";
|
|
494
537
|
const tagEntries = Object.entries(RECRUIT_TAGS);
|
|
@@ -524,16 +567,18 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
524
567
|
}
|
|
525
568
|
};
|
|
526
569
|
let menuFailed = false;
|
|
570
|
+
let menuShape = "unavailable";
|
|
527
571
|
try {
|
|
528
572
|
const menuResponse = await host.request({
|
|
529
573
|
path: "/api/cusapp/app/allMenus",
|
|
530
574
|
query: { isFront: 1, appId, terminalType: "PC" }
|
|
531
575
|
});
|
|
576
|
+
menuShape = menuShapeOf(menuResponse?.data);
|
|
532
577
|
walk(menuResponse?.data);
|
|
533
578
|
} catch {
|
|
534
579
|
menuFailed = true;
|
|
535
580
|
}
|
|
536
|
-
if (menuFailed || !flat.length)
|
|
581
|
+
if (menuFailed || !flat.length) warn.push("menus");
|
|
537
582
|
const searchMenus = [];
|
|
538
583
|
const pages = [];
|
|
539
584
|
for (const node of flat) {
|
|
@@ -559,124 +604,87 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
559
604
|
}));
|
|
560
605
|
const dictByName = {};
|
|
561
606
|
const dictRaw = [];
|
|
562
|
-
const dictMenu = searchMenus.find((m) => (m.menuName || "").trim() === "\u6570\u636E\u5B57\u5178") || null;
|
|
563
607
|
const dictObjId = forms.dictionary?.objId || "";
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
isShareToMe: 0,
|
|
583
|
-
filterCondition: {},
|
|
584
|
-
cusMenuId: dictMenu.cusMenuId,
|
|
585
|
-
urlPageTitle: "\u6570\u636E\u5B57\u5178",
|
|
586
|
-
menuName: "\u6570\u636E\u5B57\u5178"
|
|
587
|
-
},
|
|
588
|
-
headers: { ebBusinessId: dictMenu.listId }
|
|
589
|
-
});
|
|
590
|
-
let pageNo = 1;
|
|
591
|
-
let reachedEnd = false;
|
|
592
|
-
while (!reachedEnd) {
|
|
593
|
-
const batchPages = Array.from({ length: CONCURRENCY }, (_, i) => pageNo + i);
|
|
594
|
-
const responses = await Promise.all(batchPages.map((p) => fetchDictPage(p)));
|
|
595
|
-
for (const response of responses) {
|
|
596
|
-
const rows = response?.data?.data || [];
|
|
597
|
-
for (const row of rows) {
|
|
598
|
-
const name = row.selection_name;
|
|
599
|
-
const optionId = row.form_data_id;
|
|
600
|
-
if (name && optionId) {
|
|
601
|
-
(dictByName[String(name)] ||= []).push(String(optionId));
|
|
602
|
-
dictRaw.push({ selection_name: String(name), option_id: String(optionId), dict_type: row.dict_type, browser_key: row.browser_key });
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
if (rows.length < size) {
|
|
606
|
-
reachedEnd = true;
|
|
607
|
-
break;
|
|
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;
|
|
617
|
+
if (name && optionId) {
|
|
618
|
+
(dictByName[String(name)] ||= []).push(String(optionId));
|
|
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
|
+
});
|
|
608
626
|
}
|
|
609
627
|
}
|
|
610
|
-
|
|
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));
|
|
631
|
+
}
|
|
632
|
+
degraded.push("dict");
|
|
611
633
|
}
|
|
612
|
-
|
|
613
|
-
degraded.push("dict");
|
|
634
|
+
if (!Object.keys(dictByName).length) degraded.push("dict");
|
|
614
635
|
}
|
|
615
|
-
|
|
616
|
-
}
|
|
636
|
+
};
|
|
617
637
|
let ebdDetailPageId = "";
|
|
618
638
|
let selfUse = "0";
|
|
619
639
|
const bizConfig = forms.biz_config || { objId: "", formId: "", objName: "" };
|
|
620
|
-
const
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
bizEnd = true;
|
|
660
|
-
break;
|
|
661
|
-
}
|
|
662
|
-
for (const row of rows) {
|
|
663
|
-
if (String(row.config_key || "") === "28" && row.config) {
|
|
664
|
-
const match = String(row.config).match(/\/sp\/ebdpage\/view\/(\d+)/);
|
|
665
|
-
if (match) ebdDetailPageId = match[1];
|
|
666
|
-
}
|
|
667
|
-
if (String(row.config_key || "") === "-9999" && String(row.config) === "1") selfUse = "1";
|
|
668
|
-
}
|
|
669
|
-
if (rows.length < bizSize) {
|
|
670
|
-
bizEnd = true;
|
|
671
|
-
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;
|
|
672
679
|
}
|
|
673
680
|
}
|
|
674
|
-
|
|
681
|
+
} catch {
|
|
682
|
+
warn.push(`options:${dataKey}`);
|
|
675
683
|
}
|
|
676
684
|
}
|
|
677
|
-
} catch {
|
|
678
685
|
}
|
|
679
|
-
}
|
|
686
|
+
};
|
|
687
|
+
await Promise.all([loadDict(), loadBizConfig(), loadDsOptions()]);
|
|
680
688
|
if (isSelfTenant(tenantKey)) selfUse = "1";
|
|
681
689
|
if (!ebdDetailPageId) {
|
|
682
690
|
try {
|
|
@@ -693,37 +701,18 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
693
701
|
} catch {
|
|
694
702
|
}
|
|
695
703
|
}
|
|
696
|
-
const options = {};
|
|
697
|
-
for (const [dataKey, logic] of [["recruit_status", "talent_pool"], ["channel", "talent_pool"]]) {
|
|
698
|
-
const entry = forms[logic] || { objId: "", formId: "", objName: "" };
|
|
699
|
-
const fieldId = (fields[entry.objId] || {})[dataKey] || "";
|
|
700
|
-
if (fieldId && entry.objId) {
|
|
701
|
-
try {
|
|
702
|
-
const response = await host.request({
|
|
703
|
-
path: "/api/ebuilder/common/ds/options",
|
|
704
|
-
query: { fieldName: fieldId, objId: entry.objId, sourceType: "FORM", groupId: appId }
|
|
705
|
-
});
|
|
706
|
-
if (Array.isArray(response?.data)) {
|
|
707
|
-
options[dataKey] = {};
|
|
708
|
-
for (const option of response.data) {
|
|
709
|
-
if (option?.id) options[dataKey][String(option.id)] = option.name;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
} catch {
|
|
713
|
-
degraded.push(`options:${dataKey}`);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
704
|
const lists = {
|
|
718
705
|
talent: null,
|
|
719
706
|
demand: null,
|
|
720
707
|
position: null,
|
|
721
708
|
entry: null,
|
|
722
709
|
offer: null,
|
|
710
|
+
// dict / biz_config 仅作为菜单元数据保留(供 describeTargets 诊断);
|
|
711
|
+
// 字典与业务配置的实际读取已改走 dataset/v2 B 通道,不再依赖这两个菜单项。
|
|
723
712
|
interview: null,
|
|
724
713
|
candidate: null,
|
|
725
|
-
dict:
|
|
726
|
-
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,
|
|
727
716
|
all_search: searchMenus,
|
|
728
717
|
pages
|
|
729
718
|
};
|
|
@@ -735,10 +724,16 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
735
724
|
}
|
|
736
725
|
}
|
|
737
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)];
|
|
738
731
|
return {
|
|
739
732
|
appId,
|
|
740
733
|
tenantKey,
|
|
741
|
-
degraded,
|
|
734
|
+
degraded: dedupe(degraded),
|
|
735
|
+
warn: dedupe(warn),
|
|
736
|
+
menuShape,
|
|
742
737
|
forms,
|
|
743
738
|
lists,
|
|
744
739
|
fields,
|
|
@@ -749,14 +744,56 @@ async function resolveRecruitEnv(host, appId) {
|
|
|
749
744
|
selfUse
|
|
750
745
|
};
|
|
751
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
|
+
}
|
|
752
780
|
function createRecruitContextLoader() {
|
|
753
781
|
const memo = /* @__PURE__ */ new Map();
|
|
782
|
+
let last = null;
|
|
754
783
|
async function load(host) {
|
|
755
784
|
const session = await host.getSession();
|
|
756
785
|
const baseUrl = session.baseUrl.replace(/\/+$/, "");
|
|
757
786
|
const memoKey = baseUrl;
|
|
758
|
-
|
|
759
|
-
if (cached)
|
|
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;
|
|
794
|
+
}
|
|
795
|
+
memo.delete(memoKey);
|
|
796
|
+
}
|
|
760
797
|
const cloudRuntime = isXiaoECloudRuntime();
|
|
761
798
|
const gate = await host.request({
|
|
762
799
|
path: "/api/bs/ebuilder/app/tags/getAppIds",
|
|
@@ -776,9 +813,10 @@ function createRecruitContextLoader() {
|
|
|
776
813
|
if (existsSync(file)) {
|
|
777
814
|
const candidate = JSON.parse(readFileSync(file, "utf8"));
|
|
778
815
|
const savedAt = Number(candidate?.savedAt || 0);
|
|
779
|
-
const fresh = savedAt > 0 && Date.now() - savedAt <=
|
|
816
|
+
const fresh = savedAt > 0 && Date.now() - savedAt <= recruitCacheTtlMs();
|
|
780
817
|
if (candidate && candidate.cacheVersion === RECRUIT_CACHE_VERSION && fresh && hasCriticalFields(candidate)) {
|
|
781
818
|
memo.set(memoKey, candidate);
|
|
819
|
+
last = toCacheMeta(candidate, "disk", savedAt);
|
|
782
820
|
return candidate;
|
|
783
821
|
}
|
|
784
822
|
}
|
|
@@ -799,33 +837,44 @@ function createRecruitContextLoader() {
|
|
|
799
837
|
tagStillMatches = false;
|
|
800
838
|
}
|
|
801
839
|
if (tagStillMatches) {
|
|
802
|
-
const adopted = { ...snapshot.resolved, cacheVersion: RECRUIT_CACHE_VERSION };
|
|
840
|
+
const adopted = { ...snapshot.resolved, cacheVersion: RECRUIT_CACHE_VERSION, savedAt: Date.now() };
|
|
803
841
|
persistContextCache(baseUrl, appId, adopted);
|
|
804
842
|
memo.set(memoKey, adopted);
|
|
843
|
+
last = toCacheMeta(adopted, "snapshot", adopted.savedAt);
|
|
805
844
|
return adopted;
|
|
806
845
|
}
|
|
807
846
|
}
|
|
808
847
|
const resolved = await resolveRecruitEnv(host, appId);
|
|
848
|
+
const degradedNow = Array.isArray(resolved.degraded) && resolved.degraded.length > 0;
|
|
849
|
+
const persisted = !degradedNow && !cloudRuntime;
|
|
809
850
|
persistContextCache(baseUrl, appId, { ...resolved, cacheVersion: RECRUIT_CACHE_VERSION });
|
|
810
851
|
writeContextSnapshot(baseUrl, appId, resolved);
|
|
811
|
-
|
|
812
|
-
|
|
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;
|
|
813
856
|
}
|
|
814
|
-
return { load };
|
|
857
|
+
return { load, lastMeta: () => last };
|
|
815
858
|
}
|
|
816
859
|
function persistContextCache(baseUrl, appId, cache) {
|
|
817
860
|
if (Array.isArray(cache?.degraded) && cache.degraded.length) {
|
|
818
861
|
if (process.env.WEAVER_CLI_DEBUG_CACHE) {
|
|
819
|
-
console.error("[recruit-context] \u89E3\u6790\u5B58\u5728\u964D\u7EA7\uFF08", cache.degraded.join(","), "\uFF09\uFF0C\u672C\u6B21\u4E0D\u843D\u76D8\uFF0C\u4E0B\u6B21\u8C03\u7528\u5C06\u5168\u91CF\u91CD\u5EFA");
|
|
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");
|
|
820
863
|
}
|
|
821
864
|
return;
|
|
822
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
|
+
}
|
|
823
869
|
if (isXiaoECloudRuntime()) return;
|
|
870
|
+
let tmp = "";
|
|
824
871
|
try {
|
|
825
872
|
const dir = cacheDirFor(baseUrl);
|
|
826
873
|
mkdirSync(dir, { recursive: true });
|
|
874
|
+
const file = join(dir, `${appId}.json`);
|
|
875
|
+
tmp = `${file}.${process.pid}.${randHex6()}.tmp`;
|
|
827
876
|
writeFileSync(
|
|
828
|
-
|
|
877
|
+
tmp,
|
|
829
878
|
JSON.stringify({
|
|
830
879
|
__meta__: {
|
|
831
880
|
capturedAt: (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").substring(0, 19),
|
|
@@ -839,7 +888,14 @@ function persistContextCache(baseUrl, appId, cache) {
|
|
|
839
888
|
}, null, 2),
|
|
840
889
|
"utf8"
|
|
841
890
|
);
|
|
891
|
+
renameSync(tmp, file);
|
|
842
892
|
} catch (error) {
|
|
893
|
+
if (tmp) {
|
|
894
|
+
try {
|
|
895
|
+
unlinkSync(tmp);
|
|
896
|
+
} catch {
|
|
897
|
+
}
|
|
898
|
+
}
|
|
843
899
|
if (process.env.WEAVER_CLI_DEBUG_CACHE) {
|
|
844
900
|
console.error("[recruit-context] \u7F13\u5B58\u843D\u76D8\u5931\u8D25:", error instanceof Error ? error.message : String(error));
|
|
845
901
|
}
|
|
@@ -958,11 +1014,25 @@ var candidateSearch = {
|
|
|
958
1014
|
const talentList = cache.lists.talent;
|
|
959
1015
|
const talentObjId = cache.forms.talent_pool?.objId;
|
|
960
1016
|
if (!talentList?.listId || !talentObjId) {
|
|
961
|
-
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");
|
|
962
1018
|
}
|
|
963
1019
|
const fields = cache.fields[talentObjId] || {};
|
|
964
|
-
const
|
|
965
|
-
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 : "";
|
|
966
1036
|
const conditions = {};
|
|
967
1037
|
if (args.name) conditions[nameField] = [{ [nameField]: args.name, [`${nameField}_condition_type`]: "like" }];
|
|
968
1038
|
if (args.mobile) conditions[mobileField] = [{ [mobileField]: args.mobile, [`${mobileField}_condition_type`]: "like" }];
|
|
@@ -1054,7 +1124,8 @@ var candidateList = {
|
|
|
1054
1124
|
if (!listParam?.listId) {
|
|
1055
1125
|
throw new RecruitContextError(
|
|
1056
1126
|
"recruit_list_unavailable",
|
|
1057
|
-
`\
|
|
1127
|
+
`\u672A\u5B9A\u4F4D\u5230\u300C${listType.title}\u300D\u7684\u5217\u8868\u5165\u53E3\uFF0C\u65E0\u6CD5\u67E5\u8BE2\u3002${listUnavailableHint(cache)}`,
|
|
1128
|
+
"permission"
|
|
1058
1129
|
);
|
|
1059
1130
|
}
|
|
1060
1131
|
const formObjId = cache.forms[listType.formType]?.objId;
|
|
@@ -1187,7 +1258,8 @@ var interviewFeedbackTodo = {
|
|
|
1187
1258
|
if (!listParam?.listId || !form?.objId) {
|
|
1188
1259
|
throw new RecruitContextError(
|
|
1189
1260
|
"recruit_list_unavailable",
|
|
1190
|
-
|
|
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"
|
|
1191
1263
|
);
|
|
1192
1264
|
}
|
|
1193
1265
|
const pageSize = toNumber(args.pageSize, "pageSize") ?? 200;
|
|
@@ -1554,6 +1626,7 @@ export {
|
|
|
1554
1626
|
isSelfTenant,
|
|
1555
1627
|
LIST_TYPES,
|
|
1556
1628
|
namesOf,
|
|
1629
|
+
RecruitContextError,
|
|
1557
1630
|
createRecruitContextLoader,
|
|
1558
1631
|
buildListBody,
|
|
1559
1632
|
fetchListRows,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MXCRKXOP.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE
|
|
17
17
|
} from "./chunk-IZCQU5D5.js";
|
|
18
18
|
import {
|
|
19
19
|
getActiveProfile
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QVKRNL7L.js";
|
|
21
21
|
|
|
22
22
|
// src/shortcuts/im/host.ts
|
|
23
23
|
import { createHash } from "node:crypto";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
|
+
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// src/core/runtime-agent.ts
|
|
5
|
+
var XIAOE_RUNTIME_AGENT_ALIASES = /* @__PURE__ */ new Set([
|
|
6
|
+
"xiaoe",
|
|
7
|
+
"xiaoeclient",
|
|
8
|
+
"\u5C0Fe",
|
|
9
|
+
"\u5C0Fe\u5BA2\u6237\u7AEF",
|
|
10
|
+
"\u667A\u80FD\u5C0Fe",
|
|
11
|
+
"\u667A\u80FD\u5C0Fe\u5BA2\u6237\u7AEF"
|
|
12
|
+
]);
|
|
13
|
+
function normalizeRuntimeAgent(value) {
|
|
14
|
+
if (typeof value !== "string") return "";
|
|
15
|
+
return value.toLowerCase().replace(/[^a-z0-9\p{Script=Han}]+/gu, "");
|
|
16
|
+
}
|
|
17
|
+
function isXiaoERuntimeAgent(value) {
|
|
18
|
+
return XIAOE_RUNTIME_AGENT_ALIASES.has(normalizeRuntimeAgent(value));
|
|
19
|
+
}
|
|
20
|
+
function isXiaoERuntime(options) {
|
|
21
|
+
return isXiaoERuntimeAgent(options?.runtimeAgent);
|
|
22
|
+
}
|
|
23
|
+
function isXiaoEHostEnvironment(env, options = {}) {
|
|
24
|
+
if (isXiaoERuntime(options)) return true;
|
|
25
|
+
if (Object.keys(env).some((key) => key.startsWith("XIAOE_"))) return true;
|
|
26
|
+
const explicitHost = env.WORKBUDDY_AGENT_TYPE?.trim() || env.CODEX_AGENT_TYPE?.trim();
|
|
27
|
+
if (explicitHost) return isXiaoERuntimeAgent(explicitHost);
|
|
28
|
+
if (Object.keys(env).some((key) => key.startsWith("WORKBUDDY_") || key.startsWith("CODEX_"))) return false;
|
|
29
|
+
return isXiaoERuntimeAgent(env.WEAVER_AGENT_TYPE);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
isXiaoERuntimeAgent,
|
|
34
|
+
isXiaoEHostEnvironment
|
|
35
|
+
};
|