weaver-work-cli 0.1.42 → 0.1.45
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 +21 -0
- package/dist/chunks/{archive-J4I6MCKF.js → archive-ZQ4A4TV6.js} +399 -47
- package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-BBDP7AKJ.js} +12 -5
- package/dist/chunks/{asset-L7D4FAOZ.js → asset-ZOJVBWZH.js} +11 -4
- package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-XGB5IPGT.js} +7 -3
- package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-CE3GMWTS.js} +5 -4
- package/dist/chunks/{blog-BVGQ7NZL.js → blog-QSHLZSFW.js} +11 -4
- package/dist/chunks/caizhilian-KCQYFH72.js +204 -0
- package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-DLGMRJQA.js} +12 -5
- package/dist/chunks/{chunk-W7BEHOSR.js → chunk-3WBIQLMB.js} +2 -2
- package/dist/chunks/{chunk-4PD5NWAX.js → chunk-3YV7PKRL.js} +2 -2
- package/dist/chunks/{chunk-JPRO6ER2.js → chunk-3ZMAQQ3W.js} +185 -60
- package/dist/chunks/{chunk-R4CHUSKC.js → chunk-4EXOIQDI.js} +40 -10
- package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
- package/dist/chunks/chunk-6N4JPNFL.js +76 -0
- package/dist/chunks/{chunk-SA6VBIHY.js → chunk-6NXT4ICB.js} +342 -17
- package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
- package/dist/chunks/chunk-762M5XJS.js +215 -0
- package/dist/chunks/{chunk-GEWYMQME.js → chunk-77YP6I52.js} +1 -1
- package/dist/chunks/chunk-7BDPM5ST.js +11 -0
- package/dist/chunks/{chunk-G4UR6NXN.js → chunk-CZNZKOHR.js} +3 -3
- package/dist/chunks/{chunk-GHXCDPTM.js → chunk-DGMYACGJ.js} +1 -1
- package/dist/chunks/{chunk-4RAE6JXP.js → chunk-DLY5GUXX.js} +6 -3
- package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
- package/dist/chunks/{chunk-EKWAQSLU.js → chunk-GR76ZDDX.js} +432 -2248
- package/dist/chunks/{chunk-APVFJUQH.js → chunk-HFXK54M4.js} +3 -3
- package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
- package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
- package/dist/chunks/{chunk-3KTFS4IA.js → chunk-JB34OE7R.js} +808 -85
- package/dist/chunks/{chunk-72CKAUAG.js → chunk-JWWTI63L.js} +59 -7
- package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
- package/dist/chunks/{chunk-NKZRQXST.js → chunk-LGKWL4OH.js} +200 -47
- package/dist/chunks/chunk-LRCPNDZA.js +2529 -0
- package/dist/chunks/{chunk-QKNKR4RH.js → chunk-LXFVWZLM.js} +4 -4
- package/dist/chunks/{chunk-NOODWMCL.js → chunk-O6CMPO65.js} +25 -2
- package/dist/chunks/{chunk-BIPYLLVS.js → chunk-OAE3AZBQ.js} +15 -15
- package/dist/chunks/chunk-P5GQRWDC.js +60 -0
- package/dist/chunks/{caizhilian-SAADNFD6.js → chunk-PGO4ILMQ.js} +44 -517
- package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
- package/dist/chunks/{chunk-LDZQPUIA.js → chunk-T4MWQAQB.js} +8 -6
- package/dist/chunks/{chunk-BBKDXQEC.js → chunk-TGAGQV4I.js} +3 -3
- package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
- package/dist/chunks/{chunk-FOAA27U5.js → chunk-U6R6FZHD.js} +184 -18
- package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
- package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
- package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-VIMCY4DI.js} +6 -6
- package/dist/chunks/chunk-VRPH24IC.js +76 -0
- package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
- package/dist/chunks/{chunk-YRSZQUD2.js → chunk-YIKSL36S.js} +3 -3
- package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
- package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
- package/dist/chunks/{chunk-LADPYOWC.js → chunk-Z6UUBY37.js} +3 -3
- package/dist/chunks/{conflict-F2OMZRTO.js → conflict-IYJETSGT.js} +4 -3
- package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
- package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
- package/dist/chunks/continuation-GW6PRWK3.js +12 -0
- package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
- package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
- package/dist/chunks/{contract-5BETHRSG.js → contract-3QLAGYQL.js} +5803 -4593
- package/dist/chunks/{cowork-3MN6EQQO.js → cowork-3ACICHDQ.js} +11 -4
- package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-7JLC7UID.js} +8 -7
- package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-GWDTKEI2.js} +14 -9
- package/dist/chunks/{ehr-KMOJULKG.js → ehr-MYRDCHZ4.js} +357 -43
- package/dist/chunks/{employee-SAK2QYXX.js → employee-NOHNXC46.js} +3 -3
- package/dist/chunks/{env-LB7NBL2O.js → env-3MBHAWBL.js} +4 -3
- package/dist/chunks/{esb-W2PJCFCX.js → esb-4BQHNP5C.js} +12 -7
- package/dist/chunks/{factory-6ZFQXQ46.js → factory-TZEVU4DU.js} +3 -2
- package/dist/chunks/{fna-ZQPCUV4R.js → fna-ZVB2IILI.js} +14 -8
- package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-KL3HFKRM.js} +5 -4
- package/dist/chunks/{host-YTODKMSL.js → host-3TNBMDTR.js} +5 -5
- package/dist/chunks/host-7NTIBSPK.js +25 -0
- package/dist/chunks/{host-4CBHGOHT.js → host-7OWWPLM4.js} +5 -5
- package/dist/chunks/{host-ATKVNZAT.js → host-G3VU7SDW.js} +5 -5
- package/dist/chunks/{host-BQH22NTQ.js → host-M4XP5URR.js} +5 -5
- package/dist/chunks/{host-X2CSLFM6.js → host-TUOIOEMC.js} +5 -5
- package/dist/chunks/{hrm-FFM4UJFS.js → hrm-UNKCCCGP.js} +11 -7
- package/dist/chunks/{im-VEHKDQPB.js → im-NJB7ZYMH.js} +8 -7
- package/dist/chunks/{invoice-LVIKSIIF.js → invoice-OQP3TMKQ.js} +636 -1768
- package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-ASFZBMPU.js} +14 -6
- package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-UH6HGK2I.js} +7 -6
- package/dist/chunks/{mail-VDKRGUD3.js → mail-M3HJF5ER.js} +16 -14
- package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-C67EHQ4Z.js} +21 -14
- package/dist/chunks/{okr-CHG4OO3U.js → okr-EVX7FB5G.js} +12 -5
- package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
- package/dist/chunks/operations-J7PUIVWZ.js +15 -0
- package/dist/chunks/{plan-XWR75667.js → plan-2QJQEPBO.js} +12 -5
- package/dist/chunks/{project-5BXOOKMG.js → project-XELELW2T.js} +11 -4
- package/dist/chunks/reception-5WITA44R.js +1899 -0
- package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-AHY5QAMF.js} +745 -149
- package/dist/chunks/{registry-RHMW6ANW.js → registry-AQVGHUM6.js} +7 -6
- package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
- package/dist/chunks/{registry-7FFOXIAW.js → registry-QJCZ2GVG.js} +7 -6
- package/dist/chunks/{registry-Z43434VG.js → registry-VWXWPVAG.js} +4 -4
- package/dist/chunks/registry-XPWPGHYE.js +24 -0
- package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-CNWE5WQK.js} +8 -5
- package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-YYNYBQIE.js} +6 -5
- package/dist/chunks/{workflow-ADHKCAJK.js → workflow-BSYT5TGL.js} +15 -8
- package/dist/cmd/action.js +6 -0
- package/dist/cmd/identity/index.js +45 -0
- package/dist/cmd/index.js +2 -0
- package/dist/core/continuation-ttl.js +18 -0
- package/dist/core/error-codes.js +85 -0
- package/dist/core/logger.js +11 -0
- package/dist/index.js +37 -31
- package/dist/internal/e10/auth/commands.js +195 -8
- package/dist/internal/e10/auth/error-log.js +312 -0
- package/dist/internal/e10/auth/session.js +17 -3
- package/dist/internal/e10/auth/xiaoe.js +176 -13
- package/dist/internal/e10/auth-recovery.js +39 -12
- package/dist/internal/e10/context.js +29 -3
- package/dist/internal/skills/install.js +9 -1
- package/dist/shortcuts/archive/continuation.js +2 -1
- package/dist/shortcuts/archive/index.js +3 -0
- package/dist/shortcuts/archive/operations/borrow-list.js +105 -14
- package/dist/shortcuts/archive/operations/confirm.js +2 -1
- package/dist/shortcuts/archive/operations/flow-url.js +182 -22
- package/dist/shortcuts/archive/operations/getPageUrl.js +75 -0
- package/dist/shortcuts/archive/operations/prelib.js +33 -4
- package/dist/shortcuts/archive/operations/shared.js +52 -0
- package/dist/shortcuts/archive-oa/continuation.js +2 -1
- package/dist/shortcuts/archive-oa/index.js +2 -0
- package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
- package/dist/shortcuts/asset/continuation.js +2 -1
- package/dist/shortcuts/asset/index.js +2 -0
- package/dist/shortcuts/asset-idle/index.js +2 -0
- package/dist/shortcuts/blog/continuation.js +2 -1
- package/dist/shortcuts/blog/index.js +2 -0
- package/dist/shortcuts/caizhilian/continuation.js +2 -1
- package/dist/shortcuts/caizhilian/index.js +2 -0
- package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
- package/dist/shortcuts/calendar/continuation.js +2 -1
- package/dist/shortcuts/calendar/index.js +2 -0
- package/dist/shortcuts/calendar/operations/write.js +1 -1
- package/dist/shortcuts/contract/continuation.js +2 -1
- package/dist/shortcuts/contract/host.js +111 -4
- package/dist/shortcuts/contract/index.js +21 -0
- package/dist/shortcuts/contract/manifest.js +125 -0
- package/dist/shortcuts/contract/ooxml/clause-insert.js +249 -0
- package/dist/shortcuts/contract/operations/clause-insert.js +56 -0
- package/dist/shortcuts/contract/operations/customer.js +192 -0
- package/dist/shortcuts/contract/operations/file-download.js +75 -0
- package/dist/shortcuts/contract/operations/flow.js +44 -2
- package/dist/shortcuts/contract/operations/form-info.js +162 -62
- package/dist/shortcuts/contract/operations/registry.js +8 -0
- package/dist/shortcuts/contract/operations/review.js +116 -1
- package/dist/shortcuts/contract/operations/summary.js +177 -0
- package/dist/shortcuts/contract/operations/upload.js +64 -4
- package/dist/shortcuts/contract/operations/write.js +2 -1
- package/dist/shortcuts/contract/upload-cache.js +104 -0
- package/dist/shortcuts/cowork/continuation.js +2 -1
- package/dist/shortcuts/cowork/index.js +2 -0
- package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
- package/dist/shortcuts/ebuilder-form/index.js +2 -0
- package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
- package/dist/shortcuts/ehr/continuation.js +2 -1
- package/dist/shortcuts/ehr/index.js +2 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +1 -1
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +186 -5
- package/dist/shortcuts/ehr/operations/recruit-position.js +239 -6
- package/dist/shortcuts/ehr/operations/recruit-write.js +18 -19
- package/dist/shortcuts/ehr/operations/recruit.js +17 -5
- package/dist/shortcuts/esb/continuation.js +2 -1
- package/dist/shortcuts/esb/index.js +2 -0
- package/dist/shortcuts/esb/operations/trigger.js +2 -1
- package/dist/shortcuts/fna/continuation.js +2 -1
- package/dist/shortcuts/fna/index.js +2 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
- package/dist/shortcuts/fna/operations/loan.js +1 -1
- package/dist/shortcuts/hrm/index.js +2 -0
- package/dist/shortcuts/hrm/operations/employee.js +29 -1
- package/dist/shortcuts/im/continuation.js +2 -1
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/continuation.js +2 -1
- package/dist/shortcuts/invoice/index.js +14 -15
- package/dist/shortcuts/invoice/invoice-record.js +93 -0
- package/dist/shortcuts/invoice/manifest.js +190 -393
- package/dist/shortcuts/invoice/operations/add.js +2 -1
- package/dist/shortcuts/invoice/operations/delete.js +2 -1
- package/dist/shortcuts/invoice/operations/import.js +2 -1
- package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
- package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
- package/dist/shortcuts/invoice/operations/registry.js +17 -17
- package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
- package/dist/shortcuts/invoice/operations/reim.js +52 -341
- package/dist/shortcuts/invoice/operations/shared.js +21 -4
- package/dist/shortcuts/invoice/operations/update.js +2 -1
- package/dist/shortcuts/invoice/projection.js +10 -62
- package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
- package/dist/shortcuts/jiuchuanhui/index.js +2 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
- package/dist/shortcuts/mail/continuation.js +2 -1
- package/dist/shortcuts/mail/index.js +2 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
- package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
- package/dist/shortcuts/mail/operations/mail-send.js +1 -1
- package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
- package/dist/shortcuts/mail/operations/mail-template.js +1 -1
- package/dist/shortcuts/meeting/continuation.js +2 -1
- package/dist/shortcuts/meeting/index.js +2 -0
- package/dist/shortcuts/meeting/operations/change.js +1 -1
- package/dist/shortcuts/meeting/operations/create.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +198 -65
- package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/draft-memory.js +56 -0
- package/dist/shortcuts/meeting/operations/eb/factory.js +59 -4
- package/dist/shortcuts/meeting/operations/eb/person-cache.js +2 -2
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +47 -5
- package/dist/shortcuts/meeting/operations/invitation-publish.js +132 -0
- package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
- package/dist/shortcuts/meeting/operations/receipts.js +1 -1
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/meeting/operations/signs.js +1 -1
- package/dist/shortcuts/okr/continuation.js +2 -1
- package/dist/shortcuts/okr/index.js +2 -0
- package/dist/shortcuts/okr/operations/write.js +1 -1
- package/dist/shortcuts/plan/continuation.js +2 -1
- package/dist/shortcuts/plan/index.js +2 -0
- package/dist/shortcuts/plan/operations/write.js +1 -1
- package/dist/shortcuts/project/continuation.js +2 -1
- package/dist/shortcuts/project/index.js +2 -0
- package/dist/shortcuts/reception/constants.js +53 -0
- package/dist/shortcuts/reception/errors.js +54 -0
- package/dist/shortcuts/reception/host.js +125 -0
- package/dist/shortcuts/reception/index.js +198 -0
- package/dist/shortcuts/reception/manifest.js +177 -0
- package/dist/shortcuts/reception/operations/ask.js +71 -0
- package/dist/shortcuts/reception/operations/browsertool.js +58 -0
- package/dist/shortcuts/reception/operations/compose.js +129 -0
- package/dist/shortcuts/reception/operations/customparams.js +74 -0
- package/dist/shortcuts/reception/operations/doc.js +238 -0
- package/dist/shortcuts/reception/operations/docrender.js +36 -0
- package/dist/shortcuts/reception/operations/panels.js +179 -0
- package/dist/shortcuts/reception/operations/registry.js +26 -0
- package/dist/shortcuts/reception/operations/render-assets.js +184 -0
- package/dist/shortcuts/reception/operations/render.js +123 -0
- package/dist/shortcuts/reception/operations/runs.js +38 -0
- package/dist/shortcuts/reception/operations/schedule.js +127 -0
- package/dist/shortcuts/reception/operations/shared.js +196 -0
- package/dist/shortcuts/reception/operations/snapshot.js +68 -0
- package/dist/shortcuts/reception/operations/types.js +1 -0
- package/dist/shortcuts/reception/operations.js +33 -0
- package/dist/shortcuts/reception/upload.js +218 -0
- package/dist/shortcuts/recruit-stage/context.js +145 -33
- package/dist/shortcuts/recruit-stage/continuation.js +2 -1
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +86 -16
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +6 -4
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +289 -48
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +207 -25
- package/dist/shortcuts/recruit-stage/shared.js +161 -18
- package/dist/shortcuts/workflow/continuation.js +2 -1
- package/dist/shortcuts/workflow/index.js +4 -0
- package/dist/shortcuts/workflow/operations/form.js +32 -8
- package/dist/shortcuts/workflow/operations/read.js +8 -3
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +92 -5
- package/dist/shortcuts/workflow/operations/todoSmartConvert/priorityExpr.js +509 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +22 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +32 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +57 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +165 -52
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +57 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +44 -18
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/_catalog.md +3 -0
- package/docs/agent-invoice.md +1 -1
- package/docs/archive-oa.md +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/contract.md +2 -1
- package/docs/e10-auth.md +19 -1
- package/docs/ehr.md +2 -2
- package/docs/esb.md +1 -1
- package/docs/im.md +1 -1
- package/docs/invoice.md +8 -12
- package/docs/okr.md +1 -1
- package/docs/reception.md +119 -0
- package/docs/todo-smart-convert/data-contract.md +7 -0
- package/package.json +1 -1
- package/scripts/clean.mjs +43 -2
- package/skill-template/business-info.json +18 -2
- package/skill-template/domains/caizhilian.md +1 -1
- package/skill-template/domains/jinchengda.md +2 -0
- package/skill-template/domains/reception-flow.md +18 -0
- package/skill-template/domains/yepiaotong.md +4 -7
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
- package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
- package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
- package/skills/weaver-e10-calendar/references/calendar-write.md +1 -1
- package/skills/weaver-e10-cowork/SKILL.md +1 -1
- package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
- package/skills/weaver-e10-esb/SKILL.md +2 -2
- package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
- package/skills/weaver-e10-esb/references/trigger.md +2 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +198 -205
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +759 -0
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +250 -0
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +146 -7
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +178 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +75 -0
- package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +137 -0
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +163 -0
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +52 -3
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +92 -5
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +602 -0
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +209 -0
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +126 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +312 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +555 -0
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +47 -12
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +469 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +154 -1
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +224 -0
- package/skills/weaver-e10-jinchengda/references/orchestration.md +355 -0
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
- package/skills/weaver-e10-jucailin/SKILL.md +1 -1
- package/skills/weaver-e10-jucailin/references/attend-write.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-create.md +15 -4
- package/skills/weaver-e10-jucailin/references/recruit-write.md +3 -3
- package/skills/weaver-e10-meeting/SKILL.md +64 -14
- package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
- package/skills/weaver-e10-okr/references/okr-align.md +1 -1
- package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
- package/skills/weaver-e10-okr/references/okr-write.md +1 -1
- package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
- package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
- package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
- package/skills/weaver-e10-reception-flow/assets//350/241/214/347/250/213/345/215/225/346/250/241/346/235/277-/346/263/233/345/276/256.docx +0 -0
- package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
- package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
- package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
- package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
- package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
- package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
- package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +19 -10
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +10 -2
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +1 -1
- package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +204 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +13 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +29 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +27 -14
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +21 -2
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +9 -1
- package/skills/weaver-e10-shijingran/SKILL.md +5 -5
- package/skills/weaver-e10-shijingran/references/source-manifest.json +37 -36
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
- package/skills/weaver-e10-wenshuding/SKILL.md +17 -7
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +28 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +24 -8
- package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +3 -0
- package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +4 -0
- package/skills/weaver-e10-wenshuding/references/archive-search.md +3 -1
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/SKILL.md +19 -17
- package/skills/weaver-e10-workflow/aigroup/default.json +10 -6
- package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +36 -3
- package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +9 -6
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +152 -1
- package/skills/weaver-e10-yepiaotong/SKILL.md +19 -26
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
- package/skills/weaver-e10-yimiaoban/SKILL.md +18 -6
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +31 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +72 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
- package/dist/chunks/chunk-TTPJJJC4.js +0 -465
- package/dist/chunks/registry-BKBZPBAJ.js +0 -23
- package/dist/shortcuts/invoice/markdown.js +0 -172
- package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
*
|
|
19
19
|
* 默认值策略(跨环境运行时解析、不写死 id):状态=招聘中;流程=环境默认启用流程;
|
|
20
20
|
* 人数=1、薪酬月数=12;薪酬类型=月薪、招聘方式=社会招聘;
|
|
21
|
-
*
|
|
21
|
+
* 招聘负责人/用人经理=当前登录用户;工作地点=「办公地点」列表里启用状态的默认详细地址;
|
|
22
|
+
* 其余关联表单型取环境内已有职位记录的值("默认值=系统现成值")。
|
|
23
|
+
* ⚠️ 工作地点**不参与继承**:历史职位曾带出 detail_location 为「1」的脏地点。
|
|
22
24
|
*/
|
|
23
25
|
import { createHash, randomBytes } from 'node:crypto';
|
|
24
26
|
import { readFileSync } from 'node:fs';
|
|
@@ -26,7 +28,7 @@ import { resolve as resolvePath, dirname } from 'node:path';
|
|
|
26
28
|
import { fileURLToPath } from 'node:url';
|
|
27
29
|
import { rsSuccess, schemaOf } from './types.js';
|
|
28
30
|
import { rsFail, rsValidationError, rsConfirmationError } from '../errors.js';
|
|
29
|
-
import { objIdOf, formIdOf, saveFormData, getDsOptions,
|
|
31
|
+
import { objIdOf, formIdOf, saveFormData, getDsOptions, getFormDataRecord, resolvePersonId, findMenuNode, resolveCurrentUser, buildCardUrl, buildListUrl, randHex32, dsOptionsSnapshot, restoreDsOptions, invalidateEnvCache, verifySubmitted, expectedFields, probeCreatePermission, } from '../shared.js';
|
|
30
32
|
const SCHEMA_ID_STR = { type: 'string', description: '18 位记录 id(字符串)' };
|
|
31
33
|
// 职位管理表单字段 dataKey(缓存 fields 里取;不写死 fieldId)
|
|
32
34
|
const DATAKEYS_TEXT = ['position_name'];
|
|
@@ -35,11 +37,20 @@ const DATAKEYS_MTEXT = ['position_duty', 'work_request'];
|
|
|
35
37
|
const DEF_TEXT = { recruit_count: '1', number_of_pay_months: '12' };
|
|
36
38
|
const DEF_OPTION = { salary_type: '月薪', recruit_type: '社会招聘' };
|
|
37
39
|
const DEF_CURRENT_USER = ['recr_principal', 'employ_manager'];
|
|
40
|
+
// 🔴 薪资(salary_min / salary_max)必须继承,不能留空:这两个字段是**职位表单必填项**,
|
|
41
|
+
// 不传会导致后端必填校验失败、建职位直接报错(2026-11-06 实测:移除继承后 willSubmit 无薪资字段)。
|
|
42
|
+
// 但历史薪资确实可能是脏数据(实测抓到 300 元月薪),因此不静默使用:
|
|
43
|
+
// 通过 summary.inheritedFromRef 暴露继承值,并对明显偏低的值追加 inheritedSalaryWarnings 提示。
|
|
38
44
|
const DEF_FROM_REF = [
|
|
39
|
-
'position_nature', 'job_category', 'education', 'work_years',
|
|
45
|
+
'position_nature', 'job_category', 'education', 'work_years',
|
|
40
46
|
'salary_min', 'salary_max',
|
|
41
47
|
];
|
|
42
48
|
const DEF_STATUS = '招聘中';
|
|
49
|
+
// 默认办公地点用「详细地址名称」声明,不写死记录 id:运行时到「办公地点」列表
|
|
50
|
+
// 按「启用」状态 + 详细地址精确匹配取 id。历史职位继承会把内容写成「1」的脏地点带进新职位
|
|
51
|
+
// (2026-11-06 实测:某在册地点 detail_location 就是 "1" 且状态为启用),故 work_location 已从
|
|
52
|
+
// DEF_FROM_REF 移除,改由本默认地点解析;匹配不到则不写该字段并点名,不臆造 id。
|
|
53
|
+
const DEFAULT_WORK_LOCATION = '浦江镇三鲁公路3419号泛微软件园';
|
|
43
54
|
// sets 覆盖解析:字段取值类别
|
|
44
55
|
const NUM_KEYS = new Set(['recruit_count', 'number_of_pay_months', 'salary_min', 'salary_max', 'internship_duration', 'working_days']);
|
|
45
56
|
const PERSON_KEYS = new Set(['recr_principal', 'recr_helper', 'employ_manager', 'interviewer']);
|
|
@@ -115,30 +126,156 @@ function refToSubmit(d) {
|
|
|
115
126
|
return null;
|
|
116
127
|
return o;
|
|
117
128
|
}
|
|
118
|
-
//
|
|
119
|
-
|
|
129
|
+
// 工作地点的「办公地点」菜单定位:三级来源,不依赖 cache.menus
|
|
130
|
+
// 实测(2026-11-05):本环境环境缓存**没有 menus 字段**(只有 forms/lists/fields/dict 等),
|
|
131
|
+
// 原实现直接读 cache.menus → 拿到 undefined → findMenuNode 返回 null → resolveWorkLocation 恒为 null
|
|
132
|
+
// → work_location 每次进 setSkipped(连完整地址都写不进去)。改为:
|
|
133
|
+
// ① cache.lists.all_search(与面试数字人菜单解析同一模式,已在用)
|
|
134
|
+
// ② cache.menus(若某环境确实有)
|
|
135
|
+
// ③ allMenus 接口兜底(resolvePositionNewUrl 已在用,同一写法)
|
|
136
|
+
const WORK_PLACE_NAMES = ['办公地点', '工作地点'];
|
|
137
|
+
async function findWorkPlaceMenu(ctx) {
|
|
120
138
|
const { host, appId, cache } = ctx;
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
const ok = (m) => m && m.listId;
|
|
140
|
+
// ① all_search
|
|
141
|
+
const allSearch = ((cache.lists || {}).all_search || []);
|
|
142
|
+
const hit1 = allSearch.find((m) => ok(m) && WORK_PLACE_NAMES.some((n) => String(m.menuName || '').includes(n)));
|
|
143
|
+
if (hit1)
|
|
144
|
+
return { listId: String(hit1.listId), cusMenuId: String(hit1.cusMenuId || ''), menuName: String(hit1.menuName || '') };
|
|
145
|
+
// ② cache.menus(可能不存在)
|
|
146
|
+
const hit2 = findMenuNode(cache.menus || [], WORK_PLACE_NAMES, (m) => ok(m));
|
|
147
|
+
if (hit2)
|
|
148
|
+
return { listId: String(hit2.listId), cusMenuId: String(hit2.cusMenuId || ''), menuName: String(hit2.menuName || '') };
|
|
149
|
+
// ③ allMenus 接口
|
|
150
|
+
try {
|
|
151
|
+
const r = await host.request({ path: `/api/cusapp/app/allMenus?isFront=1&appId=${appId}&terminalType=PC`, method: 'GET' });
|
|
152
|
+
const flat = [];
|
|
153
|
+
(function walk(ns) { for (const n of (ns || []))
|
|
154
|
+
if (n && typeof n === 'object') {
|
|
155
|
+
flat.push(n);
|
|
156
|
+
walk(n.children || n.childs);
|
|
157
|
+
} })(r?.data?.cusAppMenus || r?.data);
|
|
158
|
+
const hit3 = findMenuNode(flat, WORK_PLACE_NAMES, (m) => ok(m));
|
|
159
|
+
if (hit3)
|
|
160
|
+
return { listId: String(hit3.listId), cusMenuId: String(hit3.cusMenuId || ''), menuName: String(hit3.menuName || '') };
|
|
161
|
+
}
|
|
162
|
+
catch { /* 接口不可用则放弃 */ }
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
// 仅进程内 memo(不落盘):同一 CLI 进程内 prepare/apply 及多个 set 复用一次列表请求。
|
|
166
|
+
// 记录 id / 启用状态 optionId 一律运行时从列表解析,跨环境不缓存、不写死。
|
|
167
|
+
const workPlaceMemo = new Map();
|
|
168
|
+
function stripHtml(s) {
|
|
169
|
+
return String(s ?? '').replace(/<[^>]*>/g, '').trim();
|
|
170
|
+
}
|
|
171
|
+
function parseSpans(raw) {
|
|
172
|
+
try {
|
|
173
|
+
const v = Array.isArray(raw) ? raw : JSON.parse(String(raw || '[]'));
|
|
174
|
+
return Array.isArray(v) ? v : [];
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
return [];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/** 「启用」判定:只读服务端翻译后的文本,不写死 optionId(跨环境 optionId 会变)。 */
|
|
181
|
+
function isEnabledText(s) {
|
|
182
|
+
const t = stripHtml(s);
|
|
183
|
+
return t.includes('启用') && !t.includes('禁用');
|
|
184
|
+
}
|
|
185
|
+
/** 拉取「办公地点」列表,按 place_status=启用 过滤;状态信息缺失时返回原始行并标记未过滤。 */
|
|
186
|
+
async function loadWorkPlaces(ctx) {
|
|
187
|
+
const { host, appId } = ctx;
|
|
188
|
+
const menu = await findWorkPlaceMenu(ctx);
|
|
189
|
+
if (!menu)
|
|
190
|
+
return { rows: [], statusFiltered: false };
|
|
191
|
+
const key = appId + '|' + menu.listId;
|
|
192
|
+
const cached = workPlaceMemo.get(key);
|
|
193
|
+
if (cached)
|
|
194
|
+
return cached;
|
|
195
|
+
const [tagObjId] = await Promise.all([
|
|
196
|
+
host
|
|
197
|
+
.request({ path: `/api/ebuilder/form/obj/getObjsByTag?appId=${appId}&tag=uf_rcrt_work_place`, method: 'GET' })
|
|
198
|
+
.then((t) => (Array.isArray(t?.data) && t.data[0] ? String(t.data[0].id || '') : ''))
|
|
199
|
+
.catch(() => ''),
|
|
200
|
+
]);
|
|
201
|
+
const pObj = tagObjId || String(menu.objId || '');
|
|
202
|
+
if (!pObj)
|
|
203
|
+
return { rows: [], statusFiltered: false };
|
|
204
|
+
const pageSize = 200;
|
|
205
|
+
const rawRows = [];
|
|
206
|
+
const dispRows = [];
|
|
207
|
+
for (let page = 1; page <= 5; page++) {
|
|
208
|
+
const body = {
|
|
209
|
+
current: page, pageSize, tableuid: randHex32(),
|
|
210
|
+
listId: menu.listId, searchParamData: { searchType: '3', type: 'and' },
|
|
211
|
+
terminal: 'PC', browser: 'Chrome', requiredMatch: 1, mapResult: 1,
|
|
212
|
+
recheckQuery: 1, isFollow: 0, isShareToMe: 0, filterCondition: {},
|
|
213
|
+
cusMenuId: menu.cusMenuId, urlPageTitle: menu.menuName, menuName: menu.menuName,
|
|
214
|
+
};
|
|
215
|
+
const r = await host.request({
|
|
216
|
+
path: `/api/ebuilder/form/list/getListDatas?passid=${pObj}&cid=${pObj}`,
|
|
217
|
+
body, headers: { ebBusinessId: menu.listId },
|
|
218
|
+
});
|
|
219
|
+
const batch = (r?.data?.data || r?.data?.displayData || []);
|
|
220
|
+
rawRows.push(...batch);
|
|
221
|
+
dispRows.push(...(r?.data?.displayData || []));
|
|
222
|
+
if (batch.length < pageSize)
|
|
223
|
+
break; // 服务端 total/hasMore 不可信,唯一可靠判据是分页本身
|
|
224
|
+
}
|
|
225
|
+
// 从 displayData 学「启用」对应的 optionId 集合与行 id 集合(两种形态都兼容)
|
|
226
|
+
const enabledStatusIds = new Set();
|
|
227
|
+
const enabledRowIds = new Set();
|
|
228
|
+
for (const d of dispRows) {
|
|
229
|
+
const rid = String(d?.form_data_id || d?.id || '');
|
|
230
|
+
if (isEnabledText(d?.place_status) && rid)
|
|
231
|
+
enabledRowIds.add(rid);
|
|
232
|
+
for (const s of parseSpans(d?.place_statusSpan)) {
|
|
233
|
+
if (isEnabledText(s?.name) && s?.id)
|
|
234
|
+
enabledStatusIds.add(String(s.id));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const statusFiltered = enabledRowIds.size > 0 || enabledStatusIds.size > 0;
|
|
238
|
+
const rows = rawRows
|
|
239
|
+
.filter((x) => !statusFiltered
|
|
240
|
+
|| enabledRowIds.has(String(x?.form_data_id || x?.id || ''))
|
|
241
|
+
|| enabledStatusIds.has(String(x?.place_status || '')))
|
|
242
|
+
.map((x) => ({
|
|
243
|
+
id: String(x?.form_data_id || x?.id || ''),
|
|
244
|
+
name: String(x?.name || ''),
|
|
245
|
+
detail: String(x?.detail_location || ''),
|
|
246
|
+
area: String(x?.area_text || ''),
|
|
247
|
+
city: String(x?.city || ''),
|
|
248
|
+
}))
|
|
249
|
+
.filter((x) => !!x.id);
|
|
250
|
+
const out = { rows, statusFiltered };
|
|
251
|
+
workPlaceMemo.set(key, out);
|
|
252
|
+
return out;
|
|
253
|
+
}
|
|
254
|
+
/** 精确匹配优先;包含匹配要求地址文本足够长且非纯数字,避免把内容写成「1」的脏地点选中。 */
|
|
255
|
+
function matchWorkPlace(rows, value) {
|
|
136
256
|
const v = String(value).trim();
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
257
|
+
if (!v || !rows.length)
|
|
258
|
+
return null;
|
|
259
|
+
const exact = rows.find((r) => r.detail === v) || rows.find((r) => r.name === v);
|
|
260
|
+
if (exact)
|
|
261
|
+
return exact;
|
|
262
|
+
const valid = (s) => s.length >= 4 && !/^\d+$/.test(s);
|
|
263
|
+
return rows.find((r) => (r.detail.includes(v) && valid(r.detail))
|
|
264
|
+
|| (r.name.includes(v) && valid(r.name))
|
|
265
|
+
|| (r.area.includes(v) && valid(r.area))
|
|
266
|
+
|| (v.includes(r.detail) && valid(r.detail))) || null;
|
|
267
|
+
}
|
|
268
|
+
// 工作地点:按名称/详细地址/城市解析「办公地点」记录 id(只在启用记录中匹配)
|
|
269
|
+
async function resolveWorkLocation(ctx, value) {
|
|
270
|
+
if (!String(value).trim())
|
|
271
|
+
return null;
|
|
272
|
+
const { rows } = await loadWorkPlaces(ctx);
|
|
273
|
+
const hit = matchWorkPlace(rows, value);
|
|
274
|
+
return hit ? { id: hit.id, name: hit.detail || hit.name || String(value) } : null;
|
|
275
|
+
}
|
|
276
|
+
/** 默认办公地点:按声明的详细地址在启用列表中精确解析 id,解析不到返回 null(不写、不继承)。 */
|
|
277
|
+
async function resolveDefaultWorkLocation(ctx) {
|
|
278
|
+
return resolveWorkLocation(ctx, DEFAULT_WORK_LOCATION);
|
|
142
279
|
}
|
|
143
280
|
// 解析 sets key=value → 提交 detail(按字段取值类别;解析不到返回 null)
|
|
144
281
|
async function resolveSetValue(ctx, key, value, refByFid) {
|
|
@@ -147,8 +284,18 @@ async function resolveSetValue(ctx, key, value, refByFid) {
|
|
|
147
284
|
const id = (cache.fields[objId] || {})[key];
|
|
148
285
|
if (!id)
|
|
149
286
|
return null;
|
|
150
|
-
if (NUM_KEYS.has(key))
|
|
287
|
+
if (NUM_KEYS.has(key)) {
|
|
288
|
+
// 薪资字段单位是「千元」(页面 15.00 = 15K,与字段 ID 交叉验证);用户/Agent 传的是「元」。
|
|
289
|
+
// 只对**显式输入**换算;从已有职位继承的值本来就是千元,绝不能再除一次。
|
|
290
|
+
if (key === 'salary_min' || key === 'salary_max') {
|
|
291
|
+
const n = Number(String(value).replace(/,/g, ''));
|
|
292
|
+
if (Number.isFinite(n) && n > 0) {
|
|
293
|
+
const k = n / 1000;
|
|
294
|
+
return { formField: { id }, content: String(Number.isInteger(k) ? k : Number(k.toFixed(3))) };
|
|
295
|
+
}
|
|
296
|
+
}
|
|
151
297
|
return { formField: { id }, content: String(value) };
|
|
298
|
+
}
|
|
152
299
|
if (MTEXT_KEYS.has(key))
|
|
153
300
|
return { formField: { id }, dataText: { content: String(value) } };
|
|
154
301
|
if (key === 'position_name')
|
|
@@ -158,7 +305,7 @@ async function resolveSetValue(ctx, key, value, refByFid) {
|
|
|
158
305
|
return uid ? { formField: { id }, dataOptions: [{ optionId: String(uid), content: value }] } : null;
|
|
159
306
|
}
|
|
160
307
|
if (OPTION_KEYS.has(key)) {
|
|
161
|
-
const m =
|
|
308
|
+
const m = await getDsOptions(host, objId, id);
|
|
162
309
|
const oid = m[value];
|
|
163
310
|
return oid ? { formField: { id }, dataOptions: [{ optionId: String(oid), content: value }] } : null;
|
|
164
311
|
}
|
|
@@ -316,6 +463,10 @@ async function buildJd(opts) {
|
|
|
316
463
|
for (const k of DATAKEYS_MTEXT)
|
|
317
464
|
if (!fid(k))
|
|
318
465
|
throw rsFail('职位管理缺少字段 ' + k + '(ds/fields 解析不到)');
|
|
466
|
+
// 并行预取:refByFid(sets 解析依赖它)与 currentUser(仅第⑤步用,与 sets 无依赖)
|
|
467
|
+
// 同时发出,避免过去「先等 refByFid → 再逐 set 串行 → 最后才取 currentUser」的多余 RTT。
|
|
468
|
+
const currentUserPromise = resolveCurrentUser(host)
|
|
469
|
+
.catch(() => null);
|
|
319
470
|
const refByFid = await fetchRefByFid(ctx);
|
|
320
471
|
const map = new Map();
|
|
321
472
|
const put = (d) => { if (d && d.formField && d.formField.id)
|
|
@@ -333,10 +484,13 @@ async function buildJd(opts) {
|
|
|
333
484
|
put({ formField: { id: fid('demand') }, dataOptions: [{ optionId: String(demandId), content: demandName || String(demandId) }] });
|
|
334
485
|
}
|
|
335
486
|
// ② sets 覆盖(AI 依 JD 指定;优先于自动默认值)
|
|
487
|
+
// 各项之间互不依赖(都只读 refByFid 与字典缓存),因此并行解析:
|
|
488
|
+
// 原实现逐个 await,6 个 set 就要串 6 次 RTT(含 work_location 内部 2~3 次请求),是 prepare 的主要串行瓶颈。
|
|
489
|
+
// 仍按原顺序 put,保证同一 key 多次出现时「后者覆盖前者」的语义不变。
|
|
336
490
|
const appliedSets = [];
|
|
337
491
|
const skippedSets = [];
|
|
338
|
-
|
|
339
|
-
|
|
492
|
+
const resolvedSets = await Promise.all(sets.map(async ([k, v]) => ({ k, v, d: await resolveSetValue(ctx, k, v, refByFid).catch(() => null) })));
|
|
493
|
+
for (const { k, v, d } of resolvedSets) {
|
|
340
494
|
if (d) {
|
|
341
495
|
put(d);
|
|
342
496
|
appliedSets.push(k + '=' + v);
|
|
@@ -349,7 +503,7 @@ async function buildJd(opts) {
|
|
|
349
503
|
if (!hasKey('status')) {
|
|
350
504
|
if (!fid('status'))
|
|
351
505
|
throw rsFail('职位管理缺少字段 status(ds/fields 解析不到)');
|
|
352
|
-
const statusMap =
|
|
506
|
+
const statusMap = await getDsOptions(host, objId, fid('status'));
|
|
353
507
|
const statusId = statusMap[DEF_STATUS];
|
|
354
508
|
if (!statusId)
|
|
355
509
|
throw rsFail('职位管理「招聘状态」未解析到「' + DEF_STATUS + '」选项(ds/options 返回为空)');
|
|
@@ -364,7 +518,7 @@ async function buildJd(opts) {
|
|
|
364
518
|
const filled = [];
|
|
365
519
|
let currentUser = null;
|
|
366
520
|
if (DEF_CURRENT_USER.some((k) => fid(k) && !hasKey(k))) {
|
|
367
|
-
currentUser = await
|
|
521
|
+
currentUser = await currentUserPromise;
|
|
368
522
|
if (currentUser && currentUser.id) {
|
|
369
523
|
for (const k of DEF_CURRENT_USER) {
|
|
370
524
|
if (fid(k) && !hasKey(k)) {
|
|
@@ -383,7 +537,7 @@ async function buildJd(opts) {
|
|
|
383
537
|
}
|
|
384
538
|
for (const [k, name] of Object.entries(DEF_OPTION)) {
|
|
385
539
|
if (fid(k) && !hasKey(k)) {
|
|
386
|
-
const m =
|
|
540
|
+
const m = await getDsOptions(host, objId, fid(k));
|
|
387
541
|
const oid = m[name];
|
|
388
542
|
if (oid) {
|
|
389
543
|
put({ formField: { id: fid(k) }, dataOptions: [{ optionId: String(oid), content: name }] });
|
|
@@ -391,6 +545,10 @@ async function buildJd(opts) {
|
|
|
391
545
|
}
|
|
392
546
|
}
|
|
393
547
|
}
|
|
548
|
+
// 其余必填字段默认值:从「环境内最近一条职位记录」继承
|
|
549
|
+
// ⚠️ 继承来源可能是脏数据(实测本环境 836 条职位中「蓝堡舟山普陀区蓝堡」占 35 条),
|
|
550
|
+
// 因此逐个字段记录 inheritedFromRef,在确认摘要里明示,避免用户以为是自己指定的值。
|
|
551
|
+
const inheritedFromRef = [];
|
|
394
552
|
for (const k of DEF_FROM_REF) {
|
|
395
553
|
const id = fid(k);
|
|
396
554
|
if (id && !map.has(String(id)) && refByFid[String(id)]) {
|
|
@@ -398,9 +556,38 @@ async function buildJd(opts) {
|
|
|
398
556
|
if (d) {
|
|
399
557
|
put(d);
|
|
400
558
|
filled.push(k);
|
|
559
|
+
inheritedFromRef.push({ field: k, value: detailValueId(refByFid[String(id)]) });
|
|
401
560
|
}
|
|
402
561
|
}
|
|
403
562
|
}
|
|
563
|
+
// 继承来的薪资若明显偏低(历史脏数据,实测出现过 300 元月薪),额外点名提示。
|
|
564
|
+
// 不阻断提交(薪资是必填项,阻断等于无法建档),但要求 Agent 在确认摘要里明确提示用户核对。
|
|
565
|
+
const inheritedSalaryWarnings = [];
|
|
566
|
+
for (const key of ['salary_min', 'salary_max']) {
|
|
567
|
+
const hit = inheritedFromRef.find((x) => x.field === key);
|
|
568
|
+
if (!hit)
|
|
569
|
+
continue;
|
|
570
|
+
const num = Number(String(hit.value).replace(/[^\d.]/g, ''));
|
|
571
|
+
// 继承值单位也是千元:18 = 18K 正常;低于 1(<1000元)或高于 100(>10万/月)才算异常
|
|
572
|
+
if (hit.value && Number.isFinite(num) && (num < 1 || num > 100)) {
|
|
573
|
+
inheritedSalaryWarnings.push(key + ' 继承值「' + hit.value + '」(千元)明显异常,请人工核对后再提交');
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
// ⑦ 工作地点默认值:不再从历史职位继承(实测会把 detail_location 为「1」的脏地点带进新职位),
|
|
577
|
+
// 改为在「办公地点」列表按「启用」状态 + 详细地址精确解析;解析不到则不写并点名。
|
|
578
|
+
let workLocationDefault = null;
|
|
579
|
+
let workLocationWarning = null;
|
|
580
|
+
if (!hasKey('work_location') && fid('work_location')) {
|
|
581
|
+
const loc = await resolveDefaultWorkLocation(ctx).catch(() => null);
|
|
582
|
+
if (loc) {
|
|
583
|
+
put({ formField: { id: fid('work_location') }, dataOptions: [{ optionId: loc.id, content: loc.name }] });
|
|
584
|
+
filled.push('work_location');
|
|
585
|
+
workLocationDefault = loc.name;
|
|
586
|
+
}
|
|
587
|
+
else {
|
|
588
|
+
workLocationWarning = `未在「办公地点」列表找到启用状态的默认地点「${DEFAULT_WORK_LOCATION}」,本次不写 work_location;请用 sets 指定`;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
404
591
|
const inv = {};
|
|
405
592
|
for (const [k, v] of Object.entries(fields))
|
|
406
593
|
inv[String(v)] = k;
|
|
@@ -414,10 +601,20 @@ async function buildJd(opts) {
|
|
|
414
601
|
requestLen: (requestText || '').length,
|
|
415
602
|
demand: demandId ? (demandName || demandId) : '(未关联需求)',
|
|
416
603
|
status: DEF_STATUS,
|
|
417
|
-
|
|
604
|
+
// 解析不到环境默认流程时不写该字段,表单自身默认值生效;文案按实际行为表述,避免误导。
|
|
605
|
+
recruitFlow: (defFlow && defFlow.id) ? defFlow.name : '(沿用表单默认值)',
|
|
418
606
|
currentUser: currentUser ? currentUser.name : null,
|
|
419
607
|
setApplied: appliedSets,
|
|
420
608
|
setSkipped: skippedSets,
|
|
609
|
+
// 明示哪些字段值继承自「环境内最近一条职位记录」——这些不是用户指定的,可能来自脏数据,
|
|
610
|
+
// 必须在确认摘要里人工核对(工作地点不参与继承,见 workLocationDefault)
|
|
611
|
+
inheritedFromRef: inheritedFromRef.length ? inheritedFromRef : undefined,
|
|
612
|
+
inheritedSalaryWarnings: inheritedSalaryWarnings.length ? inheritedSalaryWarnings : undefined,
|
|
613
|
+
inheritedNote: inheritedFromRef.length
|
|
614
|
+
? '以上字段未指定,值继承自环境内最近一条职位记录,可能含历史脏数据,请核对后再提交(工作地点不参与继承)'
|
|
615
|
+
: undefined,
|
|
616
|
+
workLocationDefault: workLocationDefault || undefined,
|
|
617
|
+
workLocationWarning: workLocationWarning || undefined,
|
|
421
618
|
requiredDefaultsFilled,
|
|
422
619
|
},
|
|
423
620
|
};
|
|
@@ -445,6 +642,9 @@ async function prepare(args, env) {
|
|
|
445
642
|
const session = await host.getSession();
|
|
446
643
|
const ctx = { host, baseUrl: session.baseUrl.replace(/\/+$/, ''), appId: '', cache: await env.recruitContext() };
|
|
447
644
|
ctx.appId = ctx.cache.appId;
|
|
645
|
+
const perm = await probeCreatePermission(ctx.host, objIdOf(ctx.cache, 'position_manage'));
|
|
646
|
+
if (perm === 'denied')
|
|
647
|
+
throw rsFail('当前账号没有「职位管理」表单的创建权限,已阻断(未写入任何数据)');
|
|
448
648
|
const positionName = String(args.positionName || '').trim();
|
|
449
649
|
if (!positionName)
|
|
450
650
|
throw rsValidationError('position_name_required', 'positionName 必填');
|
|
@@ -456,19 +656,45 @@ async function prepare(args, env) {
|
|
|
456
656
|
demandName: args.demandName ? String(args.demandName) : undefined,
|
|
457
657
|
sets: setsOf(args),
|
|
458
658
|
});
|
|
459
|
-
|
|
460
|
-
|
|
659
|
+
// 参考检索默认关闭:环境职位数据重复严重(实测 836 条中「舟山民宿管家」30 条)且列表层
|
|
660
|
+
// 无薪资/学历字段,参考价值低于请求成本。需要时显式传 referenceKeyword 才执行;
|
|
661
|
+
// 岗位范式改由 references/position-templates.md 提供(零请求)。
|
|
662
|
+
const refs = args.referenceKeyword
|
|
663
|
+
? await fetchRecentReferences(ctx, jd, String(args.referenceKeyword))
|
|
664
|
+
.catch((e) => ({ available: false, reason: e.message, items: [] }))
|
|
665
|
+
: {
|
|
666
|
+
available: false,
|
|
667
|
+
skipped: true,
|
|
668
|
+
reason: '未显式指定 referenceKeyword,已跳过同类职位参考检索(改用 references/position-templates.md 的岗位模板)',
|
|
669
|
+
items: [],
|
|
670
|
+
};
|
|
671
|
+
// fingerprint 必须基于完整 dataDetails(apply 阶段比对同一口径),回执里才做瘦身。
|
|
461
672
|
const willSubmit = { formId: jd.formId, objId: jd.objId, dataDetails: jd.dataDetails };
|
|
462
673
|
const fp = fingerprint(willSubmit);
|
|
463
|
-
const continuation = await env.continuation.issue({ operation: 'recruit-stage.jd.create.apply', fingerprint: fp
|
|
674
|
+
const continuation = await env.continuation.issue({ operation: 'recruit-stage.jd.create.apply', fingerprint: fp,
|
|
675
|
+
enumMaps: await dsOptionsSnapshot() });
|
|
676
|
+
// 回执瘦身:willSubmit 只输出字段名清单(不含内部 fieldId),continuation 提到首部——
|
|
677
|
+
// 避免大输出被截断导致 Agent 取不到 continuation 而重复调用 prepare(实测多花 10.7s)。
|
|
678
|
+
const invFieldKeys = {};
|
|
679
|
+
for (const [k, v] of Object.entries(ctx.cache.fields[jd.objId] || {}))
|
|
680
|
+
invFieldKeys[String(v)] = k;
|
|
464
681
|
return rsSuccess('recruit-stage.jd.create.prepare', {
|
|
465
682
|
mode: 'prepare',
|
|
683
|
+
continuation,
|
|
684
|
+
fingerprint: fp,
|
|
466
685
|
...jd.summary,
|
|
467
686
|
recentReferences: refs.items,
|
|
468
|
-
recentReferencesNote: refs.
|
|
469
|
-
?
|
|
470
|
-
:
|
|
471
|
-
|
|
687
|
+
recentReferencesNote: refs.skipped
|
|
688
|
+
? refs.reason
|
|
689
|
+
: refs.available
|
|
690
|
+
? `已按「${refs.keyword}」在当前环境职位列表中检索(扫描 ${refs.scanned} 条,命中 ${refs.items.length} 条)——请对标这些同类职位的薪酬/人数/要求给出推荐值,一并放进确认摘要,不要逐字段询问用户`
|
|
691
|
+
: ('参考检索不可用:' + (refs.reason || '')),
|
|
692
|
+
willSubmit: {
|
|
693
|
+
formId: willSubmit.formId,
|
|
694
|
+
objId: willSubmit.objId,
|
|
695
|
+
fieldCount: willSubmit.dataDetails.length,
|
|
696
|
+
fields: willSubmit.dataDetails.map((d) => invFieldKeys[String(d.formField && d.formField.id)] || String(d.formField && d.formField.id)),
|
|
697
|
+
},
|
|
472
698
|
}, {
|
|
473
699
|
continuation,
|
|
474
700
|
fingerprint: fp,
|
|
@@ -481,6 +707,7 @@ async function apply(args, env) {
|
|
|
481
707
|
if (!args.continuation)
|
|
482
708
|
throw rsValidationError('continuation_required', '缺少 continuation(来自 prepare 的 meta)');
|
|
483
709
|
const payload = await env.continuation.verify(String(args.continuation), 'recruit-stage.jd.create.apply');
|
|
710
|
+
restoreDsOptions(payload.enumMaps);
|
|
484
711
|
const host = env.host;
|
|
485
712
|
const session = await host.getSession();
|
|
486
713
|
const ctx = { host, baseUrl: session.baseUrl.replace(/\/+$/, ''), appId: '', cache: await env.recruitContext() };
|
|
@@ -510,24 +737,38 @@ async function apply(args, env) {
|
|
|
510
737
|
const positionPostId = data.positionPostId;
|
|
511
738
|
const checkRpa = data.checkRpa;
|
|
512
739
|
const rpaValidMsg = data.rpaValidMsg || null;
|
|
513
|
-
|
|
514
|
-
|
|
740
|
+
// 页面真实响应:外层 status=true、data.status=false(业务子状态,不是失败)、fail=false、
|
|
741
|
+
// successMsg=操作成功,且可能没有 positionPostId。旧逻辑强依赖 positionPostId 会把成功误判为 failed。
|
|
742
|
+
const okByResponse = r2?.status !== false && r2?.fail !== false && data.fail !== true;
|
|
743
|
+
// 第三层门禁:写完回查记录与关键字段,作为最终判定(接口语义不一致时以落库为准)
|
|
744
|
+
const verification = await verifySubmitted({
|
|
745
|
+
host, formId: jd.formId, objId: jd.objId, dataId: formDataId,
|
|
746
|
+
expected: expectedFields(jd.dataDetails, ctx.cache.fields[jd.objId] || {}, ['position_name', 'status', 'salary_min', 'salary_max', 'work_location'], ['position_name', 'status'], ['salary_min', 'salary_max', 'work_location']),
|
|
747
|
+
});
|
|
748
|
+
if (verification.mismatches.length)
|
|
749
|
+
invalidateEnvCache(ctx.baseUrl, ctx.appId);
|
|
750
|
+
const recordOk = verification.unavailable ? okByResponse : verification.mismatches.length === 0;
|
|
751
|
+
const created = okByResponse && recordOk;
|
|
752
|
+
const result = !created ? 'failed' : (verification.mismatches.length ? 'partial' : 'success');
|
|
753
|
+
// 列表链接只打开列表;详情单页由 viewLink 单独给出,两者不再合并成一个「列表+滑出详情」地址。
|
|
754
|
+
const listUrl = buildListUrl(ctx.baseUrl, (ctx.cache.lists?.position?.listId) || '');
|
|
515
755
|
const cardUrl = buildCardUrl(ctx.baseUrl, jd.objId, formDataId);
|
|
516
|
-
const locateUrl = buildListLocateUrl(ctx.baseUrl, ctx.appId, (ctx.cache.lists?.position?.listId) || '', jd.objId, formDataId);
|
|
517
756
|
return rsSuccess('recruit-stage.jd.create.apply', {
|
|
518
757
|
mode: 'apply',
|
|
519
|
-
result
|
|
758
|
+
result,
|
|
520
759
|
formDataId,
|
|
521
760
|
positionPostId: positionPostId || null,
|
|
522
761
|
rpaChecked: checkRpa === undefined ? null : !!checkRpa,
|
|
523
762
|
rpaValidMsg,
|
|
524
|
-
|
|
763
|
+
verification: { checked: verification.checked, mismatches: verification.mismatches, unavailable: verification.unavailable || null },
|
|
764
|
+
verifyWarnings: verification.mismatches.map((m) => '落库回查不一致:' + m.label + ' 期望 ' + m.expected + ',实际 ' + m.actual),
|
|
765
|
+
positionListUrl: listUrl,
|
|
525
766
|
positionCardUrl: cardUrl,
|
|
526
|
-
positionListLocateUrl:
|
|
767
|
+
positionListLocateUrl: listUrl,
|
|
527
768
|
// 产物链接(Agent 原样搬运成 Markdown 链接,按顺序:详情在前、列表在后)
|
|
528
769
|
viewLink: cardUrl ? `[查看 ${jd.summary.positionName || '新建职位'} 职位详情](${cardUrl})` : null,
|
|
529
|
-
listLocateLink:
|
|
530
|
-
agentNote: '查看入口 = 两个 Markdown
|
|
770
|
+
listLocateLink: listUrl ? `[打开职位列表](${listUrl})` : null,
|
|
771
|
+
agentNote: '查看入口 = 两个 Markdown 链接:① viewLink 职位详情单页 ② listLocateLink 职位列表(只打开列表,不打开详情)。按顺序原样搬运,不要包 browsertool 标签;缺哪个只给另一个。链接只是查看入口,重复点击不会重复创建。',
|
|
531
772
|
...jd.summary,
|
|
532
773
|
});
|
|
533
774
|
}
|