weaver-work-cli 0.1.61 → 0.1.63
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/dist/chunks/{archive-S2VKZWQ3.js → archive-BLDYBZDX.js} +5 -4
- package/dist/chunks/{archive-oa-HEDSIUUY.js → archive-oa-3GJ3TWXR.js} +5 -4
- package/dist/chunks/{asset-HYH4W357.js → asset-AFXJN4CK.js} +5 -4
- package/dist/chunks/{asset-idle-N7REBNGL.js → asset-idle-VUJXWGWJ.js} +5 -4
- package/dist/chunks/{attachment-content-VYYA75FR.js → attachment-content-VMJA7NSQ.js} +3 -3
- package/dist/chunks/{blog-SLMZZICV.js → blog-EREB35VU.js} +5 -4
- package/dist/chunks/{caizhilian-RV43KKBT.js → caizhilian-ATM2JO5S.js} +5 -5
- package/dist/chunks/{calendar-DMVZ4OLY.js → calendar-E26ZIH7S.js} +5 -4
- package/dist/chunks/{chunk-6XSSAUNW.js → chunk-4OB22YKE.js} +48 -12
- package/dist/chunks/{chunk-UBGWIXU3.js → chunk-5CY37VLS.js} +131 -38
- package/dist/chunks/{chunk-EGANE35F.js → chunk-6G2JARDK.js} +1 -1
- package/dist/chunks/{chunk-WIWDVETN.js → chunk-6VCQLZXE.js} +75 -76
- package/dist/chunks/{chunk-E5YD5JWR.js → chunk-BY3WDJO5.js} +1 -1
- package/dist/chunks/{chunk-IW7A2IQY.js → chunk-C4YQJFZV.js} +43 -15
- package/dist/chunks/{chunk-BQYX2UX5.js → chunk-C5PIGPGX.js} +5 -3
- package/dist/chunks/{chunk-UBRWONP4.js → chunk-EOZHSNND.js} +2 -2
- package/dist/chunks/{chunk-UQFPF4EX.js → chunk-G3ZM57PD.js} +2 -2
- package/dist/chunks/{chunk-XT77MP54.js → chunk-GOBNIGWS.js} +410 -24
- package/dist/chunks/{chunk-KY3R42RS.js → chunk-GQK6WLOS.js} +5 -3
- package/dist/chunks/{chunk-BIA2NKUG.js → chunk-HEJPVXD3.js} +5 -5
- package/dist/chunks/{chunk-ILALC2N6.js → chunk-I4C2KR2G.js} +1 -1
- package/dist/chunks/{chunk-YI2YMW5N.js → chunk-IGICM3WJ.js} +2 -2
- package/dist/chunks/chunk-IN6NXQ26.js +680 -0
- package/dist/chunks/{chunk-VBFBMM7G.js → chunk-LOVAIGM2.js} +387 -70
- package/dist/chunks/{chunk-H6YOMI3U.js → chunk-OMAGCLUE.js} +5 -3
- package/dist/chunks/{chunk-VNYOUAWV.js → chunk-QAMIIFP6.js} +11 -11
- package/dist/chunks/{chunk-QBDXJS2W.js → chunk-QZYKZ7MQ.js} +16 -8
- package/dist/chunks/{chunk-V2LASYKO.js → chunk-RR45ELVE.js} +30 -24
- package/dist/chunks/{chunk-NRYDJN4J.js → chunk-RV2JAA5I.js} +89 -8
- package/dist/chunks/{chunk-TEZHIB6T.js → chunk-SDPC7BG2.js} +5 -3
- package/dist/chunks/{chunk-T2KVJFWJ.js → chunk-SHBDXEUE.js} +4 -7
- package/dist/chunks/{chunk-P6TXQK75.js → chunk-THMBDCRA.js} +5 -3
- package/dist/chunks/chunk-TJN4PIYO.js +47 -0
- package/dist/chunks/{chunk-DTCQFTHW.js → chunk-TNFIUZ4H.js} +3 -3
- package/dist/chunks/{chunk-JFAWZX53.js → chunk-UPVAQJKS.js} +282 -131
- package/dist/chunks/{chunk-KXJA42EA.js → chunk-WPBZQVLS.js} +1 -1
- package/dist/chunks/{conflict-GFJRS6I7.js → conflict-AMNTM3FV.js} +2 -2
- package/dist/chunks/{contract-U3ZGNRWB.js → contract-PLO2V2NO.js} +2333 -4426
- package/dist/chunks/{cowork-EX7PKIDK.js → cowork-FZAXE6FO.js} +5 -4
- package/dist/chunks/{create-flow-EJZD434E.js → create-flow-2DAUN7HU.js} +16 -6
- package/dist/chunks/{data-FOODGAMF.js → data-7NXMWET4.js} +3 -3
- package/dist/chunks/{ebuilder-form-I2EOKODG.js → ebuilder-form-DEYHX6M7.js} +4 -4
- package/dist/chunks/{ehr-TE4RFNID.js → ehr-QQH2DYYA.js} +244 -151
- package/dist/chunks/{employee-DR5Y64TI.js → employee-PGMY6NI6.js} +1 -1
- package/dist/chunks/{entry-mode-ZOLSXEGX.js → entry-mode-2JTVEKMP.js} +3 -3
- package/dist/chunks/{env-TID5NFR6.js → env-2JZMXC6I.js} +2 -2
- package/dist/chunks/{esb-7L6MHYLB.js → esb-I5ZFHJUK.js} +8 -8
- package/dist/chunks/{factory-OG7BPMH5.js → factory-XIATYHU6.js} +1 -1
- package/dist/chunks/{fna-6V2ENR3Y.js → fna-3V2TL6B2.js} +5 -4
- package/dist/chunks/{group-chat-5DKPWIHL.js → group-chat-CVYUZCOQ.js} +3 -3
- package/dist/chunks/{host-TJ5VVHM7.js → host-4DP7C7YQ.js} +4 -4
- package/dist/chunks/{host-3DLYA54R.js → host-4KQCAEWA.js} +4 -4
- package/dist/chunks/{host-ONZC6AE7.js → host-4X2F3JPQ.js} +4 -4
- package/dist/chunks/{host-OGBHL75G.js → host-BD7NAM33.js} +4 -4
- package/dist/chunks/{host-VTPAWDZV.js → host-CBONEAZS.js} +4 -4
- package/dist/chunks/{host-GOJHHTPY.js → host-L37QVNIV.js} +4 -4
- package/dist/chunks/{hrm-2N7NFQDZ.js → hrm-OL3IKN7C.js} +6 -6
- package/dist/chunks/{im-XCH47ZBN.js → im-YXQWUF3R.js} +4 -4
- package/dist/chunks/{invoice-XQRKMGNY.js → invoice-4WY32PR2.js} +199 -332
- package/dist/chunks/{jiuchuanhui-PL6DRPBM.js → jiuchuanhui-L6SHLONH.js} +5 -4
- package/dist/chunks/{lazy-dispatch-UATEN7H7.js → lazy-dispatch-OYE6QV24.js} +5 -5
- package/dist/chunks/{mail-Q7Z4CQ4D.js → mail-PZV2KNRU.js} +5 -4
- package/dist/chunks/{meeting-5E3BNARL.js → meeting-6SOBCC6N.js} +16 -15
- package/dist/chunks/{minute-doc-NXRE5C77.js → minute-doc-KSJSJNOH.js} +4 -4
- package/dist/chunks/{okr-3O3XNYOK.js → okr-B76FW5M2.js} +5 -4
- package/dist/chunks/{operations-EZWG72FH.js → operations-YOMEGFLV.js} +5 -5
- package/dist/chunks/{performance-Y7CPNSOR.js → performance-4VBKUPFO.js} +5 -4
- package/dist/chunks/{plan-BLGPZF5M.js → plan-HBNZRQTI.js} +5 -4
- package/dist/chunks/{project-6MZMLJMP.js → project-IV6FWK74.js} +5 -4
- package/dist/chunks/{reception-F2VT2X52.js → reception-BR5YURT6.js} +3 -3
- package/dist/chunks/{recruit-stage-4ETIBMIW.js → recruit-stage-4HQ6OGXT.js} +654 -336
- package/dist/chunks/{registry-I4DVPDMU.js → registry-7LICMV5J.js} +12 -12
- package/dist/chunks/{registry-3FYSWV3U.js → registry-JFQEFC7E.js} +3 -3
- package/dist/chunks/{registry-3UGIWH53.js → registry-JMNOXRST.js} +2 -2
- package/dist/chunks/{registry-7RS74TCK.js → registry-MZJQX65Q.js} +5 -5
- package/dist/chunks/{room-recommend-GWCVKCXW.js → room-recommend-43GLLE7Y.js} +4 -4
- package/dist/chunks/{schedule-6AN63MJQ.js → schedule-ZQ42BEW6.js} +4 -4
- package/dist/chunks/{smart-extract-SR4SJJKN.js → smart-extract-QKAEAZGM.js} +3 -3
- package/dist/chunks/{workflow-KF7FA2UQ.js → workflow-6HV7H5PC.js} +10 -7
- package/dist/index.js +34 -34
- package/dist/internal/e10/auth/commands.js +21 -1
- package/dist/internal/e10/auth/xiaoe.js +6 -2
- package/dist/internal/e10/auth-recovery.js +28 -2
- package/dist/internal/e10/request-runtime.js +15 -3
- package/dist/internal/e10/request-trace.js +65 -0
- package/dist/shortcuts/contract/data/metric-catalog.js +149 -0
- package/dist/shortcuts/contract/index.js +14 -39
- package/dist/shortcuts/contract/manifest.js +115 -270
- package/dist/shortcuts/contract/operations/compare-report.js +437 -0
- package/dist/shortcuts/contract/operations/compare.js +2 -0
- package/dist/shortcuts/contract/operations/first-screen.js +96 -207
- package/dist/shortcuts/contract/operations/flow.js +19 -1
- package/dist/shortcuts/contract/operations/{card-ebdf-list.js → ledger-card.js} +98 -25
- package/dist/shortcuts/contract/operations/ledger.js +315 -1
- package/dist/shortcuts/contract/operations/metrics.js +93 -0
- package/dist/shortcuts/contract/operations/modeltext.js +3 -3
- package/dist/shortcuts/contract/operations/page.js +8 -4
- package/dist/shortcuts/contract/operations/performance.js +53 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +289 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +264 -0
- package/dist/shortcuts/contract/operations/recommend.js +42 -1
- package/dist/shortcuts/contract/operations/registry.js +16 -23
- package/dist/shortcuts/contract/operations/{card-risk-report.js → review-report.js} +24 -114
- package/dist/shortcuts/contract/operations/review.js +33 -167
- package/dist/shortcuts/contract/operations/save-recognize.js +173 -43
- package/dist/shortcuts/contract/operations/triage.js +13 -6
- package/dist/shortcuts/contract/operations/{template.js → type-clause-read.js} +10 -25
- package/dist/shortcuts/contract/operations/upload.js +17 -11
- package/dist/shortcuts/contract/prewarm-cache.js +6 -2
- package/dist/shortcuts/contract/prewarm.js +33 -23
- package/dist/shortcuts/contract/recommend-cache.js +191 -0
- package/dist/shortcuts/ehr/operations/recruit-interview-overview.js +85 -62
- package/dist/shortcuts/ehr/operations/recruit-position.js +21 -13
- package/dist/shortcuts/ehr/operations/recruit-short-cache.js +59 -0
- package/dist/shortcuts/ehr/operations/recruit-tag.js +17 -11
- package/dist/shortcuts/ehr/operations/recruit-write.js +118 -70
- package/dist/shortcuts/ehr/operations/recruit.js +338 -121
- package/dist/shortcuts/hrm/operations/employee.js +64 -17
- package/dist/shortcuts/hrm/operations/resolve.js +419 -369
- package/dist/shortcuts/im/host.js +38 -22
- package/dist/shortcuts/invoice/manifest.js +30 -62
- package/dist/shortcuts/invoice/operations/registry.js +2 -2
- package/dist/shortcuts/invoice/operations/reim-customer.js +111 -0
- package/dist/shortcuts/invoice/operations/shared.js +0 -204
- package/dist/shortcuts/meeting/operations/eb/conflict.js +60 -2
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +116 -7
- package/dist/shortcuts/meeting/operations/eb/create-form-link.js +380 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +1 -3
- package/dist/shortcuts/recruit-stage/batch-store.js +44 -0
- package/dist/shortcuts/recruit-stage/context.js +75 -9
- package/dist/shortcuts/recruit-stage/manifest.js +1 -1
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -22
- package/dist/shortcuts/recruit-stage/operations/list.js +187 -37
- package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +231 -313
- package/dist/shortcuts/recruit-stage/operations/search.js +5 -5
- package/dist/shortcuts/recruit-stage/operations/tag.js +286 -0
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +12 -15
- package/dist/shortcuts/workflow/operations/read.js +8 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +3 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +7 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +4 -3
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +33 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +153 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/workflowClarification.js +232 -0
- package/dist/shortcuts/workflow/operations.js +5 -0
- package/docs/agent-invoice.md +1 -1
- package/docs/contract.md +2 -2
- package/docs/e10-auth.md +28 -0
- package/docs/ehr.md +1 -1
- package/docs/invoice.md +0 -2
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +0 -1
- package/skills/weaver-e10-hrm/SKILL.md +3 -3
- package/skills/weaver-e10-hrm/references/employee.md +13 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +237 -347
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -14
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +109 -185
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +12 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +28 -20
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +12 -17
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +7 -13
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +21 -12
- package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +10 -18
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +18 -17
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +114 -61
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +8 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +73 -104
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +32 -37
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +12 -10
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +70 -82
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +37 -33
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +94 -27
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +9 -15
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +9 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +59 -32
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +7 -5
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +21 -13
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +13 -13
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +6 -5
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +250 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +11 -20
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +203 -54
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +4 -11
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +11 -17
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +11 -17
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +5 -11
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +56 -7
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +10 -16
- package/skills/weaver-e10-jinchengda/references/orchestration.md +31 -33
- package/skills/weaver-e10-jucailin/SKILL.md +6 -7
- package/skills/weaver-e10-jucailin/agents/openai.yaml +52 -0
- package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +8 -6
- package/skills/weaver-e10-jucailin/references/recruit-read.md +4 -0
- package/skills/weaver-e10-jucailin/references/recruit-screening-to-interview-sop.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-write.md +4 -4
- package/skills/weaver-e10-meeting/SKILL.md +83 -531
- package/skills/weaver-e10-meeting/references/commands-table.md +61 -0
- package/skills/weaver-e10-meeting/references/create-commands.md +136 -0
- package/skills/weaver-e10-meeting/references/create-flow.md +3 -1
- package/skills/weaver-e10-meeting/references/create-guardrails.md +14 -8
- package/skills/weaver-e10-meeting/references/custom-fields.md +40 -0
- package/skills/weaver-e10-meeting/references/eb-contracts.md +60 -0
- package/skills/weaver-e10-meeting/references/invitation.md +69 -0
- package/skills/weaver-e10-meeting/references/minutes-pipeline.md +119 -0
- package/skills/weaver-e10-meeting/references/pitfalls.md +1 -1
- package/skills/weaver-e10-meeting/references/room-recommend.md +88 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +317 -266
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +22 -27
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +30 -27
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +2 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +12 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +2 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +23 -19
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +18 -16
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +25 -23
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +10 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +2 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +11 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +150 -85
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +14 -18
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +173 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-taxonomy.json +76 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +3 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
- package/skills/weaver-e10-workflow/SKILL.md +49 -32
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +67 -34
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +65 -51
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +18 -11
- package/skills/weaver-e10-workflow/references/workflow-create.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -37
- package/skills/weaver-e10-workflow/references/workflow-query.md +25 -22
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +318 -110
- package/skills/weaver-e10-yepiaotong/SKILL.md +16 -9
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +9 -7
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +15 -11
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +29 -25
- package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +89 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +35 -37
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +66 -63
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +50 -71
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +34 -95
- package/skills/weaver-e10-yimiaoban/SKILL.md +10 -10
- package/skills/weaver-e10-yimiaoban/references/person.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +9 -9
- package/dist/chunks/chunk-6QYNE6HE.js +0 -658
- package/dist/chunks/chunk-SHYQUBY3.js +0 -48
- package/dist/shortcuts/contract/operations/card-action.js +0 -1266
- package/dist/shortcuts/contract/operations/card-plan.js +0 -393
- package/dist/shortcuts/contract/operations/card.js +0 -232
- package/dist/shortcuts/contract/operations/compare-screen.js +0 -378
- package/dist/shortcuts/contract/operations/quote-to-contract.js +0 -495
- package/dist/shortcuts/contract/operations/quotescreen.js +0 -529
- package/dist/shortcuts/contract/operations/summary-validate.js +0 -293
- package/dist/shortcuts/contract/operations/summary.js +0 -187
- package/dist/shortcuts/ehr/recruit-stage/batch-store.js +0 -78
- package/dist/shortcuts/ehr/recruit-stage/context.js +0 -231
- package/dist/shortcuts/ehr/recruit-stage/continuation.js +0 -74
- package/dist/shortcuts/ehr/recruit-stage/errors.js +0 -65
- package/dist/shortcuts/ehr/recruit-stage/fs-scan.js +0 -165
- package/dist/shortcuts/ehr/recruit-stage/host.js +0 -109
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +0 -1065
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-feedback.js +0 -295
- package/dist/shortcuts/ehr/recruit-stage/operations/jd-create.js +0 -961
- package/dist/shortcuts/ehr/recruit-stage/operations/list.js +0 -431
- package/dist/shortcuts/ehr/recruit-stage/operations/registry.js +0 -50
- package/dist/shortcuts/ehr/recruit-stage/operations/resume-import.js +0 -1655
- package/dist/shortcuts/ehr/recruit-stage/operations/search.js +0 -158
- package/dist/shortcuts/ehr/recruit-stage/operations/types.js +0 -34
- package/dist/shortcuts/ehr/recruit-stage/runtime.js +0 -31
- package/dist/shortcuts/ehr/recruit-stage/school-tiers.json +0 -318
- package/dist/shortcuts/ehr/recruit-stage/shared.js +0 -887
- package/dist/shortcuts/invoice/operations/browse-field.js +0 -17
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +0 -22
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +0 -554
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +0 -279
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +0 -483
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -46
- package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +0 -194
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +0 -204
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { dirname, resolve } from 'node:path';
|
|
4
|
+
const CACHE_VERSION = 2;
|
|
5
|
+
const MAX_ENTRIES = 100;
|
|
6
|
+
function cacheRoot() {
|
|
7
|
+
const home = process.env.WEAVER_WORK_CLI_HOME
|
|
8
|
+
|| process.env.WORK_CLI_HOME
|
|
9
|
+
|| resolve(homedir(), '.weaver-work-cli');
|
|
10
|
+
return resolve(home, 'contract');
|
|
11
|
+
}
|
|
12
|
+
export function recommendCacheFilePath() {
|
|
13
|
+
return resolve(cacheRoot(), 'recommend-cache.json');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 缓存开关(**不是时效**):仅用于排查或强制每次都实时推荐。
|
|
17
|
+
*
|
|
18
|
+
* - `WEAVER_CONTRACT_RECOMMEND_CACHE=0` / `off` → 禁用;
|
|
19
|
+
* - 兼容旧变量 `WEAVER_CONTRACT_RECOMMEND_CACHE_TTL_MS=0`(语义已改为「禁用」,不再是 TTL)。
|
|
20
|
+
*/
|
|
21
|
+
export function isRecommendCacheEnabled() {
|
|
22
|
+
const flag = (process.env.WEAVER_CONTRACT_RECOMMEND_CACHE ?? '').trim().toLowerCase();
|
|
23
|
+
if (flag === '0' || flag === 'off' || flag === 'false')
|
|
24
|
+
return false;
|
|
25
|
+
const legacy = process.env.WEAVER_CONTRACT_RECOMMEND_CACHE_TTL_MS;
|
|
26
|
+
if (legacy !== undefined && Number(legacy) === 0)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 产品标的锚词表(方案 B 的「同产品标的」维度)。
|
|
32
|
+
*
|
|
33
|
+
* 顺序敏感,两条硬规则:
|
|
34
|
+
* 1. **契约锁排第一**:契约锁是独立的电子签章产品,报价单标题常写成
|
|
35
|
+
* 「契约锁合同管理系统」,若先匹配「合同管理」会被误归到今承达,导致契约锁销售
|
|
36
|
+
* 复用今承达的范文(用户明确要求:契约锁销售用契约锁模板)。
|
|
37
|
+
* 2. **今承达/合同管理排在 e-cology 之前**:报价单常同时出现「今承达合同管理系统」
|
|
38
|
+
* 与「e-cology 平台」,前者才是真正在卖的产品。
|
|
39
|
+
*/
|
|
40
|
+
const SUBJECT_ANCHORS = [
|
|
41
|
+
{ key: 'qiyuesuo', patterns: [/契约锁/u, /电子签章/u] },
|
|
42
|
+
{ key: 'jinchengda', patterns: [/今承达/u, /合同管理系统/u, /合同管理/u] },
|
|
43
|
+
{ key: 'jucailin', patterns: [/聚才林/u, /人事管理/u, /人力资源管理/u] },
|
|
44
|
+
{ key: 'caizhilian', patterns: [/采知连/u, /知识文档/u] },
|
|
45
|
+
{ key: 'jiuchuanhui', patterns: [/九氚汇/u, /营销管理/u, /CRM/iu] },
|
|
46
|
+
{ key: 'shijingran', patterns: [/事井然/u, /项目管理/u] },
|
|
47
|
+
{ key: 'mukelin', patterns: [/睦客邻/u, /客服管理/u] },
|
|
48
|
+
{ key: 'jingqiaotong', patterns: [/京桥通/u, /采购管理/u, /SRM/iu] },
|
|
49
|
+
{ key: 'qiyecheng', patterns: [/齐业成/u, /费控管理/u, /费用报销/u] },
|
|
50
|
+
{ key: 'qianling', patterns: [/千里聆/u, /RPA/iu, /流程自动化/u] },
|
|
51
|
+
{ key: 'wenshuding', patterns: [/文书定/u, /档案管理/u] },
|
|
52
|
+
{ key: 'yepiaotong', patterns: [/业票通/u, /发票管理/u, /数电票/u] },
|
|
53
|
+
{ key: 'ziguanjia', patterns: [/资管家/u, /资产管理/u] },
|
|
54
|
+
{ key: 'lingxintong', patterns: [/令信通/u, /身份管控/u, /统一身份/u] },
|
|
55
|
+
{ key: 'yimiaoban', patterns: [/易秒办/u, /即时通讯/u] },
|
|
56
|
+
{ key: 'qinglange', patterns: [/青蓝阁/u, /学习培训/u, /在线学习/u] },
|
|
57
|
+
{ key: 'e-cology', patterns: [/e-cology/iu, /协同办公/u] },
|
|
58
|
+
];
|
|
59
|
+
/**
|
|
60
|
+
* 从报价单内容里识别产品标的。
|
|
61
|
+
*
|
|
62
|
+
* 入参应尽量给**结构化内容**(标的名称、费用分节名),它们比标题稳定;
|
|
63
|
+
* 标题只作补充。识别不到锚词时返回归一后的前缀,保证键稳定(不会每次都变)。
|
|
64
|
+
*/
|
|
65
|
+
export function normalizeSubjectKey(...texts) {
|
|
66
|
+
const blob = texts
|
|
67
|
+
.map((item) => String(item ?? ''))
|
|
68
|
+
.join(' ');
|
|
69
|
+
for (const anchor of SUBJECT_ANCHORS) {
|
|
70
|
+
if (anchor.patterns.some((pattern) => pattern.test(blob)))
|
|
71
|
+
return anchor.key;
|
|
72
|
+
}
|
|
73
|
+
const cleaned = blob
|
|
74
|
+
.replace(/[((][^))]*[))]/gu, '')
|
|
75
|
+
.replace(/[\s\u3000]/gu, '')
|
|
76
|
+
.replace(/泛微|网络科技股份有限公司|报价文件|报价单|报价|文件/gu, '')
|
|
77
|
+
.toLowerCase();
|
|
78
|
+
return cleaned.slice(0, 24) || 'unknown';
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 场景类型归一:只保留四类合同类型,其余记 `unknown`。
|
|
82
|
+
*
|
|
83
|
+
* 不再拼接「是否含实施服务」——该项不影响「该用哪份范文」的判定,
|
|
84
|
+
* 写进键只会把同一份范文拆成两条缓存(用户 2026-11-19 口径:产品标的 + 场景类型两个维度)。
|
|
85
|
+
*/
|
|
86
|
+
export function buildSceneKey(flow) {
|
|
87
|
+
const value = String(flow ?? '').trim();
|
|
88
|
+
if (value === '新客户' || value === '常规二次销售' || value === '老客户增值' || value === '契约锁') {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
return 'unknown';
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 产品标的 + 场景类型 → 场景类型(业务映射)。
|
|
95
|
+
*
|
|
96
|
+
* 用户口径:**契约锁销售就是契约锁模板**。契约锁是独立产品,它的合同类型天然是
|
|
97
|
+
* 「契约锁」,不该落进新客户/增值那三条销售流程键里。
|
|
98
|
+
*
|
|
99
|
+
* 其余产品:用识别出的场景类型;识别不出时记 `unknown` 而不是猜「新客户」——
|
|
100
|
+
* 猜错会复用错误范文,宁可这次不命中(多花 35 秒重推一次)。
|
|
101
|
+
*/
|
|
102
|
+
export function resolveSceneKey(subjectKey, detectedFlow) {
|
|
103
|
+
if (subjectKey === 'qiyuesuo')
|
|
104
|
+
return '契约锁';
|
|
105
|
+
return buildSceneKey(detectedFlow);
|
|
106
|
+
}
|
|
107
|
+
/** 缓存键:产品标的 + 场景类型 + 环境 + 账号,任一不同都不复用。 */
|
|
108
|
+
export function recommendCacheKey(input) {
|
|
109
|
+
return `${input.baseUrl}|${input.userId}|${input.subjectKey}|${input.sceneKey}`;
|
|
110
|
+
}
|
|
111
|
+
async function readCache() {
|
|
112
|
+
try {
|
|
113
|
+
const raw = (await readFile(recommendCacheFilePath(), 'utf8')).replace(/^\uFEFF/u, '');
|
|
114
|
+
const parsed = JSON.parse(raw);
|
|
115
|
+
// 旧版(version 1,含 cacheKeyAt TTL 语义)直接丢弃,避免带着失效口径继续复用
|
|
116
|
+
if (!parsed || parsed.version !== CACHE_VERSION || typeof parsed.entries !== 'object') {
|
|
117
|
+
return { version: CACHE_VERSION, entries: {} };
|
|
118
|
+
}
|
|
119
|
+
return { version: CACHE_VERSION, entries: parsed.entries ?? {} };
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return { version: CACHE_VERSION, entries: {} };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
async function writeCache(cache) {
|
|
126
|
+
try {
|
|
127
|
+
const path = recommendCacheFilePath();
|
|
128
|
+
await mkdir(dirname(path), { recursive: true });
|
|
129
|
+
await writeFile(path, JSON.stringify(cache), 'utf8');
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
// 写不进去只影响下次命中率,不影响本次结果。
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 取缓存条目。**不做任何时效判断**:只要条目还在就返回,
|
|
137
|
+
* 是否真的可用由调用方在实际下载时探测(取不到就 forget + 重推)。
|
|
138
|
+
*/
|
|
139
|
+
export async function lookupRecommendation(key) {
|
|
140
|
+
if (!isRecommendCacheEnabled())
|
|
141
|
+
return null;
|
|
142
|
+
const cache = await readCache();
|
|
143
|
+
const entry = cache.entries[key];
|
|
144
|
+
if (!entry)
|
|
145
|
+
return null;
|
|
146
|
+
entry.hits = (entry.hits ?? 0) + 1;
|
|
147
|
+
entry.touchedAt = Date.now();
|
|
148
|
+
await writeCache(cache);
|
|
149
|
+
return entry;
|
|
150
|
+
}
|
|
151
|
+
/** 推荐成功后回写;同一键覆盖,并按 touchedAt 做 LRU 容量裁剪(非时效失效)。 */
|
|
152
|
+
export async function rememberRecommendation(key, entry) {
|
|
153
|
+
if (!isRecommendCacheEnabled() || !entry.fileId)
|
|
154
|
+
return;
|
|
155
|
+
const cache = await readCache();
|
|
156
|
+
const previous = cache.entries[key];
|
|
157
|
+
cache.entries[key] = {
|
|
158
|
+
...entry,
|
|
159
|
+
touchedAt: Date.now(),
|
|
160
|
+
hits: previous?.hits ?? 0,
|
|
161
|
+
};
|
|
162
|
+
const keys = Object.keys(cache.entries);
|
|
163
|
+
if (keys.length > MAX_ENTRIES) {
|
|
164
|
+
keys
|
|
165
|
+
.sort((a, b) => cache.entries[a].touchedAt - cache.entries[b].touchedAt)
|
|
166
|
+
.slice(0, keys.length - MAX_ENTRIES)
|
|
167
|
+
.forEach((stale) => delete cache.entries[stale]);
|
|
168
|
+
}
|
|
169
|
+
await writeCache(cache);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 清除单条缓存 —— 惰性失效的落点。
|
|
173
|
+
*
|
|
174
|
+
* 缓存命中但下载失败 / 返回空(fileId 被清理、无权限、跨环境、服务端 cacheKey 已失效)时,
|
|
175
|
+
* 调用方必须先清这一条,再重新推荐并回写;否则坏 fileId 会被反复复用、每次都失败。
|
|
176
|
+
*/
|
|
177
|
+
export async function forgetRecommendation(key) {
|
|
178
|
+
const cache = await readCache();
|
|
179
|
+
if (!(key in cache.entries))
|
|
180
|
+
return false;
|
|
181
|
+
delete cache.entries[key];
|
|
182
|
+
await writeCache(cache);
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
/** 清空全部推荐缓存,供强制刷新或排查使用。 */
|
|
186
|
+
export async function clearRecommendCache() {
|
|
187
|
+
const cache = await readCache();
|
|
188
|
+
const count = Object.keys(cache.entries).length;
|
|
189
|
+
await writeCache({ version: CACHE_VERSION, entries: {} });
|
|
190
|
+
return count;
|
|
191
|
+
}
|
|
@@ -22,7 +22,19 @@ const ACTION_STATUSES = ['待反馈', '待查看'];
|
|
|
22
22
|
const DEFAULT_DAYS = 7;
|
|
23
23
|
/** 本环境实测每天约 100 场面试,7 天 ≈ 700 条 ≈ 70 页;默认留到 100 页把 7 天窗口扫完 */
|
|
24
24
|
const DEFAULT_MAX_PAGES = 100;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* 每页条数:**服务端上限 20**(实测 pageSize=100 也只回 20 行)。
|
|
27
|
+
* 2026-11-18 从 10 提到 20:同样窗口页数减半(实测该环境 50 页 → 25 页)。
|
|
28
|
+
*/
|
|
29
|
+
const SERVER_PAGE_SIZE = 20;
|
|
30
|
+
/**
|
|
31
|
+
* 并发取页数(**只并发读,不并发写**)。
|
|
32
|
+
*
|
|
33
|
+
* 列表按 start_time 倒序,逻辑上仍需顺序判定窗口下界;这里按批并发取 4 页,
|
|
34
|
+
* 再按顺序逐行判定,命中「连续 3 行早于下界」立即停止——最多多取 3 页(纯读、无副作用),
|
|
35
|
+
* 换来 4× 的 RTT 折叠。`E10_RS_OVERVIEW_SERIAL=1` 可退回逐页串行(排障用)。
|
|
36
|
+
*/
|
|
37
|
+
const PAGE_BATCH = 6;
|
|
26
38
|
function ymd(d) {
|
|
27
39
|
const y = d.getFullYear();
|
|
28
40
|
const m = String(d.getMonth() + 1).padStart(2, '0');
|
|
@@ -64,7 +76,10 @@ async function listInterviewPage(env, params) {
|
|
|
64
76
|
});
|
|
65
77
|
// 复用 candidate.list 的读取通道:displayData 优先、原始层兜底、total 三态降级都在里面,
|
|
66
78
|
// 自己另写一套响应解析会漏掉 displayData 分支(行字段就取不到 union_status)。
|
|
67
|
-
|
|
79
|
+
// 只有第 1 页带 count(后续页的 count 对「倒序扫描」没有信息增量,纯多付一次 RTT)。
|
|
80
|
+
const { rows, total } = await fetchListRows(env.host, params.objId, params.listId, body, {
|
|
81
|
+
withCount: params.current === 1,
|
|
82
|
+
});
|
|
68
83
|
return { rows, total };
|
|
69
84
|
}
|
|
70
85
|
async function interviewOverview(args, env) {
|
|
@@ -121,69 +136,77 @@ async function interviewOverview(args, env) {
|
|
|
121
136
|
let earlyStop = false;
|
|
122
137
|
let reachedEnd = false;
|
|
123
138
|
let consecutiveBefore = 0;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (!
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
continue; // 晚于窗口上界(未来面试),不计入
|
|
145
|
-
if (st < windowStart) {
|
|
146
|
-
consecutiveBefore += 1;
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
consecutiveBefore = 0;
|
|
150
|
-
const status = String(row?.union_status ?? '').trim();
|
|
151
|
-
if (status === '未开始' || status === '待查看' || status === '待反馈' || status === '已反馈') {
|
|
152
|
-
counts[status] += 1;
|
|
139
|
+
const serial = process.env.E10_RS_OVERVIEW_SERIAL === '1';
|
|
140
|
+
const batchSize = serial ? 1 : PAGE_BATCH;
|
|
141
|
+
const pageParam = (current) => ({
|
|
142
|
+
objId,
|
|
143
|
+
listId: listParam.listId,
|
|
144
|
+
cusMenuId: listParam.cusMenuId || '',
|
|
145
|
+
menuName: listParam.menuName || listType.title,
|
|
146
|
+
current,
|
|
147
|
+
});
|
|
148
|
+
// 按批取页、按序判定:命中「连续 3 行早于下界」立即停止,语义与逐页串行完全一致,
|
|
149
|
+
// 区别仅是同一批内 4 个 GET 请求并发(都是只读列表查询,不改变任何计数口径)。
|
|
150
|
+
scanning: for (let batchStart = 1; batchStart <= maxPages; batchStart += batchSize) {
|
|
151
|
+
const batchEnd = Math.min(batchStart + batchSize - 1, maxPages);
|
|
152
|
+
const pages = await Promise.all(Array.from({ length: batchEnd - batchStart + 1 }, (_, i) => listInterviewPage(env, pageParam(batchStart + i))));
|
|
153
|
+
for (const page of pages) {
|
|
154
|
+
if (listTotal === null)
|
|
155
|
+
listTotal = page.total;
|
|
156
|
+
if (!page.rows.length) {
|
|
157
|
+
reachedEnd = true;
|
|
158
|
+
break scanning;
|
|
153
159
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
160
|
+
scanned += page.rows.length;
|
|
161
|
+
for (const row of page.rows) {
|
|
162
|
+
const st = normalizeStartTime(row?.start_time);
|
|
163
|
+
if (!st)
|
|
164
|
+
continue; // 无时间无法归窗,跳过(计数体现在 rows 里)
|
|
165
|
+
if (st > windowEnd)
|
|
166
|
+
continue; // 晚于窗口上界(未来面试),不计入
|
|
167
|
+
if (st < windowStart) {
|
|
168
|
+
consecutiveBefore += 1;
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
consecutiveBefore = 0;
|
|
172
|
+
const status = String(row?.union_status ?? '').trim();
|
|
173
|
+
if (status === '未开始' || status === '待查看' || status === '待反馈' || status === '已反馈') {
|
|
174
|
+
counts[status] += 1;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
// 空值/已失效/已取消等不硬塞进「其他」,按原值明细暴露,避免掩盖脏数据
|
|
178
|
+
const key = status || '(空)';
|
|
179
|
+
otherStatusCounts.set(key, (otherStatusCounts.get(key) ?? 0) + 1);
|
|
180
|
+
}
|
|
181
|
+
if (status === '待反馈' || status === '待查看') {
|
|
182
|
+
const who = namesOf(row?.interviewer) || '(未指定面试官)';
|
|
183
|
+
const rec = byInterviewer.get(who) ?? { pendingFeedback: 0, pendingView: 0 };
|
|
184
|
+
if (status === '待反馈')
|
|
185
|
+
rec.pendingFeedback += 1;
|
|
186
|
+
else
|
|
187
|
+
rec.pendingView += 1;
|
|
188
|
+
byInterviewer.set(who, rec);
|
|
189
|
+
}
|
|
190
|
+
matched.push({
|
|
191
|
+
startTime: st,
|
|
192
|
+
status: status || '(空)',
|
|
193
|
+
// 行内 talent_id / position_manage_id / interviewer 放的是人名或门户结构,不是 id;
|
|
194
|
+
// 门户结构是 JSON 字符串,必须用 namesOf 解析,否则整段 JSON 会被人当成人名
|
|
195
|
+
candidate: namesOf(row?.talent_id) || '',
|
|
196
|
+
position: namesOf(row?.position_manage_id) || '',
|
|
197
|
+
interviewer: namesOf(row?.interviewer) || '',
|
|
198
|
+
type: namesOf(row?.interview_type) || '',
|
|
199
|
+
session: namesOf(row?.interview_session) || '',
|
|
200
|
+
rounds: namesOf(row?.interview_rounds) || '',
|
|
201
|
+
formDataId: String(row?.form_data_id ?? '').trim(),
|
|
202
|
+
candidateManageId: String(row?.candidate_manage_id ?? '').trim(),
|
|
203
|
+
});
|
|
158
204
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
rec.pendingFeedback += 1;
|
|
164
|
-
else
|
|
165
|
-
rec.pendingView += 1;
|
|
166
|
-
byInterviewer.set(who, rec);
|
|
205
|
+
// 倒序列表:连续 3 行都早于窗口下界,判定已越过窗口(容忍个别脏时间)
|
|
206
|
+
if (consecutiveBefore >= 3) {
|
|
207
|
+
earlyStop = true;
|
|
208
|
+
break scanning;
|
|
167
209
|
}
|
|
168
|
-
matched.push({
|
|
169
|
-
startTime: st,
|
|
170
|
-
status: status || '(空)',
|
|
171
|
-
// 行内 talent_id / position_manage_id / interviewer 放的是人名或门户结构,不是 id;
|
|
172
|
-
// 门户结构是 JSON 字符串,必须用 namesOf 解析,否则整段 JSON 会被人当成人名
|
|
173
|
-
candidate: namesOf(row?.talent_id) || '',
|
|
174
|
-
position: namesOf(row?.position_manage_id) || '',
|
|
175
|
-
interviewer: namesOf(row?.interviewer) || '',
|
|
176
|
-
type: namesOf(row?.interview_type) || '',
|
|
177
|
-
session: namesOf(row?.interview_session) || '',
|
|
178
|
-
rounds: namesOf(row?.interview_rounds) || '',
|
|
179
|
-
formDataId: String(row?.form_data_id ?? '').trim(),
|
|
180
|
-
candidateManageId: String(row?.candidate_manage_id ?? '').trim(),
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
// 倒序列表:连续 3 行都早于窗口下界,判定已越过窗口(容忍个别脏时间)
|
|
184
|
-
if (consecutiveBefore >= 3) {
|
|
185
|
-
earlyStop = true;
|
|
186
|
-
break;
|
|
187
210
|
}
|
|
188
211
|
}
|
|
189
212
|
const truncated = !earlyStop && !reachedEnd;
|
|
@@ -387,14 +387,18 @@ async function buildPositionPlan(env, cache, args) {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
// ④ 默认值:枚举 / 数值 / 当前用户
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
390
|
+
// 枚举项并发预取(原实现逐项串行,实测 3 个 ds/options = 187+133+123 ms);落值顺序不变。
|
|
391
|
+
const optionDefaults = Object.entries(OPTION_DEFAULTS)
|
|
392
|
+
.map(([key, name]) => ({ key, name, fieldId: fid(key) }))
|
|
393
|
+
.filter((item) => item.fieldId && !has(item.key));
|
|
394
|
+
const prefetched = await Promise.all(optionDefaults.map(async (item) => ({
|
|
395
|
+
...item,
|
|
396
|
+
options: await getDsOptions(env.host, objId, item.fieldId, cache.appId),
|
|
397
|
+
})));
|
|
398
|
+
for (const item of prefetched) {
|
|
399
|
+
const optionId = item.options[item.name];
|
|
396
400
|
if (optionId)
|
|
397
|
-
put({ formField: { id: fieldId }, dataOptions: [{ optionId: String(optionId), content: name }] });
|
|
401
|
+
put({ formField: { id: item.fieldId }, dataOptions: [{ optionId: String(optionId), content: item.name }] });
|
|
398
402
|
}
|
|
399
403
|
for (const [key, value] of Object.entries(TEXT_DEFAULTS)) {
|
|
400
404
|
const fieldId = fid(key);
|
|
@@ -409,7 +413,12 @@ async function buildPositionPlan(env, cache, args) {
|
|
|
409
413
|
}
|
|
410
414
|
}
|
|
411
415
|
// ⑤ 关联表单型字段:沿用在册职位的现值(引用有效性由系统保证)
|
|
412
|
-
|
|
416
|
+
// ⑥ 工作地点默认值(与 ⑤ 的取数并发;写入顺序仍是先 ⑤ 后 ⑥,输出结构不变)
|
|
417
|
+
const wantLoc = !has('work_location') && Boolean(fid('work_location'));
|
|
418
|
+
const [refDetails, defaultLoc] = await Promise.all([
|
|
419
|
+
fetchReferenceDetails(env, cache, objId, formId),
|
|
420
|
+
wantLoc ? resolveDefaultWorkLocation(env, cache).catch(() => null) : Promise.resolve(null),
|
|
421
|
+
]);
|
|
413
422
|
const refMap = new Map();
|
|
414
423
|
for (const detail of refDetails) {
|
|
415
424
|
const id = detail?.formField?.id;
|
|
@@ -435,11 +444,10 @@ async function buildPositionPlan(env, cache, args) {
|
|
|
435
444
|
// 改为在「办公地点」列表按启用状态 + 详细地址精确解析;解析不到则不写并点名。
|
|
436
445
|
let workLocationDefault = null;
|
|
437
446
|
let workLocationWarning = null;
|
|
438
|
-
if (
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
workLocationDefault = loc.name;
|
|
447
|
+
if (wantLoc) {
|
|
448
|
+
if (defaultLoc) {
|
|
449
|
+
put({ formField: { id: fid('work_location') }, dataOptions: [{ optionId: defaultLoc.id, content: defaultLoc.name }] });
|
|
450
|
+
workLocationDefault = defaultLoc.name;
|
|
443
451
|
}
|
|
444
452
|
else {
|
|
445
453
|
workLocationWarning = `未在「办公地点」列表找到启用状态的默认地点「${DEFAULT_WORK_LOCATION}」,本次不写 work_location;请用 workLocation 显式指定`;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 招聘写通道短缓存:只用于「跨进程仍然成立、且短时间不会变」的解析结果
|
|
3
|
+
* (人员姓名→userId、ds/options 枚举)。CLI 每次调用都是新进程,进程内 memo 无效,
|
|
4
|
+
* 所以这里落盘(TTL 到期自动失效)。`E10_RS_NO_SHORT_CACHE=1` 可整体关闭。
|
|
5
|
+
*
|
|
6
|
+
* 不动任何业务判定:缓存只保存「解析成功的结果」,读不到/过期就重新请求。
|
|
7
|
+
*/
|
|
8
|
+
import { createHash } from 'node:crypto';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
import { existsSync } from 'node:fs';
|
|
12
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
13
|
+
const DIR = join(homedir(), '.weaver-work-cli', 'env-cache', 'recruit-ops', '_short-cache');
|
|
14
|
+
function fileOf(ns, baseUrl, key) {
|
|
15
|
+
const hash = createHash('sha1').update(`${ns}|${baseUrl}|${key}`).digest('hex').slice(0, 24);
|
|
16
|
+
return join(DIR, `${ns}-${hash}.json`);
|
|
17
|
+
}
|
|
18
|
+
export function shortCacheEnabled() {
|
|
19
|
+
return process.env.E10_RS_NO_SHORT_CACHE !== '1';
|
|
20
|
+
}
|
|
21
|
+
/** 读缓存;未命中/过期返回 undefined(不抛错,坏缓存当未命中)。 */
|
|
22
|
+
export async function readShortCache(ns, baseUrl, key, ttlMs) {
|
|
23
|
+
if (!shortCacheEnabled())
|
|
24
|
+
return undefined;
|
|
25
|
+
try {
|
|
26
|
+
const path = fileOf(ns, baseUrl, key);
|
|
27
|
+
if (!existsSync(path))
|
|
28
|
+
return undefined;
|
|
29
|
+
const raw = JSON.parse(await readFile(path, 'utf8'));
|
|
30
|
+
if (!raw || typeof raw.at !== 'number')
|
|
31
|
+
return undefined;
|
|
32
|
+
if (Date.now() - raw.at > ttlMs)
|
|
33
|
+
return undefined;
|
|
34
|
+
return raw.data;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export async function writeShortCache(ns, baseUrl, key, data) {
|
|
41
|
+
if (!shortCacheEnabled())
|
|
42
|
+
return;
|
|
43
|
+
try {
|
|
44
|
+
await mkdir(DIR, { recursive: true });
|
|
45
|
+
await writeFile(fileOf(ns, baseUrl, key), JSON.stringify({ at: Date.now(), data }), 'utf8');
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
/* 写缓存失败不影响主流程 */
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/** 读缓存 → 未命中则 loader() 取真值并回写。 */
|
|
52
|
+
export async function cachedShort(ns, baseUrl, key, ttlMs, loader) {
|
|
53
|
+
const hit = await readShortCache(ns, baseUrl, key, ttlMs);
|
|
54
|
+
if (hit !== undefined)
|
|
55
|
+
return hit;
|
|
56
|
+
const data = await loader();
|
|
57
|
+
await writeShortCache(ns, baseUrl, key, data);
|
|
58
|
+
return data;
|
|
59
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { READ, ehrSuccess, schemaOf, } from './types.js';
|
|
2
2
|
import { ehrValidationError } from '../errors.js';
|
|
3
|
+
import { cachedShort } from './recruit-short-cache.js';
|
|
3
4
|
/**
|
|
4
5
|
* 招聘标签检索(只读)。
|
|
5
6
|
*
|
|
@@ -46,17 +47,22 @@ async function queryPage(env, params) {
|
|
|
46
47
|
// 🔴 groupId 才是服务端真认的过滤参数(tagGroup 不是),见文件头实测记录
|
|
47
48
|
if (params.groupId !== undefined)
|
|
48
49
|
body.groupId = params.groupId;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
// 标签清单是低频变化的只读字典(服务端单笔实测 0.97 s):按「类型+关键词+标签组+页码」缓存 10 min。
|
|
51
|
+
// 新打的标签最多晚 10 min 出现;`E10_RS_NO_SHORT_CACHE=1` 可关闭。
|
|
52
|
+
const session = await env.host.getSession();
|
|
53
|
+
return cachedShort('tags', session.baseUrl, `${params.type}|${params.keyword}|${params.groupId ?? ''}|${params.pageNo}|${params.pageSize}`, 10 * 60 * 1000, async () => {
|
|
54
|
+
const res = (await env.host.request({
|
|
55
|
+
path: TAG_QUERY_PATH,
|
|
56
|
+
method: 'POST',
|
|
57
|
+
body,
|
|
58
|
+
operation: 'ehr.recruit.tag.list',
|
|
59
|
+
}));
|
|
60
|
+
const d = res?.data ?? {};
|
|
61
|
+
return {
|
|
62
|
+
total: typeof d.total === 'number' ? d.total : null,
|
|
63
|
+
rows: (Array.isArray(d.data) ? d.data : []),
|
|
64
|
+
};
|
|
65
|
+
});
|
|
60
66
|
}
|
|
61
67
|
async function listTags(args, env) {
|
|
62
68
|
const keyword = args.keyword === undefined ? '' : String(args.keyword).trim();
|