weaver-work-cli 0.1.40 → 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-JHTONRST.js → archive-P6TBQGKL.js} +13 -5
- package/dist/chunks/{archive-oa-FCHLCPHC.js → archive-oa-7TQ2NXOH.js} +12 -5
- package/dist/chunks/{asset-RLIHC7DB.js → asset-3ELRG37G.js} +11 -4
- package/dist/chunks/{asset-idle-KVOFTLCP.js → asset-idle-WIGMUFMD.js} +7 -3
- package/dist/chunks/{attachment-content-RZYDB3MB.js → attachment-content-E3276UOV.js} +5 -4
- package/dist/chunks/{blog-42OZTJNP.js → blog-C5NMZAAC.js} +11 -4
- package/dist/chunks/{caizhilian-KRK547K5.js → caizhilian-5XSM2DFP.js} +13 -6
- package/dist/chunks/{calendar-RTWAMKHD.js → calendar-FI2WNSBO.js} +71 -26
- package/dist/chunks/{chunk-CXRQWOZ5.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-LN447PY2.js → chunk-BCVYBYYT.js} +432 -2247
- package/dist/chunks/{chunk-7E6MUOEK.js → chunk-CWYGFU5B.js} +2 -2
- package/dist/chunks/{chunk-NOODWMCL.js → chunk-D4ADSZ7H.js} +1 -1
- package/dist/chunks/{chunk-WFFNM65B.js → chunk-ETNJSKMM.js} +281 -29
- package/dist/chunks/{chunk-CAQNBBQA.js → chunk-F4E4EM35.js} +3 -3
- package/dist/chunks/{chunk-4CTESSKI.js → chunk-FAZTGX7S.js} +6 -6
- package/dist/chunks/chunk-FRZKBMSW.js +2562 -0
- package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
- package/dist/chunks/{chunk-NJKREDA3.js → chunk-GAMZLAG2.js} +1 -1
- package/dist/chunks/{chunk-FLS4DPGP.js → chunk-GM6J7Q4B.js} +28 -15
- package/dist/chunks/{chunk-NETCCARD.js → chunk-GRDRG6HP.js} +3 -3
- package/dist/chunks/chunk-HIT4Y6OI.js +1238 -0
- package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
- package/dist/chunks/{chunk-IZSSVYAG.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-57IECMWX.js → chunk-N4M2DDFE.js} +29 -15
- package/dist/chunks/{chunk-JWRZM2H2.js → chunk-OF4S23UB.js} +4 -4
- package/dist/chunks/{chunk-VNBU55SL.js → chunk-PC7VKEB5.js} +80 -2458
- package/dist/chunks/{chunk-G2JSIUWF.js → chunk-PUQS5MWL.js} +91 -2
- package/dist/chunks/{chunk-E7OK5WD5.js → chunk-Q4OYAQYH.js} +5 -5
- package/dist/chunks/{chunk-7BRU4EFH.js → chunk-QVSWRLLU.js} +35 -6
- package/dist/chunks/{chunk-T6EGVBKU.js → chunk-TA7FXXJD.js} +6 -3
- package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
- package/dist/chunks/{chunk-4TEDNCON.js → chunk-UFIT2UU3.js} +354 -56
- 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-7U577Q7U.js → chunk-WSF4NNMR.js} +3 -3
- package/dist/chunks/chunk-XHK4MDR5.js +2497 -0
- package/dist/chunks/{chunk-LFMSDBZN.js → chunk-XNIK66I4.js} +326 -161
- 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-I566ZYNF.js → chunk-Z7VYWPZV.js} +1 -1
- package/dist/chunks/{conflict-VR55AOOO.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-HI4FNPYE.js → contract-DNIIW5VJ.js} +13 -5
- package/dist/chunks/{cowork-HJLI353D.js → cowork-GMLRGVIW.js} +31 -14
- package/dist/chunks/create-flow-J22BO65E.js +56 -0
- package/dist/chunks/{ebuilder-form-HTGI63UU.js → ebuilder-form-ANV2FHYV.js} +12 -7
- package/dist/chunks/{ehr-GYXIYH3A.js → ehr-GSTGAIY3.js} +695 -1255
- package/dist/chunks/{employee-SAK2QYXX.js → employee-22BGJ3QS.js} +3 -3
- package/dist/chunks/{env-DW3G4HUO.js → env-BX3VRFS7.js} +4 -3
- package/dist/chunks/{esb-I5INCEFE.js → esb-ATAIASX2.js} +12 -7
- package/dist/chunks/{factory-TKXGXS6L.js → factory-PETTFME6.js} +3 -2
- package/dist/chunks/{fna-K2MHTQ24.js → fna-YEKBSFSX.js} +14 -8
- package/dist/chunks/{group-chat-VYBNMJLG.js → group-chat-BFVXAYFX.js} +7 -4
- package/dist/chunks/{host-D5SERMAJ.js → host-HRBXEPDQ.js} +5 -5
- package/dist/chunks/{host-JM4YVHFM.js → host-LR55CTHP.js} +5 -5
- package/dist/chunks/{host-L3VLITMT.js → host-SUOY6VYQ.js} +5 -5
- package/dist/chunks/{host-ZUQTJYYK.js → host-SZGV4UNT.js} +5 -5
- package/dist/chunks/{host-256GVCAH.js → host-WIKN2EJ5.js} +5 -5
- package/dist/chunks/{hrm-VLRBKTZB.js → hrm-NRDO4W5G.js} +11 -7
- package/dist/chunks/{im-QK3VTLXK.js → im-IQ2HN23S.js} +11 -10
- package/dist/chunks/{invoice-T5JTA32H.js → invoice-MNRW76PP.js} +636 -1768
- package/dist/chunks/{jiuchuanhui-P2FNEQVZ.js → jiuchuanhui-DTRBAX4N.js} +14 -6
- package/dist/chunks/{lazy-dispatch-XRRI46M6.js → lazy-dispatch-ZVWAI25B.js} +7 -6
- package/dist/chunks/{mail-3Y7MJ6PS.js → mail-ZVAUXOJA.js} +16 -14
- package/dist/chunks/{meeting-M7LTXGJE.js → meeting-FEVPZ67S.js} +21 -13
- package/dist/chunks/{okr-OBC6S67L.js → okr-SDH3E5RA.js} +12 -5
- package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
- package/dist/chunks/{plan-5H6I53SK.js → plan-E35JFDI7.js} +12 -5
- package/dist/chunks/{project-L75QZV4S.js → project-73QXBAB2.js} +49 -25
- package/dist/chunks/reception-UWZVACBN.js +1899 -0
- package/dist/chunks/recruit-stage-4MAOCKFY.js +4770 -0
- package/dist/chunks/registry-IM5G23LS.js +24 -0
- package/dist/chunks/{registry-UGRBCBHO.js → registry-JDUS4E7D.js} +7 -6
- package/dist/chunks/{registry-RXPN6BBT.js → registry-KNKSCJNT.js} +7 -6
- package/dist/chunks/{registry-NYPYMZXG.js → registry-PO7SI256.js} +4 -4
- package/dist/chunks/{registry-QGHFNUWS.js → registry-PVUZQDDQ.js} +3 -3
- package/dist/chunks/{room-recommend-A3UDC3CA.js → room-recommend-H7KLXA5R.js} +6 -5
- package/dist/chunks/{schedule-5GCACCK7.js → schedule-ESZIBAUO.js} +6 -5
- package/dist/chunks/{workflow-M5ZJ7DWF.js → workflow-CWJFJLQU.js} +15 -10
- 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 +41 -30
- package/dist/internal/e10/auth/commands.js +164 -8
- package/dist/internal/e10/auth/error-log.js +182 -0
- package/dist/internal/e10/auth/messages.js +6 -0
- package/dist/internal/e10/auth/session.js +34 -3
- package/dist/internal/e10/auth/xiaoe.js +286 -44
- package/dist/internal/e10/auth-recovery.js +72 -14
- package/dist/internal/e10/context.js +72 -13
- package/dist/internal/e10/index.js +1 -1
- package/dist/internal/e10/network-error.js +93 -0
- package/dist/internal/e10/request-runtime.js +6 -0
- 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/read.js +31 -22
- package/dist/shortcuts/calendar/operations/write.js +46 -2
- 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/cowork/operations/discuss-write.js +5 -1
- package/dist/shortcuts/cowork/operations/item-write.js +1 -7
- package/dist/shortcuts/cowork/operations/member-write.js +3 -1
- package/dist/shortcuts/cowork/operations/permission-write.js +5 -1
- package/dist/shortcuts/cowork/operations/shared.js +7 -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 +44 -2
- package/dist/shortcuts/ehr/operations/hr-contact.js +7 -4
- package/dist/shortcuts/ehr/operations/hr-report.js +13 -7
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +317 -63
- package/dist/shortcuts/ehr/operations/recruit-position.js +134 -2
- package/dist/shortcuts/ehr/operations/recruit-write.js +263 -18
- package/dist/shortcuts/ehr/operations/recruit.js +10 -4
- package/dist/shortcuts/ehr/operations/shared.js +47 -0
- 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/org.js +118 -0
- package/dist/shortcuts/im/continuation.js +2 -1
- package/dist/shortcuts/index.js +10 -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/catalog.js +4 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +101 -35
- package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/factory.js +34 -1
- package/dist/shortcuts/meeting/operations/eb/group-chat.js +25 -3
- package/dist/shortcuts/meeting/operations/eb/person-cache.js +96 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +33 -11
- 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/project/operations/read.js +6 -25
- package/dist/shortcuts/project/operations/shared.js +22 -0
- package/dist/shortcuts/project/operations/write.js +28 -2
- 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 +231 -0
- package/dist/shortcuts/recruit-stage/continuation.js +74 -0
- package/dist/shortcuts/recruit-stage/errors.js +65 -0
- package/dist/shortcuts/recruit-stage/host.js +109 -0
- package/dist/shortcuts/recruit-stage/index.js +115 -0
- package/dist/shortcuts/recruit-stage/manifest.js +29 -0
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +722 -0
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +269 -0
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +719 -0
- package/dist/shortcuts/recruit-stage/operations/list.js +431 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +38 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +1354 -0
- package/dist/shortcuts/recruit-stage/operations/search.js +158 -0
- package/dist/shortcuts/recruit-stage/operations/types.js +25 -0
- package/dist/shortcuts/recruit-stage/school-tiers.json +318 -0
- package/dist/shortcuts/recruit-stage/shared.js +608 -0
- 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/todoSmartConvert/detailFieldRules.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +13 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +17 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +14 -9
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +50 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +2 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +17 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +7 -39
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +3 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +51 -15
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.pipeline.js +16 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +151 -63
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subGroup.js +56 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +39 -14
- 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 +23 -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/operation-manual.md +8 -0
- package/docs/reception.md +119 -0
- package/package.json +1 -1
- package/scripts/clean.mjs +43 -2
- package/scripts/install-skill-to-xiaoe.mjs +105 -0
- package/scripts/package-skill.mjs +4 -2
- package/skill-template/business-info.json +42 -2
- package/skill-template/domains/caizhilian.md +1 -1
- package/skill-template/domains/reception-flow.md +18 -0
- package/skill-template/domains/recruit-stage.md +29 -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/SKILL.md +2 -1
- package/skills/weaver-e10-calendar/references/calendar-write.md +55 -1
- package/skills/weaver-e10-cowork/SKILL.md +1 -1
- package/skills/weaver-e10-cowork/references/cowork-write.md +3 -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 +10 -2
- package/skills/weaver-e10-jucailin/references/hr-contact.md +8 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +8 -0
- package/skills/weaver-e10-jucailin/references/recruit-create.md +14 -5
- package/skills/weaver-e10-jucailin/references/recruit-read.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-write.md +5 -4
- package/skills/weaver-e10-mail/SKILL.md +1 -1
- package/skills/weaver-e10-meeting/SKILL.md +39 -7
- 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 +230 -0
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +119 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +188 -0
- 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-arrange-interview.md +322 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +127 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +65 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +63 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +142 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +95 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +56 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +101 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +148 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +77 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +59 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +69 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +241 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +451 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +128 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +146 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +69 -0
- package/skills/weaver-e10-shared/SKILL.md +1 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +10 -2
- package/skills/weaver-e10-shijingran/SKILL.md +7 -6
- package/skills/weaver-e10-shijingran/references/operations.md +3 -1
- package/skills/weaver-e10-shijingran/references/source-manifest.json +30 -28
- package/skills/weaver-e10-shijingran/references/write-operations.md +2 -0
- 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/SKILL.md +4 -2
- package/skills/weaver-e10-workflow/aigroup/default.json +11 -9
- package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +23 -13
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +62 -20
- package/skills/weaver-e10-yepiaotong/SKILL.md +28 -36
- package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +6 -3
- 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-SPRHHSVC.js +0 -465
- package/dist/chunks/registry-KMHCPAAD.js +0 -22
- 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
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { calendarConfirmationError, calendarPartialError, calendarValidationError, CalendarCliError } from '../errors.js';
|
|
3
4
|
import { calendarSuccess, schemaOf, SCHEMA_ID, SCHEMA_DATETIME_MINUTE, SCHEMA_SWITCH, SCHEMA_DATE } from './types.js';
|
|
4
5
|
import { assertDateTimeMinute, defaultEndTime, optionId, participantIds, pickDefined, } from './shared.js';
|
|
5
|
-
|
|
6
|
+
import { fetchAgendaAppAndForm } from './read.js';
|
|
6
7
|
// 日程 mainTable 可选业务字段(创建/更新共用)
|
|
7
8
|
const OPTIONAL_FIELDS = [
|
|
8
9
|
'next_start_remind',
|
|
@@ -81,6 +82,37 @@ async function verifyLease(args, action, env) {
|
|
|
81
82
|
function isNetworkError(error) {
|
|
82
83
|
return error instanceof CalendarCliError && error.type === 'network';
|
|
83
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* 从 saveFormData/createAgenda 返回体提取新建日程 ID。
|
|
87
|
+
* 兼容两种后端形态:
|
|
88
|
+
* - 顶层 `datajson.dataIds`(字符串数组)
|
|
89
|
+
* - `datajson.datas[].mainTable.dataIds` / `datajson.datas[].mainTable.id`
|
|
90
|
+
*/
|
|
91
|
+
function extractCreatedIds(response) {
|
|
92
|
+
const datajson = response?.datajson;
|
|
93
|
+
if (!datajson || typeof datajson !== 'object')
|
|
94
|
+
return [];
|
|
95
|
+
if (Array.isArray(datajson.dataIds)) {
|
|
96
|
+
return datajson.dataIds.map((v) => String(v)).filter(Boolean);
|
|
97
|
+
}
|
|
98
|
+
const datas = Array.isArray(datajson.datas) ? datajson.datas : [];
|
|
99
|
+
const ids = [];
|
|
100
|
+
for (const d of datas) {
|
|
101
|
+
const mt = d?.mainTable;
|
|
102
|
+
if (!mt)
|
|
103
|
+
continue;
|
|
104
|
+
if (Array.isArray(mt.dataIds))
|
|
105
|
+
ids.push(...mt.dataIds.map((v) => String(v)));
|
|
106
|
+
else if (mt.id !== undefined && mt.id !== null && mt.id !== '')
|
|
107
|
+
ids.push(String(mt.id));
|
|
108
|
+
}
|
|
109
|
+
return ids;
|
|
110
|
+
}
|
|
111
|
+
/** 拼日程详情卡片页链接(baseUrl 可能带协议头,统一归一成 https://host/...)。 */
|
|
112
|
+
function buildCardUrl(baseUrl, formId, id) {
|
|
113
|
+
const hostPart = String(baseUrl || '').replace(/^https?:\/\//i, '').replace(/\/+$/, '');
|
|
114
|
+
return `https://${hostPart}/sp/ebdfpage/card/0/${formId}/${id}`;
|
|
115
|
+
}
|
|
84
116
|
/** 构造写入接口 datajson 请求体(datas[].mainTable 结构)。 */
|
|
85
117
|
async function buildWriteDatajson(host, mainTableList) {
|
|
86
118
|
const session = await host.getSession();
|
|
@@ -195,9 +227,21 @@ const calendarCreateApply = {
|
|
|
195
227
|
}
|
|
196
228
|
throw error;
|
|
197
229
|
}
|
|
230
|
+
const createdIds = extractCreatedIds(response);
|
|
231
|
+
const createdId = createdIds[0];
|
|
232
|
+
const session = await env.host.getSession();
|
|
233
|
+
let accessUrl = null;
|
|
234
|
+
if (createdId) {
|
|
235
|
+
const { formId } = await fetchAgendaAppAndForm(env.host);
|
|
236
|
+
if (formId) {
|
|
237
|
+
accessUrl = buildCardUrl(session.baseUrl, formId, createdId);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
198
240
|
return calendarSuccess('calendar.create.apply', {
|
|
199
241
|
status: 'COMPLETE',
|
|
200
|
-
|
|
242
|
+
createdId: createdId ?? null,
|
|
243
|
+
createdIds,
|
|
244
|
+
accessUrl,
|
|
201
245
|
});
|
|
202
246
|
},
|
|
203
247
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createContractContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createContractContinuationSigner } from './continuation.js';
|
|
4
5
|
import { contractValidationError } from './errors.js';
|
|
5
6
|
import { createContractHost } from './host.js';
|
|
@@ -109,6 +110,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
109
110
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
110
111
|
}
|
|
111
112
|
catch (error) {
|
|
113
|
+
reportPlatformError(error);
|
|
112
114
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
113
115
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
114
116
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { ContractCliError, contractConfirmationError, contractPartialError, contractValidationError } from '../errors.js';
|
|
2
3
|
import { objectFingerprint, sessionMatches } from './shared.js';
|
|
3
4
|
import { CONTRACT_WORKFLOW } from './types.js';
|
|
@@ -37,7 +38,7 @@ export class ContractWritePrepareOperation {
|
|
|
37
38
|
data: {
|
|
38
39
|
preview,
|
|
39
40
|
continuation: continuationToken,
|
|
40
|
-
expiresInSeconds:
|
|
41
|
+
expiresInSeconds: CONTINUATION_TTL_SECONDS,
|
|
41
42
|
workflow: CONTRACT_WORKFLOW.awaitingConfirmation(baseName),
|
|
42
43
|
...(precheck ? { precheck } : {}),
|
|
43
44
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createCoworkContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createCoworkContinuationSigner } from './continuation.js';
|
|
4
5
|
import { createCoworkHost } from './host.js';
|
|
5
6
|
import { coworkManifest } from './manifest.js';
|
|
@@ -84,6 +85,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
84
85
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
85
86
|
}
|
|
86
87
|
catch (error) {
|
|
88
|
+
reportPlatformError(error);
|
|
87
89
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
88
90
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
89
91
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoworkCliError, coworkNotFoundError, coworkPartialError, coworkValidationError } from '../errors.js';
|
|
2
2
|
import { READ_BEFORE_WRITE, WRITE, SCHEMA_ID, coworkSuccess, schemaOf, } from './types.js';
|
|
3
|
-
import { assertEnum, assertString, compact, normalizeList, requireConfirm, toBase64Html, toId, toPositiveInt, unwrapData, verifyLease, } from './shared.js';
|
|
3
|
+
import { assertEnum, assertString, compact, coworkViewUrl, normalizeList, requireConfirm, toBase64Html, toId, toPositiveInt, unwrapData, verifyLease, } from './shared.js';
|
|
4
4
|
function isNetworkError(error) {
|
|
5
5
|
return error instanceof CoworkCliError && error.type === 'network';
|
|
6
6
|
}
|
|
@@ -132,6 +132,8 @@ const discussPublishApply = {
|
|
|
132
132
|
coworkId,
|
|
133
133
|
sectionId,
|
|
134
134
|
status: data.status ?? root?.status ?? null,
|
|
135
|
+
viewUrl: coworkViewUrl(lease.baseUrl, coworkId),
|
|
136
|
+
mobileViewUrl: coworkViewUrl(lease.baseUrl, coworkId, true),
|
|
135
137
|
});
|
|
136
138
|
},
|
|
137
139
|
};
|
|
@@ -266,6 +268,8 @@ const discussActionApply = {
|
|
|
266
268
|
coworkId,
|
|
267
269
|
discussId,
|
|
268
270
|
result: unwrapData(response) ?? null,
|
|
271
|
+
viewUrl: coworkViewUrl(lease.baseUrl, coworkId),
|
|
272
|
+
mobileViewUrl: coworkViewUrl(lease.baseUrl, coworkId, true),
|
|
269
273
|
});
|
|
270
274
|
},
|
|
271
275
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoworkCliError, coworkNotFoundError, coworkPartialError, coworkValidationError } from '../errors.js';
|
|
2
2
|
import { READ_BEFORE_WRITE, WRITE, SCHEMA_ID, SCHEMA_DATETIME, coworkSuccess, schemaOf, } from './types.js';
|
|
3
|
-
import { assertEnum, assertString, requireConfirm, toBase64Html, toId, unwrapData, verifyLease, } from './shared.js';
|
|
3
|
+
import { assertEnum, assertString, coworkViewUrl, requireConfirm, toBase64Html, toId, unwrapData, verifyLease, } from './shared.js';
|
|
4
4
|
function isNetworkError(error) {
|
|
5
5
|
return error instanceof CoworkCliError && error.type === 'network';
|
|
6
6
|
}
|
|
@@ -114,12 +114,6 @@ function hashCode(text) {
|
|
|
114
114
|
}
|
|
115
115
|
return String(hash >>> 0);
|
|
116
116
|
}
|
|
117
|
-
function coworkViewUrl(baseUrl, id, mobile = false) {
|
|
118
|
-
if (!id)
|
|
119
|
-
return null;
|
|
120
|
-
const base = String(baseUrl || '').replace(/\/+$/, '');
|
|
121
|
-
return `${base}/${mobile ? 'mobile' : 'sp'}/cowork/view/${id}`;
|
|
122
|
-
}
|
|
123
117
|
function defaultEndTime() {
|
|
124
118
|
const target = new Date(Date.now() + 7 * 24 * 3600 * 1000);
|
|
125
119
|
const pad = (n) => String(n).padStart(2, '0');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoworkCliError, coworkNotFoundError, coworkPartialError, coworkValidationError } from '../errors.js';
|
|
2
2
|
import { READ_BEFORE_WRITE, WRITE, SCHEMA_ID, coworkSuccess, schemaOf, } from './types.js';
|
|
3
|
-
import { assertEnum, compact, normalizeList, requireConfirm, toId, toIdList, toPositiveInt, unwrapData, verifyLease, } from './shared.js';
|
|
3
|
+
import { assertEnum, compact, coworkViewUrl, normalizeList, requireConfirm, toId, toIdList, toPositiveInt, unwrapData, verifyLease, } from './shared.js';
|
|
4
4
|
function isNetworkError(error) {
|
|
5
5
|
return error instanceof CoworkCliError && error.type === 'network';
|
|
6
6
|
}
|
|
@@ -153,6 +153,8 @@ const memberActionApply = {
|
|
|
153
153
|
coworkId,
|
|
154
154
|
userIds: action === 'join' ? undefined : String(form.ids).split(','),
|
|
155
155
|
result: unwrapData(response) ?? null,
|
|
156
|
+
viewUrl: coworkViewUrl(lease.baseUrl, coworkId),
|
|
157
|
+
mobileViewUrl: coworkViewUrl(lease.baseUrl, coworkId, true),
|
|
156
158
|
});
|
|
157
159
|
},
|
|
158
160
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoworkCliError, coworkNotFoundError, coworkPartialError, coworkValidationError } from '../errors.js';
|
|
2
2
|
import { READ_BEFORE_WRITE, WRITE, SCHEMA_ID, coworkSuccess, schemaOf, } from './types.js';
|
|
3
|
-
import { normalizeList, requireConfirm, toId, unwrapData, verifyLease, } from './shared.js';
|
|
3
|
+
import { coworkViewUrl, normalizeList, requireConfirm, toId, unwrapData, verifyLease, } from './shared.js';
|
|
4
4
|
function isNetworkError(error) {
|
|
5
5
|
return error instanceof CoworkCliError && error.type === 'network';
|
|
6
6
|
}
|
|
@@ -163,6 +163,8 @@ const permAddApply = {
|
|
|
163
163
|
userId,
|
|
164
164
|
userName,
|
|
165
165
|
result: unwrapData(response) ?? null,
|
|
166
|
+
viewUrl: coworkViewUrl(lease.baseUrl, coworkId),
|
|
167
|
+
mobileViewUrl: coworkViewUrl(lease.baseUrl, coworkId, true),
|
|
166
168
|
});
|
|
167
169
|
},
|
|
168
170
|
};
|
|
@@ -275,6 +277,8 @@ const permRemoveApply = {
|
|
|
275
277
|
removed: stillThere === false ? true : undefined,
|
|
276
278
|
verified: stillThere !== null,
|
|
277
279
|
result: unwrapData(response) ?? null,
|
|
280
|
+
viewUrl: coworkViewUrl(lease.baseUrl, coworkId),
|
|
281
|
+
mobileViewUrl: coworkViewUrl(lease.baseUrl, coworkId, true),
|
|
278
282
|
});
|
|
279
283
|
},
|
|
280
284
|
};
|
|
@@ -88,6 +88,13 @@ export function unwrapData(response) {
|
|
|
88
88
|
return response;
|
|
89
89
|
return response.data;
|
|
90
90
|
}
|
|
91
|
+
/** 协作查看页地址:PC `/sp/cowork/view/{id}`、移动端 `/mobile/cowork/view/{id}`(真实环境取证形态,禁止改拼)。 */
|
|
92
|
+
export function coworkViewUrl(baseUrl, id, mobile = false) {
|
|
93
|
+
if (!id)
|
|
94
|
+
return null;
|
|
95
|
+
const base = String(baseUrl || '').replace(/\/+$/, '');
|
|
96
|
+
return `${base}/${mobile ? 'mobile' : 'sp'}/cowork/view/${id}`;
|
|
97
|
+
}
|
|
91
98
|
/** 协作列表的 data 形如 { pageSize, total, current, pageUid, columns[], data[] }。 */
|
|
92
99
|
export function normalizePaged(response) {
|
|
93
100
|
const data = unwrapData(response);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createEbuilderFormContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createEbuilderFormContinuationSigner } from './continuation.js';
|
|
4
5
|
import { ebuilderValidationError } from './errors.js';
|
|
5
6
|
import { createEbuilderFormHost } from './host.js';
|
|
@@ -81,6 +82,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
81
82
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
82
83
|
}
|
|
83
84
|
catch (error) {
|
|
85
|
+
reportPlatformError(error);
|
|
84
86
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
85
87
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
86
88
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { ebuilderConfirmationError, ebuilderValidationError } from '../errors.js';
|
|
2
3
|
import { ebuilderSuccess } from './types.js';
|
|
3
4
|
import { asObject, assertKnownKeys, assertNoForbiddenKeys, optionalArray, optionalObject, optionalString, requiredArray, requiredString, sha256VisibleFingerprint, } from './shared.js';
|
|
@@ -51,7 +52,7 @@ export class EbuilderOpenapiPrepareOperation {
|
|
|
51
52
|
target: prepared.target,
|
|
52
53
|
requestPreview: { datajson: prepared.datajson },
|
|
53
54
|
continuation,
|
|
54
|
-
expiresInSeconds:
|
|
55
|
+
expiresInSeconds: CONTINUATION_TTL_SECONDS,
|
|
55
56
|
}, { status: 'PREPARED' }, prepared.warnings);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
@@ -110,7 +111,7 @@ export class EbuilderCustomPrepareOperation {
|
|
|
110
111
|
target: prepared.target,
|
|
111
112
|
requestPreview: { datajson: prepared.datajson },
|
|
112
113
|
continuation,
|
|
113
|
-
expiresInSeconds:
|
|
114
|
+
expiresInSeconds: CONTINUATION_TTL_SECONDS,
|
|
114
115
|
}, { status: 'PREPARED' }, prepared.warnings);
|
|
115
116
|
}
|
|
116
117
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createEhrContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createEhrContinuationSigner } from './continuation.js';
|
|
4
5
|
import { createEhrHost } from './host.js';
|
|
5
6
|
import { ehrManifest } from './manifest.js';
|
|
@@ -89,6 +90,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
89
90
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
90
91
|
}
|
|
91
92
|
catch (error) {
|
|
93
|
+
reportPlatformError(error);
|
|
92
94
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
93
95
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
94
96
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { ehrConfirmationError, ehrPartialError, ehrValidationError, EhrCliError } from '../errors.js';
|
|
3
4
|
import { READ, SCHEMA_DATE, SCHEMA_ID, ehrSuccess, schemaOf, WRITE, } from './types.js';
|
|
4
|
-
import { assertEnum, assertEnumArray, compact, pickDefined, toIdList } from './shared.js';
|
|
5
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
5
|
+
import { assertEnum, assertEnumArray, compact, pickDefined, toIdList, EHR_PAGES, ehrPageUrl, addDays } from './shared.js';
|
|
6
6
|
const CARD_TYPES = ['CHECKIN', 'CHECKOUT', 'LEAVE', 'RETURN', 'CHECKIN_AND_RETURN', 'CHECKOUT_AND_LEAVE'];
|
|
7
7
|
const APPEAL_TYPES = [
|
|
8
8
|
'leave',
|
|
@@ -316,9 +316,51 @@ const ehrAttendAppealSaveApply = {
|
|
|
316
316
|
}
|
|
317
317
|
throw error;
|
|
318
318
|
}
|
|
319
|
+
// 回执(按 references/attend-appeal-save.md 契约,2026-11-04):
|
|
320
|
+
// ① 回查申诉列表定位本次新建记录(日期前后各放宽 1 天,防跨天/时区边界漏查);
|
|
321
|
+
// ② 返回 appealListUrl(考勤异常/申诉页面,已取证路由)。
|
|
322
|
+
// 回查失败不阻塞提交结果(提交已成功),以 locateWarning 如实提示。
|
|
323
|
+
const session = await env.host.getSession();
|
|
324
|
+
const appealListUrl = ehrPageUrl(session.baseUrl, EHR_PAGES.attendAbnormal);
|
|
325
|
+
let appeal = null;
|
|
326
|
+
let locateWarning;
|
|
327
|
+
try {
|
|
328
|
+
const listResp = await env.host.request({
|
|
329
|
+
method: 'POST',
|
|
330
|
+
path: '/api/attend/web/appeal/getAppealList',
|
|
331
|
+
body: {
|
|
332
|
+
beginDate: addDays(String(args.attendDay), -1),
|
|
333
|
+
endDate: addDays(String(args.attendDay), 1),
|
|
334
|
+
current: 1,
|
|
335
|
+
pageSize: 50,
|
|
336
|
+
},
|
|
337
|
+
});
|
|
338
|
+
const payload = listResp?.data;
|
|
339
|
+
const rows = Array.isArray(payload?.data) ? payload.data
|
|
340
|
+
: Array.isArray(payload?.rows) ? payload.rows
|
|
341
|
+
: Array.isArray(payload) ? payload
|
|
342
|
+
: [];
|
|
343
|
+
const day = String(args.attendDay);
|
|
344
|
+
const desc = String(args.appealDesc ?? '');
|
|
345
|
+
const pick = rows.find((r) => String(r?.attendDay ?? r?.attend_date ?? r?.attendDate ?? '').startsWith(day))
|
|
346
|
+
|| (desc ? rows.find((r) => String(r?.appealDesc ?? r?.appeal_desc ?? '').includes(desc)) : null)
|
|
347
|
+
|| null;
|
|
348
|
+
if (pick)
|
|
349
|
+
appeal = pick;
|
|
350
|
+
else
|
|
351
|
+
locateWarning = '未在申诉列表中定位到本次记录(可能刚提交尚在同步),请稍后用 ehr.attend.appeal.list 复核';
|
|
352
|
+
}
|
|
353
|
+
catch (e) {
|
|
354
|
+
locateWarning = '申诉列表回查失败:' + (e?.message || '未知原因') + ';请稍后用 ehr.attend.appeal.list 复核';
|
|
355
|
+
}
|
|
319
356
|
return ehrSuccess('ehr.attend.appeal.save.apply', {
|
|
320
357
|
status: 'COMPLETE',
|
|
321
358
|
result: response?.data,
|
|
359
|
+
/** 定位到的新建申诉记录(含申诉 ID 等,处理申诉时用其 id) */
|
|
360
|
+
appeal,
|
|
361
|
+
/** 考勤异常/申诉页面地址(已取证路由,禁止改拼) */
|
|
362
|
+
appealListUrl,
|
|
363
|
+
...(locateWarning ? { locateWarning } : {}),
|
|
322
364
|
verifyHint: '可通过 ehr.attend.appeal.list 回查申诉是否已生成',
|
|
323
365
|
});
|
|
324
366
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ehrValidationError } from '../errors.js';
|
|
2
2
|
import { READ, SCHEMA_DATE, SCHEMA_ID, SCHEMA_ID_LIST, ehrSuccess, schemaOf, } from './types.js';
|
|
3
|
-
import { assertDateRange, assertEnum, compact, normalizePaged, pickDefined, toIdList, toNumber, toPositiveInt, } from './shared.js';
|
|
3
|
+
import { assertDateRange, assertEnum, compact, normalizePaged, pickDefined, toIdList, toNumber, toPositiveInt, EHR_PAGES, ehrPageUrl, } from './shared.js';
|
|
4
4
|
const BROWSER_TYPES = ['department', 'subcompany', 'position', 'resource', 'jobsetid', 'grade'];
|
|
5
5
|
const USERNAME_OPERATORS = ['in', 'notIn', 'eq', 'notEq'];
|
|
6
6
|
const PERSONNEL_STATUS = ['all', 'normal', '1', '2', '3', '4', '5', '6', '7', '9', '10'];
|
|
@@ -139,7 +139,8 @@ const contactSearch = {
|
|
|
139
139
|
body: compact(body),
|
|
140
140
|
});
|
|
141
141
|
const { data, page } = normalizePaged(response);
|
|
142
|
-
|
|
142
|
+
const hrSession = await host.getSession();
|
|
143
|
+
return ehrSuccess('ehr.hr.contact.search', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrEmployeeManager), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
143
144
|
},
|
|
144
145
|
};
|
|
145
146
|
const contactCount = {
|
|
@@ -268,7 +269,8 @@ const birthdayList = {
|
|
|
268
269
|
body,
|
|
269
270
|
});
|
|
270
271
|
const { data, page } = normalizePaged(response);
|
|
271
|
-
|
|
272
|
+
const hrSession = await host.getSession();
|
|
273
|
+
return ehrSuccess('ehr.hr.birthday.list', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrBirthdayList), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
272
274
|
},
|
|
273
275
|
};
|
|
274
276
|
const empchangeConditions = {
|
|
@@ -347,7 +349,8 @@ const empchangeList = {
|
|
|
347
349
|
body: compact(body),
|
|
348
350
|
});
|
|
349
351
|
const { data, page } = normalizePaged(response);
|
|
350
|
-
|
|
352
|
+
const hrSession = await host.getSession();
|
|
353
|
+
return ehrSuccess('ehr.hr.empchange.list', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrPersonalStateChange), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
351
354
|
},
|
|
352
355
|
};
|
|
353
356
|
export const hrContactOperations = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ehrValidationError } from '../errors.js';
|
|
2
2
|
import { READ, SCHEMA_DATE, SCHEMA_ID, SCHEMA_ID_LIST, SCHEMA_STRING_LIST, ehrSuccess, schemaOf, } from './types.js';
|
|
3
|
-
import { assertEnum, compact, normalizePaged, toIdList, toNumber, toPositiveInt } from './shared.js';
|
|
3
|
+
import { assertEnum, compact, normalizePaged, toIdList, toNumber, toPositiveInt, EHR_PAGES, ehrPageUrl } from './shared.js';
|
|
4
4
|
const EST_DATA_TYPES = [
|
|
5
5
|
'numberingCount',
|
|
6
6
|
'numberingCountWithSub',
|
|
@@ -74,7 +74,8 @@ const reportDeptTable = {
|
|
|
74
74
|
body: buildPersonReport(args, 'departmentName'),
|
|
75
75
|
});
|
|
76
76
|
const { data, page } = normalizePaged(response);
|
|
77
|
-
|
|
77
|
+
const hrSession = await host.getSession();
|
|
78
|
+
return ehrSuccess('ehr.hr.report.dept.table', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrReportDeptPerson), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
78
79
|
},
|
|
79
80
|
};
|
|
80
81
|
const reportPosiTable = {
|
|
@@ -93,7 +94,8 @@ const reportPosiTable = {
|
|
|
93
94
|
body: buildPersonReport(args, 'positionName'),
|
|
94
95
|
});
|
|
95
96
|
const { data, page } = normalizePaged(response);
|
|
96
|
-
|
|
97
|
+
const hrSession = await host.getSession();
|
|
98
|
+
return ehrSuccess('ehr.hr.report.posi.table', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrReportPosiPerson), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
97
99
|
},
|
|
98
100
|
};
|
|
99
101
|
const reportJobTable = {
|
|
@@ -112,7 +114,8 @@ const reportJobTable = {
|
|
|
112
114
|
body: buildPersonReport(args, 'jobName'),
|
|
113
115
|
});
|
|
114
116
|
const { data, page } = normalizePaged(response);
|
|
115
|
-
|
|
117
|
+
const hrSession = await host.getSession();
|
|
118
|
+
return ehrSuccess('ehr.hr.report.job.table', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrReportJobPerson), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
116
119
|
},
|
|
117
120
|
};
|
|
118
121
|
const reportJobTypeTable = {
|
|
@@ -214,7 +217,8 @@ const estEmpTable = {
|
|
|
214
217
|
},
|
|
215
218
|
});
|
|
216
219
|
const { data, page } = normalizePaged(response);
|
|
217
|
-
|
|
220
|
+
const hrSession = await host.getSession();
|
|
221
|
+
return ehrSuccess('ehr.hr.est.emp.table', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrTpReportTp), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
218
222
|
},
|
|
219
223
|
};
|
|
220
224
|
const estDcEmpTable = {
|
|
@@ -258,7 +262,8 @@ const estDcEmpTable = {
|
|
|
258
262
|
},
|
|
259
263
|
});
|
|
260
264
|
const { data, page } = normalizePaged(response);
|
|
261
|
-
|
|
265
|
+
const hrSession = await host.getSession();
|
|
266
|
+
return ehrSuccess('ehr.hr.est.dc.emp.table', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrTpReportHw), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
262
267
|
},
|
|
263
268
|
};
|
|
264
269
|
const turnEmpTable = {
|
|
@@ -305,7 +310,8 @@ const turnEmpTable = {
|
|
|
305
310
|
body,
|
|
306
311
|
});
|
|
307
312
|
const { data, page } = normalizePaged(response);
|
|
308
|
-
|
|
313
|
+
const hrSession = await host.getSession();
|
|
314
|
+
return ehrSuccess('ehr.hr.turn.emp.table', data, { page, viewUrl: ehrPageUrl(hrSession.baseUrl, EHR_PAGES.hrTpReportTurn), profileUrlTemplate: ehrPageUrl(hrSession.baseUrl, '/sp/hrm/profileInfo/{人员id}') });
|
|
309
315
|
},
|
|
310
316
|
};
|
|
311
317
|
const propsSa = {
|