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
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
continuationReplayError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HP7JIYMT.js";
|
|
6
6
|
import {
|
|
7
7
|
CLARIFICATION_SUBTYPE,
|
|
8
8
|
WorkflowCliError,
|
|
@@ -12,19 +12,23 @@ import {
|
|
|
12
12
|
workflowPartialError,
|
|
13
13
|
workflowPolicyError,
|
|
14
14
|
workflowValidationError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WRXSAVKO.js";
|
|
16
16
|
import {
|
|
17
17
|
stringifyForStdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-727FH2NI.js";
|
|
19
19
|
import {
|
|
20
20
|
stateRoot
|
|
21
21
|
} from "./chunk-AJ62BGAW.js";
|
|
22
|
+
import {
|
|
23
|
+
CONTINUATION_TTL_MS,
|
|
24
|
+
CONTINUATION_TTL_SECONDS
|
|
25
|
+
} from "./chunk-7BDPM5ST.js";
|
|
22
26
|
import {
|
|
23
27
|
E10_REAUTH_GUIDANCE,
|
|
24
28
|
createFetchTimingSink,
|
|
25
29
|
hasXiaoEEnv,
|
|
26
30
|
runWithFetchTiming
|
|
27
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UFIT2UU3.js";
|
|
28
32
|
|
|
29
33
|
// src/shortcuts/workflow/operations/form.ts
|
|
30
34
|
import { randomUUID } from "node:crypto";
|
|
@@ -5150,7 +5154,6 @@ var SYSTEM_FIELD_KEYS = {
|
|
|
5150
5154
|
SECLEVEL: "\u5BC6\u7EA7"
|
|
5151
5155
|
};
|
|
5152
5156
|
var ATTACH_SIZE_LIMIT_STEPS_MB = [1, 5, 10, 20, 50, 100];
|
|
5153
|
-
var CONTINUATION_TTL_MS = 10 * 60 * 1e3;
|
|
5154
5157
|
var READ_WHOLE_OUTPUT_HINT = "\u8BFB\u53D6\u672C\u8F93\u51FA\u8BF7\u4E00\u6B21\u8BFB\u5B8C\uFF1A\u4E0D\u8981\u7528 head/tail \u7B49\u7BA1\u9053\u622A\u65AD\uFF08\u622A\u65AD\u4F1A\u7834\u574F JSON\uFF0C\u5E76\u5BFC\u81F4\u91CD\u590D\u6267\u884C\u540C\u4E00\u6761\u547D\u4EE4\uFF09\u3002";
|
|
5155
5158
|
var CREATE_FORM_STDOUT_SAFE_CHARS = 2e4;
|
|
5156
5159
|
var DURATION_RESERVE_SENTINEL = 99999999;
|
|
@@ -8264,6 +8267,7 @@ var XIAOE_FILL_FORM_SDK_OPTIONS = {
|
|
|
8264
8267
|
var XIAOE_INITIAL_VALUES_MULTI_SEPARATOR = ",";
|
|
8265
8268
|
var XIAOE_INITIAL_VALUES_ROW_SEPARATOR = ";";
|
|
8266
8269
|
var XIAOE_BROWSER_ID_PREFIX = "##";
|
|
8270
|
+
var XIAOE_INITIAL_COVERT_NAME = 1;
|
|
8267
8271
|
function xiaoEUrlParamScalar(value, prefixBrowserId = false) {
|
|
8268
8272
|
if (value === null || value === void 0) return "";
|
|
8269
8273
|
if (typeof value === "object") {
|
|
@@ -8357,6 +8361,9 @@ function xiaoESrcFieldQuery(params) {
|
|
|
8357
8361
|
}
|
|
8358
8362
|
return query;
|
|
8359
8363
|
}
|
|
8364
|
+
function xiaoEEncodeSrcHash(src) {
|
|
8365
|
+
return src.replace(/#/gu, "%23");
|
|
8366
|
+
}
|
|
8360
8367
|
function renderXiaoEFillFormMarkdown(params) {
|
|
8361
8368
|
const base = String(params.baseUrl ?? "").replace(/\/+$/u, "");
|
|
8362
8369
|
const workflowId = String(params.workflowId ?? "").trim();
|
|
@@ -8368,7 +8375,10 @@ function renderXiaoEFillFormMarkdown(params) {
|
|
|
8368
8375
|
arguments: {
|
|
8369
8376
|
type: "e10",
|
|
8370
8377
|
title: String(params.title ?? ""),
|
|
8371
|
-
|
|
8378
|
+
// `#` 一律转义成 `%23`(2026-11-05 用户裁定):`##<id>` 前缀与用户填的 `#` 都会被当成片段起始符。
|
|
8379
|
+
src: xiaoEEncodeSrcHash(
|
|
8380
|
+
`${base}/sp/workflow${createPath}?workflowId=${workflowId}&isCreate=1&initialCovertName=${XIAOE_INITIAL_COVERT_NAME}${xiaoESrcFieldQuery(params.customParams)}`
|
|
8381
|
+
),
|
|
8372
8382
|
sdkOptions: {
|
|
8373
8383
|
compName: XIAOE_FILL_FORM_SDK_OPTIONS.compName,
|
|
8374
8384
|
routerType: XIAOE_FILL_FORM_SDK_OPTIONS.routerType,
|
|
@@ -8378,9 +8388,10 @@ function renderXiaoEFillFormMarkdown(params) {
|
|
|
8378
8388
|
params_mobile: { ...XIAOE_FILL_FORM_SDK_OPTIONS.params_mobile },
|
|
8379
8389
|
params: {
|
|
8380
8390
|
customParams: {
|
|
8381
|
-
// 字段 id → 值(要填写的字段及值),随后是这次要填的**全部字段 id
|
|
8391
|
+
// 字段 id → 值(要填写的字段及值),随后是这次要填的**全部字段 id** 与自定义标识。
|
|
8382
8392
|
...params.customParams.values,
|
|
8383
|
-
fieldAssignKeys: params.customParams.keys.join(",")
|
|
8393
|
+
fieldAssignKeys: params.customParams.keys.join(","),
|
|
8394
|
+
initialCovertName: XIAOE_INITIAL_COVERT_NAME
|
|
8384
8395
|
}
|
|
8385
8396
|
}
|
|
8386
8397
|
}
|
|
@@ -9968,6 +9979,7 @@ var STAGE_VALUES = [
|
|
|
9968
9979
|
"smartGroup",
|
|
9969
9980
|
"summaryContext",
|
|
9970
9981
|
"summary",
|
|
9982
|
+
"subGroup",
|
|
9971
9983
|
"groupSummaryContext",
|
|
9972
9984
|
"groupSummary",
|
|
9973
9985
|
"aggregate"
|
|
@@ -10082,6 +10094,7 @@ var ALLOWED_INPUT_KEYS = [
|
|
|
10082
10094
|
"aiGroupSummaries",
|
|
10083
10095
|
"withDetailContext",
|
|
10084
10096
|
"withGroupSummaryContext",
|
|
10097
|
+
"withSubGroup",
|
|
10085
10098
|
"detailPrefetch",
|
|
10086
10099
|
"maxCharsPerBatch",
|
|
10087
10100
|
"maxItemsPerBatch",
|
|
@@ -10400,7 +10413,7 @@ function promptTagOf(prompt) {
|
|
|
10400
10413
|
return String(prompt ?? "").trim();
|
|
10401
10414
|
}
|
|
10402
10415
|
function entryMatches(entry, maxChars, pk, dv) {
|
|
10403
|
-
if (pk !== void 0 && entry.pk !==
|
|
10416
|
+
if (pk !== void 0 && entry.pk !== pk) return false;
|
|
10404
10417
|
if (maxChars !== void 0 && entry.maxChars !== void 0 && entry.maxChars !== maxChars) return false;
|
|
10405
10418
|
if (entry.dv !== void 0 && entry.dv !== dv) return false;
|
|
10406
10419
|
return true;
|
|
@@ -10411,7 +10424,7 @@ function normalizeSummaryEntry(raw) {
|
|
|
10411
10424
|
if (typeof entry.summary !== "string" || !entry.summary.trim()) return null;
|
|
10412
10425
|
if (typeof entry.cachedAt !== "number" || !Number.isFinite(entry.cachedAt)) return null;
|
|
10413
10426
|
const maxChars = typeof entry.maxChars === "number" && Number.isFinite(entry.maxChars) ? entry.maxChars : void 0;
|
|
10414
|
-
const pk = typeof entry.pk === "string"
|
|
10427
|
+
const pk = typeof entry.pk === "string" ? entry.pk : void 0;
|
|
10415
10428
|
const dv = typeof entry.dv === "string" && entry.dv !== "" ? entry.dv : void 0;
|
|
10416
10429
|
return {
|
|
10417
10430
|
summary: entry.summary,
|
|
@@ -10477,7 +10490,8 @@ async function openSummaryCache(ctx) {
|
|
|
10477
10490
|
summary: text,
|
|
10478
10491
|
cachedAt: Date.now(),
|
|
10479
10492
|
...maxChars === void 0 ? {} : { maxChars },
|
|
10480
|
-
|
|
10493
|
+
// 空串同样落库(见 entryMatches 注释):空口径与「缺 pk」必须能区分开。
|
|
10494
|
+
...pk === void 0 ? {} : { pk },
|
|
10481
10495
|
...dv === void 0 || dv === "" ? {} : { dv }
|
|
10482
10496
|
});
|
|
10483
10497
|
dirty = true;
|
|
@@ -11004,18 +11018,15 @@ function projectDisplayRows(response) {
|
|
|
11004
11018
|
var DETAIL_CACHE_FILE_NAME = "todo-detail-cache.json";
|
|
11005
11019
|
var DETAIL_CACHE_TTL_MS = SUMMARY_CACHE_TTL_MS;
|
|
11006
11020
|
var DETAIL_CACHE_PRUNE_INTERVAL_MS = SUMMARY_CACHE_PRUNE_INTERVAL_MS;
|
|
11007
|
-
var DETAIL_CACHE_ENTRY_VERSION =
|
|
11021
|
+
var DETAIL_CACHE_ENTRY_VERSION = 4;
|
|
11008
11022
|
function detailCacheKey(requestId, lastFeedBackDateTime) {
|
|
11009
11023
|
const stamp = String(lastFeedBackDateTime ?? "").trim();
|
|
11010
11024
|
return `${requestId}__${stamp}`;
|
|
11011
11025
|
}
|
|
11012
11026
|
function detailMaterialTagOf(entry) {
|
|
11013
|
-
const
|
|
11014
|
-
const basicKeys = Object.keys(basic).sort();
|
|
11015
|
-
const material = JSON.stringify([
|
|
11016
|
-
basicKeys.map((key) => [key, basic[key]]),
|
|
11027
|
+
const material = JSON.stringify(
|
|
11017
11028
|
(entry.fields ?? []).map((field) => [field.fieldName, field.value])
|
|
11018
|
-
|
|
11029
|
+
);
|
|
11019
11030
|
let hash = 5381;
|
|
11020
11031
|
for (let i = 0; i < material.length; i += 1) hash = (hash << 5) + hash + material.charCodeAt(i) >>> 0;
|
|
11021
11032
|
return hash.toString(16);
|
|
@@ -11026,17 +11037,12 @@ function normalizeEntry(raw) {
|
|
|
11026
11037
|
if (value.v !== DETAIL_CACHE_ENTRY_VERSION) return null;
|
|
11027
11038
|
if (typeof value.cachedAt !== "number" || !Number.isFinite(value.cachedAt)) return null;
|
|
11028
11039
|
if (typeof value.excludeTag !== "string") return null;
|
|
11029
|
-
const
|
|
11030
|
-
if (value.basicInfo && typeof value.basicInfo === "object") {
|
|
11031
|
-
for (const [key, item] of Object.entries(value.basicInfo)) {
|
|
11032
|
-
if (typeof item === "string") basicInfo[key] = item;
|
|
11033
|
-
}
|
|
11034
|
-
}
|
|
11040
|
+
const workflowName = typeof value.workflowName === "string" ? value.workflowName : "";
|
|
11035
11041
|
const fields = Array.isArray(value.fields) ? value.fields.filter((item) => Boolean(item) && typeof item.fieldName === "string" && typeof item.value === "string").map((item) => ({ fieldName: item.fieldName, value: item.value })) : [];
|
|
11036
11042
|
const metrics = value.metrics && typeof value.metrics === "object" ? value.metrics : {};
|
|
11037
11043
|
return {
|
|
11038
11044
|
v: DETAIL_CACHE_ENTRY_VERSION,
|
|
11039
|
-
|
|
11045
|
+
workflowName,
|
|
11040
11046
|
fields,
|
|
11041
11047
|
metrics,
|
|
11042
11048
|
excludeTag: value.excludeTag,
|
|
@@ -11129,13 +11135,13 @@ function pickInternalMessageContentField(fields) {
|
|
|
11129
11135
|
const content = named.find((item) => item.name === "\u5185\u5BB9" || item.name.endsWith("\u5185\u5BB9"));
|
|
11130
11136
|
return content?.field;
|
|
11131
11137
|
}
|
|
11132
|
-
function pickInternalMessageFieldPairs(fields, basicInfo = {}) {
|
|
11138
|
+
function pickInternalMessageFieldPairs(fields, basicInfo = {}, fallbackCreatorName) {
|
|
11133
11139
|
const content = pickInternalMessageContentField(fields);
|
|
11134
11140
|
const contentValue = String(content?.value ?? "").trim();
|
|
11135
11141
|
if (!contentValue) return [];
|
|
11136
11142
|
const name = normalizeDetailFieldName(content?.fieldName) || INTERNAL_MESSAGE_CONTENT_LABEL;
|
|
11137
11143
|
const pairs = [{ fieldName: name, value: contentValue }];
|
|
11138
|
-
const creatorName = String(basicInfo.creatorName ?? "").trim();
|
|
11144
|
+
const creatorName = String(basicInfo.creatorName ?? fallbackCreatorName ?? "").trim();
|
|
11139
11145
|
if (creatorName) pairs.push({ fieldName: INTERNAL_MESSAGE_INITIATOR_LABEL, value: creatorName });
|
|
11140
11146
|
const createdAt = String(basicInfo.createdAt ?? "").trim();
|
|
11141
11147
|
if (createdAt) pairs.push({ fieldName: INTERNAL_MESSAGE_TIME_LABEL, value: createdAt });
|
|
@@ -11388,6 +11394,11 @@ function isRetryable(error) {
|
|
|
11388
11394
|
if (structured?.type === "network") return true;
|
|
11389
11395
|
return structured?.retryable === true && structured?.type !== "authentication";
|
|
11390
11396
|
}
|
|
11397
|
+
function userIdToCreatorName(options, requestId) {
|
|
11398
|
+
const name = options.rowMeta?.get(requestId)?.createrName;
|
|
11399
|
+
const text = String(name ?? "").trim();
|
|
11400
|
+
return text === "" ? void 0 : text;
|
|
11401
|
+
}
|
|
11391
11402
|
async function fetchOneDetail(env, requestId, userId, options) {
|
|
11392
11403
|
const body = {
|
|
11393
11404
|
requestId,
|
|
@@ -11408,28 +11419,26 @@ async function fetchOneDetail(env, requestId, userId, options) {
|
|
|
11408
11419
|
const normalized = normalizeDetailResponse(response);
|
|
11409
11420
|
const base = normalized?.basicInfo ?? {};
|
|
11410
11421
|
const rawFields = Array.isArray(normalized?.formData?.fields) ? normalized.formData.fields : [];
|
|
11411
|
-
const
|
|
11412
|
-
Object.entries(base).filter(([key]) => key !== "requestTitle" && key !== "flowName")
|
|
11413
|
-
);
|
|
11422
|
+
const workflowName = String(base.workflowName ?? "").trim();
|
|
11414
11423
|
const usableFields = dropDistributionDetailFields(rawFields);
|
|
11415
11424
|
const internalMessage = isInternalMessageDetail(
|
|
11416
|
-
|
|
11425
|
+
workflowName,
|
|
11417
11426
|
usableFields.map((field) => field?.fieldName)
|
|
11418
11427
|
);
|
|
11419
11428
|
const cleanedFields = usableFields.map((field) => ({
|
|
11420
11429
|
...field,
|
|
11421
11430
|
value: cleanFieldText(String(field?.value ?? ""))
|
|
11422
11431
|
}));
|
|
11423
|
-
const excludeFields = excludeFieldsFor(
|
|
11432
|
+
const excludeFields = excludeFieldsFor(workflowName);
|
|
11424
11433
|
const excludeSet = new Set(excludeFields.map((name) => normalizeDetailFieldName(name)));
|
|
11425
|
-
const picked = (internalMessage ? pickInternalMessageFieldPairs(cleanedFields,
|
|
11434
|
+
const picked = (internalMessage ? pickInternalMessageFieldPairs(cleanedFields, {}, userIdToCreatorName(options, requestId)) : cleanedFields.filter((field) => !excludeSet.has(normalizeDetailFieldName(field?.fieldName)))).slice(0, DETAIL_MATERIAL_FIELD_LIMIT).map((field) => ({
|
|
11426
11435
|
fieldName: String(field?.fieldName ?? "").trim(),
|
|
11427
11436
|
value: String(field?.value ?? "").slice(0, DETAIL_MATERIAL_VALUE_LIMIT)
|
|
11428
11437
|
})).filter((field) => field.fieldName && field.value);
|
|
11429
11438
|
const metrics = extractRowMetrics(usableFields);
|
|
11430
11439
|
return {
|
|
11431
11440
|
requestId,
|
|
11432
|
-
|
|
11441
|
+
workflowName,
|
|
11433
11442
|
formFields: picked,
|
|
11434
11443
|
contextAvailable: picked.length > 0,
|
|
11435
11444
|
excludeTag: excludeTagOf(excludeFields),
|
|
@@ -11484,7 +11493,7 @@ async function fetchRequestDetailsBatch(env, requestIds, options = {}) {
|
|
|
11484
11493
|
failures.push({ requestId, error: reason });
|
|
11485
11494
|
details.set(requestId, {
|
|
11486
11495
|
requestId,
|
|
11487
|
-
|
|
11496
|
+
workflowName: "",
|
|
11488
11497
|
formFields: [],
|
|
11489
11498
|
contextAvailable: false,
|
|
11490
11499
|
excludeTag: "",
|
|
@@ -11512,9 +11521,7 @@ async function fetchRequestDetailsBatch(env, requestIds, options = {}) {
|
|
|
11512
11521
|
|
|
11513
11522
|
// src/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.ts
|
|
11514
11523
|
function contextOfDetail(detail) {
|
|
11515
|
-
|
|
11516
|
-
const fieldLines = (detail.formFields ?? []).map((field) => `${field.fieldName}:${field.value}`);
|
|
11517
|
-
return [...basicLines, ...fieldLines].join("\n");
|
|
11524
|
+
return (detail.formFields ?? []).map((field) => `${field.fieldName}:${field.value}`).join("\n");
|
|
11518
11525
|
}
|
|
11519
11526
|
var EMPTY_DETAIL_STATS = {
|
|
11520
11527
|
requested: 0,
|
|
@@ -11540,7 +11547,7 @@ function stampsOfRows(rows) {
|
|
|
11540
11547
|
function materialFieldsOf(detail) {
|
|
11541
11548
|
return detail.formFields.map((field) => ({ fieldName: field.fieldName, value: field.value }));
|
|
11542
11549
|
}
|
|
11543
|
-
async function fetchDetailFacts(env, requestIds, args, stamps) {
|
|
11550
|
+
async function fetchDetailFacts(env, requestIds, args, stamps, names, createrNames) {
|
|
11544
11551
|
const unique = [...new Set(requestIds.filter(Boolean))];
|
|
11545
11552
|
const facts = /* @__PURE__ */ new Map();
|
|
11546
11553
|
const warnings = [];
|
|
@@ -11552,15 +11559,16 @@ async function fetchDetailFacts(env, requestIds, args, stamps) {
|
|
|
11552
11559
|
const missing = [];
|
|
11553
11560
|
for (const requestId of unique) {
|
|
11554
11561
|
const hit = cache.get(requestId, stamps?.get(requestId));
|
|
11555
|
-
if (!hit || hit.excludeTag !== excludeTagFor(hit.
|
|
11562
|
+
if (!hit || hit.excludeTag !== excludeTagFor(hit.workflowName ?? names?.get(requestId) ?? "")) {
|
|
11556
11563
|
missing.push(requestId);
|
|
11557
11564
|
continue;
|
|
11558
11565
|
}
|
|
11559
11566
|
facts.set(requestId, {
|
|
11560
|
-
context: contextOfDetail({
|
|
11567
|
+
context: contextOfDetail({ formFields: hit.fields }),
|
|
11561
11568
|
contextAvailable: hit.fields.length > 0,
|
|
11562
11569
|
metrics: hit.metrics,
|
|
11563
|
-
fields: hit.fields
|
|
11570
|
+
fields: hit.fields,
|
|
11571
|
+
workflowName: hit.workflowName || (names?.get(requestId) ?? "")
|
|
11564
11572
|
});
|
|
11565
11573
|
stats.cacheHit += 1;
|
|
11566
11574
|
}
|
|
@@ -11569,7 +11577,8 @@ async function fetchDetailFacts(env, requestIds, args, stamps) {
|
|
|
11569
11577
|
try {
|
|
11570
11578
|
const { details, stats: fetchStats } = await fetchRequestDetailsBatch(env, missing, {
|
|
11571
11579
|
concurrency: readBoundedInt(args.detailConcurrency, "detailConcurrency", 10, 1, 32),
|
|
11572
|
-
timeoutMs: readBoundedInt(args.detailTimeoutMs, "detailTimeoutMs", 1e4, 1e3, 6e4)
|
|
11580
|
+
timeoutMs: readBoundedInt(args.detailTimeoutMs, "detailTimeoutMs", 1e4, 1e3, 6e4),
|
|
11581
|
+
...createrNames ? { rowMeta: createrNames } : {}
|
|
11573
11582
|
});
|
|
11574
11583
|
stats.failed = fetchStats.failed;
|
|
11575
11584
|
stats.concurrency = fetchStats.concurrency;
|
|
@@ -11578,7 +11587,8 @@ async function fetchDetailFacts(env, requestIds, args, stamps) {
|
|
|
11578
11587
|
context: contextOfDetail(detail),
|
|
11579
11588
|
contextAvailable: detail.formFields.length > 0,
|
|
11580
11589
|
metrics: detail.metrics ?? {},
|
|
11581
|
-
fields: materialFieldsOf(detail)
|
|
11590
|
+
fields: materialFieldsOf(detail),
|
|
11591
|
+
workflowName: detail.workflowName || (names?.get(requestId) ?? "")
|
|
11582
11592
|
};
|
|
11583
11593
|
facts.set(requestId, fact);
|
|
11584
11594
|
stats.fetched += 1;
|
|
@@ -11586,7 +11596,7 @@ async function fetchDetailFacts(env, requestIds, args, stamps) {
|
|
|
11586
11596
|
else stats.contextEmpty += 1;
|
|
11587
11597
|
if (cache.set(requestId, stamps?.get(requestId), {
|
|
11588
11598
|
v: DETAIL_CACHE_ENTRY_VERSION,
|
|
11589
|
-
|
|
11599
|
+
workflowName: fact.workflowName,
|
|
11590
11600
|
metrics: fact.metrics,
|
|
11591
11601
|
fields: fact.fields,
|
|
11592
11602
|
excludeTag: detail.excludeTag
|
|
@@ -11833,14 +11843,8 @@ function runGroup(args) {
|
|
|
11833
11843
|
const { rawCount, rows, duplicateCount, unreadableCount } = readItems(args.items);
|
|
11834
11844
|
const groupBy = readGroupBy(args.groupBy);
|
|
11835
11845
|
const topN = readTopN(args.topN);
|
|
11836
|
-
const pgConfig = generalRules()?.priorityGroup ?? null;
|
|
11837
|
-
const pgTitle = pgConfig?.title?.trim() || PRIORITY_GROUP_TITLE;
|
|
11838
|
-
const pgRules = new Set(pgConfig?.rules ?? ["overdue", "levelFallback"]);
|
|
11839
|
-
const priority = selectPriorityRows(rows, pgRules);
|
|
11840
|
-
const priorityRows = sortPriorityRows(priority.rows);
|
|
11841
|
-
const restRows = rows;
|
|
11842
11846
|
const buckets = /* @__PURE__ */ new Map();
|
|
11843
|
-
for (const row of
|
|
11847
|
+
for (const row of rows) {
|
|
11844
11848
|
const key = groupKeyOf(row, groupBy);
|
|
11845
11849
|
let bucket = buckets.get(key);
|
|
11846
11850
|
if (!bucket) {
|
|
@@ -11863,16 +11867,8 @@ function runGroup(args) {
|
|
|
11863
11867
|
stats: statsOf(bucket.rows),
|
|
11864
11868
|
...bucket.ids.length > 1 ? { workflowIds: bucket.ids } : {}
|
|
11865
11869
|
}));
|
|
11866
|
-
const groups =
|
|
11867
|
-
|
|
11868
|
-
topPriority: true,
|
|
11869
|
-
title: pgTitle,
|
|
11870
|
-
count: priorityRows.length,
|
|
11871
|
-
requestDatas: priorityRows.map((row) => toRequestData(row)),
|
|
11872
|
-
stats: statsOf(priorityRows)
|
|
11873
|
-
}, ...workflowGroups] : workflowGroups;
|
|
11874
|
-
const displayedWorkflow = workflowGroups.slice(0, topN);
|
|
11875
|
-
const displayed = priorityRows.length > 0 && groupBy === "workflow" ? [groups[0], ...displayedWorkflow] : displayedWorkflow;
|
|
11870
|
+
const groups = workflowGroups;
|
|
11871
|
+
const displayed = workflowGroups.slice(0, topN);
|
|
11876
11872
|
const rest = workflowGroups.slice(topN);
|
|
11877
11873
|
const restCount = rest.reduce((sum, group) => sum + group.count, 0);
|
|
11878
11874
|
const overall = statsOf(rows);
|
|
@@ -11889,16 +11885,6 @@ function runGroup(args) {
|
|
|
11889
11885
|
groupBy === "workflow" ? `\u6709 ${unknownGroupCount} \u6761\u7F3A\u5C11\u5DE5\u4F5C\u6D41\u540D\u79F0\uFF0C\u5DF2\u5F52\u5165\u300C${UNKNOWN_GROUP}\u300D` : `\u6709 ${unknownGroupCount} \u6761\u7F3A\u5C11\u5206\u7EC4\u5B57\u6BB5\uFF0C\u5DF2\u5F52\u5165\u300C${UNKNOWN_GROUP}\u300D`
|
|
11890
11886
|
);
|
|
11891
11887
|
}
|
|
11892
|
-
if (priorityRows.length > 0 && groupBy === "workflow") {
|
|
11893
|
-
const levelText = priority.targetLevel === 2 ? "\u7D27\u6025\uFF08requestLevel=2\uFF09" : priority.targetLevel === 1 ? "\u91CD\u8981\uFF08requestLevel=1\uFF1B\u672C\u6B21\u65E0 2 \u7EA7\u6570\u636E\uFF0C\u5DF2\u6309\u89C4\u5219\u964D\u7EA7\u53D6 1\uFF0C0 \u7EA7\u4E0D\u53D6\uFF09" : "\u65E0\u7B49\u7EA7\uFF08\u672C\u6B21\u6574\u6279\u6CA1\u6709 \u22651 \u7EA7\u7684\u6761\u76EE\uFF0C\u53EA\u6309\u8D85\u65F6\u7B5B\uFF09";
|
|
11894
|
-
warnings.push(
|
|
11895
|
-
`\u300C${pgTitle}\u300D\u7B5B\u51FA ${priorityRows.length} \u6761\uFF1A\u8D85\u65F6 ${priority.overdueCount} \u6761 / \u7B49\u7EA7\u547D\u4E2D ${priority.levelCount} \u6761\uFF08\u4E24\u8005\u90FD\u6EE1\u8DB3 ${priority.bothCount} \u6761\uFF09\uFF0C\u7B49\u7EA7\u53E3\u5F84=${levelText}\uFF1B\u8FD9 ${priorityRows.length} \u6761\u540C\u65F6\u4FDD\u7559\u5728\u5404\u81EA\u5DE5\u4F5C\u6D41\u5206\u7EC4\u4E2D\uFF08\u53E0\u52A0\u89C6\u56FE\uFF1A\u03A3count \u4F1A\u5927\u4E8E totalCount\uFF0CtotalCount \u6309\u53BB\u91CD\u6761\u6570\u8BA1 = ${rows.length}\uFF09`
|
|
11896
|
-
);
|
|
11897
|
-
} else if (priorityRows.length === 0 && groupBy === "workflow") {
|
|
11898
|
-
warnings.push(
|
|
11899
|
-
`\u672C\u6B21\u6CA1\u6709\u8D85\u65F6\u6761\u76EE\uFF0C\u4E5F\u6CA1\u6709 requestLevel\u22651 \u7684\u6761\u76EE\uFF0C\u6545\u4E0D\u8F93\u51FA\u300C${PRIORITY_GROUP_TITLE}\u300D\u5206\u7EC4`
|
|
11900
|
-
);
|
|
11901
|
-
}
|
|
11902
11888
|
if (rest.length > 0) {
|
|
11903
11889
|
warnings.push(`markdown \u53EA\u5C55\u793A\u524D ${topN} \u4E2A\u5DE5\u4F5C\u6D41\u5206\u7EC4\uFF0C\u5176\u4F59 ${rest.length} \u7EC4\u5171 ${restCount} \u6761\u4ECD\u5728 wfIdGroup \u4E2D\uFF08\u672A\u622A\u65AD\uFF09`);
|
|
11904
11890
|
}
|
|
@@ -11934,7 +11920,7 @@ function runGroup(args) {
|
|
|
11934
11920
|
},
|
|
11935
11921
|
wfIdGroup: groups,
|
|
11936
11922
|
/** 第二部分(非优先组)的总条数与组数,前端折叠/分页直接用它,不用自己减 */
|
|
11937
|
-
restTotal:
|
|
11923
|
+
restTotal: rows.length,
|
|
11938
11924
|
restGroupCount: workflowGroups.length,
|
|
11939
11925
|
restGroups: rest.length > 0 ? { groupCount: rest.length, count: restCount } : null,
|
|
11940
11926
|
warnings,
|
|
@@ -12049,6 +12035,46 @@ async function collectRawTodos(args, env) {
|
|
|
12049
12035
|
if (items.length >= limit) break;
|
|
12050
12036
|
if (pageRows.length < pageSize) break;
|
|
12051
12037
|
}
|
|
12038
|
+
const workflowNames = /* @__PURE__ */ new Map();
|
|
12039
|
+
const createrNames = /* @__PURE__ */ new Map();
|
|
12040
|
+
for (const row of items) {
|
|
12041
|
+
if (!row.requestId) continue;
|
|
12042
|
+
const name = String(row.workflowName ?? "").trim();
|
|
12043
|
+
if (name) workflowNames.set(row.requestId, name);
|
|
12044
|
+
if (row.createrName) createrNames.set(row.requestId, { createrName: row.createrName });
|
|
12045
|
+
}
|
|
12046
|
+
const detailBackfill = { requested: 0, cacheHit: 0, fetched: 0, failed: 0, nameFilled: 0 };
|
|
12047
|
+
let allFacts = /* @__PURE__ */ new Map();
|
|
12048
|
+
if (items.length > 0) {
|
|
12049
|
+
const detailIds = [...new Set(items.map((row) => row.requestId).filter(Boolean))];
|
|
12050
|
+
const { facts, stats } = await fetchDetailFacts(
|
|
12051
|
+
env,
|
|
12052
|
+
detailIds,
|
|
12053
|
+
args,
|
|
12054
|
+
stampsOfRows(items),
|
|
12055
|
+
workflowNames,
|
|
12056
|
+
createrNames
|
|
12057
|
+
);
|
|
12058
|
+
allFacts = facts;
|
|
12059
|
+
detailBackfill.requested = stats.requested;
|
|
12060
|
+
detailBackfill.cacheHit = stats.cacheHit;
|
|
12061
|
+
detailBackfill.fetched = stats.fetched;
|
|
12062
|
+
detailBackfill.failed = stats.failed;
|
|
12063
|
+
for (const row of items) {
|
|
12064
|
+
const fact = facts.get(row.requestId);
|
|
12065
|
+
if (!fact) continue;
|
|
12066
|
+
if (!String(row.workflowName ?? "").trim() && fact.workflowName) {
|
|
12067
|
+
row.workflowName = fact.workflowName;
|
|
12068
|
+
workflowNames.set(row.requestId, fact.workflowName);
|
|
12069
|
+
detailBackfill.nameFilled += 1;
|
|
12070
|
+
}
|
|
12071
|
+
}
|
|
12072
|
+
if (detailBackfill.nameFilled > 0) {
|
|
12073
|
+
warnings.push(
|
|
12074
|
+
`\u6709 ${detailBackfill.nameFilled} \u6761\u5217\u8868\u6570\u636E\u7F3A\u5C11\u5DE5\u4F5C\u6D41\u540D\u79F0\uFF0C\u5DF2\u7528\u6D41\u7A0B\u8BE6\u60C5\u6570\u636E\uFF08basic.workflowName\uFF09\u56DE\u586B`
|
|
12075
|
+
);
|
|
12076
|
+
}
|
|
12077
|
+
}
|
|
12052
12078
|
await saveSearchIndex(
|
|
12053
12079
|
{
|
|
12054
12080
|
items: items.map((row, index) => ({
|
|
@@ -12125,8 +12151,9 @@ async function collectRawTodos(args, env) {
|
|
|
12125
12151
|
cachedSummaryIds.add(row.requestId);
|
|
12126
12152
|
}
|
|
12127
12153
|
detailStats = {
|
|
12128
|
-
deferred:
|
|
12129
|
-
note: "\u8BE6\u60C5\
|
|
12154
|
+
deferred: false,
|
|
12155
|
+
note: "\u8BE6\u60C5\u5DF2\u5728 collect \u9636\u6BB5\u5168\u91CF\u56DE\u586B\uFF08\u7F13\u5B58\u4F18\u5148\uFF09\uFF1A\u4EC5 basic.workflowName \u4FDD\u7559\uFF0C\u5176\u4F59 basic \u5B57\u6BB5\u4E0E\u7D20\u6750\u65E0\u5173",
|
|
12156
|
+
detailBackfill,
|
|
12130
12157
|
summaryCached: cachedSummaryIds.size,
|
|
12131
12158
|
summaryCacheFile: summaryCache.file,
|
|
12132
12159
|
summaryCachePruned: summaryCache.pruned
|
|
@@ -12137,15 +12164,15 @@ async function collectRawTodos(args, env) {
|
|
|
12137
12164
|
const targetRows = wfIdGroup.filter((group) => !group.topPriority && activeRuleFor(group.title)?.aiGroup?.groupRule.aiContext === "\u6D41\u7A0B\u8BE6\u60C5").flatMap((group) => group.requestDatas ?? []);
|
|
12138
12165
|
const targetIds = [...new Set(targetRows.map((row) => row.requestId).filter(Boolean))];
|
|
12139
12166
|
if (targetIds.length > 0) {
|
|
12140
|
-
const
|
|
12141
|
-
|
|
12142
|
-
if (fact.fields.length > 0) fieldsById.set(requestId, fact.fields);
|
|
12167
|
+
for (const requestId of targetIds) {
|
|
12168
|
+
const fact = allFacts.get(requestId);
|
|
12169
|
+
if (fact && fact.fields.length > 0) fieldsById.set(requestId, fact.fields);
|
|
12143
12170
|
}
|
|
12144
12171
|
detailStats.groupingMaterial = {
|
|
12145
12172
|
requested: targetIds.length,
|
|
12146
|
-
cacheHit:
|
|
12147
|
-
fetched:
|
|
12148
|
-
failed:
|
|
12173
|
+
cacheHit: detailBackfill.cacheHit,
|
|
12174
|
+
fetched: detailBackfill.fetched,
|
|
12175
|
+
failed: detailBackfill.failed,
|
|
12149
12176
|
withFields: fieldsById.size
|
|
12150
12177
|
};
|
|
12151
12178
|
}
|
|
@@ -12317,7 +12344,17 @@ function inferStage(args) {
|
|
|
12317
12344
|
if (!Array.isArray(args.wfIdGroup)) return "auto";
|
|
12318
12345
|
if (Array.isArray(args.aiGroupSummaries)) return "groupSummary";
|
|
12319
12346
|
if (Array.isArray(args.aiSummaries)) return "summary";
|
|
12320
|
-
|
|
12347
|
+
if (hasAnyRequestSummary(args.wfIdGroup)) {
|
|
12348
|
+
return hasAnySubGroup(args.wfIdGroup) ? "groupSummaryContext" : "subGroup";
|
|
12349
|
+
}
|
|
12350
|
+
return "summaryContext";
|
|
12351
|
+
}
|
|
12352
|
+
function hasAnySubGroup(groups) {
|
|
12353
|
+
for (const raw of groups) {
|
|
12354
|
+
const items = raw?.displayItems;
|
|
12355
|
+
if (Array.isArray(items) && items.some((item) => item?.type === "group")) return true;
|
|
12356
|
+
}
|
|
12357
|
+
return false;
|
|
12321
12358
|
}
|
|
12322
12359
|
function rowsOfRawGroup(group) {
|
|
12323
12360
|
if (!group) return [];
|
|
@@ -12352,6 +12389,34 @@ function rowsOfGroup(group) {
|
|
|
12352
12389
|
function groupItemsOf(group) {
|
|
12353
12390
|
return group.displayItems.filter((item) => item.type === "group");
|
|
12354
12391
|
}
|
|
12392
|
+
function assemblePriorityGroup(groups) {
|
|
12393
|
+
const base = (groups ?? []).filter((group) => group.id !== PRIORITY_GROUP_ID && group.topPriority !== true);
|
|
12394
|
+
const pgConfig = generalRules()?.priorityGroup ?? null;
|
|
12395
|
+
const title = pgConfig?.title?.trim() || PRIORITY_GROUP_TITLE;
|
|
12396
|
+
const rules = new Set(pgConfig?.rules ?? ["overdue", "levelFallback"]);
|
|
12397
|
+
const rows = base.flatMap((group) => rowsOfGroup(group));
|
|
12398
|
+
if (rows.length === 0) return { groups: base };
|
|
12399
|
+
const selection = selectPriorityRows(rows, rules);
|
|
12400
|
+
const selected = sortPriorityRows(selection.rows);
|
|
12401
|
+
if (selected.length === 0) {
|
|
12402
|
+
return { groups: base, warning: `\u672C\u6B21\u6CA1\u6709\u8D85\u65F6\u6761\u76EE\uFF0C\u4E5F\u6CA1\u6709 requestLevel\u22651 \u7684\u6761\u76EE\uFF0C\u6545\u4E0D\u8F93\u51FA\u300C${title}\u300D\u5206\u7EC4` };
|
|
12403
|
+
}
|
|
12404
|
+
const levelText = selection.targetLevel === 2 ? "\u7D27\u6025\uFF08requestLevel=2\uFF09" : selection.targetLevel === 1 ? "\u91CD\u8981\uFF08requestLevel=1\uFF1B\u672C\u6B21\u65E0 2 \u7EA7\u6570\u636E\uFF0C\u5DF2\u6309\u89C4\u5219\u964D\u7EA7\u53D6 1\uFF0C0 \u7EA7\u4E0D\u53D6\uFF09" : "\u65E0\u7B49\u7EA7\uFF08\u672C\u6B21\u6574\u6279\u6CA1\u6709 \u22651 \u7EA7\u7684\u6761\u76EE\uFF0C\u53EA\u6309\u8D85\u65F6\u7B5B\uFF09";
|
|
12405
|
+
const priorityGroup = {
|
|
12406
|
+
id: PRIORITY_GROUP_ID,
|
|
12407
|
+
topPriority: true,
|
|
12408
|
+
title,
|
|
12409
|
+
count: selected.length,
|
|
12410
|
+
// 大分组(含优先组)默认展开;只有汇总项收缩
|
|
12411
|
+
defaultExpanded: true,
|
|
12412
|
+
// 复制一份:优先组是独立视图,确保两边互不影响
|
|
12413
|
+
displayItems: requestItemsOf(selected.map((row) => ({ ...row })))
|
|
12414
|
+
};
|
|
12415
|
+
return {
|
|
12416
|
+
groups: [priorityGroup, ...base],
|
|
12417
|
+
warning: `\u300C${title}\u300D\u7B5B\u51FA ${selected.length} \u6761\uFF1A\u8D85\u65F6 ${selection.overdueCount} \u6761 / \u7B49\u7EA7\u547D\u4E2D ${selection.levelCount} \u6761\uFF08\u4E24\u8005\u90FD\u6EE1\u8DB3 ${selection.bothCount} \u6761\uFF09\uFF0C\u7B49\u7EA7\u53E3\u5F84=${levelText}\uFF1B\u8FD9 ${selected.length} \u6761\u540C\u65F6\u4FDD\u7559\u5728\u5404\u81EA\u5DE5\u4F5C\u6D41\u5206\u7EC4\u4E2D\uFF08\u53E0\u52A0\u89C6\u56FE\uFF1A\u03A3count \u4F1A\u5927\u4E8E totalCount\uFF0CtotalCount \u6309\u53BB\u91CD\u6761\u6570\u8BA1\uFF09`
|
|
12418
|
+
};
|
|
12419
|
+
}
|
|
12355
12420
|
function readAiGroups(value) {
|
|
12356
12421
|
if (!Array.isArray(value)) {
|
|
12357
12422
|
throw workflowValidationError(
|
|
@@ -12367,14 +12432,15 @@ function readAiGroups(value) {
|
|
|
12367
12432
|
if (!record) {
|
|
12368
12433
|
throw workflowValidationError("ai_groups_invalid", `${label} \u5FC5\u987B\u662F\u5BF9\u8C61 { groupId, title, requestIds }`, { retryAllowed: false });
|
|
12369
12434
|
}
|
|
12370
|
-
const unknownKeys = Object.keys(record).filter((key) => !["groupId", "title", "requestIds"].includes(key));
|
|
12435
|
+
const unknownKeys = Object.keys(record).filter((key) => !["groupId", "title", "requestIds", "summary"].includes(key));
|
|
12371
12436
|
if (unknownKeys.length > 0) {
|
|
12372
12437
|
throw workflowValidationError(
|
|
12373
12438
|
"ai_groups_invalid",
|
|
12374
|
-
`${label} \u4E0D\u63A5\u53D7\u5B57\u6BB5\uFF1A${unknownKeys.join(", ")}\uFF1B\u53EA\u652F\u6301 groupId / title / requestIds`,
|
|
12439
|
+
`${label} \u4E0D\u63A5\u53D7\u5B57\u6BB5\uFF1A${unknownKeys.join(", ")}\uFF1B\u53EA\u652F\u6301 groupId / title / requestIds / summary`,
|
|
12375
12440
|
{ retryAllowed: false, details: { unknownKeys } }
|
|
12376
12441
|
);
|
|
12377
12442
|
}
|
|
12443
|
+
const planSummary = typeof record.summary === "string" ? record.summary.trim() : "";
|
|
12378
12444
|
const groupId = typeof record.groupId === "string" ? record.groupId.trim() : "";
|
|
12379
12445
|
if (!groupId) {
|
|
12380
12446
|
throw workflowValidationError(
|
|
@@ -12412,7 +12478,12 @@ function readAiGroups(value) {
|
|
|
12412
12478
|
ids.push(id);
|
|
12413
12479
|
}
|
|
12414
12480
|
const bucket = map.get(groupId) ?? [];
|
|
12415
|
-
bucket.push({
|
|
12481
|
+
bucket.push({
|
|
12482
|
+
groupId,
|
|
12483
|
+
title,
|
|
12484
|
+
requestIds: [...new Set(ids)],
|
|
12485
|
+
...planSummary ? { summary: planSummary } : {}
|
|
12486
|
+
});
|
|
12416
12487
|
map.set(groupId, bucket);
|
|
12417
12488
|
});
|
|
12418
12489
|
return map;
|
|
@@ -12468,44 +12539,21 @@ function rowKeyForCount(row) {
|
|
|
12468
12539
|
if (id) return `id:${id}`;
|
|
12469
12540
|
return `tx:${row.requestNameTitle ?? ""}|${row.creater ?? ""}|${row.nodeId ?? ""}`;
|
|
12470
12541
|
}
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
const
|
|
12485
|
-
const
|
|
12486
|
-
const detailCacheForTag = skipDetail ? null : await openDetailCache(env.ctx);
|
|
12487
|
-
const materialTagOfRow = (requestId, stamp) => {
|
|
12488
|
-
const entry = detailCacheForTag?.get(requestId, stamp);
|
|
12489
|
-
return entry ? detailMaterialTagOf(entry) : void 0;
|
|
12490
|
-
};
|
|
12491
|
-
const cachedIds = /* @__PURE__ */ new Set();
|
|
12492
|
-
const allRows = [];
|
|
12493
|
-
for (const group of groups) {
|
|
12494
|
-
for (const row of group.requestDatas ?? []) {
|
|
12495
|
-
allRows.push(row);
|
|
12496
|
-
if (summaryCache.get(
|
|
12497
|
-
row.requestId,
|
|
12498
|
-
row.lastFeedBackDateTime,
|
|
12499
|
-
summaryMaxChars,
|
|
12500
|
-
promptTagOf(activeRuleFor(group.title)?.requestSummaryPrompt ?? ""),
|
|
12501
|
-
materialTagOfRow(row.requestId, row.lastFeedBackDateTime)
|
|
12502
|
-
)) cachedIds.add(row.requestId);
|
|
12503
|
-
}
|
|
12504
|
-
}
|
|
12505
|
-
const detailIds = [...new Set(allRows.map((row) => row.requestId).filter(Boolean))];
|
|
12506
|
-
const stamps = stampsOfRows(allRows);
|
|
12507
|
-
const facts = skipDetail ? /* @__PURE__ */ new Map() : options.facts ?? (await fetchDetailFacts(env, detailIds, args, stamps)).facts;
|
|
12508
|
-
const metrics = skipDetail ? void 0 : options.metrics ?? metricsOfFacts(facts);
|
|
12542
|
+
function flattenFinalGroups(groups) {
|
|
12543
|
+
return groups.map((group) => ({
|
|
12544
|
+
id: group.id,
|
|
12545
|
+
topPriority: group.id === PRIORITY_GROUP_ID,
|
|
12546
|
+
title: group.title,
|
|
12547
|
+
count: group.count,
|
|
12548
|
+
defaultExpanded: true,
|
|
12549
|
+
displayItems: requestItemsOf(group.requestDatas)
|
|
12550
|
+
}));
|
|
12551
|
+
}
|
|
12552
|
+
function applySubGroups(groups, options) {
|
|
12553
|
+
const plans = options.plans;
|
|
12554
|
+
const facts = options.facts;
|
|
12555
|
+
const metrics = options.metrics;
|
|
12556
|
+
const warnings = options.warnings;
|
|
12509
12557
|
const knownGroupIds = new Set(groups.map((group) => group.id));
|
|
12510
12558
|
for (const groupId of plans?.keys() ?? []) {
|
|
12511
12559
|
if (!knownGroupIds.has(groupId)) {
|
|
@@ -12523,15 +12571,6 @@ async function runSmartGroup(args, env, options = {}) {
|
|
|
12523
12571
|
);
|
|
12524
12572
|
}
|
|
12525
12573
|
}
|
|
12526
|
-
const warnings = (base.warnings ?? []).filter((text) => !text.startsWith("markdown \u53EA\u5C55\u793A\u524D"));
|
|
12527
|
-
warnings.push(...primeRules(env.ctx).warnings);
|
|
12528
|
-
if (skipDetail) {
|
|
12529
|
-
warnings.push("withDetailContext=false\uFF1A\u672C\u6B21\u672A\u62C9\u53D6\u4EFB\u4F55\u8BE6\u60C5\u2014\u2014\u8BF7\u5047/\u8D22\u52A1\u9608\u503C\u6539\u4E3A\u6309\u6807\u9898\u8BC6\u522B\u3001\u8DF3\u8FC7\u6574\u7EC4\u7A7A\u5224\u5B9A\uFF0C\u4E5F\u4E0D\u4EA7 summaryBatches");
|
|
12530
|
-
} else if (cachedIds.size > 0) {
|
|
12531
|
-
warnings.push(
|
|
12532
|
-
`\u6709 ${cachedIds.size} \u6761\u547D\u4E2D\u672C\u5730\u6458\u8981\u7F13\u5B58\uFF08\u8FD9\u4E9B\u6761\u76EE\u4E0D\u7528\u518D\u8C03 AI\uFF09\uFF1B\u8BE6\u60C5\u4ECD\u6309\u7F13\u5B58\u4F18\u5148\u53D6\u4E00\u6B21\u2014\u2014\u9608\u503C\u6307\u6807\u53EA\u8BA4\u6D41\u7A0B\u8BE6\u60C5\u6570\u636E\uFF0C\u8DF3\u8FC7\u8BE6\u60C5\u4F1A\u8BA9\u9608\u503C\u5206\u7EC4\u5931\u6548`
|
|
12533
|
-
);
|
|
12534
|
-
}
|
|
12535
12574
|
const finalGroups = groups.map((group) => {
|
|
12536
12575
|
if (group.id === PRIORITY_GROUP_ID) {
|
|
12537
12576
|
return {
|
|
@@ -12657,7 +12696,11 @@ async function runSmartGroup(args, env, options = {}) {
|
|
|
12657
12696
|
}
|
|
12658
12697
|
groupRows = kept2;
|
|
12659
12698
|
}
|
|
12660
|
-
subGroups.push({
|
|
12699
|
+
subGroups.push({
|
|
12700
|
+
title: plan.title,
|
|
12701
|
+
requestDatas: groupRows,
|
|
12702
|
+
...plan.summary ? { summary: plan.summary } : {}
|
|
12703
|
+
});
|
|
12661
12704
|
}
|
|
12662
12705
|
const kept = subGroups.filter((sub) => sub.requestDatas.length >= 2);
|
|
12663
12706
|
const dissolved = subGroups.length - kept.length;
|
|
@@ -12689,6 +12732,7 @@ async function runSmartGroup(args, env, options = {}) {
|
|
|
12689
12732
|
}
|
|
12690
12733
|
}
|
|
12691
12734
|
const renderSubGroupSummary = (sub) => {
|
|
12735
|
+
if ((sub.summary ?? "").trim()) return sub.summary;
|
|
12692
12736
|
const groupSummary = rule.aiGroup?.groupSummary;
|
|
12693
12737
|
if (!groupSummary || groupSummary.needAI || !groupSummary.template) return "";
|
|
12694
12738
|
if (groupRule.groupTitle && sub.title !== groupRule.groupTitle) return "";
|
|
@@ -12730,9 +12774,57 @@ async function runSmartGroup(args, env, options = {}) {
|
|
|
12730
12774
|
displayItems: [...groupItems, ...requestItemsOf(singles)]
|
|
12731
12775
|
};
|
|
12732
12776
|
});
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12777
|
+
return finalGroups;
|
|
12778
|
+
}
|
|
12779
|
+
async function runSmartGroup(args, env, options = {}) {
|
|
12780
|
+
const base = runGroup(args);
|
|
12781
|
+
const groups = base.wfIdGroup ?? [];
|
|
12782
|
+
const plans = args.aiGroups === void 0 || args.aiGroups === null ? void 0 : readAiGroups(args.aiGroups);
|
|
12783
|
+
const groupFocus = typeof args.groupFocus === "string" ? args.groupFocus.trim() : "";
|
|
12784
|
+
const hasFocus = groupFocus.length > 0;
|
|
12785
|
+
const summaryMaxChars = readBoundedInt(
|
|
12786
|
+
args.summaryMaxChars,
|
|
12787
|
+
"summaryMaxChars",
|
|
12788
|
+
DEFAULT_REQUEST_SUMMARY_MAX2,
|
|
12789
|
+
10,
|
|
12790
|
+
500
|
|
12791
|
+
);
|
|
12792
|
+
const skipDetail = args.withDetailContext === false;
|
|
12793
|
+
const summaryCache = await openSummaryCache(env.ctx);
|
|
12794
|
+
const detailCacheForTag = skipDetail ? null : await openDetailCache(env.ctx);
|
|
12795
|
+
const materialTagOfRow = (requestId, stamp) => {
|
|
12796
|
+
const entry = detailCacheForTag?.get(requestId, stamp);
|
|
12797
|
+
return entry ? detailMaterialTagOf(entry) : void 0;
|
|
12798
|
+
};
|
|
12799
|
+
const cachedIds = /* @__PURE__ */ new Set();
|
|
12800
|
+
const allRows = [];
|
|
12801
|
+
for (const group of groups) {
|
|
12802
|
+
for (const row of group.requestDatas ?? []) {
|
|
12803
|
+
allRows.push(row);
|
|
12804
|
+
if (summaryCache.get(
|
|
12805
|
+
row.requestId,
|
|
12806
|
+
row.lastFeedBackDateTime,
|
|
12807
|
+
summaryMaxChars,
|
|
12808
|
+
promptTagOf(activeRuleFor(group.title)?.requestSummaryPrompt ?? ""),
|
|
12809
|
+
materialTagOfRow(row.requestId, row.lastFeedBackDateTime)
|
|
12810
|
+
)) cachedIds.add(row.requestId);
|
|
12811
|
+
}
|
|
12812
|
+
}
|
|
12813
|
+
const detailIds = [...new Set(allRows.map((row) => row.requestId).filter(Boolean))];
|
|
12814
|
+
const stamps = stampsOfRows(allRows);
|
|
12815
|
+
const facts = skipDetail ? /* @__PURE__ */ new Map() : options.facts ?? (await fetchDetailFacts(env, detailIds, args, stamps)).facts;
|
|
12816
|
+
const warnings = (base.warnings ?? []).filter((text) => !text.startsWith("markdown \u53EA\u5C55\u793A\u524D"));
|
|
12817
|
+
warnings.push(...primeRules(env.ctx).warnings);
|
|
12818
|
+
if (skipDetail) {
|
|
12819
|
+
warnings.push("withDetailContext=false\uFF1A\u672C\u6B21\u672A\u62C9\u53D6\u4EFB\u4F55\u8BE6\u60C5\u2014\u2014\u8BF7\u5047/\u8D22\u52A1\u9608\u503C\u6539\u4E3A\u6309\u6807\u9898\u8BC6\u522B\u3001\u8DF3\u8FC7\u6574\u7EC4\u7A7A\u5224\u5B9A\uFF0C\u4E5F\u4E0D\u4EA7 summaryBatches");
|
|
12820
|
+
} else if (cachedIds.size > 0) {
|
|
12821
|
+
warnings.push(
|
|
12822
|
+
`\u6709 ${cachedIds.size} \u6761\u547D\u4E2D\u672C\u5730\u6458\u8981\u7F13\u5B58\uFF08\u8FD9\u4E9B\u6761\u76EE\u4E0D\u7528\u518D\u8C03 AI\uFF09\uFF1B\u8BE6\u60C5\u4ECD\u6309\u7F13\u5B58\u4F18\u5148\u53D6\u4E00\u6B21\u2014\u2014\u9608\u503C\u6307\u6807\u53EA\u8BA4\u6D41\u7A0B\u8BE6\u60C5\u6570\u636E\uFF0C\u8DF3\u8FC7\u8BE6\u60C5\u4F1A\u8BA9\u9608\u503C\u5206\u7EC4\u5931\u6548`
|
|
12823
|
+
);
|
|
12824
|
+
}
|
|
12825
|
+
const orderedGroups = flattenFinalGroups(groups);
|
|
12826
|
+
if (plans !== void 0) {
|
|
12827
|
+
warnings.push("aiGroups \u5DF2\u6536\u5230\uFF0C\u4F46\u672C\u9636\u6BB5\u4E0D\u505A\u4E8C\u6B21\u5206\u7EC4\uFF1A\u7559\u5230 stage=subGroup \u5E94\u7528");
|
|
12736
12828
|
}
|
|
12737
12829
|
return {
|
|
12738
12830
|
data: {
|
|
@@ -12909,7 +13001,7 @@ function collectSummaryUnits(groups) {
|
|
|
12909
13001
|
continue;
|
|
12910
13002
|
}
|
|
12911
13003
|
const kind = detectBusinessKind(group.title);
|
|
12912
|
-
if (!needsRequestSummary(kind)) continue;
|
|
13004
|
+
if (!needAiSummary(group.title) || !needsRequestSummary(kind)) continue;
|
|
12913
13005
|
for (const item of group.displayItems) {
|
|
12914
13006
|
if (item.type === "group") {
|
|
12915
13007
|
units.push({
|
|
@@ -12949,11 +13041,11 @@ async function runSummaryContext(args, env, prefetched) {
|
|
|
12949
13041
|
const prefilledIds = /* @__PURE__ */ new Set();
|
|
12950
13042
|
const needsDetail = [];
|
|
12951
13043
|
const workflowTitleByRequest = /* @__PURE__ */ new Map();
|
|
12952
|
-
for (const
|
|
12953
|
-
if (
|
|
12954
|
-
for (const row of
|
|
13044
|
+
for (const group of groups) {
|
|
13045
|
+
if (group.topPriority) continue;
|
|
13046
|
+
for (const row of rowsOfGroup(group)) {
|
|
12955
13047
|
if (row.requestId && !workflowTitleByRequest.has(row.requestId)) {
|
|
12956
|
-
workflowTitleByRequest.set(row.requestId,
|
|
13048
|
+
workflowTitleByRequest.set(row.requestId, group.title);
|
|
12957
13049
|
}
|
|
12958
13050
|
}
|
|
12959
13051
|
}
|
|
@@ -12961,6 +13053,7 @@ async function runSummaryContext(args, env, prefetched) {
|
|
|
12961
13053
|
for (const unit of units) {
|
|
12962
13054
|
for (const row of unit.rows) {
|
|
12963
13055
|
const name = ruleNameForRow(unit, row);
|
|
13056
|
+
if (!needAiSummary(name)) continue;
|
|
12964
13057
|
const cached = summaryCache.get(
|
|
12965
13058
|
row.requestId,
|
|
12966
13059
|
row.lastFeedBackDateTime,
|
|
@@ -13016,6 +13109,13 @@ async function runSummaryContext(args, env, prefetched) {
|
|
|
13016
13109
|
};
|
|
13017
13110
|
for (const row of unit.rows) {
|
|
13018
13111
|
if (prefilledIds.has(row.requestId)) continue;
|
|
13112
|
+
if (!needAiSummary(ruleNameForRow(unit, row))) {
|
|
13113
|
+
if (!(row.summary ?? "").trim()) {
|
|
13114
|
+
row.summary = row.requestNameTitle ?? "";
|
|
13115
|
+
if ((row.summary ?? "").trim()) titleCopied += 1;
|
|
13116
|
+
}
|
|
13117
|
+
continue;
|
|
13118
|
+
}
|
|
13019
13119
|
const { context, contextAvailable: available } = provider.get(row.requestId);
|
|
13020
13120
|
if (!available) {
|
|
13021
13121
|
const firstSeen = !row.requestId || !claimed.has(row.requestId);
|
|
@@ -13169,17 +13269,15 @@ async function runSummary(args, env) {
|
|
|
13169
13269
|
}
|
|
13170
13270
|
const ruleNameForGroup = (group, row) => group.topPriority ? wfTitleByRequest.get(row?.requestId ?? "") ?? group.title : group.title;
|
|
13171
13271
|
for (const group of groups) {
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13272
|
+
for (const row of rowsOfGroup(group)) {
|
|
13273
|
+
if ((row.summary ?? "").trim()) continue;
|
|
13274
|
+
const name = ruleNameForGroup(group, row);
|
|
13275
|
+
if (!needAiSummary(name)) {
|
|
13175
13276
|
row.summary = row.requestNameTitle ?? "";
|
|
13176
13277
|
if ((row.summary ?? "").trim()) titleSummary += 1;
|
|
13278
|
+
continue;
|
|
13177
13279
|
}
|
|
13178
|
-
continue;
|
|
13179
|
-
}
|
|
13180
|
-
for (const row of rowsOfGroup(group)) {
|
|
13181
|
-
if (!row?.requestId || (row.summary ?? "").trim()) continue;
|
|
13182
|
-
const name = ruleNameForGroup(group, row);
|
|
13280
|
+
if (!row?.requestId) continue;
|
|
13183
13281
|
const cached = summaryCache.get(
|
|
13184
13282
|
row.requestId,
|
|
13185
13283
|
row.lastFeedBackDateTime,
|
|
@@ -13312,6 +13410,41 @@ async function runSummary(args, env) {
|
|
|
13312
13410
|
};
|
|
13313
13411
|
}
|
|
13314
13412
|
|
|
13413
|
+
// src/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subGroup.ts
|
|
13414
|
+
async function runSubGroup(args, env) {
|
|
13415
|
+
const groups = await readFinalGroups(args, env);
|
|
13416
|
+
const warnings = [];
|
|
13417
|
+
const wfGroups = groups.filter((group) => !group.topPriority).map((group) => ({
|
|
13418
|
+
id: group.id,
|
|
13419
|
+
title: group.title,
|
|
13420
|
+
count: group.count,
|
|
13421
|
+
requestDatas: rowsOfGroup(group)
|
|
13422
|
+
}));
|
|
13423
|
+
const plans = args.aiGroups === void 0 || args.aiGroups === null ? void 0 : readAiGroups(args.aiGroups);
|
|
13424
|
+
const rows = wfGroups.flatMap((group) => group.requestDatas);
|
|
13425
|
+
const detailIds = [...new Set(rows.map((row) => row.requestId).filter(Boolean))];
|
|
13426
|
+
const facts = /* @__PURE__ */ new Map();
|
|
13427
|
+
let metrics;
|
|
13428
|
+
if (args.withDetailContext !== false && detailIds.length > 0) {
|
|
13429
|
+
const result = await fetchDetailFacts(env, detailIds, args, stampsOfRows(rows));
|
|
13430
|
+
for (const [requestId, fact] of result.facts) facts.set(requestId, fact);
|
|
13431
|
+
metrics = metricsOfFacts(facts);
|
|
13432
|
+
warnings.push(...result.warnings);
|
|
13433
|
+
}
|
|
13434
|
+
const finalGroups = applySubGroups(wfGroups, { plans, facts, metrics, warnings });
|
|
13435
|
+
return {
|
|
13436
|
+
data: {
|
|
13437
|
+
smartSummaryTitle: readSmartSummaryTitle(
|
|
13438
|
+
args,
|
|
13439
|
+
`\u60A8\u5F53\u524D\u6709 ${totalTodoCount(groups)} \u6761\u5F85\u529E\uFF0C\u6E05\u5355\u5982\u4E0B\uFF1A`
|
|
13440
|
+
),
|
|
13441
|
+
totalCount: totalTodoCount(groups),
|
|
13442
|
+
wfIdGroup: finalGroups
|
|
13443
|
+
},
|
|
13444
|
+
warnings
|
|
13445
|
+
};
|
|
13446
|
+
}
|
|
13447
|
+
|
|
13315
13448
|
// src/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.ts
|
|
13316
13449
|
var INTERNAL_MESSAGE_SUMMARY_HINT2 = "\u5185\u90E8\u7559\u8A00\uFF1A\u53EA\u6309\u539F\u6587\u76F4\u63A5\u6982\u62EC\u300C\u8C01\u8BF4\u4E86\u4EC0\u4E48\u300D\uFF0C\u4E0D\u8981\u8FC7\u5EA6\u89E3\u8BFB\u3001\u4E0D\u8981\u63A8\u6D4B\u52A8\u673A\u6216\u5F71\u54CD\uFF0C\u4E25\u683C\u6309\u672C\u6279 suggestedMaxChars \u63A7\u5236\u5B57\u6570";
|
|
13317
13450
|
var GROUP_SUMMARY_TAIL = GROUP_SUMMARY_TAIL_TEXT;
|
|
@@ -13356,7 +13489,7 @@ function collectGroupSummaryBatches(groups, isCtxEmpty, maxCharsFor = () => DEFA
|
|
|
13356
13489
|
if (group.topPriority) continue;
|
|
13357
13490
|
const kind = detectBusinessKind(group.title);
|
|
13358
13491
|
for (const sub of groupItemsOf(group)) {
|
|
13359
|
-
if (
|
|
13492
|
+
if ((sub.summary ?? "").trim() !== "") continue;
|
|
13360
13493
|
const allRows = Array.isArray(sub.requestDatas) ? sub.requestDatas : [];
|
|
13361
13494
|
const rows = isCtxEmpty ? allRows.filter((row) => !isCtxEmpty(row.requestId)) : allRows;
|
|
13362
13495
|
const emptySkipped = allRows.length - rows.length;
|
|
@@ -13661,6 +13794,7 @@ var inputSchema = schemaOf({
|
|
|
13661
13794
|
}
|
|
13662
13795
|
},
|
|
13663
13796
|
withDetailContext: { type: "boolean", description: "smartGroup \u662F\u5426\u540C\u8FDB\u7A0B\u751F\u6210\u5355\u6761\u6458\u8981\u4E0A\u4E0B\u6587\u3002" },
|
|
13797
|
+
withSubGroup: { type: "boolean", description: "summary \u56DE\u586B\u540E\u662F\u5426\u540C\u8FDB\u7A0B\u63A5\u7740\u505A ai \u4E8C\u6B21\u5206\u7EC4\uFF08stage=subGroup \u7B49\u4EF7\uFF09\u3002" },
|
|
13664
13798
|
withGroupSummaryContext: { type: "boolean", description: "summary \u662F\u5426\u540C\u8FDB\u7A0B\u751F\u6210\u7EC4\u6458\u8981\u4E0A\u4E0B\u6587\u3002" },
|
|
13665
13799
|
detailPrefetch: { type: "boolean", description: "\u5E9F\u5F03\u517C\u5BB9\u53C2\u6570\uFF0C\u5DF2\u5FFD\u7565\uFF1Bcollect \u53EA\u5728\u7ED9\u4E86 groupFocus \u4E14\u610F\u56FE\u9002\u7528\u4E8E\u672C\u7EC4\u65F6\u6309\u9700\u9884\u53D6\u5206\u7EC4\u5B57\u6BB5\uFF08\u8D70\u8BE6\u60C5\u7F13\u5B58\uFF09\u3002" },
|
|
13666
13800
|
groupBy: { type: "string", enum: [...GROUP_BY_VALUES], default: "workflow" },
|
|
@@ -13741,6 +13875,14 @@ var workflowTodoSmartConvertOperations = [{
|
|
|
13741
13875
|
const stage = args.stage === void 0 || args.stage === null || args.stage === "" ? inferStage(args) : readStage(args.stage);
|
|
13742
13876
|
const hasItems = Array.isArray(args.items);
|
|
13743
13877
|
const resumed = stage === "collect" && hasItems;
|
|
13878
|
+
const withPriorityView = (data, extraWarnings) => {
|
|
13879
|
+
if ((args.groupBy ?? "workflow") !== "workflow") return { data, warnings: extraWarnings };
|
|
13880
|
+
const { groups, warning } = assemblePriorityGroup(data.wfIdGroup ?? []);
|
|
13881
|
+
return {
|
|
13882
|
+
data: { ...data, wfIdGroup: groups },
|
|
13883
|
+
warnings: warning ? [...extraWarnings, warning] : extraWarnings
|
|
13884
|
+
};
|
|
13885
|
+
};
|
|
13744
13886
|
if ((stage === "group" || stage === "smartGroup" || stage === "aggregate") && !hasItems) {
|
|
13745
13887
|
throw workflowValidationError(
|
|
13746
13888
|
"items_required",
|
|
@@ -13794,39 +13936,62 @@ var workflowTodoSmartConvertOperations = [{
|
|
|
13794
13936
|
);
|
|
13795
13937
|
}
|
|
13796
13938
|
const result = await runSummary(args, env);
|
|
13939
|
+
let baseData = result.data;
|
|
13940
|
+
let baseWarnings = result.warnings;
|
|
13941
|
+
let subGrouped = false;
|
|
13942
|
+
if (args.withSubGroup === true) {
|
|
13943
|
+
const sub = await runSubGroup({ ...args, wfIdGroup: baseData.wfIdGroup }, env);
|
|
13944
|
+
baseData = { ...baseData, wfIdGroup: sub.data.wfIdGroup };
|
|
13945
|
+
baseWarnings = [...baseWarnings, ...sub.warnings];
|
|
13946
|
+
subGrouped = true;
|
|
13947
|
+
}
|
|
13948
|
+
const final = withPriorityView(baseData, baseWarnings);
|
|
13797
13949
|
if (args.withGroupSummaryContext === true) {
|
|
13798
13950
|
const context = await runGroupSummaryContext({
|
|
13799
|
-
wfIdGroup:
|
|
13800
|
-
smartSummaryTitle:
|
|
13801
|
-
totalCount:
|
|
13951
|
+
wfIdGroup: final.data.wfIdGroup,
|
|
13952
|
+
smartSummaryTitle: final.data.smartSummaryTitle,
|
|
13953
|
+
totalCount: final.data.totalCount
|
|
13802
13954
|
}, env);
|
|
13803
13955
|
if (Array.isArray(context.data.groupSummaryBatches) && context.data.groupSummaryBatches.length === 0) {
|
|
13804
|
-
return finish(env, args, startedAt, stage,
|
|
13956
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
13805
13957
|
branch: "todo-smart-convert",
|
|
13806
13958
|
stage,
|
|
13807
13959
|
aiSummarized: true,
|
|
13960
|
+
subGrouped,
|
|
13808
13961
|
withGroupSummaryContext: true,
|
|
13809
13962
|
...result.meta
|
|
13810
|
-
},
|
|
13963
|
+
}, final.warnings);
|
|
13811
13964
|
}
|
|
13812
13965
|
return finish(env, args, startedAt, stage, {
|
|
13813
|
-
...
|
|
13966
|
+
...final.data,
|
|
13814
13967
|
groupSummaryBatches: context.data.groupSummaryBatches,
|
|
13815
13968
|
groupSummaryStats: context.data.groupSummaryStats
|
|
13816
13969
|
}, {
|
|
13817
13970
|
branch: "todo-smart-convert",
|
|
13818
13971
|
stage,
|
|
13819
13972
|
aiSummarized: true,
|
|
13973
|
+
subGrouped,
|
|
13820
13974
|
withGroupSummaryContext: true,
|
|
13821
13975
|
...result.meta
|
|
13822
|
-
}, [...
|
|
13976
|
+
}, [...final.warnings, ...context.warnings]);
|
|
13823
13977
|
}
|
|
13824
|
-
return finish(env, args, startedAt, stage,
|
|
13978
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
13825
13979
|
branch: "todo-smart-convert",
|
|
13826
13980
|
stage,
|
|
13827
13981
|
aiSummarized: true,
|
|
13982
|
+
subGrouped,
|
|
13828
13983
|
...result.meta
|
|
13829
|
-
},
|
|
13984
|
+
}, final.warnings);
|
|
13985
|
+
}
|
|
13986
|
+
if (stage === "subGroup") {
|
|
13987
|
+
const result = await runSubGroup(args, env);
|
|
13988
|
+
const final = withPriorityView(result.data, result.warnings);
|
|
13989
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
13990
|
+
branch: "todo-smart-convert",
|
|
13991
|
+
stage,
|
|
13992
|
+
aiGrouped: Array.isArray(args.aiGroups),
|
|
13993
|
+
subGrouped: true
|
|
13994
|
+
}, final.warnings);
|
|
13830
13995
|
}
|
|
13831
13996
|
if (stage === "groupSummaryContext") {
|
|
13832
13997
|
const result = await runGroupSummaryContext(args, env);
|
|
@@ -13845,12 +14010,13 @@ var workflowTodoSmartConvertOperations = [{
|
|
|
13845
14010
|
);
|
|
13846
14011
|
}
|
|
13847
14012
|
const result = await runGroupSummary(args, env);
|
|
13848
|
-
|
|
14013
|
+
const final = withPriorityView(result.data, result.warnings);
|
|
14014
|
+
return finish(env, args, startedAt, stage, final.data, {
|
|
13849
14015
|
branch: "todo-smart-convert",
|
|
13850
14016
|
stage,
|
|
13851
14017
|
aiSummarized: true,
|
|
13852
14018
|
...result.meta
|
|
13853
|
-
},
|
|
14019
|
+
}, final.warnings);
|
|
13854
14020
|
}
|
|
13855
14021
|
if (stage === "group" || resumed) {
|
|
13856
14022
|
return finish(env, args, startedAt, "group", runGroup(args), {
|
|
@@ -13877,7 +14043,6 @@ var workflowTodoSmartConvertOperations = [{
|
|
|
13877
14043
|
|
|
13878
14044
|
// src/shortcuts/workflow/operations/write.ts
|
|
13879
14045
|
import { createHash } from "node:crypto";
|
|
13880
|
-
var CONTINUATION_TTL_SECONDS = 600;
|
|
13881
14046
|
var BATCH_SIZE_DEFAULT = 100;
|
|
13882
14047
|
var READ_REMARK_VALUES = /* @__PURE__ */ new Set(["60", "61", "70", "71", "80", "81"]);
|
|
13883
14048
|
var SHARE_TYPE_MAP = {
|