weaver-work-cli 0.1.42 → 0.1.44
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 +17 -0
- package/dist/chunks/{archive-J4I6MCKF.js → archive-P6TBQGKL.js} +13 -5
- package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-7TQ2NXOH.js} +12 -5
- package/dist/chunks/{asset-L7D4FAOZ.js → asset-3ELRG37G.js} +11 -4
- package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-WIGMUFMD.js} +7 -3
- package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-E3276UOV.js} +5 -4
- package/dist/chunks/{blog-BVGQ7NZL.js → blog-C5NMZAAC.js} +11 -4
- package/dist/chunks/{caizhilian-SAADNFD6.js → caizhilian-5XSM2DFP.js} +13 -6
- package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-FI2WNSBO.js} +12 -5
- package/dist/chunks/{chunk-YRSZQUD2.js → chunk-3YBDYOC4.js} +3 -3
- package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
- package/dist/chunks/chunk-6N4JPNFL.js +76 -0
- package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
- package/dist/chunks/chunk-7BDPM5ST.js +11 -0
- package/dist/chunks/{chunk-EKWAQSLU.js → chunk-BCVYBYYT.js} +432 -2248
- package/dist/chunks/{chunk-W7BEHOSR.js → chunk-CWYGFU5B.js} +2 -2
- package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
- package/dist/chunks/{chunk-SA6VBIHY.js → chunk-ETNJSKMM.js} +214 -16
- package/dist/chunks/{chunk-BBKDXQEC.js → chunk-F4E4EM35.js} +3 -3
- package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-FAZTGX7S.js} +6 -6
- package/dist/chunks/{chunk-NKZRQXST.js → chunk-FRZKBMSW.js} +52 -36
- package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
- package/dist/chunks/{chunk-GEWYMQME.js → chunk-GAMZLAG2.js} +1 -1
- package/dist/chunks/{chunk-R4CHUSKC.js → chunk-GM6J7Q4B.js} +4 -4
- package/dist/chunks/{chunk-APVFJUQH.js → chunk-GRDRG6HP.js} +3 -3
- package/dist/chunks/{chunk-LDZQPUIA.js → chunk-HIT4Y6OI.js} +1 -1
- package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
- package/dist/chunks/{chunk-LADPYOWC.js → chunk-IAZ3UPY6.js} +3 -3
- package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
- package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
- package/dist/chunks/{chunk-BIPYLLVS.js → chunk-N4M2DDFE.js} +15 -15
- package/dist/chunks/{chunk-QKNKR4RH.js → chunk-OF4S23UB.js} +4 -4
- package/dist/chunks/{chunk-JPRO6ER2.js → chunk-PC7VKEB5.js} +57 -60
- package/dist/chunks/{chunk-4PD5NWAX.js → chunk-PUQS5MWL.js} +2 -2
- package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
- package/dist/chunks/{chunk-72CKAUAG.js → chunk-QVSWRLLU.js} +7 -5
- package/dist/chunks/{chunk-4RAE6JXP.js → chunk-TA7FXXJD.js} +6 -3
- package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
- package/dist/chunks/{chunk-FOAA27U5.js → chunk-UFIT2UU3.js} +16 -4
- 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-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
- package/dist/chunks/{chunk-G4UR6NXN.js → chunk-WSF4NNMR.js} +3 -3
- package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
- package/dist/chunks/{chunk-3KTFS4IA.js → chunk-XNIK66I4.js} +19 -9
- 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-GHXCDPTM.js → chunk-Z7VYWPZV.js} +1 -1
- package/dist/chunks/{conflict-F2OMZRTO.js → conflict-ARLSZJ6V.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-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-DNIIW5VJ.js} +13 -5
- package/dist/chunks/{cowork-3MN6EQQO.js → cowork-GMLRGVIW.js} +11 -4
- package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-J22BO65E.js} +8 -7
- package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-ANV2FHYV.js} +12 -7
- package/dist/chunks/{ehr-KMOJULKG.js → ehr-GSTGAIY3.js} +266 -24
- package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
- package/dist/chunks/{env-LB7NBL2O.js → env-BX3VRFS7.js} +4 -3
- package/dist/chunks/{esb-W2PJCFCX.js → esb-ATAIASX2.js} +12 -7
- package/dist/chunks/{factory-6ZFQXQ46.js → factory-PETTFME6.js} +3 -2
- package/dist/chunks/{fna-ZQPCUV4R.js → fna-YEKBSFSX.js} +14 -8
- package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-BFVXAYFX.js} +5 -4
- package/dist/chunks/{host-ATKVNZAT.js → host-HRBXEPDQ.js} +5 -5
- package/dist/chunks/{host-BQH22NTQ.js → host-LR55CTHP.js} +5 -5
- package/dist/chunks/{host-X2CSLFM6.js → host-SUOY6VYQ.js} +5 -5
- package/dist/chunks/{host-4CBHGOHT.js → host-SZGV4UNT.js} +5 -5
- package/dist/chunks/{host-YTODKMSL.js → host-WIKN2EJ5.js} +5 -5
- package/dist/chunks/{hrm-FFM4UJFS.js → hrm-NRDO4W5G.js} +11 -7
- package/dist/chunks/{im-VEHKDQPB.js → im-IQ2HN23S.js} +8 -7
- package/dist/chunks/{invoice-LVIKSIIF.js → invoice-MNRW76PP.js} +636 -1768
- package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-DTRBAX4N.js} +14 -6
- package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
- package/dist/chunks/{mail-VDKRGUD3.js → mail-ZVAUXOJA.js} +16 -14
- package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-FEVPZ67S.js} +21 -14
- package/dist/chunks/{okr-CHG4OO3U.js → okr-SDH3E5RA.js} +12 -5
- package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
- package/dist/chunks/{plan-XWR75667.js → plan-E35JFDI7.js} +12 -5
- package/dist/chunks/{project-5BXOOKMG.js → project-73QXBAB2.js} +11 -4
- package/dist/chunks/reception-UWZVACBN.js +1899 -0
- package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-4MAOCKFY.js} +320 -57
- package/dist/chunks/registry-IM5G23LS.js +24 -0
- package/dist/chunks/{registry-RHMW6ANW.js → registry-JDUS4E7D.js} +7 -6
- package/dist/chunks/{registry-7FFOXIAW.js → registry-KNKSCJNT.js} +7 -6
- package/dist/chunks/{registry-Z43434VG.js → registry-PO7SI256.js} +4 -4
- package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
- package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-H7KLXA5R.js} +6 -5
- package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-ESZIBAUO.js} +6 -5
- package/dist/chunks/{workflow-ADHKCAJK.js → workflow-CWJFJLQU.js} +13 -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 +163 -8
- package/dist/internal/e10/auth/error-log.js +182 -0
- package/dist/internal/e10/auth/session.js +17 -3
- package/dist/internal/e10/auth-recovery.js +39 -12
- package/dist/internal/e10/context.js +17 -2
- 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/confirm.js +2 -1
- 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/index.js +2 -0
- package/dist/shortcuts/contract/operations/write.js +2 -1
- 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 +182 -3
- package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +1 -1
- 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/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 +16 -7
- package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/factory.js +1 -1
- package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
- package/dist/shortcuts/meeting/operations/receipts.js +1 -1
- 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/jd-create.js +106 -17
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +166 -10
- package/dist/shortcuts/workflow/continuation.js +2 -1
- package/dist/shortcuts/workflow/index.js +2 -0
- package/dist/shortcuts/workflow/operations/form.js +32 -8
- 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 +1 -1
- package/docs/e10-auth.md +16 -0
- 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/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/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/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-request-write.md +1 -1
- 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 +12 -3
- package/skills/weaver-e10-jucailin/references/recruit-write.md +1 -1
- package/skills/weaver-e10-meeting/SKILL.md +8 -6
- 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 +9 -5
- 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 +202 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +22 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +14 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +6 -0
- 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/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
- 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 +1 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
- 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
|
@@ -2,13 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
meetingStateDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GAMZLAG2.js";
|
|
6
6
|
import {
|
|
7
7
|
SCHEMA_ID,
|
|
8
8
|
meetingSuccess,
|
|
9
9
|
meetingValidationError,
|
|
10
10
|
schemaOf
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QVSWRLLU.js";
|
|
12
12
|
|
|
13
13
|
// src/shortcuts/meeting/operations/attachment-content.ts
|
|
14
14
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
hrmValidationError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-56EZERK4.js";
|
|
6
6
|
|
|
7
7
|
// src/shortcuts/hrm/operations/types.ts
|
|
8
8
|
var READ = "read";
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
E10_XIAOE_NETWORK_UNAVAILABLE_MESSAGE,
|
|
8
8
|
E10_XIAOE_RECOVERY_FAILED_MESSAGE,
|
|
9
9
|
getActiveProfile,
|
|
10
|
+
getE10AuthRoot,
|
|
10
11
|
hasXiaoEEnv,
|
|
11
12
|
isXiaoERuntimeAgent,
|
|
12
13
|
lastXiaoEFailure,
|
|
@@ -16,10 +17,159 @@ import {
|
|
|
16
17
|
startFetchTiming,
|
|
17
18
|
summarizeXiaoEFailureKind,
|
|
18
19
|
tryXiaoEUnifiedLogin
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UFIT2UU3.js";
|
|
20
21
|
import {
|
|
21
|
-
CliError
|
|
22
|
-
|
|
22
|
+
CliError,
|
|
23
|
+
toErrorEnvelope
|
|
24
|
+
} from "./chunk-UG5G54VL.js";
|
|
25
|
+
|
|
26
|
+
// src/internal/e10/auth/error-log.ts
|
|
27
|
+
import { randomUUID } from "node:crypto";
|
|
28
|
+
import { appendFile, chmod, mkdir, readFile, unlink } from "node:fs/promises";
|
|
29
|
+
import { dirname, resolve } from "node:path";
|
|
30
|
+
var XIAOE_AUTH_ERROR_LOG_NAME = "xiaoe-auth-errors.ndjson";
|
|
31
|
+
var DEFAULT_LOG_LIMIT = 50;
|
|
32
|
+
var MAX_XIAOE_AUTH_ERROR_LOG_LIMIT = 500;
|
|
33
|
+
function getXiaoEAuthErrorLogPath() {
|
|
34
|
+
return resolve(getE10AuthRoot(), "logs", XIAOE_AUTH_ERROR_LOG_NAME);
|
|
35
|
+
}
|
|
36
|
+
function xiaoEAuthLogSecrets(env) {
|
|
37
|
+
return Object.entries(env).filter(([key, value]) => Boolean(
|
|
38
|
+
value && (key.startsWith("XIAOE_") || key.startsWith("WEAVER_XIAOE_")) && /(?:TOKEN|AUTH|ETEAMSID|COOKIE|SESSION|SECRET|PASSWORD)/iu.test(key)
|
|
39
|
+
)).map(([, value]) => value);
|
|
40
|
+
}
|
|
41
|
+
function redactSensitiveText(value, secrets = []) {
|
|
42
|
+
let text = value;
|
|
43
|
+
for (const secret of secrets) {
|
|
44
|
+
if (secret && secret.length >= 6) text = text.split(secret).join("<redacted>");
|
|
45
|
+
}
|
|
46
|
+
return text.replace(/(https?:\/\/[^\s?#]+)\?[^\s#]*/giu, "$1?<redacted>").replace(/\b(Bearer\s+)[A-Za-z0-9._~+/=-]+/giu, "$1<redacted>").replace(
|
|
47
|
+
/((?:eteamsid|access[_-]?token|refresh[_-]?token|auth(?:orization)?|cookie|session[_-]?id|secret|password)\s*[:=]\s*)(["']?)[^\s,;}"']+/giu,
|
|
48
|
+
"$1$2<redacted>"
|
|
49
|
+
).replace(
|
|
50
|
+
/(["'](?:eteamsid|access[_-]?token|refresh[_-]?token|authorization|cookie|session[_-]?id|secret|password)["']\s*:\s*["'])[^"']*(["'])/giu,
|
|
51
|
+
"$1<redacted>$2"
|
|
52
|
+
).replace(/\b[A-Za-z0-9_-]{48,}\b/gu, "<redacted>");
|
|
53
|
+
}
|
|
54
|
+
function sanitizeBaseUrl(value, secrets) {
|
|
55
|
+
if (!value) return void 0;
|
|
56
|
+
try {
|
|
57
|
+
const url = new URL(value);
|
|
58
|
+
url.username = "";
|
|
59
|
+
url.password = "";
|
|
60
|
+
url.search = "";
|
|
61
|
+
url.hash = "";
|
|
62
|
+
return redactSensitiveText(url.toString().replace(/\/$/u, ""), secrets);
|
|
63
|
+
} catch {
|
|
64
|
+
return redactSensitiveText(value, secrets);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function sanitizeFailure(failure, secrets) {
|
|
68
|
+
return {
|
|
69
|
+
stage: failure.stage,
|
|
70
|
+
kind: failure.kind,
|
|
71
|
+
message: redactSensitiveText(failure.message, secrets),
|
|
72
|
+
...failure.causeCode ? { causeCode: redactSensitiveText(failure.causeCode, secrets) } : {},
|
|
73
|
+
...failure.httpStatus === void 0 ? {} : { httpStatus: failure.httpStatus }
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function sanitizeError(error, secrets) {
|
|
77
|
+
if (error === void 0) return void 0;
|
|
78
|
+
const envelope = toErrorEnvelope(error);
|
|
79
|
+
return {
|
|
80
|
+
...envelope,
|
|
81
|
+
message: redactSensitiveText(envelope.message, secrets),
|
|
82
|
+
// Error details can contain arbitrary server payloads. The normalized
|
|
83
|
+
// diagnostics fields above are the only details persisted to disk.
|
|
84
|
+
...envelope.details === void 0 ? {} : { details: "<omitted from persistent auth log>" }
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function createEntry(input) {
|
|
88
|
+
const secrets = input.secrets || [];
|
|
89
|
+
const diagnostics = input.diagnostics;
|
|
90
|
+
const baseUrl = sanitizeBaseUrl(input.baseUrl || diagnostics?.baseUrl, secrets);
|
|
91
|
+
const lastError = diagnostics?.lastError ? redactSensitiveText(diagnostics.lastError, secrets) : void 0;
|
|
92
|
+
const failures = diagnostics?.failures?.map((failure) => sanitizeFailure(failure, secrets));
|
|
93
|
+
const error = sanitizeError(input.error, secrets);
|
|
94
|
+
return {
|
|
95
|
+
schemaVersion: 1,
|
|
96
|
+
id: randomUUID(),
|
|
97
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
98
|
+
source: input.source,
|
|
99
|
+
...input.profile ? { profile: redactSensitiveText(input.profile, secrets) } : {},
|
|
100
|
+
...baseUrl ? { baseUrl } : {},
|
|
101
|
+
...diagnostics?.clientType ? { clientType: diagnostics.clientType } : {},
|
|
102
|
+
...diagnostics?.platformCredentialDetected === void 0 ? {} : { platformCredentialDetected: diagnostics.platformCredentialDetected },
|
|
103
|
+
attemptedSteps: (diagnostics?.attemptedSteps || []).map((step) => redactSensitiveText(step, secrets)),
|
|
104
|
+
...lastError ? { lastError } : {},
|
|
105
|
+
...failures?.length ? { failures } : {},
|
|
106
|
+
...input.resultSessionExpired ? { resultSessionExpired: true } : {},
|
|
107
|
+
...error ? { error } : {}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
async function appendXiaoEAuthErrorLog(input) {
|
|
111
|
+
const path = getXiaoEAuthErrorLogPath();
|
|
112
|
+
await mkdir(dirname(path), { recursive: true, mode: 448 });
|
|
113
|
+
await chmod(dirname(path), 448).catch(() => void 0);
|
|
114
|
+
const entry = createEntry(input);
|
|
115
|
+
await appendFile(path, `${JSON.stringify(entry)}
|
|
116
|
+
`, { encoding: "utf8", mode: 384 });
|
|
117
|
+
await chmod(path, 384).catch(() => void 0);
|
|
118
|
+
return entry;
|
|
119
|
+
}
|
|
120
|
+
function isLogEntry(value) {
|
|
121
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
122
|
+
const candidate = value;
|
|
123
|
+
return candidate.schemaVersion === 1 && typeof candidate.id === "string" && typeof candidate.timestamp === "string" && (candidate.source === "login" || candidate.source === "recovery") && Array.isArray(candidate.attemptedSteps);
|
|
124
|
+
}
|
|
125
|
+
function normalizeXiaoEAuthErrorLogLimit(value) {
|
|
126
|
+
if (value === void 0 || value === null || value === "") return DEFAULT_LOG_LIMIT;
|
|
127
|
+
const limit = Number(value);
|
|
128
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > MAX_XIAOE_AUTH_ERROR_LOG_LIMIT) {
|
|
129
|
+
throw new RangeError(`limit must be an integer between 1 and ${MAX_XIAOE_AUTH_ERROR_LOG_LIMIT}`);
|
|
130
|
+
}
|
|
131
|
+
return limit;
|
|
132
|
+
}
|
|
133
|
+
async function readXiaoEAuthErrorLog(limit = DEFAULT_LOG_LIMIT) {
|
|
134
|
+
const normalizedLimit = normalizeXiaoEAuthErrorLogLimit(limit);
|
|
135
|
+
const path = getXiaoEAuthErrorLogPath();
|
|
136
|
+
let content = "";
|
|
137
|
+
try {
|
|
138
|
+
content = await readFile(path, "utf8");
|
|
139
|
+
} catch (error) {
|
|
140
|
+
if (error?.code !== "ENOENT") throw error;
|
|
141
|
+
}
|
|
142
|
+
let invalidLines = 0;
|
|
143
|
+
const entries = [];
|
|
144
|
+
for (const line of content.split(/\r?\n/u)) {
|
|
145
|
+
if (!line.trim()) continue;
|
|
146
|
+
try {
|
|
147
|
+
const value = JSON.parse(line);
|
|
148
|
+
if (isLogEntry(value)) entries.push(value);
|
|
149
|
+
else invalidLines += 1;
|
|
150
|
+
} catch {
|
|
151
|
+
invalidLines += 1;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const recent = entries.slice(-normalizedLimit).reverse();
|
|
155
|
+
return {
|
|
156
|
+
path,
|
|
157
|
+
total: entries.length,
|
|
158
|
+
returned: recent.length,
|
|
159
|
+
invalidLines,
|
|
160
|
+
entries: recent
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
async function clearXiaoEAuthErrorLog() {
|
|
164
|
+
const path = getXiaoEAuthErrorLogPath();
|
|
165
|
+
try {
|
|
166
|
+
await unlink(path);
|
|
167
|
+
return { path, cleared: true };
|
|
168
|
+
} catch (error) {
|
|
169
|
+
if (error?.code === "ENOENT") return { path, cleared: false };
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
23
173
|
|
|
24
174
|
// src/internal/e10/auth-recovery.ts
|
|
25
175
|
var AUTH_REQUIRED_CODES = /* @__PURE__ */ new Set(["-2", "401"]);
|
|
@@ -180,6 +330,12 @@ function recoveryLogger(ctx) {
|
|
|
180
330
|
warn: (message) => adapter.debug(message)
|
|
181
331
|
};
|
|
182
332
|
}
|
|
333
|
+
function reportAuthLogWriteFailure(ctx, error) {
|
|
334
|
+
const logger = ctx.logger;
|
|
335
|
+
logger?.debug?.(
|
|
336
|
+
`Could not persist XiaoE auth error log: ${error instanceof Error ? error.message : String(error)}`
|
|
337
|
+
);
|
|
338
|
+
}
|
|
183
339
|
async function recoverXiaoEAuthSession(ctx, currentSession) {
|
|
184
340
|
return (await recoverXiaoEAuthSessionWithDiagnostics(ctx, currentSession)).session;
|
|
185
341
|
}
|
|
@@ -203,18 +359,39 @@ ${baseUrl}`;
|
|
|
203
359
|
if (existing) return existing;
|
|
204
360
|
const diagnostics = { attemptedSteps: [] };
|
|
205
361
|
const recovery = (async () => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
362
|
+
try {
|
|
363
|
+
const login = await tryXiaoEUnifiedLogin({
|
|
364
|
+
env: ctx.env,
|
|
365
|
+
baseUrl,
|
|
366
|
+
profileBaseUrl: baseUrl,
|
|
367
|
+
allowBundledEnvScript: true,
|
|
368
|
+
allowTokenScript: true,
|
|
369
|
+
tenantKeyFallback: currentSession?.tenantKey || config.tenantKey,
|
|
370
|
+
profileHint: profile,
|
|
371
|
+
diagnostics,
|
|
372
|
+
logger: recoveryLogger(ctx)
|
|
373
|
+
});
|
|
374
|
+
if (!login) {
|
|
375
|
+
await appendXiaoEAuthErrorLog({
|
|
376
|
+
source: "recovery",
|
|
377
|
+
profile,
|
|
378
|
+
baseUrl,
|
|
379
|
+
diagnostics,
|
|
380
|
+
secrets: xiaoEAuthLogSecrets(ctx.env)
|
|
381
|
+
}).catch((error) => reportAuthLogWriteFailure(ctx, error));
|
|
382
|
+
}
|
|
383
|
+
return { session: login?.session || null, diagnostics };
|
|
384
|
+
} catch (error) {
|
|
385
|
+
await appendXiaoEAuthErrorLog({
|
|
386
|
+
source: "recovery",
|
|
387
|
+
profile,
|
|
388
|
+
baseUrl,
|
|
389
|
+
diagnostics,
|
|
390
|
+
error,
|
|
391
|
+
secrets: xiaoEAuthLogSecrets(ctx.env)
|
|
392
|
+
}).catch((logError) => reportAuthLogWriteFailure(ctx, logError));
|
|
393
|
+
throw error;
|
|
394
|
+
}
|
|
218
395
|
})();
|
|
219
396
|
recoveryInFlight.set(key, recovery);
|
|
220
397
|
try {
|
|
@@ -268,12 +445,26 @@ async function getE10Session(ctx, load = {}) {
|
|
|
268
445
|
return E10AuthSession.fromOptions(options, ctx.cwd, load);
|
|
269
446
|
}
|
|
270
447
|
async function requireE10Session(ctx, load = {}) {
|
|
448
|
+
const options = ctx.getGlobalOptions();
|
|
271
449
|
let session = await getE10Session(ctx, load);
|
|
272
450
|
if (session?.isExpired() && canAutomaticallyRecoverXiaoE(ctx, session)) {
|
|
273
451
|
const outcome = await recoverXiaoEAuthSessionWithDiagnostics(ctx, session).catch(() => null);
|
|
274
452
|
session = outcome?.session || null;
|
|
275
453
|
if (!session || session.isExpired()) {
|
|
276
|
-
|
|
454
|
+
const resultSessionExpired = session?.isExpired() === true;
|
|
455
|
+
const error = xiaoERecoveryFailedError(outcome?.diagnostics, resultSessionExpired);
|
|
456
|
+
if (resultSessionExpired) {
|
|
457
|
+
await appendXiaoEAuthErrorLog({
|
|
458
|
+
source: "recovery",
|
|
459
|
+
profile: options.profile || getActiveProfile(),
|
|
460
|
+
baseUrl: session?.getBaseUrl(),
|
|
461
|
+
diagnostics: outcome?.diagnostics,
|
|
462
|
+
resultSessionExpired: true,
|
|
463
|
+
error,
|
|
464
|
+
secrets: xiaoEAuthLogSecrets(ctx.env)
|
|
465
|
+
}).catch(() => void 0);
|
|
466
|
+
}
|
|
467
|
+
throw error;
|
|
277
468
|
}
|
|
278
469
|
}
|
|
279
470
|
if (!session && canAutomaticallyRecoverXiaoE(ctx)) {
|
|
@@ -760,8 +951,15 @@ function cloneForHook(value) {
|
|
|
760
951
|
}
|
|
761
952
|
|
|
762
953
|
export {
|
|
954
|
+
getXiaoEAuthErrorLogPath,
|
|
955
|
+
xiaoEAuthLogSecrets,
|
|
956
|
+
appendXiaoEAuthErrorLog,
|
|
957
|
+
normalizeXiaoEAuthErrorLogLimit,
|
|
958
|
+
readXiaoEAuthErrorLog,
|
|
959
|
+
clearXiaoEAuthErrorLog,
|
|
763
960
|
isE10SessionExpiredResponse,
|
|
764
961
|
isE10AuthenticationRequired,
|
|
962
|
+
getE10Session,
|
|
765
963
|
requireE10Session,
|
|
766
964
|
E10ApiError,
|
|
767
965
|
createE10RequestRuntime
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
esbPermissionError,
|
|
9
9
|
esbValidationError,
|
|
10
10
|
esbWriteUncertain
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TXUG266F.js";
|
|
12
12
|
import {
|
|
13
13
|
E10ApiError,
|
|
14
14
|
createE10RequestRuntime,
|
|
15
15
|
isE10SessionExpiredResponse,
|
|
16
16
|
requireE10Session
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ETNJSKMM.js";
|
|
18
18
|
import {
|
|
19
19
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
20
20
|
getActiveProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UFIT2UU3.js";
|
|
22
22
|
|
|
23
23
|
// src/shortcuts/esb/host.ts
|
|
24
24
|
var ESB_PATHS = {
|
|
@@ -3,13 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
readCache,
|
|
5
5
|
writeCache
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Z7VYWPZV.js";
|
|
7
7
|
import {
|
|
8
8
|
SCHEMA_DATETIME_MINUTE,
|
|
9
9
|
meetingSuccess,
|
|
10
10
|
meetingValidationError,
|
|
11
11
|
schemaOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QVSWRLLU.js";
|
|
13
13
|
|
|
14
14
|
// src/shortcuts/meeting/operations/eb/schedule.ts
|
|
15
15
|
var SCHEDULE_TYPE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/queryAgendaType";
|
|
@@ -110,9 +110,9 @@ async function runScheduleConflictFlow(env, input) {
|
|
|
110
110
|
if (!employeeId) {
|
|
111
111
|
throw meetingValidationError("schedule_employee_required", "\u53D6\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u7528\u6237 id\uFF0C\u65E0\u6CD5\u89E6\u53D1 ESB \u65E5\u7A0B\u67E5\u8BE2");
|
|
112
112
|
}
|
|
113
|
-
const { createEsbHost } = await import("./host-
|
|
114
|
-
const { createEsbContinuationSigner } = await import("./continuation-
|
|
115
|
-
const { getEsbOperation } = await import("./registry-
|
|
113
|
+
const { createEsbHost } = await import("./host-WIKN2EJ5.js");
|
|
114
|
+
const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
|
|
115
|
+
const { getEsbOperation } = await import("./registry-KNKSCJNT.js");
|
|
116
116
|
const esbEnv = {
|
|
117
117
|
ctx: env.ctx,
|
|
118
118
|
host: createEsbHost(env.ctx),
|
|
@@ -331,7 +331,7 @@ async function resolveMemberIdsByName(env, names) {
|
|
|
331
331
|
const unique = [...new Set(names)].filter((name) => name !== "");
|
|
332
332
|
if (unique.length === 0) return map;
|
|
333
333
|
try {
|
|
334
|
-
const { hrmEmployeeOperations } = await import("./employee-
|
|
334
|
+
const { hrmEmployeeOperations } = await import("./employee-22BGJ3QS.js");
|
|
335
335
|
const query = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.query");
|
|
336
336
|
if (!query) return map;
|
|
337
337
|
for (const name of unique) {
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
loadDayUsages,
|
|
8
8
|
loadRooms,
|
|
9
9
|
recommendRooms
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GM6J7Q4B.js";
|
|
11
11
|
import {
|
|
12
12
|
cacheScopeSuffix,
|
|
13
13
|
readCache,
|
|
14
14
|
writeCache
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z7VYWPZV.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchEbAppSettings,
|
|
18
18
|
findCommonFreeSlots
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OF4S23UB.js";
|
|
20
20
|
import {
|
|
21
21
|
EB_BASE,
|
|
22
22
|
SCHEMA_DATETIME_MINUTE,
|
|
@@ -25,7 +25,11 @@ import {
|
|
|
25
25
|
meetingValidationError,
|
|
26
26
|
schemaOf,
|
|
27
27
|
writeBody
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QVSWRLLU.js";
|
|
29
|
+
import {
|
|
30
|
+
CONTINUATION_TTL_MS,
|
|
31
|
+
CONTINUATION_TTL_SECONDS
|
|
32
|
+
} from "./chunk-7BDPM5ST.js";
|
|
29
33
|
|
|
30
34
|
// src/shortcuts/meeting/operations/eb/create-flow.ts
|
|
31
35
|
import { existsSync } from "node:fs";
|
|
@@ -112,7 +116,7 @@ async function resolvePersonsCached(env, ids, options = {}) {
|
|
|
112
116
|
for (let index = 0; index < missing.length; index += BATCH_MAX) {
|
|
113
117
|
const chunk = missing.slice(index, index + BATCH_MAX);
|
|
114
118
|
try {
|
|
115
|
-
const { hrmEmployeeOperations } = await import("./employee-
|
|
119
|
+
const { hrmEmployeeOperations } = await import("./employee-22BGJ3QS.js");
|
|
116
120
|
const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
|
|
117
121
|
if (!batch) break;
|
|
118
122
|
const result = await batch.handler({ ids: chunk }, env);
|
|
@@ -174,9 +178,9 @@ function workflowEnv(env) {
|
|
|
174
178
|
return env;
|
|
175
179
|
}
|
|
176
180
|
async function loadCreateForm(env, workflowId) {
|
|
177
|
-
const { createWorkflowHost } = await import("./host-
|
|
178
|
-
const { createWorkflowContinuationSigner } = await import("./continuation-
|
|
179
|
-
const { getWorkflowOperation } = await import("./registry-
|
|
181
|
+
const { createWorkflowHost } = await import("./host-SUOY6VYQ.js");
|
|
182
|
+
const { createWorkflowContinuationSigner } = await import("./continuation-HFW2YT5S.js");
|
|
183
|
+
const { getWorkflowOperation } = await import("./registry-JDUS4E7D.js");
|
|
180
184
|
const wfEnv = {
|
|
181
185
|
...workflowEnv(env),
|
|
182
186
|
host: createWorkflowHost(env.ctx),
|
|
@@ -218,7 +222,7 @@ async function resolvePersonTokens(env, tokens) {
|
|
|
218
222
|
}
|
|
219
223
|
if (nameLike.length > 0) {
|
|
220
224
|
try {
|
|
221
|
-
const { hrmEmployeeOperations } = await import("./employee-
|
|
225
|
+
const { hrmEmployeeOperations } = await import("./employee-22BGJ3QS.js");
|
|
222
226
|
const query = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.query");
|
|
223
227
|
for (const name of nameLike) {
|
|
224
228
|
if (!query) break;
|
|
@@ -281,7 +285,7 @@ async function resolveAddressRoom(env, input) {
|
|
|
281
285
|
const text = String(input ?? "").trim();
|
|
282
286
|
if (!text) return null;
|
|
283
287
|
const ref = parseRoomRef(text);
|
|
284
|
-
const { loadRooms: loadRooms2 } = await import("./room-recommend-
|
|
288
|
+
const { loadRooms: loadRooms2 } = await import("./room-recommend-H7KLXA5R.js");
|
|
285
289
|
let rooms = [];
|
|
286
290
|
try {
|
|
287
291
|
rooms = (await loadRooms2(env, {})).rooms;
|
|
@@ -303,7 +307,7 @@ async function resolveRoomValue(env, input) {
|
|
|
303
307
|
const ref = parseRoomRef(text);
|
|
304
308
|
if (ref.id) {
|
|
305
309
|
try {
|
|
306
|
-
const { getMeetingOperation } = await import("./registry-
|
|
310
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
307
311
|
const detail = await getMeetingOperation("meeting.eb.room.detail").handler({ id: ref.id }, env);
|
|
308
312
|
const main = detail?.data?.mainTable ?? detail?.data?.data?.mainTable ?? {};
|
|
309
313
|
const name = String(main.room_name ?? "").trim() || ref.name || "";
|
|
@@ -328,6 +332,12 @@ async function shapeBrowserValues(env, values) {
|
|
|
328
332
|
readable.address = String(shaped.address);
|
|
329
333
|
}
|
|
330
334
|
}
|
|
335
|
+
if (shaped.begin_datetime !== void 0 && String(shaped.begin_datetime).trim() !== "") {
|
|
336
|
+
readable.begin_datetime = String(shaped.begin_datetime).trim();
|
|
337
|
+
}
|
|
338
|
+
if (shaped.end_datetime !== void 0 && String(shaped.end_datetime).trim() !== "") {
|
|
339
|
+
readable.end_datetime = String(shaped.end_datetime).trim();
|
|
340
|
+
}
|
|
331
341
|
const personFields = ["hrm_members", "caller", "contacter"];
|
|
332
342
|
const idPool = [];
|
|
333
343
|
for (const key of personFields) {
|
|
@@ -409,7 +419,7 @@ async function shapeBrowserValues(env, values) {
|
|
|
409
419
|
const nameOnly = rows.filter((row) => row.id === "" && row.name !== "");
|
|
410
420
|
if (nameOnly.length > 0) {
|
|
411
421
|
try {
|
|
412
|
-
const { getMeetingOperation } = await import("./registry-
|
|
422
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
413
423
|
const search = getMeetingOperation("meeting.eb.crm.search");
|
|
414
424
|
for (const row of nameOnly) {
|
|
415
425
|
const found = await search.handler({ keyword: row.name, limit: 5 }, env).catch(() => null);
|
|
@@ -603,7 +613,7 @@ async function resolveAutoCrmDetailRows(env, raw) {
|
|
|
603
613
|
const missing = [];
|
|
604
614
|
if (entries.length > 0) {
|
|
605
615
|
try {
|
|
606
|
-
const { getMeetingOperation } = await import("./registry-
|
|
616
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
607
617
|
const search = getMeetingOperation("meeting.eb.crm.search");
|
|
608
618
|
for (const entry of entries) {
|
|
609
619
|
if (entry.contacts.length > 0) continue;
|
|
@@ -862,8 +872,8 @@ function shouldAutoPickFlow(args) {
|
|
|
862
872
|
async function sendInvitationToGroup(env, groupId, filePath, warnings) {
|
|
863
873
|
const started = Date.now();
|
|
864
874
|
try {
|
|
865
|
-
const { buildImEnv } = await import("./group-chat-
|
|
866
|
-
const { getImOperation } = await import("./registry-
|
|
875
|
+
const { buildImEnv } = await import("./group-chat-BFVXAYFX.js");
|
|
876
|
+
const { getImOperation } = await import("./registry-PVUZQDDQ.js");
|
|
867
877
|
const imEnv = await buildImEnv(env);
|
|
868
878
|
const prepared = await getImOperation("im.msg.send.group.prepare").handler(
|
|
869
879
|
{ groupId, file: filePath },
|
|
@@ -1106,7 +1116,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1106
1116
|
}
|
|
1107
1117
|
}
|
|
1108
1118
|
const nameLike = rawMembers.filter((item) => !/^\d+$/.test(item));
|
|
1109
|
-
const nameToId = nameLike.length > 0 ? await import("./schedule-
|
|
1119
|
+
const nameToId = nameLike.length > 0 ? await import("./schedule-ESZIBAUO.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
1110
1120
|
const memberIds = rawMembers.map((item) => nameToId.get(item) ?? item);
|
|
1111
1121
|
const timeConfirmed = args.timeConfirmed === true || slotConfirmed;
|
|
1112
1122
|
const callerWorkflowId = String(args.workflowId ?? "").trim();
|
|
@@ -1121,7 +1131,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1121
1131
|
if (!beginHasTime || !timeConfirmed) {
|
|
1122
1132
|
const day2 = /^\d{4}-\d{2}-\d{2}/.test(beginText) ? beginText.slice(0, 10) : String(args.dateFrom ?? "").trim().slice(0, 10) || tomorrowIso();
|
|
1123
1133
|
const duration = Number(args.durationMinutes) > 0 ? Math.round(Number(args.durationMinutes)) : 60;
|
|
1124
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1134
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
1125
1135
|
const suggested = await getMeetingOperation("meeting.eb.meeting.create.suggest").handler(
|
|
1126
1136
|
{
|
|
1127
1137
|
dateFrom: day2,
|
|
@@ -1243,7 +1253,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1243
1253
|
usageFromCache: usageData.fromCache
|
|
1244
1254
|
};
|
|
1245
1255
|
}
|
|
1246
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1256
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
1247
1257
|
const result = await getMeetingOperation("meeting.eb.conflict.room").handler(
|
|
1248
1258
|
{ beginDatetime: beginText, endDatetime: endText, address: room.id },
|
|
1249
1259
|
env
|
|
@@ -1251,7 +1261,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1251
1261
|
return { room, ...result?.data ?? {} };
|
|
1252
1262
|
})().catch(noteFailure("\u4F1A\u8BAE\u5BA4**\u5360\u7528**\u68C0\u6D4B")) : Promise.resolve(null);
|
|
1253
1263
|
const conflictTask = enrich && beginText && endText && memberIds.length > 0 ? (async () => {
|
|
1254
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1264
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
1255
1265
|
return getMeetingOperation("meeting.eb.conflict.member").handler(
|
|
1256
1266
|
{ beginDatetime: beginText, endDatetime: endText, hrmMembers: memberIds.join(",") },
|
|
1257
1267
|
env
|
|
@@ -1594,8 +1604,11 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1594
1604
|
})();
|
|
1595
1605
|
const shaped = await shapeBrowserValues(env, {
|
|
1596
1606
|
mt_name: args.mt_name,
|
|
1597
|
-
|
|
1598
|
-
|
|
1607
|
+
// ⛔ 2026-11-05 修:用户只说「明天下午」时,时间是 CLI 按 time_slot 展开出来的(beginText/endText),
|
|
1608
|
+
// 原始入参 args.begin_datetime 是空的 —— 以前这里直接取 args,表单两个时间字段就空着,
|
|
1609
|
+
// 页面打开后默认成"当前时间"(用户实测:填 11-06 13:00–18:00,表单显示 11-05 17:25)。
|
|
1610
|
+
begin_datetime: beginText || args.begin_datetime,
|
|
1611
|
+
end_datetime: endText || args.end_datetime,
|
|
1599
1612
|
mt_desc: args.mt_desc,
|
|
1600
1613
|
address: addressInput,
|
|
1601
1614
|
customize_address: args.customize_address,
|
|
@@ -1667,7 +1680,10 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1667
1680
|
);
|
|
1668
1681
|
} else if (auto.missing.length > 0) {
|
|
1669
1682
|
warnings.push(
|
|
1670
|
-
`\u5DF2\u5199\u300C\u53C2\u4F1A\u5BA2\u6237\u300D\uFF0C\u4F46\u6CA1\u80FD\u81EA\u52A8\u5E26\u51FA\u300C${auto.missing.join("\u3001")}\u300D\u7684\u8054\u7CFB\u4EBA\uFF08CRM \u91CC\
|
|
1683
|
+
`\u5DF2\u5199\u300C\u53C2\u4F1A\u5BA2\u6237\u300D\uFF0C\u4F46\u6CA1\u80FD\u81EA\u52A8\u5E26\u51FA\u300C${auto.missing.join("\u3001")}\u300D\u7684\u8054\u7CFB\u4EBA\uFF08CRM \u91CC\u6CA1\u5EFA\u6863\u8054\u7CFB\u4EBA\uFF09\u3002`
|
|
1684
|
+
// ⛔ 2026-11-05 用户明确:**没有联系人不用问**。建会和邀请函都不依赖客户联系人,
|
|
1685
|
+
// 以前这句提示在引导模型回头问「补充联系人姓名手机号」,属于多余的一轮。
|
|
1686
|
+
// 用户真给了联系人时才会传 crm_member_details,这里不要主动要。
|
|
1671
1687
|
);
|
|
1672
1688
|
}
|
|
1673
1689
|
}
|
|
@@ -1787,7 +1803,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1787
1803
|
},
|
|
1788
1804
|
fingerprint: JSON.stringify({ workflowId, main, ...detailPayload ? { details: detailPayload } : {} })
|
|
1789
1805
|
},
|
|
1790
|
-
|
|
1806
|
+
CONTINUATION_TTL_MS
|
|
1791
1807
|
);
|
|
1792
1808
|
return meetingSuccess(
|
|
1793
1809
|
"meeting.eb.meeting.create.flow.prepare",
|
|
@@ -1822,7 +1838,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1822
1838
|
...Object.keys(decisions).length > 0 ? { decisions } : {}
|
|
1823
1839
|
},
|
|
1824
1840
|
continuation,
|
|
1825
|
-
expiresInSeconds:
|
|
1841
|
+
expiresInSeconds: CONTINUATION_TTL_SECONDS
|
|
1826
1842
|
},
|
|
1827
1843
|
warnings.length > 0 ? { warnings } : {}
|
|
1828
1844
|
);
|
|
@@ -1853,7 +1869,7 @@ async function patchMeetingCrmMembers(env, meetingId, ids, count, settleMsList =
|
|
|
1853
1869
|
});
|
|
1854
1870
|
};
|
|
1855
1871
|
const readBack = async () => {
|
|
1856
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1872
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
1857
1873
|
const detail = getMeetingOperation("meeting.eb.meeting.detail");
|
|
1858
1874
|
const read = await detail.handler({ id: String(meetingId).trim() }, env);
|
|
1859
1875
|
return String(read?.data?.data?.crm_members ?? "").trim();
|
|
@@ -1880,7 +1896,7 @@ async function renderPreInvitation(payload, env) {
|
|
|
1880
1896
|
const fields = payload?.invitationFields ?? {};
|
|
1881
1897
|
const started = Date.now();
|
|
1882
1898
|
try {
|
|
1883
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1899
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
1884
1900
|
const render = getMeetingOperation("meeting.invitation.render");
|
|
1885
1901
|
const rendered = await render.handler(
|
|
1886
1902
|
{
|
|
@@ -1951,9 +1967,9 @@ var ebMeetingCreateFlowApply = {
|
|
|
1951
1967
|
throw meetingValidationError("context_mismatch", "\u786E\u8BA4\u4E0A\u4E0B\u6587\u5DF2\u53D8\u5316\uFF08\u79DF\u6237\u6216\u767B\u5F55\u8D26\u53F7\u4E0D\u540C\uFF09\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C prepare");
|
|
1952
1968
|
}
|
|
1953
1969
|
const payload = lease?.payload ?? {};
|
|
1954
|
-
const { createWorkflowHost } = await import("./host-
|
|
1955
|
-
const { createWorkflowContinuationSigner } = await import("./continuation-
|
|
1956
|
-
const { getWorkflowOperation } = await import("./registry-
|
|
1970
|
+
const { createWorkflowHost } = await import("./host-SUOY6VYQ.js");
|
|
1971
|
+
const { createWorkflowContinuationSigner } = await import("./continuation-HFW2YT5S.js");
|
|
1972
|
+
const { getWorkflowOperation } = await import("./registry-JDUS4E7D.js");
|
|
1957
1973
|
const wfEnv = {
|
|
1958
1974
|
...workflowEnv(env),
|
|
1959
1975
|
host: createWorkflowHost(env.ctx),
|
|
@@ -2003,7 +2019,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2003
2019
|
const groupPayload2 = payload?.groupChat;
|
|
2004
2020
|
if (groupPayload2) {
|
|
2005
2021
|
try {
|
|
2006
|
-
const { ensureMeetingGroupChat } = await import("./group-chat-
|
|
2022
|
+
const { ensureMeetingGroupChat } = await import("./group-chat-BFVXAYFX.js");
|
|
2007
2023
|
groupChat2 = {
|
|
2008
2024
|
...await ensureMeetingGroupChat(env, {
|
|
2009
2025
|
meetingName: String(payload.mtName ?? ""),
|
|
@@ -2019,7 +2035,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2019
2035
|
}
|
|
2020
2036
|
if (groupChat2 && groupChat2.ok) {
|
|
2021
2037
|
try {
|
|
2022
|
-
const { savePendingForm } = await import("./group-chat-
|
|
2038
|
+
const { savePendingForm } = await import("./group-chat-BFVXAYFX.js");
|
|
2023
2039
|
await savePendingForm(env, {
|
|
2024
2040
|
workflowId: String(payload.workflowId ?? ""),
|
|
2025
2041
|
workflowName: String(payload.workflowName ?? ""),
|
|
@@ -2086,7 +2102,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2086
2102
|
let meetingId = "";
|
|
2087
2103
|
const timings = { submitMs: Date.now() - submitStartedAt };
|
|
2088
2104
|
if (waitSeconds > 0) {
|
|
2089
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2105
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
2090
2106
|
const list = getMeetingOperation("meeting.eb.meeting.list");
|
|
2091
2107
|
const deadline = Date.now() + Math.min(waitSeconds, 30) * 1e3;
|
|
2092
2108
|
const pollStart = Date.now();
|
|
@@ -2136,7 +2152,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2136
2152
|
if (groupPayload) {
|
|
2137
2153
|
const groupStart = Date.now();
|
|
2138
2154
|
try {
|
|
2139
|
-
const { ensureMeetingGroupChat } = await import("./group-chat-
|
|
2155
|
+
const { ensureMeetingGroupChat } = await import("./group-chat-BFVXAYFX.js");
|
|
2140
2156
|
const group = await ensureMeetingGroupChat(env, {
|
|
2141
2157
|
meetingName: String(payload.mtName ?? ""),
|
|
2142
2158
|
beginDatetime: String(groupPayload.beginDatetime ?? ""),
|
|
@@ -2168,7 +2184,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2168
2184
|
if (meetingId) {
|
|
2169
2185
|
const invitationStart = Date.now();
|
|
2170
2186
|
try {
|
|
2171
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2187
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
2172
2188
|
const render = getMeetingOperation("meeting.invitation.render");
|
|
2173
2189
|
const rendered = await render.handler(
|
|
2174
2190
|
{
|
|
@@ -2338,7 +2354,7 @@ var ebMeetingCreateFlowQuick = {
|
|
|
2338
2354
|
`\u4F1A\u8BAE\u540D\u79F0/\u5185\u5BB9\u91CC\u63D0\u5230\u5BA2\u6237\u300C${crmMentioned}\u300D\uFF0C\u4F46\u6CA1\u4F20 crm_members \u2014\u2014 \u63D0\u4EA4\u540E\u300C\u53C2\u4F1A\u5BA2\u6237\u300D\u4F1A\u662F\u7A7A\u7684\u3002\u5148 meeting.eb.crm.search {"keyword":"${crmMentioned}"} \u62FF items[].customerId\uFF0C\u518D\u628A crm_members:[{"id":"<customerId>","name":"<\u5B8C\u6574\u5BA2\u6237\u540D>"}] \u4E00\u8D77\u4F20\uFF08\u5FC5\u987B\u5E26\u540D\u79F0\uFF0C\u53EA\u7ED9 id \u4F1A\u88AB\u9759\u9ED8\u5B58\u7A7A\uFF09\uFF1B\u786E\u5B9E\u4E0D\u9700\u8981\u586B\u53C2\u4F1A\u5BA2\u6237\u5C31\u4F20 crm_skip:true\u3002`
|
|
2339
2355
|
);
|
|
2340
2356
|
}
|
|
2341
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2357
|
+
const { getMeetingOperation } = await import("./registry-IM5G23LS.js");
|
|
2342
2358
|
const prepareStartedAt = Date.now();
|
|
2343
2359
|
const { submit_mode: _submitMode, confirm: _confirm, ...prepareArgs } = args;
|
|
2344
2360
|
const prepared = await getMeetingOperation("meeting.eb.meeting.create.flow.prepare").handler(
|
|
@@ -2436,7 +2452,7 @@ var ebMeetingCreateSuggest = {
|
|
|
2436
2452
|
const topN = Math.max(1, Math.min(5, Number(args.topN) || 3));
|
|
2437
2453
|
const rawMembers = String(args.hrm_members ?? "").split(/[,;,;\s]+/).map((item) => item.trim()).filter((item) => item !== "");
|
|
2438
2454
|
const nameLike = rawMembers.filter((item) => !/^\d+$/.test(item));
|
|
2439
|
-
const nameToId = nameLike.length > 0 ? await import("./schedule-
|
|
2455
|
+
const nameToId = nameLike.length > 0 ? await import("./schedule-ESZIBAUO.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2440
2456
|
const memberIds = rawMembers.map((item) => nameToId.get(item) ?? item);
|
|
2441
2457
|
const unresolved = rawMembers.filter((item) => nameToId.get(item) === void 0 && !/^\d+$/.test(item));
|
|
2442
2458
|
const selfId = await env.host.getSession().then((s) => String(s?.userId ?? "")).catch(() => "");
|