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
|
@@ -5,8 +5,9 @@ import { collectRawTodos } from './todoSmartConvert.collect.js';
|
|
|
5
5
|
import { runSmartConvert } from './todoSmartConvert.aggregate.js';
|
|
6
6
|
import { runGroup } from './todoSmartConvert.group.js';
|
|
7
7
|
import { inferStage, readStage } from './todoSmartConvert.pipeline.js';
|
|
8
|
-
import { runSmartGroup } from './todoSmartConvert.smartGroup.js';
|
|
8
|
+
import { runSmartGroup, assemblePriorityGroup } from './todoSmartConvert.smartGroup.js';
|
|
9
9
|
import { runSummary, runSummaryContext } from './todoSmartConvert.summary.js';
|
|
10
|
+
import { runSubGroup } from './todoSmartConvert.subGroup.js';
|
|
10
11
|
import { runGroupSummary, runGroupSummaryContext } from './todoSmartConvert.groupSummary.js';
|
|
11
12
|
import { schemaOf, } from '../types.js';
|
|
12
13
|
const inputSchema = schemaOf({
|
|
@@ -58,6 +59,7 @@ const inputSchema = schemaOf({
|
|
|
58
59
|
},
|
|
59
60
|
},
|
|
60
61
|
withDetailContext: { type: 'boolean', description: 'smartGroup 是否同进程生成单条摘要上下文。' },
|
|
62
|
+
withSubGroup: { type: 'boolean', description: 'summary 回填后是否同进程接着做 ai 二次分组(stage=subGroup 等价)。' },
|
|
61
63
|
withGroupSummaryContext: { type: 'boolean', description: 'summary 是否同进程生成组摘要上下文。' },
|
|
62
64
|
detailPrefetch: { type: 'boolean', description: '废弃兼容参数,已忽略;collect 只在给了 groupFocus 且意图适用于本组时按需预取分组字段(走详情缓存)。' },
|
|
63
65
|
groupBy: { type: 'string', enum: [...GROUP_BY_VALUES], default: 'workflow' },
|
|
@@ -140,6 +142,19 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
140
142
|
: readStage(args.stage);
|
|
141
143
|
const hasItems = Array.isArray(args.items);
|
|
142
144
|
const resumed = stage === 'collect' && hasItems;
|
|
145
|
+
/**
|
|
146
|
+
* 把「建议优先处理的流程」拼到**最终结构**上(2026-11-03 用户定:放到最后生成)。
|
|
147
|
+
* 只在会产出成品结构的阶段(summary / groupSummary)调用;幂等,重复调用不会叠加。
|
|
148
|
+
*/
|
|
149
|
+
const withPriorityView = (data, extraWarnings) => {
|
|
150
|
+
if ((args.groupBy ?? 'workflow') !== 'workflow')
|
|
151
|
+
return { data, warnings: extraWarnings };
|
|
152
|
+
const { groups, warning } = assemblePriorityGroup(data.wfIdGroup ?? []);
|
|
153
|
+
return {
|
|
154
|
+
data: { ...data, wfIdGroup: groups },
|
|
155
|
+
warnings: warning ? [...extraWarnings, warning] : extraWarnings,
|
|
156
|
+
};
|
|
157
|
+
};
|
|
143
158
|
if ((stage === 'group' || stage === 'smartGroup' || stage === 'aggregate') && !hasItems) {
|
|
144
159
|
throw workflowValidationError('items_required', 'stage=' + stage + ' 需要 items:先执行 stage=collect,再回灌 data.items', { retryAllowed: false });
|
|
145
160
|
}
|
|
@@ -167,28 +182,48 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
167
182
|
throw workflowValidationError('ai_summaries_required', 'stage=summary 需要 aiSummaries:先执行 stage=summaryContext', { retryAllowed: false });
|
|
168
183
|
}
|
|
169
184
|
const result = await runSummary(args, env);
|
|
185
|
+
// 2026-11-03 用户定:**ai 二次分组后移到单条摘要之后**(两者不再耦合)。
|
|
186
|
+
// `withSubGroup` 时在同一次进程内接着做二次分组,省掉一轮 CLI 启动(≈6~7s)。
|
|
187
|
+
// 顺序:summary(回填单条摘要) → subGroup(切子组) → priority 装配 → 组摘要批次。
|
|
188
|
+
let baseData = result.data;
|
|
189
|
+
let baseWarnings = result.warnings;
|
|
190
|
+
let subGrouped = false;
|
|
191
|
+
if (args.withSubGroup === true) {
|
|
192
|
+
const sub = await runSubGroup({ ...args, wfIdGroup: baseData.wfIdGroup }, env);
|
|
193
|
+
baseData = { ...baseData, wfIdGroup: sub.data.wfIdGroup };
|
|
194
|
+
baseWarnings = [...baseWarnings, ...sub.warnings];
|
|
195
|
+
subGrouped = true;
|
|
196
|
+
}
|
|
197
|
+
const final = withPriorityView(baseData, baseWarnings);
|
|
170
198
|
if (args.withGroupSummaryContext === true) {
|
|
171
199
|
const context = await runGroupSummaryContext({
|
|
172
|
-
wfIdGroup:
|
|
173
|
-
smartSummaryTitle:
|
|
174
|
-
totalCount:
|
|
200
|
+
wfIdGroup: final.data.wfIdGroup,
|
|
201
|
+
smartSummaryTitle: final.data.smartSummaryTitle,
|
|
202
|
+
totalCount: final.data.totalCount,
|
|
175
203
|
}, env);
|
|
176
204
|
if (Array.isArray(context.data.groupSummaryBatches) && context.data.groupSummaryBatches.length === 0) {
|
|
177
|
-
return finish(env, args, startedAt, stage,
|
|
178
|
-
branch: 'todo-smart-convert', stage, aiSummarized: true, withGroupSummaryContext: true, ...result.meta,
|
|
179
|
-
},
|
|
205
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
206
|
+
branch: 'todo-smart-convert', stage, aiSummarized: true, subGrouped, withGroupSummaryContext: true, ...result.meta,
|
|
207
|
+
}, final.warnings);
|
|
180
208
|
}
|
|
181
209
|
return finish(env, args, startedAt, stage, {
|
|
182
|
-
...
|
|
210
|
+
...final.data,
|
|
183
211
|
groupSummaryBatches: context.data.groupSummaryBatches,
|
|
184
212
|
groupSummaryStats: context.data.groupSummaryStats,
|
|
185
213
|
}, {
|
|
186
|
-
branch: 'todo-smart-convert', stage, aiSummarized: true, withGroupSummaryContext: true, ...result.meta,
|
|
187
|
-
}, [...
|
|
214
|
+
branch: 'todo-smart-convert', stage, aiSummarized: true, subGrouped, withGroupSummaryContext: true, ...result.meta,
|
|
215
|
+
}, [...final.warnings, ...context.warnings]);
|
|
188
216
|
}
|
|
189
|
-
return finish(env, args, startedAt, stage,
|
|
190
|
-
branch: 'todo-smart-convert', stage, aiSummarized: true, ...result.meta,
|
|
191
|
-
},
|
|
217
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
218
|
+
branch: 'todo-smart-convert', stage, aiSummarized: true, subGrouped, ...result.meta,
|
|
219
|
+
}, final.warnings);
|
|
220
|
+
}
|
|
221
|
+
if (stage === 'subGroup') {
|
|
222
|
+
const result = await runSubGroup(args, env);
|
|
223
|
+
const final = withPriorityView(result.data, result.warnings);
|
|
224
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
225
|
+
branch: 'todo-smart-convert', stage, aiGrouped: Array.isArray(args.aiGroups), subGrouped: true,
|
|
226
|
+
}, final.warnings);
|
|
192
227
|
}
|
|
193
228
|
if (stage === 'groupSummaryContext') {
|
|
194
229
|
const result = await runGroupSummaryContext(args, env);
|
|
@@ -201,9 +236,10 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
201
236
|
throw workflowValidationError('ai_group_summaries_required', 'stage=groupSummary 需要 aiGroupSummaries:先执行 stage=groupSummaryContext', { retryAllowed: false });
|
|
202
237
|
}
|
|
203
238
|
const result = await runGroupSummary(args, env);
|
|
204
|
-
|
|
239
|
+
const final = withPriorityView(result.data, result.warnings);
|
|
240
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
205
241
|
branch: 'todo-smart-convert', stage, aiSummarized: true, ...result.meta,
|
|
206
|
-
},
|
|
242
|
+
}, final.warnings);
|
|
207
243
|
}
|
|
208
244
|
if (stage === 'group' || resumed) {
|
|
209
245
|
return finish(env, args, startedAt, 'group', runGroup(args), {
|
|
@@ -32,7 +32,22 @@ export function inferStage(args) {
|
|
|
32
32
|
return 'groupSummary';
|
|
33
33
|
if (Array.isArray(args.aiSummaries))
|
|
34
34
|
return 'summary';
|
|
35
|
-
|
|
35
|
+
if (hasAnyRequestSummary(args.wfIdGroup)) {
|
|
36
|
+
// 2026-11-03:ai 二次分组后移到单条摘要之后。
|
|
37
|
+
// 单条摘要已填、但结构里还没有汇总项(`type:"group"`)⇒ 下一步是 subGroup;
|
|
38
|
+
// 已经有汇总项 ⇒ 说明二次分组做过,下一步才是组摘要。
|
|
39
|
+
return hasAnySubGroup(args.wfIdGroup) ? 'groupSummaryContext' : 'subGroup';
|
|
40
|
+
}
|
|
41
|
+
return 'summaryContext';
|
|
42
|
+
}
|
|
43
|
+
/** 结构里是否已经存在汇总项(`displayItems[].type === "group"`)。 */
|
|
44
|
+
export function hasAnySubGroup(groups) {
|
|
45
|
+
for (const raw of groups) {
|
|
46
|
+
const items = raw?.displayItems;
|
|
47
|
+
if (Array.isArray(items) && items.some((item) => item?.type === 'group'))
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
36
51
|
}
|
|
37
52
|
/** 从**未经校验**的分组对象里摊平出条目(推断阶段用,同时兼容新旧两种结构)。 */
|
|
38
53
|
export function rowsOfRawGroup(group) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { workflowValidationError } from '../../errors.js';
|
|
2
2
|
import { renderGroupSummaryTemplate, } from './businessRules.js';
|
|
3
3
|
import { asRecord, readBoundedInt, } from './todoSmartConvert.core.js';
|
|
4
|
-
import { PRIORITY_GROUP_ID, PRIORITY_GROUP_TITLE, runGroup, GROUP_MIN_ITEMS_FOR_SUBGROUP, } from './todoSmartConvert.group.js';
|
|
4
|
+
import { PRIORITY_GROUP_ID, PRIORITY_GROUP_TITLE, runGroup, GROUP_MIN_ITEMS_FOR_SUBGROUP, selectPriorityRows, sortPriorityRows, } from './todoSmartConvert.group.js';
|
|
5
5
|
import { fetchDetailFacts, stampsOfRows } from './todoSmartConvert.detail.js';
|
|
6
|
-
import { activeRuleFor, evaluateFocusKeywords, primeRules } from './aigroupRules.js';
|
|
6
|
+
import { activeRuleFor, evaluateFocusKeywords, generalRules, primeRules } from './aigroupRules.js';
|
|
7
7
|
import { openSummaryCache, promptTagOf } from './summaryCache.js';
|
|
8
8
|
import { openDetailCache, detailMaterialTagOf } from './todoDetailCache.js';
|
|
9
9
|
const DEFAULT_REQUEST_SUMMARY_MAX = 50;
|
|
@@ -19,6 +19,54 @@ export function rowsOfGroup(group) {
|
|
|
19
19
|
export function groupItemsOf(group) {
|
|
20
20
|
return group.displayItems.filter((item) => item.type === 'group');
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* 最终结构上的「建议优先处理的流程」置顶视图(2026-11-03 用户定:改到**最后一步**生成)。
|
|
24
|
+
*
|
|
25
|
+
* - 输入是**成品结构**(单条摘要、组摘要都已回填):按同一条规则(`generalRules.priorityGroup`)
|
|
26
|
+
* 从各工作流分组的 `displayItems` 里摊平条目、筛出「超时 / 紧急程度」命中项,复制一份成
|
|
27
|
+
* `id=priority`、`unshift` 到首位;
|
|
28
|
+
* - **幂等**:输入里已有 priority 组时先剔除再重建,stage 串联多次调用结果一致;
|
|
29
|
+
* - 叠加视图语义不变:入选条目仍保留在原工作流分组里 ⇒ `Σcount` 仍大于 `totalCount`
|
|
30
|
+
* (`totalCount` 始终按去重条数计);
|
|
31
|
+
* - 判定字段(`overTime` / `userOverTime` / `requestLevel`)都在 `requestData` 上,不必回查列表;
|
|
32
|
+
* 原排序用的 `receivedTime` 不在 requestData 中,同档退化为按 `requestId` 稳定排序。
|
|
33
|
+
*/
|
|
34
|
+
export function assemblePriorityGroup(groups) {
|
|
35
|
+
const base = (groups ?? []).filter((group) => group.id !== PRIORITY_GROUP_ID && group.topPriority !== true);
|
|
36
|
+
const pgConfig = generalRules()?.priorityGroup ?? null;
|
|
37
|
+
const title = pgConfig?.title?.trim() || PRIORITY_GROUP_TITLE;
|
|
38
|
+
const rules = new Set(pgConfig?.rules ?? ['overdue', 'levelFallback']);
|
|
39
|
+
const rows = base.flatMap((group) => rowsOfGroup(group));
|
|
40
|
+
if (rows.length === 0)
|
|
41
|
+
return { groups: base };
|
|
42
|
+
const selection = selectPriorityRows(rows, rules);
|
|
43
|
+
const selected = sortPriorityRows(selection.rows);
|
|
44
|
+
if (selected.length === 0) {
|
|
45
|
+
return { groups: base, warning: `本次没有超时条目,也没有 requestLevel≥1 的条目,故不输出「${title}」分组` };
|
|
46
|
+
}
|
|
47
|
+
const levelText = selection.targetLevel === 2
|
|
48
|
+
? '紧急(requestLevel=2)'
|
|
49
|
+
: selection.targetLevel === 1
|
|
50
|
+
? '重要(requestLevel=1;本次无 2 级数据,已按规则降级取 1,0 级不取)'
|
|
51
|
+
: '无等级(本次整批没有 ≥1 级的条目,只按超时筛)';
|
|
52
|
+
const priorityGroup = {
|
|
53
|
+
id: PRIORITY_GROUP_ID,
|
|
54
|
+
topPriority: true,
|
|
55
|
+
title,
|
|
56
|
+
count: selected.length,
|
|
57
|
+
// 大分组(含优先组)默认展开;只有汇总项收缩
|
|
58
|
+
defaultExpanded: true,
|
|
59
|
+
// 复制一份:优先组是独立视图,确保两边互不影响
|
|
60
|
+
displayItems: requestItemsOf(selected.map((row) => ({ ...row }))),
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
groups: [priorityGroup, ...base],
|
|
64
|
+
warning: `「${title}」筛出 ${selected.length} 条:超时 ${selection.overdueCount} 条 / `
|
|
65
|
+
+ `等级命中 ${selection.levelCount} 条(两者都满足 ${selection.bothCount} 条),等级口径=${levelText};`
|
|
66
|
+
+ `这 ${selected.length} 条同时保留在各自工作流分组中(叠加视图:Σcount 会大于 totalCount,`
|
|
67
|
+
+ 'totalCount 按去重条数计)',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
22
70
|
/**
|
|
23
71
|
* 校验并索引 `aiGroups`。
|
|
24
72
|
*
|
|
@@ -40,10 +88,11 @@ export function readAiGroups(value) {
|
|
|
40
88
|
if (!record) {
|
|
41
89
|
throw workflowValidationError('ai_groups_invalid', `${label} 必须是对象 { groupId, title, requestIds }`, { retryAllowed: false });
|
|
42
90
|
}
|
|
43
|
-
const unknownKeys = Object.keys(record).filter((key) => !['groupId', 'title', 'requestIds'].includes(key));
|
|
91
|
+
const unknownKeys = Object.keys(record).filter((key) => !['groupId', 'title', 'requestIds', 'summary'].includes(key));
|
|
44
92
|
if (unknownKeys.length > 0) {
|
|
45
|
-
throw workflowValidationError('ai_groups_invalid', `${label} 不接受字段:${unknownKeys.join(', ')};只支持 groupId / title / requestIds`, { retryAllowed: false, details: { unknownKeys } });
|
|
93
|
+
throw workflowValidationError('ai_groups_invalid', `${label} 不接受字段:${unknownKeys.join(', ')};只支持 groupId / title / requestIds / summary`, { retryAllowed: false, details: { unknownKeys } });
|
|
46
94
|
}
|
|
95
|
+
const planSummary = typeof record.summary === 'string' ? record.summary.trim() : '';
|
|
47
96
|
const groupId = typeof record.groupId === 'string' ? record.groupId.trim() : '';
|
|
48
97
|
if (!groupId) {
|
|
49
98
|
throw workflowValidationError('ai_groups_invalid', `${label}.groupId 必填且必须是字符串(19 位 workflowId 用数字会失真;值取 stage=group 的 wfIdGroup[i].id)`, { retryAllowed: false });
|
|
@@ -65,7 +114,12 @@ export function readAiGroups(value) {
|
|
|
65
114
|
ids.push(id);
|
|
66
115
|
}
|
|
67
116
|
const bucket = map.get(groupId) ?? [];
|
|
68
|
-
bucket.push({
|
|
117
|
+
bucket.push({
|
|
118
|
+
groupId,
|
|
119
|
+
title,
|
|
120
|
+
requestIds: [...new Set(ids)],
|
|
121
|
+
...(planSummary ? { summary: planSummary } : {}),
|
|
122
|
+
});
|
|
69
123
|
map.set(groupId, bucket);
|
|
70
124
|
});
|
|
71
125
|
return map;
|
|
@@ -159,48 +213,29 @@ function rowKeyForCount(row) {
|
|
|
159
213
|
return `id:${id}`;
|
|
160
214
|
return `tx:${row.requestNameTitle ?? ''}|${row.creater ?? ''}|${row.nodeId ?? ''}`;
|
|
161
215
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
186
|
-
const cachedIds = new Set();
|
|
187
|
-
const allRows = [];
|
|
188
|
-
for (const group of groups) {
|
|
189
|
-
for (const row of group.requestDatas ?? []) {
|
|
190
|
-
allRows.push(row);
|
|
191
|
-
if (summaryCache.get(row.requestId, row.lastFeedBackDateTime, summaryMaxChars, promptTagOf(activeRuleFor(group.title)?.requestSummaryPrompt ?? ''), materialTagOfRow(row.requestId, row.lastFeedBackDateTime)))
|
|
192
|
-
cachedIds.add(row.requestId);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
// 详情缓存已经按 `requestId__lastFeedBackDateTime` 落盘,命中时零请求;
|
|
196
|
-
// 所以「摘要命中」不再等于「可以不拉详情」——否则阈值分组会因为没有指标而失效(回归 10.2)。
|
|
197
|
-
const detailIds = [...new Set(allRows.map((row) => row.requestId).filter(Boolean))];
|
|
198
|
-
// stamps 决定详情缓存的键:不传就永远 miss(缓存白建)。
|
|
199
|
-
const stamps = stampsOfRows(allRows);
|
|
200
|
-
const facts = skipDetail
|
|
201
|
-
? new Map()
|
|
202
|
-
: (options.facts ?? (await fetchDetailFacts(env, detailIds, args, stamps)).facts);
|
|
203
|
-
const metrics = skipDetail ? undefined : (options.metrics ?? metricsOfFacts(facts));
|
|
216
|
+
/** 平铺结构:不做 ai 二次分组,`displayItems` 全是单条。 */
|
|
217
|
+
export function flattenFinalGroups(groups) {
|
|
218
|
+
return groups.map((group) => ({
|
|
219
|
+
id: group.id,
|
|
220
|
+
topPriority: group.id === PRIORITY_GROUP_ID,
|
|
221
|
+
title: group.title,
|
|
222
|
+
count: group.count,
|
|
223
|
+
defaultExpanded: true,
|
|
224
|
+
displayItems: requestItemsOf(group.requestDatas),
|
|
225
|
+
}));
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* 在**已有结构**上应用 aigroup 规则的 ai 二次分组(2026-11-03 解耦)。
|
|
229
|
+
*
|
|
230
|
+
* 输入是首次 workflowName 分组产出的平铺结构(条目上可能已经带着单条摘要),
|
|
231
|
+
* 输出带汇总项的结构;既不重新分组、也不碰详情缓存,纯粹做「组内切子组」。
|
|
232
|
+
*/
|
|
233
|
+
export function applySubGroups(groups, options) {
|
|
234
|
+
const plans = options.plans;
|
|
235
|
+
const facts = options.facts;
|
|
236
|
+
const metrics = options.metrics;
|
|
237
|
+
const warnings = options.warnings;
|
|
238
|
+
// 计划本身的合法性:未知 groupId / 对优先组做二次分组,都要硬失败(2026-11-03 迁移到本阶段)。
|
|
204
239
|
const knownGroupIds = new Set(groups.map((group) => group.id));
|
|
205
240
|
for (const groupId of plans?.keys() ?? []) {
|
|
206
241
|
if (!knownGroupIds.has(groupId)) {
|
|
@@ -210,18 +245,6 @@ export async function runSmartGroup(args, env, options = {}) {
|
|
|
210
245
|
throw workflowValidationError('ai_group_priority_unsupported', `「${PRIORITY_GROUP_TITLE}」不做二次分组:目标结构里它只有 displayItems(全是单条展示),没有汇总项;请把它的条目从 aiGroups 里去掉`, { retryAllowed: true });
|
|
211
246
|
}
|
|
212
247
|
}
|
|
213
|
-
// markdown 是中间态的东西,最终结构里没有,相关提示一并丢掉,免得误导调用方。
|
|
214
|
-
const warnings = (base.warnings ?? [])
|
|
215
|
-
.filter((text) => !text.startsWith('markdown 只展示前'));
|
|
216
|
-
// aigroup 规则(default.json + user-intents.json):每个 operation 只加载一次。
|
|
217
|
-
warnings.push(...primeRules(env.ctx).warnings);
|
|
218
|
-
if (skipDetail) {
|
|
219
|
-
warnings.push('withDetailContext=false:本次未拉取任何详情——请假/财务阈值改为按标题识别、跳过整组空判定,也不产 summaryBatches');
|
|
220
|
-
}
|
|
221
|
-
else if (cachedIds.size > 0) {
|
|
222
|
-
warnings.push(`有 ${cachedIds.size} 条命中本地摘要缓存(这些条目不用再调 AI);`
|
|
223
|
-
+ '详情仍按缓存优先取一次——阈值指标只认流程详情数据,跳过详情会让阈值分组失效');
|
|
224
|
-
}
|
|
225
248
|
const finalGroups = groups.map((group) => {
|
|
226
249
|
if (group.id === PRIORITY_GROUP_ID) {
|
|
227
250
|
return {
|
|
@@ -358,7 +381,11 @@ export async function runSmartGroup(args, env, options = {}) {
|
|
|
358
381
|
}
|
|
359
382
|
groupRows = kept;
|
|
360
383
|
}
|
|
361
|
-
subGroups.push({
|
|
384
|
+
subGroups.push({
|
|
385
|
+
title: plan.title,
|
|
386
|
+
requestDatas: groupRows,
|
|
387
|
+
...(plan.summary ? { summary: plan.summary } : {}),
|
|
388
|
+
});
|
|
362
389
|
}
|
|
363
390
|
// 子组 <2 不成立(含有意图的子组):解散,条目平铺(Q5)。
|
|
364
391
|
const kept = subGroups.filter((sub) => sub.requestDatas.length >= 2);
|
|
@@ -400,6 +427,10 @@ export async function runSmartGroup(args, env, options = {}) {
|
|
|
400
427
|
}
|
|
401
428
|
/** 组摘要:规则 `needAI:false` 时用 JSON `template` 渲染,否则留空交 AI。 */
|
|
402
429
|
const renderSubGroupSummary = (sub) => {
|
|
430
|
+
// ① 模型随 aiGroups 一起给的摘要优先(同一次交互产出,见 AiSmartGroupPlan.summary)
|
|
431
|
+
if ((sub.summary ?? '').trim())
|
|
432
|
+
return sub.summary;
|
|
433
|
+
// ② 否则走规则里的固定模板(needAI:false 的确定性组)
|
|
403
434
|
const groupSummary = rule.aiGroup?.groupSummary;
|
|
404
435
|
if (!groupSummary || groupSummary.needAI || !groupSummary.template)
|
|
405
436
|
return '';
|
|
@@ -449,10 +480,67 @@ export async function runSmartGroup(args, env, options = {}) {
|
|
|
449
480
|
displayItems: [...groupItems, ...requestItemsOf(singles)],
|
|
450
481
|
};
|
|
451
482
|
});
|
|
483
|
+
return finalGroups;
|
|
484
|
+
}
|
|
485
|
+
export async function runSmartGroup(args, env, options = {}) {
|
|
486
|
+
const base = runGroup(args);
|
|
487
|
+
const groups = (base.wfIdGroup ?? []);
|
|
488
|
+
/** `null` = 确定性模式;数组(可能为空)= 兼容模式 */
|
|
489
|
+
const plans = args.aiGroups === undefined || args.aiGroups === null
|
|
490
|
+
? undefined
|
|
491
|
+
: readAiGroups(args.aiGroups);
|
|
492
|
+
// 注意:`aiGroups: []` 与「未传」现在等价(默认不分组),不再需要用空数组区分语义。
|
|
493
|
+
// 有侧重点时分组 = 标题语义 + 侧重点;子组顺序沿用模型返回顺序。
|
|
494
|
+
// 无侧重点时普通组按条数降序,请假/财务使用阈值规则。
|
|
495
|
+
const groupFocus = typeof args.groupFocus === 'string' ? args.groupFocus.trim() : '';
|
|
496
|
+
const hasFocus = groupFocus.length > 0;
|
|
497
|
+
// 摘要字数口径:缓存命中要按口径过滤(10 字要求不能吃 50 字的旧摘要)。
|
|
498
|
+
const summaryMaxChars = readBoundedInt(args.summaryMaxChars, "summaryMaxChars", DEFAULT_REQUEST_SUMMARY_MAX, 10, 500);
|
|
499
|
+
// 详情用来算阈值指标 + 判定空上下文;摘要缓存只省 AI,不省详情(阈值指标只认流程详情数据)。
|
|
500
|
+
// withDetailContext=false 时只生成结构、不获取详情(此时没有指标,阈值规则自然不生效)。
|
|
501
|
+
const skipDetail = args.withDetailContext === false;
|
|
502
|
+
const summaryCache = await openSummaryCache(env.ctx);
|
|
503
|
+
// 摘要条目的素材特征值:详情素材变了 ⇒ 旧摘要视为不存在(该条重新写摘要)
|
|
504
|
+
const detailCacheForTag = skipDetail ? null : await openDetailCache(env.ctx);
|
|
505
|
+
const materialTagOfRow = (requestId, stamp) => {
|
|
506
|
+
const entry = detailCacheForTag?.get(requestId, stamp);
|
|
507
|
+
return entry ? detailMaterialTagOf(entry) : undefined;
|
|
508
|
+
};
|
|
509
|
+
const cachedIds = new Set();
|
|
510
|
+
const allRows = [];
|
|
511
|
+
for (const group of groups) {
|
|
512
|
+
for (const row of group.requestDatas ?? []) {
|
|
513
|
+
allRows.push(row);
|
|
514
|
+
if (summaryCache.get(row.requestId, row.lastFeedBackDateTime, summaryMaxChars, promptTagOf(activeRuleFor(group.title)?.requestSummaryPrompt ?? ''), materialTagOfRow(row.requestId, row.lastFeedBackDateTime)))
|
|
515
|
+
cachedIds.add(row.requestId);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
// 详情缓存已经按 `requestId__lastFeedBackDateTime` 落盘,命中时零请求;
|
|
519
|
+
// 所以「摘要命中」不再等于「可以不拉详情」——否则阈值分组会因为没有指标而失效(回归 10.2)。
|
|
520
|
+
const detailIds = [...new Set(allRows.map((row) => row.requestId).filter(Boolean))];
|
|
521
|
+
// stamps 决定详情缓存的键:不传就永远 miss(缓存白建)。
|
|
522
|
+
const stamps = stampsOfRows(allRows);
|
|
523
|
+
const facts = skipDetail
|
|
524
|
+
? new Map()
|
|
525
|
+
: (options.facts ?? (await fetchDetailFacts(env, detailIds, args, stamps)).facts);
|
|
526
|
+
// markdown 是中间态的东西,最终结构里没有,相关提示一并丢掉,免得误导调用方。
|
|
527
|
+
const warnings = (base.warnings ?? [])
|
|
528
|
+
.filter((text) => !text.startsWith('markdown 只展示前'));
|
|
529
|
+
// aigroup 规则(default.json + user-intents.json):每个 operation 只加载一次。
|
|
530
|
+
warnings.push(...primeRules(env.ctx).warnings);
|
|
531
|
+
if (skipDetail) {
|
|
532
|
+
warnings.push('withDetailContext=false:本次未拉取任何详情——请假/财务阈值改为按标题识别、跳过整组空判定,也不产 summaryBatches');
|
|
533
|
+
}
|
|
534
|
+
else if (cachedIds.size > 0) {
|
|
535
|
+
warnings.push(`有 ${cachedIds.size} 条命中本地摘要缓存(这些条目不用再调 AI);`
|
|
536
|
+
+ '详情仍按缓存优先取一次——阈值指标只认流程详情数据,跳过详情会让阈值分组失效');
|
|
537
|
+
}
|
|
452
538
|
// 分组顺序完全沿用第一次 workflowName 分组顺序。
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
539
|
+
// 2026-11-03 用户定:本阶段**只做** workflowName 首次分组,产出平铺 displayItems。
|
|
540
|
+
// ai 二次分组一律由 `stage=subGroup` 调 `applySubGroups()` 完成(旧的就地分组分支已删除)。
|
|
541
|
+
const orderedGroups = flattenFinalGroups(groups);
|
|
542
|
+
if (plans !== undefined) {
|
|
543
|
+
warnings.push('aiGroups 已收到,但本阶段不做二次分组:留到 stage=subGroup 应用');
|
|
456
544
|
}
|
|
457
545
|
return {
|
|
458
546
|
data: {
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { applySubGroups, metricsOfFacts, readAiGroups, rowsOfGroup, totalTodoCount, } from './todoSmartConvert.smartGroup.js';
|
|
2
|
+
import { fetchDetailFacts, stampsOfRows } from './todoSmartConvert.detail.js';
|
|
3
|
+
import { readFinalGroups, readSmartSummaryTitle } from './todoSmartConvert.summary.js';
|
|
4
|
+
/**
|
|
5
|
+
* `stage=subGroup`:**ai 二次分组**(2026-11-03 从 `smartGroup` 拆出来独立成阶段)。
|
|
6
|
+
*
|
|
7
|
+
* 为什么要拆:二次分组曾经和「workflowName 首次分组」绑在同一个 stage 里,导致
|
|
8
|
+
* `focus:false` 的组在**写单条摘要之前**就强制要求模型给出 `aiGroups`——摘要与分组互相耦合。
|
|
9
|
+
* 现在的链路:
|
|
10
|
+
*
|
|
11
|
+
* ```
|
|
12
|
+
* collect → smartGroup(仅首次分组 + 平铺) → summaryContext → summary(单条摘要)
|
|
13
|
+
* → subGroup(本阶段:ai 二次分组) → groupSummaryContext → groupSummary
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* 本阶段只做「组内切子组」:不重新分组、不改摘要、详情全部走缓存(命中率 100%,
|
|
17
|
+
* 因为 collect 已经全量回填)。条目上已有的单条摘要随 `requestDatas` 一起带进子组。
|
|
18
|
+
*/
|
|
19
|
+
export async function runSubGroup(args, env) {
|
|
20
|
+
const groups = await readFinalGroups(args, env);
|
|
21
|
+
const warnings = [];
|
|
22
|
+
// 优先级组是最终结构上的叠加视图,不参与二次分组(导出前由 assemblePriorityGroup 重建)。
|
|
23
|
+
const wfGroups = groups
|
|
24
|
+
.filter((group) => !group.topPriority)
|
|
25
|
+
.map((group) => ({
|
|
26
|
+
id: group.id,
|
|
27
|
+
title: group.title,
|
|
28
|
+
count: group.count,
|
|
29
|
+
requestDatas: rowsOfGroup(group),
|
|
30
|
+
}));
|
|
31
|
+
const plans = args.aiGroups === undefined || args.aiGroups === null
|
|
32
|
+
? undefined
|
|
33
|
+
: readAiGroups(args.aiGroups);
|
|
34
|
+
// 阈值类二次分组(请假天数 / 报销金额 / 计划完成时间)要指标 ⇒ 仍要详情;
|
|
35
|
+
// collect 已全量回填,这里等价于纯缓存命中、零 HTTP。
|
|
36
|
+
const rows = wfGroups.flatMap((group) => group.requestDatas);
|
|
37
|
+
const detailIds = [...new Set(rows.map((row) => row.requestId).filter(Boolean))];
|
|
38
|
+
const facts = new Map();
|
|
39
|
+
let metrics;
|
|
40
|
+
if (args.withDetailContext !== false && detailIds.length > 0) {
|
|
41
|
+
const result = await fetchDetailFacts(env, detailIds, args, stampsOfRows(rows));
|
|
42
|
+
for (const [requestId, fact] of result.facts)
|
|
43
|
+
facts.set(requestId, fact);
|
|
44
|
+
metrics = metricsOfFacts(facts);
|
|
45
|
+
warnings.push(...result.warnings);
|
|
46
|
+
}
|
|
47
|
+
const finalGroups = applySubGroups(wfGroups, { plans, facts, metrics, warnings });
|
|
48
|
+
return {
|
|
49
|
+
data: {
|
|
50
|
+
smartSummaryTitle: readSmartSummaryTitle(args, `您当前有 ${totalTodoCount(groups)} 条待办,清单如下:`),
|
|
51
|
+
totalCount: totalTodoCount(groups),
|
|
52
|
+
wfIdGroup: finalGroups,
|
|
53
|
+
},
|
|
54
|
+
warnings,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -178,7 +178,10 @@ export function collectSummaryUnits(groups) {
|
|
|
178
178
|
continue;
|
|
179
179
|
}
|
|
180
180
|
const kind = detectBusinessKind(group.title);
|
|
181
|
-
|
|
181
|
+
// 规则 `needSummary:false`(default.json)⇒ 整组不进 AI 批次(标题兜底,见 runSummary)。
|
|
182
|
+
// 2026-11-03 用户定:此前这里只认硬编码业务类型(仅满意度被排除),导致规则里配了 false 的组
|
|
183
|
+
// 仍然生成素材、把「待写摘要」虚报成几百条。
|
|
184
|
+
if (!needAiSummary(group.title) || !needsRequestSummary(kind))
|
|
182
185
|
continue;
|
|
183
186
|
for (const item of group.displayItems) {
|
|
184
187
|
if (item.type === 'group') {
|
|
@@ -244,12 +247,14 @@ export async function runSummaryContext(args, env, prefetched) {
|
|
|
244
247
|
* 先建 requestId → 工作流组名 的映射,优先组的行查这张表。
|
|
245
248
|
*/
|
|
246
249
|
const workflowTitleByRequest = new Map();
|
|
247
|
-
|
|
248
|
-
|
|
250
|
+
// 从**全部工作流组**建映射(不能用 units:`needSummary:false` 的组不产 unit,但它们在优先组里
|
|
251
|
+
// 仍有副本,缺了映射就会被当成「建议优先处理的流程」⇒ 落 `*` 兜底 ⇒ 误判成需要 AI)。
|
|
252
|
+
for (const group of groups) {
|
|
253
|
+
if (group.topPriority)
|
|
249
254
|
continue;
|
|
250
|
-
for (const row of
|
|
255
|
+
for (const row of rowsOfGroup(group)) {
|
|
251
256
|
if (row.requestId && !workflowTitleByRequest.has(row.requestId)) {
|
|
252
|
-
workflowTitleByRequest.set(row.requestId,
|
|
257
|
+
workflowTitleByRequest.set(row.requestId, group.title);
|
|
253
258
|
}
|
|
254
259
|
}
|
|
255
260
|
}
|
|
@@ -259,6 +264,10 @@ export async function runSummaryContext(args, env, prefetched) {
|
|
|
259
264
|
for (const unit of units) {
|
|
260
265
|
for (const row of unit.rows) {
|
|
261
266
|
const name = ruleNameForRow(unit, row);
|
|
267
|
+
// 规则 `needSummary:false` ⇒ 不取详情、不进批次,摘要由 `runSummary` 用标题兜底
|
|
268
|
+
// (2026-11-03 用户定:优先组副本此前按组名判定,把这批条目也算成了待写)。
|
|
269
|
+
if (!needAiSummary(name))
|
|
270
|
+
continue;
|
|
262
271
|
const cached = summaryCache.get(row.requestId, row.lastFeedBackDateTime, explicitMaxCharsFor(args, name), promptTagOf(requestPromptFor(name)), materialTagOfRow(row.requestId, row.lastFeedBackDateTime));
|
|
263
272
|
if (cached) {
|
|
264
273
|
row.summary = cached;
|
|
@@ -321,6 +330,16 @@ export async function runSummaryContext(args, env, prefetched) {
|
|
|
321
330
|
// 摘要缓存已命中(上一步预填)⇒ 不再喂 AI
|
|
322
331
|
if (prefilledIds.has(row.requestId))
|
|
323
332
|
continue;
|
|
333
|
+
// 规则 `needSummary:false` ⇒ 标题兜底、不进批次(优先组副本按**原工作流**口径判定)。
|
|
334
|
+
// 2026-11-03:此前只在「详情为空」时才复制标题,规则豁免完全没接,规则 false 的条目照样进批次。
|
|
335
|
+
if (!needAiSummary(ruleNameForRow(unit, row))) {
|
|
336
|
+
if (!(row.summary ?? '').trim()) {
|
|
337
|
+
row.summary = row.requestNameTitle ?? '';
|
|
338
|
+
if ((row.summary ?? '').trim())
|
|
339
|
+
titleCopied += 1;
|
|
340
|
+
}
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
324
343
|
const { context, contextAvailable: available } = provider.get(row.requestId);
|
|
325
344
|
if (!available) {
|
|
326
345
|
// ★ 详情为空 ⇒ 不喂 AI,summary 直接复制标题(确定性操作,不走模型)。
|
|
@@ -487,21 +506,27 @@ export async function runSummary(args, env) {
|
|
|
487
506
|
}
|
|
488
507
|
}
|
|
489
508
|
const ruleNameForGroup = (group, row) => group.topPriority ? (wfTitleByRequest.get(row?.requestId ?? '') ?? group.title) : group.title;
|
|
509
|
+
/**
|
|
510
|
+
* 逐条按**原工作流口径**判定(2026-11-03 用户定:优先组副本空摘要修复)。
|
|
511
|
+
*
|
|
512
|
+
* 旧实现按「组」判定,且优先组被整组跳过标题兜底——但优先组的组名匹配不到规则(会落到 `*` 兜底,
|
|
513
|
+
* `needSummary` 被当成 true),于是 `needSummary:false` 的条目(如内部留言、安全问题工单)
|
|
514
|
+
* 在优先组里的副本既没走标题兜底、又没走 AI 批次,summary 恒为空 ⇒ 导出闸门拦截。
|
|
515
|
+
* 现在改为逐条解析口径:`needSummary:false` ⇒ 标题兜底(与普通组副本一致),否则读摘要缓存。
|
|
516
|
+
*/
|
|
490
517
|
for (const group of groups) {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
518
|
+
for (const row of rowsOfGroup(group)) {
|
|
519
|
+
if ((row.summary ?? '').trim())
|
|
520
|
+
continue;
|
|
521
|
+
const name = ruleNameForGroup(group, row);
|
|
522
|
+
if (!needAiSummary(name)) {
|
|
495
523
|
row.summary = row.requestNameTitle ?? '';
|
|
496
524
|
if ((row.summary ?? '').trim())
|
|
497
525
|
titleSummary += 1;
|
|
526
|
+
continue;
|
|
498
527
|
}
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
for (const row of rowsOfGroup(group)) {
|
|
502
|
-
if (!row?.requestId || (row.summary ?? '').trim())
|
|
528
|
+
if (!row?.requestId)
|
|
503
529
|
continue;
|
|
504
|
-
const name = ruleNameForGroup(group, row);
|
|
505
530
|
const cached = summaryCache.get(row.requestId, row.lastFeedBackDateTime, explicitMaxCharsFor(args, name), promptTagOf(requestPromptFor(name)), materialTagOfRow(row.requestId, row.lastFeedBackDateTime));
|
|
506
531
|
if (cached) {
|
|
507
532
|
row.summary = cached;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { WorkflowCliError, workflowConfirmationError, workflowPartialError, workflowValidationError, } from '../errors.js';
|
|
3
4
|
import { continuationReplayError } from '../continuation.js';
|
|
@@ -17,7 +18,6 @@ import { findIndexedItem, loadSearchIndex, } from '../state.js';
|
|
|
17
18
|
// 「确定性幂等键 + 有界保护窗口」的一次性闸门承担(见 batchIdempotencyKey / claimBatchWrite)。
|
|
18
19
|
// 写请求遇网络中断/超时(结果未知)一律抛 workflowPartialError,禁止自动重试。
|
|
19
20
|
// ===========================================================================
|
|
20
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
21
21
|
const BATCH_SIZE_DEFAULT = 100;
|
|
22
22
|
const READ_REMARK_VALUES = new Set(['60', '61', '70', '71', '80', '81']);
|
|
23
23
|
// 共享对象类型 → addRequestShare2 的 shareType
|
package/docs/_catalog.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| 齐业成费控中心(预算/费用中心/报销报表 AI 问答/借款管理/发票核销)、fna operation、提醒还款与催票 prepare/apply | `docs/fna.md` |
|
|
14
14
|
| 文书定档案管理(全宗/检索/借阅车/借阅单/发起借阅/预归档上传)、wenshuding operation | `docs/wenshuding.md` |
|
|
15
15
|
| 计划报告管理(报告查询/新建/修改/发布/撤回/提交提醒/评论)、plan operation、写操作 prepare/apply | `docs/plan.md` |
|
|
16
|
+
| 客户参观接待(面板/行程单与内部方案/填单页预填)、reception operation、零写请求 | `docs/reception.md` |
|
|
16
17
|
| OKR 目标管理(目标查询/详情、关键成果、目标对齐、评论)、okr operation、标准版与 ebuilder 双链路、写操作 prepare/apply | `docs/okr.md` |
|
|
17
18
|
| eBuilder 表单(菜单定位、List/NList、字段/浏览、OpenAPI 与自定义接口)、ebuilder-form operation、写操作 prepare/apply | `docs/ebuilder-form.md` |
|
|
18
19
|
| E10 ESB 中心自定义触发动作流(入参模板查询 / prepare-apply 触发)、esb operation | `docs/esb.md` |
|
|
@@ -30,6 +31,8 @@
|
|
|
30
31
|
| Agent 调用齐业成费控 CLI 的具体 reference | `skills/weaver-e10-qiyecheng/references/` |
|
|
31
32
|
| Agent 调用计划报告 CLI 的入口路由 | `skills/weaver-e10-plan/SKILL.md` |
|
|
32
33
|
| Agent 调用计划报告 CLI 的具体 reference | `skills/weaver-e10-plan/references/` |
|
|
34
|
+
| Agent 调用客户参观接待 CLI 的入口路由 | `skills/weaver-e10-reception-flow/SKILL.md` |
|
|
35
|
+
| Agent 调用客户参观接待 CLI 的具体 reference(抽取口径/面板约束/建单口径) | `skills/weaver-e10-reception-flow/references/` |
|
|
33
36
|
| Agent 调用 OKR 目标管理 CLI 的入口路由 | `skills/weaver-e10-okr/SKILL.md` |
|
|
34
37
|
| Agent 调用 OKR 目标管理 CLI 的具体 reference | `skills/weaver-e10-okr/references/` |
|
|
35
38
|
| Agent 调用 ESB 动作流 CLI 的入口路由 | `skills/weaver-e10-esb/SKILL.md` |
|
package/docs/agent-invoice.md
CHANGED
|
@@ -67,7 +67,7 @@ weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"s
|
|
|
67
67
|
|
|
68
68
|
删除、编辑、新增同样必须使用 `prepare -> apply`。出现 `partial/write_uncertain` 时停止,不能自动重试写操作。
|
|
69
69
|
|
|
70
|
-
处理“把发票填进流程表单”的场景,使用 `invoice.browse-field.data` 生成浏览按钮控件所需 JSON。处理“报销发票/自动填单”时,先读取 `invoice-reim.md`,用报销相关只读 operation
|
|
70
|
+
处理“把发票填进流程表单”的场景,使用 `invoice.browse-field.data` 生成浏览按钮控件所需 JSON。处理“报销发票/自动填单”时,先读取 `invoice-reim.md`,用报销相关只读 operation(`invoice.reim.candidates.list`、`invoice.reim.requests.list`、`invoice.reim.workflow.resolve`、`invoice.reim.employee-superiors`、`invoice.reim.field.search`)获取候选发票、事前申请、工作流、人员上级和相关客户/项目;报销单的载入、创建和修改统一走 `weaver-e10-workflow`:`workflow.createForm` 载入表单,`workflow.createRequest`(`action` 固定 `draft`)存草稿,修改走 `workflow.editLoad` / `workflow.editPrepare` / `workflow.editApply`。旧的 `invoice.reim.flow.create/update.*` 已移除,不要再调用。处理“开票 / 待开票合同”时读取 `invoice-issuing-workflow.md`:先用 `weaver-e10-workflow` 的 `workflow.search` 查出当前用户有权限看的合同审批流程,再把 `data.cards` 传给 `invoice.issuing.contracts.list` 补齐是否开票、合同号、客户名称和开票金额,列出待开票合同;用户选定后用 `invoice.issuing.contract.detail` 取合同客户与合同正文文档 id,按销售方选开票申请流程,问清预计收款时间并确认后用 `workflow.createForm` / `workflow.createRequest`(`action` 固定 `draft`)存草稿。当前修正资料包没有客户档案查询或红字发票红冲接口,`invoice.customer.*` 和 `invoice.red.*` 不能调用或绕过。
|
|
71
71
|
|
|
72
72
|
## 暂缓能力
|
|
73
73
|
|
package/docs/archive-oa.md
CHANGED
|
@@ -68,7 +68,7 @@ weaver-work-cli --json archive-oa run archive-oa.contract.list --input-json '{"p
|
|
|
68
68
|
## 写操作确认协议
|
|
69
69
|
|
|
70
70
|
- `*.prepare`:只读回查与参数校验(加入借阅车会查一次借阅车现状),返回 `preview` 与 `continuation`。
|
|
71
|
-
- `*.apply`:必须带 `continuation` 且 `confirm: true`(CLI `--yes`);票据含环境与登录账号指纹,
|
|
71
|
+
- `*.apply`:必须带 `continuation` 且 `confirm: true`(CLI `--yes`);票据含环境与登录账号指纹,24 小时有效。
|
|
72
72
|
- 发起借阅用 `archive-oa.borrow.start.url` 生成流程页 URL(只读,`risk: read`):生成后优先用系统默认浏览器打开,无法打开时原样输出完整 URL;流程表单由用户在浏览器确认并提交。OpenESB 版 `borrow.start.prepare` / `.apply` 已下线。
|
|
73
73
|
- `failNum > 0` 时返回 `partial / write_uncertain`,不自动重放。
|
|
74
74
|
|