weaver-work-cli 0.1.42 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/chunks/{archive-J4I6MCKF.js → archive-ZQ4A4TV6.js} +399 -47
- package/dist/chunks/{archive-oa-BRZKKTO4.js → archive-oa-BBDP7AKJ.js} +12 -5
- package/dist/chunks/{asset-L7D4FAOZ.js → asset-ZOJVBWZH.js} +11 -4
- package/dist/chunks/{asset-idle-DADLLV75.js → asset-idle-XGB5IPGT.js} +7 -3
- package/dist/chunks/{attachment-content-K4C7VLWQ.js → attachment-content-CE3GMWTS.js} +5 -4
- package/dist/chunks/{blog-BVGQ7NZL.js → blog-QSHLZSFW.js} +11 -4
- package/dist/chunks/caizhilian-KCQYFH72.js +204 -0
- package/dist/chunks/{calendar-Q7NQY5Z2.js → calendar-DLGMRJQA.js} +12 -5
- package/dist/chunks/{chunk-W7BEHOSR.js → chunk-3WBIQLMB.js} +2 -2
- package/dist/chunks/{chunk-4PD5NWAX.js → chunk-3YV7PKRL.js} +2 -2
- package/dist/chunks/{chunk-JPRO6ER2.js → chunk-3ZMAQQ3W.js} +185 -60
- package/dist/chunks/{chunk-R4CHUSKC.js → chunk-4EXOIQDI.js} +40 -10
- package/dist/chunks/{chunk-OOUTBLZ4.js → chunk-56EZERK4.js} +1 -1
- package/dist/chunks/chunk-6N4JPNFL.js +76 -0
- package/dist/chunks/{chunk-SA6VBIHY.js → chunk-6NXT4ICB.js} +342 -17
- package/dist/chunks/{chunk-ZUX3P6BQ.js → chunk-727FH2NI.js} +1 -1
- package/dist/chunks/chunk-762M5XJS.js +215 -0
- package/dist/chunks/{chunk-GEWYMQME.js → chunk-77YP6I52.js} +1 -1
- package/dist/chunks/chunk-7BDPM5ST.js +11 -0
- package/dist/chunks/{chunk-G4UR6NXN.js → chunk-CZNZKOHR.js} +3 -3
- package/dist/chunks/{chunk-GHXCDPTM.js → chunk-DGMYACGJ.js} +1 -1
- package/dist/chunks/{chunk-4RAE6JXP.js → chunk-DLY5GUXX.js} +6 -3
- package/dist/chunks/{chunk-BYBSCN4X.js → chunk-G7PQWD4L.js} +6 -3
- package/dist/chunks/{chunk-EKWAQSLU.js → chunk-GR76ZDDX.js} +432 -2248
- package/dist/chunks/{chunk-APVFJUQH.js → chunk-HFXK54M4.js} +3 -3
- package/dist/chunks/{chunk-EZALDOQH.js → chunk-HP7JIYMT.js} +5 -2
- package/dist/chunks/{chunk-ZEDWSH32.js → chunk-IC62NFM5.js} +1 -1
- package/dist/chunks/{chunk-3KTFS4IA.js → chunk-JB34OE7R.js} +808 -85
- package/dist/chunks/{chunk-72CKAUAG.js → chunk-JWWTI63L.js} +59 -7
- package/dist/chunks/{chunk-P26ZWSKU.js → chunk-KIHNAS25.js} +5 -2
- package/dist/chunks/{chunk-NKZRQXST.js → chunk-LGKWL4OH.js} +200 -47
- package/dist/chunks/chunk-LRCPNDZA.js +2529 -0
- package/dist/chunks/{chunk-QKNKR4RH.js → chunk-LXFVWZLM.js} +4 -4
- package/dist/chunks/{chunk-NOODWMCL.js → chunk-O6CMPO65.js} +25 -2
- package/dist/chunks/{chunk-BIPYLLVS.js → chunk-OAE3AZBQ.js} +15 -15
- package/dist/chunks/chunk-P5GQRWDC.js +60 -0
- package/dist/chunks/{caizhilian-SAADNFD6.js → chunk-PGO4ILMQ.js} +44 -517
- package/dist/chunks/{chunk-2LV74IWP.js → chunk-Q4OYAQYH.js} +1 -1
- package/dist/chunks/{chunk-LDZQPUIA.js → chunk-T4MWQAQB.js} +8 -6
- package/dist/chunks/{chunk-BBKDXQEC.js → chunk-TGAGQV4I.js} +3 -3
- package/dist/chunks/{chunk-GPMFD4RD.js → chunk-TXUG266F.js} +1 -1
- package/dist/chunks/{chunk-FOAA27U5.js → chunk-U6R6FZHD.js} +184 -18
- package/dist/chunks/{chunk-LUSPKZKY.js → chunk-UG5G54VL.js} +1 -0
- package/dist/chunks/{chunk-NIAJ5ZCG.js → chunk-UL5XUQ25.js} +5 -2
- package/dist/chunks/{chunk-IZ7S7QUS.js → chunk-VIMCY4DI.js} +6 -6
- package/dist/chunks/chunk-VRPH24IC.js +76 -0
- package/dist/chunks/{chunk-FMPJJYYI.js → chunk-WRXSAVKO.js} +1 -1
- package/dist/chunks/{chunk-YRSZQUD2.js → chunk-YIKSL36S.js} +3 -3
- package/dist/chunks/{chunk-3SO6QL6U.js → chunk-YWX377BY.js} +5 -2
- package/dist/chunks/{chunk-BYATLLEF.js → chunk-Z3GDFVJR.js} +1 -1
- package/dist/chunks/{chunk-LADPYOWC.js → chunk-Z6UUBY37.js} +3 -3
- package/dist/chunks/{conflict-F2OMZRTO.js → conflict-IYJETSGT.js} +4 -3
- package/dist/chunks/{continuation-2CKSBLA6.js → continuation-3S37AUSH.js} +4 -3
- package/dist/chunks/{continuation-RN6PZN2M.js → continuation-3XLYYTKV.js} +4 -3
- package/dist/chunks/continuation-GW6PRWK3.js +12 -0
- package/dist/chunks/{continuation-HZIZRZBX.js → continuation-HFW2YT5S.js} +4 -3
- package/dist/chunks/{continuation-NLECEJPX.js → continuation-KI7DRRZN.js} +4 -3
- package/dist/chunks/{contract-5BETHRSG.js → contract-3QLAGYQL.js} +5803 -4593
- package/dist/chunks/{cowork-3MN6EQQO.js → cowork-3ACICHDQ.js} +11 -4
- package/dist/chunks/{create-flow-5FQNNMVO.js → create-flow-7JLC7UID.js} +8 -7
- package/dist/chunks/{ebuilder-form-SBHOYBUD.js → ebuilder-form-GWDTKEI2.js} +14 -9
- package/dist/chunks/{ehr-KMOJULKG.js → ehr-MYRDCHZ4.js} +357 -43
- package/dist/chunks/{employee-SAK2QYXX.js → employee-NOHNXC46.js} +3 -3
- package/dist/chunks/{env-LB7NBL2O.js → env-3MBHAWBL.js} +4 -3
- package/dist/chunks/{esb-W2PJCFCX.js → esb-4BQHNP5C.js} +12 -7
- package/dist/chunks/{factory-6ZFQXQ46.js → factory-TZEVU4DU.js} +3 -2
- package/dist/chunks/{fna-ZQPCUV4R.js → fna-ZVB2IILI.js} +14 -8
- package/dist/chunks/{group-chat-2HHAJN46.js → group-chat-KL3HFKRM.js} +5 -4
- package/dist/chunks/{host-YTODKMSL.js → host-3TNBMDTR.js} +5 -5
- package/dist/chunks/host-7NTIBSPK.js +25 -0
- package/dist/chunks/{host-4CBHGOHT.js → host-7OWWPLM4.js} +5 -5
- package/dist/chunks/{host-ATKVNZAT.js → host-G3VU7SDW.js} +5 -5
- package/dist/chunks/{host-BQH22NTQ.js → host-M4XP5URR.js} +5 -5
- package/dist/chunks/{host-X2CSLFM6.js → host-TUOIOEMC.js} +5 -5
- package/dist/chunks/{hrm-FFM4UJFS.js → hrm-UNKCCCGP.js} +11 -7
- package/dist/chunks/{im-VEHKDQPB.js → im-NJB7ZYMH.js} +8 -7
- package/dist/chunks/{invoice-LVIKSIIF.js → invoice-OQP3TMKQ.js} +636 -1768
- package/dist/chunks/{jiuchuanhui-X6DINO5P.js → jiuchuanhui-ASFZBMPU.js} +14 -6
- package/dist/chunks/{lazy-dispatch-KSWTN5L6.js → lazy-dispatch-UH6HGK2I.js} +7 -6
- package/dist/chunks/{mail-VDKRGUD3.js → mail-M3HJF5ER.js} +16 -14
- package/dist/chunks/{meeting-CLC6HP3Z.js → meeting-C67EHQ4Z.js} +21 -14
- package/dist/chunks/{okr-CHG4OO3U.js → okr-EVX7FB5G.js} +12 -5
- package/dist/chunks/{operations-5QL3AECO.js → operations-62N6EP3C.js} +4 -3
- package/dist/chunks/operations-J7PUIVWZ.js +15 -0
- package/dist/chunks/{plan-XWR75667.js → plan-2QJQEPBO.js} +12 -5
- package/dist/chunks/{project-5BXOOKMG.js → project-XELELW2T.js} +11 -4
- package/dist/chunks/reception-5WITA44R.js +1899 -0
- package/dist/chunks/{recruit-stage-DGMFNNDE.js → recruit-stage-AHY5QAMF.js} +745 -149
- package/dist/chunks/{registry-RHMW6ANW.js → registry-AQVGHUM6.js} +7 -6
- package/dist/chunks/{registry-OZSMDVPP.js → registry-PVUZQDDQ.js} +3 -3
- package/dist/chunks/{registry-7FFOXIAW.js → registry-QJCZ2GVG.js} +7 -6
- package/dist/chunks/{registry-Z43434VG.js → registry-VWXWPVAG.js} +4 -4
- package/dist/chunks/registry-XPWPGHYE.js +24 -0
- package/dist/chunks/{room-recommend-62H7ZQQ6.js → room-recommend-CNWE5WQK.js} +8 -5
- package/dist/chunks/{schedule-FNXKH3DQ.js → schedule-YYNYBQIE.js} +6 -5
- package/dist/chunks/{workflow-ADHKCAJK.js → workflow-BSYT5TGL.js} +15 -8
- package/dist/cmd/action.js +6 -0
- package/dist/cmd/identity/index.js +45 -0
- package/dist/cmd/index.js +2 -0
- package/dist/core/continuation-ttl.js +18 -0
- package/dist/core/error-codes.js +85 -0
- package/dist/core/logger.js +11 -0
- package/dist/index.js +37 -31
- package/dist/internal/e10/auth/commands.js +195 -8
- package/dist/internal/e10/auth/error-log.js +312 -0
- package/dist/internal/e10/auth/session.js +17 -3
- package/dist/internal/e10/auth/xiaoe.js +176 -13
- package/dist/internal/e10/auth-recovery.js +39 -12
- package/dist/internal/e10/context.js +29 -3
- package/dist/internal/skills/install.js +9 -1
- package/dist/shortcuts/archive/continuation.js +2 -1
- package/dist/shortcuts/archive/index.js +3 -0
- package/dist/shortcuts/archive/operations/borrow-list.js +105 -14
- package/dist/shortcuts/archive/operations/confirm.js +2 -1
- package/dist/shortcuts/archive/operations/flow-url.js +182 -22
- package/dist/shortcuts/archive/operations/getPageUrl.js +75 -0
- package/dist/shortcuts/archive/operations/prelib.js +33 -4
- package/dist/shortcuts/archive/operations/shared.js +52 -0
- package/dist/shortcuts/archive-oa/continuation.js +2 -1
- package/dist/shortcuts/archive-oa/index.js +2 -0
- package/dist/shortcuts/archive-oa/operations/confirm.js +2 -1
- package/dist/shortcuts/asset/continuation.js +2 -1
- package/dist/shortcuts/asset/index.js +2 -0
- package/dist/shortcuts/asset-idle/index.js +2 -0
- package/dist/shortcuts/blog/continuation.js +2 -1
- package/dist/shortcuts/blog/index.js +2 -0
- package/dist/shortcuts/caizhilian/continuation.js +2 -1
- package/dist/shortcuts/caizhilian/index.js +2 -0
- package/dist/shortcuts/caizhilian/operations/confirm.js +3 -2
- package/dist/shortcuts/calendar/continuation.js +2 -1
- package/dist/shortcuts/calendar/index.js +2 -0
- package/dist/shortcuts/calendar/operations/write.js +1 -1
- package/dist/shortcuts/contract/continuation.js +2 -1
- package/dist/shortcuts/contract/host.js +111 -4
- package/dist/shortcuts/contract/index.js +21 -0
- package/dist/shortcuts/contract/manifest.js +125 -0
- package/dist/shortcuts/contract/ooxml/clause-insert.js +249 -0
- package/dist/shortcuts/contract/operations/clause-insert.js +56 -0
- package/dist/shortcuts/contract/operations/customer.js +192 -0
- package/dist/shortcuts/contract/operations/file-download.js +75 -0
- package/dist/shortcuts/contract/operations/flow.js +44 -2
- package/dist/shortcuts/contract/operations/form-info.js +162 -62
- package/dist/shortcuts/contract/operations/registry.js +8 -0
- package/dist/shortcuts/contract/operations/review.js +116 -1
- package/dist/shortcuts/contract/operations/summary.js +177 -0
- package/dist/shortcuts/contract/operations/upload.js +64 -4
- package/dist/shortcuts/contract/operations/write.js +2 -1
- package/dist/shortcuts/contract/upload-cache.js +104 -0
- package/dist/shortcuts/cowork/continuation.js +2 -1
- package/dist/shortcuts/cowork/index.js +2 -0
- package/dist/shortcuts/ebuilder-form/continuation.js +2 -1
- package/dist/shortcuts/ebuilder-form/index.js +2 -0
- package/dist/shortcuts/ebuilder-form/operations/write.js +3 -2
- package/dist/shortcuts/ehr/continuation.js +2 -1
- package/dist/shortcuts/ehr/index.js +2 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +1 -1
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +186 -5
- package/dist/shortcuts/ehr/operations/recruit-position.js +239 -6
- package/dist/shortcuts/ehr/operations/recruit-write.js +18 -19
- package/dist/shortcuts/ehr/operations/recruit.js +17 -5
- package/dist/shortcuts/esb/continuation.js +2 -1
- package/dist/shortcuts/esb/index.js +2 -0
- package/dist/shortcuts/esb/operations/trigger.js +2 -1
- package/dist/shortcuts/fna/continuation.js +2 -1
- package/dist/shortcuts/fna/index.js +2 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +1 -1
- package/dist/shortcuts/fna/operations/loan.js +1 -1
- package/dist/shortcuts/hrm/index.js +2 -0
- package/dist/shortcuts/hrm/operations/employee.js +29 -1
- package/dist/shortcuts/im/continuation.js +2 -1
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/continuation.js +2 -1
- package/dist/shortcuts/invoice/index.js +14 -15
- package/dist/shortcuts/invoice/invoice-record.js +93 -0
- package/dist/shortcuts/invoice/manifest.js +190 -393
- package/dist/shortcuts/invoice/operations/add.js +2 -1
- package/dist/shortcuts/invoice/operations/delete.js +2 -1
- package/dist/shortcuts/invoice/operations/import.js +2 -1
- package/dist/shortcuts/invoice/operations/issuing-contract-detail.js +86 -0
- package/dist/shortcuts/invoice/operations/issuing-contracts.js +210 -0
- package/dist/shortcuts/invoice/operations/registry.js +17 -17
- package/dist/shortcuts/invoice/operations/reim-auto.js +4 -569
- package/dist/shortcuts/invoice/operations/reim.js +52 -341
- package/dist/shortcuts/invoice/operations/shared.js +21 -4
- package/dist/shortcuts/invoice/operations/update.js +2 -1
- package/dist/shortcuts/invoice/projection.js +10 -62
- package/dist/shortcuts/jiuchuanhui/continuation.js +2 -1
- package/dist/shortcuts/jiuchuanhui/index.js +2 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +2 -1
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +2 -1
- package/dist/shortcuts/mail/continuation.js +2 -1
- package/dist/shortcuts/mail/index.js +2 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +1 -1
- package/dist/shortcuts/mail/operations/mail-contacts.js +1 -1
- package/dist/shortcuts/mail/operations/mail-send.js +1 -1
- package/dist/shortcuts/mail/operations/mail-sign.js +1 -1
- package/dist/shortcuts/mail/operations/mail-template.js +1 -1
- package/dist/shortcuts/meeting/continuation.js +2 -1
- package/dist/shortcuts/meeting/index.js +2 -0
- package/dist/shortcuts/meeting/operations/change.js +1 -1
- package/dist/shortcuts/meeting/operations/create.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +198 -65
- package/dist/shortcuts/meeting/operations/eb/decision.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/draft-memory.js +56 -0
- package/dist/shortcuts/meeting/operations/eb/factory.js +59 -4
- package/dist/shortcuts/meeting/operations/eb/person-cache.js +2 -2
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +47 -5
- package/dist/shortcuts/meeting/operations/invitation-publish.js +132 -0
- package/dist/shortcuts/meeting/operations/lifecycle.js +1 -1
- package/dist/shortcuts/meeting/operations/receipts.js +1 -1
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/meeting/operations/signs.js +1 -1
- package/dist/shortcuts/okr/continuation.js +2 -1
- package/dist/shortcuts/okr/index.js +2 -0
- package/dist/shortcuts/okr/operations/write.js +1 -1
- package/dist/shortcuts/plan/continuation.js +2 -1
- package/dist/shortcuts/plan/index.js +2 -0
- package/dist/shortcuts/plan/operations/write.js +1 -1
- package/dist/shortcuts/project/continuation.js +2 -1
- package/dist/shortcuts/project/index.js +2 -0
- package/dist/shortcuts/reception/constants.js +53 -0
- package/dist/shortcuts/reception/errors.js +54 -0
- package/dist/shortcuts/reception/host.js +125 -0
- package/dist/shortcuts/reception/index.js +198 -0
- package/dist/shortcuts/reception/manifest.js +177 -0
- package/dist/shortcuts/reception/operations/ask.js +71 -0
- package/dist/shortcuts/reception/operations/browsertool.js +58 -0
- package/dist/shortcuts/reception/operations/compose.js +129 -0
- package/dist/shortcuts/reception/operations/customparams.js +74 -0
- package/dist/shortcuts/reception/operations/doc.js +238 -0
- package/dist/shortcuts/reception/operations/docrender.js +36 -0
- package/dist/shortcuts/reception/operations/panels.js +179 -0
- package/dist/shortcuts/reception/operations/registry.js +26 -0
- package/dist/shortcuts/reception/operations/render-assets.js +184 -0
- package/dist/shortcuts/reception/operations/render.js +123 -0
- package/dist/shortcuts/reception/operations/runs.js +38 -0
- package/dist/shortcuts/reception/operations/schedule.js +127 -0
- package/dist/shortcuts/reception/operations/shared.js +196 -0
- package/dist/shortcuts/reception/operations/snapshot.js +68 -0
- package/dist/shortcuts/reception/operations/types.js +1 -0
- package/dist/shortcuts/reception/operations.js +33 -0
- package/dist/shortcuts/reception/upload.js +218 -0
- package/dist/shortcuts/recruit-stage/context.js +145 -33
- package/dist/shortcuts/recruit-stage/continuation.js +2 -1
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +86 -16
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +6 -4
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +289 -48
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +207 -25
- package/dist/shortcuts/recruit-stage/shared.js +161 -18
- package/dist/shortcuts/workflow/continuation.js +2 -1
- package/dist/shortcuts/workflow/index.js +4 -0
- package/dist/shortcuts/workflow/operations/form.js +32 -8
- package/dist/shortcuts/workflow/operations/read.js +8 -3
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +92 -5
- package/dist/shortcuts/workflow/operations/todoSmartConvert/priorityExpr.js +509 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +22 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +32 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +57 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +165 -52
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +57 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +44 -18
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/_catalog.md +3 -0
- package/docs/agent-invoice.md +1 -1
- package/docs/archive-oa.md +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/contract.md +2 -1
- package/docs/e10-auth.md +19 -1
- package/docs/ehr.md +2 -2
- package/docs/esb.md +1 -1
- package/docs/im.md +1 -1
- package/docs/invoice.md +8 -12
- package/docs/okr.md +1 -1
- package/docs/reception.md +119 -0
- package/docs/todo-smart-convert/data-contract.md +7 -0
- package/package.json +1 -1
- package/scripts/clean.mjs +43 -2
- package/skill-template/business-info.json +18 -2
- package/skill-template/domains/caizhilian.md +1 -1
- package/skill-template/domains/jinchengda.md +2 -0
- package/skill-template/domains/reception-flow.md +18 -0
- package/skill-template/domains/yepiaotong.md +4 -7
- package/skills/weaver-e10-archive-oa/references/source-manifest.json +14 -14
- package/skills/weaver-e10-blog/references/blog-publish.md +1 -1
- package/skills/weaver-e10-blog/references/source-manifest.json +7 -7
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +21 -21
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +2 -2
- package/skills/weaver-e10-calendar/references/calendar-write.md +1 -1
- package/skills/weaver-e10-cowork/SKILL.md +1 -1
- package/skills/weaver-e10-ebuilder-form/SKILL.md +1 -1
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -1
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -1
- package/skills/weaver-e10-esb/SKILL.md +2 -2
- package/skills/weaver-e10-esb/references/source-manifest.json +22 -22
- package/skills/weaver-e10-esb/references/trigger.md +2 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +198 -205
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +759 -0
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +250 -0
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +146 -7
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +178 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +75 -0
- package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +137 -0
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +163 -0
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +52 -3
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +92 -5
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +602 -0
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +209 -0
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +126 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +312 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +555 -0
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +47 -12
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +469 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +154 -1
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +224 -0
- package/skills/weaver-e10-jinchengda/references/orchestration.md +355 -0
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +29 -29
- package/skills/weaver-e10-jucailin/SKILL.md +1 -1
- package/skills/weaver-e10-jucailin/references/attend-write.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-create.md +15 -4
- package/skills/weaver-e10-jucailin/references/recruit-write.md +3 -3
- package/skills/weaver-e10-meeting/SKILL.md +64 -14
- package/skills/weaver-e10-meeting/references/meeting-change.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-create.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
- package/skills/weaver-e10-okr/references/okr-align.md +1 -1
- package/skills/weaver-e10-okr/references/okr-keyresult.md +1 -1
- package/skills/weaver-e10-okr/references/okr-write.md +1 -1
- package/skills/weaver-e10-okr/references/source-manifest.json +8 -8
- package/skills/weaver-e10-plan/references/plan-report-write.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +20 -20
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +1 -1
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +18 -18
- package/skills/weaver-e10-reception-flow/SKILL.md +173 -0
- package/skills/weaver-e10-reception-flow/assets//350/241/214/347/250/213/345/215/225/346/250/241/346/235/277-/346/263/233/345/276/256.docx +0 -0
- package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +213 -0
- package/skills/weaver-e10-reception-flow/references/browsertool.md +68 -0
- package/skills/weaver-e10-reception-flow/references/env-pitfalls.md +51 -0
- package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +227 -0
- package/skills/weaver-e10-reception-flow/references/guide.md +179 -0
- package/skills/weaver-e10-reception-flow/scripts/locate.sh +14 -0
- package/skills/weaver-e10-reception-flow/scripts/render.py +724 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +19 -10
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +10 -2
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +1 -1
- package/skills/weaver-e10-recruit-stage/lib/xiaoe-session.mjs +66 -0
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +204 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +13 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +29 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +27 -14
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +21 -2
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +9 -1
- package/skills/weaver-e10-shijingran/SKILL.md +5 -5
- package/skills/weaver-e10-shijingran/references/source-manifest.json +37 -36
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +2 -0
- package/skills/weaver-e10-wenshuding/SKILL.md +17 -7
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +28 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +24 -8
- package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +3 -0
- package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +4 -0
- package/skills/weaver-e10-wenshuding/references/archive-search.md +3 -1
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +3 -3
- package/skills/weaver-e10-workflow/SKILL.md +19 -17
- package/skills/weaver-e10-workflow/aigroup/default.json +10 -6
- package/skills/weaver-e10-workflow/references/source-manifest.json +32 -32
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +36 -3
- package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +9 -6
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +152 -1
- package/skills/weaver-e10-yepiaotong/SKILL.md +19 -26
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +13 -10
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +194 -155
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +28 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +5 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +8 -10
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +211 -616
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +149 -117
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +17 -20
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +20 -39
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +55 -22
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -17
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +88 -92
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +144 -354
- package/skills/weaver-e10-yimiaoban/SKILL.md +18 -6
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +31 -1
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +72 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
- package/dist/chunks/chunk-TTPJJJC4.js +0 -465
- package/dist/chunks/registry-BKBZPBAJ.js +0 -23
- package/dist/shortcuts/invoice/markdown.js +0 -172
- package/dist/shortcuts/invoice/operations/issuing-qys.js +0 -424
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +0 -131
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-form-fill-rules.md +0 -179
|
@@ -129,6 +129,37 @@ export function renderMarkdown(params) {
|
|
|
129
129
|
}
|
|
130
130
|
return lines.join('\n');
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* collect 阶段透传给 `buildSearchQuery` 的筛选条件键(2026-11-06 与 `workflow.search` 对齐)。
|
|
134
|
+
*
|
|
135
|
+
* 为什么做成一份常量而不是在「入参白名单」和「collect 取值循环」各写一份:两处一旦分叉,
|
|
136
|
+
* 就会出现「search 能筛、汇总筛不了」的口径漂移(旧实现只放行 9 个键,编号 / 状态 / 节点 /
|
|
137
|
+
* 发起时间 / 表单字段全部缺失)。这里只放**筛选条件**;排序(`sort`)、`totalOnly`、
|
|
138
|
+
* `batchType`、`planJson`、`queryJson` 属查询模式开关,不走 collect。
|
|
139
|
+
*/
|
|
140
|
+
export const COLLECT_FILTER_KEYS = [
|
|
141
|
+
'tabid', 'tabName', 'subCategory',
|
|
142
|
+
'isremarks',
|
|
143
|
+
'workflow', 'workflowTerm',
|
|
144
|
+
'creator', 'creatorDept', 'creatorSubcom', 'workflowType',
|
|
145
|
+
'requestName', 'requestNameTerm',
|
|
146
|
+
'requestMark', 'requestMarkTerm',
|
|
147
|
+
'requestLevel',
|
|
148
|
+
'nodeId', 'nodeIdTerm',
|
|
149
|
+
'flowStatus', 'flowStatusTerm',
|
|
150
|
+
'requestId', 'exRequestId',
|
|
151
|
+
'createTime', 'operateTime', 'receiveTime', 'finishTime',
|
|
152
|
+
'filterFields',
|
|
153
|
+
'conditionType',
|
|
154
|
+
];
|
|
155
|
+
/**
|
|
156
|
+
* collect 透传的排序键(2026-11-06,与 `workflow.search` 的 `sort` 同口径)。
|
|
157
|
+
*
|
|
158
|
+
* 单独成组而不是塞进 `COLLECT_FILTER_KEYS`:它不是筛选条件,`query.filters` 回显里也不该出现
|
|
159
|
+
* (排在 `query.sort` 上)。取数覆盖要求「search 能排的 collect 也能排」,故与筛选条件一并透传
|
|
160
|
+
* 给同一个 `buildSearchQuery`;sortParams 属于顶层参数,翻页时每页都带同一份,不会跳页错位。
|
|
161
|
+
*/
|
|
162
|
+
export const COLLECT_ORDER_KEYS = ['sort'];
|
|
132
163
|
export const ALLOWED_INPUT_KEYS = [
|
|
133
164
|
'stage',
|
|
134
165
|
'items',
|
|
@@ -152,15 +183,8 @@ export const ALLOWED_INPUT_KEYS = [
|
|
|
152
183
|
'limit',
|
|
153
184
|
'pageSize',
|
|
154
185
|
'category',
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
'subCategory',
|
|
158
|
-
'isremarks',
|
|
159
|
-
'workflow',
|
|
160
|
-
'creator',
|
|
161
|
-
'requestName',
|
|
162
|
-
'receiveTime',
|
|
163
|
-
'requestLevel',
|
|
186
|
+
...COLLECT_FILTER_KEYS,
|
|
187
|
+
...COLLECT_ORDER_KEYS,
|
|
164
188
|
'skillTiming',
|
|
165
189
|
];
|
|
166
190
|
/** 允许把上一阶段的 data 原样回灌到下一阶段。 */
|
|
@@ -283,10 +307,23 @@ function stripDisplayHtml(value) {
|
|
|
283
307
|
*
|
|
284
308
|
* 只认显示层字段名,**不回落**技术行字段;取不到就留空/0,不猜。
|
|
285
309
|
*/
|
|
286
|
-
export function rowFromAny(raw) {
|
|
310
|
+
export function rowFromAny(raw, extraFields) {
|
|
287
311
|
const record = asRecord(raw);
|
|
288
312
|
if (!record)
|
|
289
313
|
return undefined;
|
|
314
|
+
// 优先组表达式用到的原始字段(2026-11-05):只有显式点名的键才收,避免把整行 100+ 字段
|
|
315
|
+
// 带进中间态。大小写不敏感匹配,键名按原始拼写保留。
|
|
316
|
+
let rawFields;
|
|
317
|
+
if (extraFields && extraFields.size > 0) {
|
|
318
|
+
for (const [key, value] of Object.entries(record)) {
|
|
319
|
+
if (!extraFields.has(key.toLowerCase()))
|
|
320
|
+
continue;
|
|
321
|
+
if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean')
|
|
322
|
+
continue;
|
|
323
|
+
rawFields ??= {};
|
|
324
|
+
rawFields[key] = value;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
290
327
|
const pick = (keys, sanitize = false) => {
|
|
291
328
|
for (const key of keys) {
|
|
292
329
|
const value = record[key];
|
|
@@ -313,7 +350,7 @@ export function rowFromAny(raw) {
|
|
|
313
350
|
}
|
|
314
351
|
return 0;
|
|
315
352
|
};
|
|
316
|
-
|
|
353
|
+
const result = {
|
|
317
354
|
requestId: pick(['requestId', 'requestid', 'request_id', 'id']) ?? '',
|
|
318
355
|
workflowId: pick(['workflowId', 'workflowid', 'workflowtype']) ?? '',
|
|
319
356
|
userMasterId: pick(['userMasterId', 'usermasterid', 'userid']) ?? '',
|
|
@@ -341,6 +378,15 @@ export function rowFromAny(raw) {
|
|
|
341
378
|
requestMark: pick(['requestMark', 'requestmark']),
|
|
342
379
|
amount: parseAmount(record.amount ?? record.money ?? record.totalAmount ?? record.totalamount ?? record.sum ?? record.fee),
|
|
343
380
|
};
|
|
381
|
+
// 已经映射成顶层字段的原始键不用再进 `_rawFields`(如 isremark / requestlevel / overTime):
|
|
382
|
+
// 顶层那份是归一后的类型,求值时优先读顶层,重复一份只是白占体积。
|
|
383
|
+
if (rawFields) {
|
|
384
|
+
const mapped = new Set(Object.keys(result).map((key) => key.toLowerCase()));
|
|
385
|
+
const rest = Object.fromEntries(Object.entries(rawFields).filter(([key]) => !mapped.has(key.toLowerCase())));
|
|
386
|
+
if (Object.keys(rest).length > 0)
|
|
387
|
+
result._rawFields = rest;
|
|
388
|
+
}
|
|
389
|
+
return result;
|
|
344
390
|
}
|
|
345
391
|
export function assertKnownKeys(args) {
|
|
346
392
|
const known = [...ALLOWED_INPUT_KEYS, ...RESUME_INPUT_KEYS];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { workflowValidationError } from '../../errors.js';
|
|
2
|
+
import { prioritySort } from './aigroupRules.js';
|
|
3
|
+
import { evaluatePriorityRule } from './priorityExpr.js';
|
|
2
4
|
import { UNKNOWN_GROUP, groupKeyOf, readGroupBy, readItems, readTopN, assertKnownKeys, } from './todoSmartConvert.core.js';
|
|
3
5
|
import { intentAppliesToKind, } from './businessRules.js';
|
|
4
6
|
/** 紧急程度以 requestLevel=2 或显示文本「紧急」为准;1 级是「重要」。 */
|
|
@@ -114,66 +116,163 @@ export function isExpiringTodayRow(row, now = Date.now()) {
|
|
|
114
116
|
return false;
|
|
115
117
|
return isExpiringTodayUserOverTime(row.userOverTime, now);
|
|
116
118
|
}
|
|
119
|
+
/** 规则里写的字段名是否命中该键(大小写不敏感;`requestlevel` ↔ `requestLevel`)。 */
|
|
120
|
+
function sameField(key, field) {
|
|
121
|
+
return key.toLowerCase() === field.toLowerCase();
|
|
122
|
+
}
|
|
117
123
|
/**
|
|
118
|
-
*
|
|
124
|
+
* 取字段值:**先查 requestData 顶层**(归一后的类型更可靠:requestLevel 是数字、overTime 是布尔),
|
|
125
|
+
* 再查 `_rawFields`(只有规则点名要的原始字段才在里面,如 `receivedatetime` / `overduedays`)。
|
|
126
|
+
*/
|
|
127
|
+
function resolveRuleField(row, field) {
|
|
128
|
+
for (const [key, value] of Object.entries(row)) {
|
|
129
|
+
if (key === '_rawFields')
|
|
130
|
+
continue;
|
|
131
|
+
if (sameField(key, field))
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
const raw = row._rawFields;
|
|
135
|
+
if (raw) {
|
|
136
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
137
|
+
if (sameField(key, field))
|
|
138
|
+
return value;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 「建议优先处理的流程」筛选(2026-11-05 用户定稿:规则外置为一条表达式)。
|
|
119
145
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* `=0`(正常)**不因等级入选**——降级链到 1 就停,不倒到 0;
|
|
123
|
-
* 3. 整批连 1 级都没有(全 0)时,等级条件不生效,只按超时筛;此时若一条都没超时,
|
|
124
|
-
* 优先组为空("实在没有紧急的就算了"),不硬凑。
|
|
146
|
+
* 判据完全来自 `generalRules.priorityGroup.rule`(语法见 `priorityExpr.ts`),代码里不再有
|
|
147
|
+
* 任何内置口径——原来的 `overdue` / `levelFallback` 已删除,表达式没配就**不输出优先组**。
|
|
125
148
|
*
|
|
126
|
-
*
|
|
127
|
-
* `
|
|
149
|
+
* 只读不写:不修改任何行的分组归属,优先组仍是叠加视图(入选条目照样留在原工作流分组)。
|
|
150
|
+
* 表达式引用到的原始字段由取数阶段按需保留在 `requestData._rawFields` 里,最终输出前剥离。
|
|
128
151
|
*/
|
|
129
|
-
export function selectPriorityRows(rows,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
export function selectPriorityRows(rows, expr, now = new Date()) {
|
|
153
|
+
if (!expr)
|
|
154
|
+
return { rows: [], evaluatedCount: 0 };
|
|
155
|
+
const selected = rows.filter((row) => evaluatePriorityRule(expr, (field) => resolveRuleField(row, field), now));
|
|
156
|
+
return { rows: selected, evaluatedCount: rows.length };
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 优先组缺省排序(规则没配 `generalRules.priorityGroup.sort` 时):
|
|
160
|
+
* 接收时间升序——越早收到越该先处理。排序口径已外置,代码里不再写死别的档位。
|
|
161
|
+
*/
|
|
162
|
+
export const DEFAULT_PRIORITY_SORT = [{ field: 'receivedatetime', dir: 'asc' }];
|
|
163
|
+
/** 归属排序字段的中文名(只用于 warning 文案,认不出的字段名原样输出)。 */
|
|
164
|
+
const SORT_FIELD_LABEL = {
|
|
165
|
+
userovertime: '到期时间(userOverTime)',
|
|
166
|
+
curuserovertime: '到期时间(curUserOverTime)',
|
|
167
|
+
requestlevel: '紧急程度(requestLevel)',
|
|
168
|
+
receivedatetime: '接收时间(receivedatetime)',
|
|
169
|
+
receivedtime: '接收时间(receivedTime)',
|
|
170
|
+
planfinishdatetime: '计划完成时间',
|
|
171
|
+
};
|
|
172
|
+
/** 字段名是否时间类:值可能是「05-07到期 / 昨天到期 / 2026-11-30 08:30:59」三种形态。 */
|
|
173
|
+
function isTimeSortField(field) {
|
|
174
|
+
const key = field.toLowerCase();
|
|
175
|
+
return key.endsWith('datetime') || key.endsWith('time') || key.endsWith('date');
|
|
176
|
+
}
|
|
177
|
+
const HALF_YEAR_MS = 180 * 24 * 60 * 60 * 1000;
|
|
178
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
179
|
+
function startOfDay(stamp) {
|
|
180
|
+
const date = new Date(stamp);
|
|
181
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
|
|
182
|
+
}
|
|
183
|
+
/** `MM-DD到期` 补年:差超过半年按去年算(与 `isExpiredUserOverTime` 同一口径)。 */
|
|
184
|
+
function monthDayStamp(month, day, now) {
|
|
185
|
+
if (month < 1 || month > 12 || day < 1 || day > 31)
|
|
186
|
+
return undefined;
|
|
187
|
+
const base = new Date(now);
|
|
188
|
+
let stamp = new Date(base.getFullYear(), month - 1, day).getTime();
|
|
189
|
+
if (stamp - now > HALF_YEAR_MS)
|
|
190
|
+
stamp = new Date(base.getFullYear() - 1, month - 1, day).getTime();
|
|
191
|
+
return stamp;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* 把排序字段的文本值换算成可比较的时间戳。
|
|
195
|
+
*
|
|
196
|
+
* 认不出来的文案返回 `undefined`(= 该字段缺失、排到最后),**不猜**。
|
|
197
|
+
*/
|
|
198
|
+
export function prioritySortStamp(text, now = Date.now()) {
|
|
199
|
+
const value = text.trim();
|
|
200
|
+
if (!value)
|
|
201
|
+
return undefined;
|
|
202
|
+
// 「已超时」不知道到底超了多久,按最小时间戳排最前:它确实最该先处理
|
|
203
|
+
if (/^已超时$/u.test(value))
|
|
204
|
+
return 0;
|
|
205
|
+
if (/^昨天到期$/u.test(value))
|
|
206
|
+
return startOfDay(now) - DAY_MS;
|
|
207
|
+
if (/^今日到期$/u.test(value))
|
|
208
|
+
return startOfDay(now);
|
|
209
|
+
if (/^明天到期$/u.test(value))
|
|
210
|
+
return startOfDay(now) + DAY_MS;
|
|
211
|
+
const monthDay = /^(\d{1,2})[-/](\d{1,2})\s*到期$/u.exec(value);
|
|
212
|
+
if (monthDay)
|
|
213
|
+
return monthDayStamp(Number(monthDay[1]), Number(monthDay[2]), now);
|
|
214
|
+
return timeOf(value);
|
|
215
|
+
}
|
|
216
|
+
function sortValueOf(row, key, now) {
|
|
217
|
+
const raw = resolveRuleField(row, key.field);
|
|
218
|
+
if (raw === undefined || raw === null)
|
|
219
|
+
return null;
|
|
220
|
+
// 布尔先判:`overTime` 名字里也带 time,不能当时间处理
|
|
221
|
+
if (typeof raw === 'boolean')
|
|
222
|
+
return { kind: 'num', value: raw ? 1 : 0 };
|
|
223
|
+
if (typeof raw === 'number')
|
|
224
|
+
return Number.isFinite(raw) ? { kind: 'num', value: raw } : null;
|
|
225
|
+
const text = String(raw).trim();
|
|
226
|
+
if (!text)
|
|
227
|
+
return null;
|
|
228
|
+
if (isTimeSortField(key.field)) {
|
|
229
|
+
const stamp = prioritySortStamp(text, now);
|
|
230
|
+
return stamp === undefined ? null : { kind: 'num', value: stamp };
|
|
153
231
|
}
|
|
154
|
-
return {
|
|
232
|
+
return { kind: 'str', value: text };
|
|
233
|
+
}
|
|
234
|
+
/** 单级比较:空值恒定排最后(不随 asc/desc 翻转),避免空数据被顶到最前。 */
|
|
235
|
+
function compareSortValue(a, b, dir) {
|
|
236
|
+
if (!a && !b)
|
|
237
|
+
return 0;
|
|
238
|
+
if (!a)
|
|
239
|
+
return 1;
|
|
240
|
+
if (!b)
|
|
241
|
+
return -1;
|
|
242
|
+
const diff = a.kind === 'num' && b.kind === 'num'
|
|
243
|
+
? a.value - b.value
|
|
244
|
+
: String(a.value).localeCompare(String(b.value), 'zh-Hans-CN');
|
|
245
|
+
return dir === 'desc' ? -diff : diff;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* 优先组的排序键(2026-11-05 用户定:口径外置到 `generalRules.priorityGroup.sort`)。
|
|
249
|
+
*
|
|
250
|
+
* 规则文件没配时回落 `DEFAULT_PRIORITY_SORT`(接收时间升序),与改动前行为一致。
|
|
251
|
+
*/
|
|
252
|
+
export function configuredPrioritySort() {
|
|
253
|
+
const configured = prioritySort();
|
|
254
|
+
return configured.length > 0 ? configured : DEFAULT_PRIORITY_SORT;
|
|
255
|
+
}
|
|
256
|
+
/** 排序口径的可读描述,用于 warning:`到期时间(userOverTime) 升序 → 紧急程度 降序`。 */
|
|
257
|
+
export function describePrioritySort(keys) {
|
|
258
|
+
return keys
|
|
259
|
+
.map((key) => `${SORT_FIELD_LABEL[key.field.toLowerCase()] ?? key.field} ${key.dir === 'desc' ? '降序' : '升序'}`)
|
|
260
|
+
.join(' → ');
|
|
155
261
|
}
|
|
156
262
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
263
|
+
* 优先组内部排序(2026-11-05 用户定:口径外置)。
|
|
264
|
+
*
|
|
265
|
+
* 按配置的多级键逐级比较:前一级相等才比下一级;全部相等时按 `requestId` 稳定兜底,
|
|
266
|
+
* 保证同一批数据两次跑出同一顺序。空值在**每一级**都排最后。
|
|
159
267
|
*/
|
|
160
|
-
export function sortPriorityRows(rows) {
|
|
161
|
-
const
|
|
162
|
-
const overdue = isOverdueRow(row);
|
|
163
|
-
if (overdue && row.requestLevel >= 2)
|
|
164
|
-
return 0;
|
|
165
|
-
if (overdue)
|
|
166
|
-
return 1;
|
|
167
|
-
return 2;
|
|
168
|
-
};
|
|
268
|
+
export function sortPriorityRows(rows, keys = configuredPrioritySort(), now = Date.now()) {
|
|
269
|
+
const effective = keys.length > 0 ? keys : DEFAULT_PRIORITY_SORT;
|
|
169
270
|
return [...rows].sort((a, b) => {
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (at !== bt)
|
|
176
|
-
return at - bt;
|
|
271
|
+
for (const key of effective) {
|
|
272
|
+
const diff = compareSortValue(sortValueOf(a, key, now), sortValueOf(b, key, now), key.dir);
|
|
273
|
+
if (diff !== 0)
|
|
274
|
+
return diff;
|
|
275
|
+
}
|
|
177
276
|
return a.requestId.localeCompare(b.requestId);
|
|
178
277
|
});
|
|
179
278
|
}
|
|
@@ -183,8 +282,18 @@ function urgencyOf(row) {
|
|
|
183
282
|
return row.requestLevelShow;
|
|
184
283
|
return row.requestLevel >= 2 ? '紧急' : UNKNOWN_GROUP;
|
|
185
284
|
}
|
|
186
|
-
/**
|
|
285
|
+
/**
|
|
286
|
+
* 内部行 → 目标 requestData:只挑目标字段,内部辅助位(workflowName/amount…)不外泄。
|
|
287
|
+
*
|
|
288
|
+
* 例外是 `_rawFields`(2026-11-05):优先组规则要用原始字段判断,而阶段之间只传成品结构,
|
|
289
|
+
* 没有别的载体,所以按需带着走;接收时间也塞进去(优先组按它排序,requestData 本身没有这一位)。
|
|
290
|
+
* 它在最终输出前由 `stripPriorityRawFields` 整体剥离,对外契约仍是 14 个字段。
|
|
291
|
+
*/
|
|
187
292
|
export function toRequestData(row) {
|
|
293
|
+
const rawFields = {
|
|
294
|
+
...(row.receivedTime ? { receivedatetime: row.receivedTime } : {}),
|
|
295
|
+
...(row._rawFields ?? {}),
|
|
296
|
+
};
|
|
188
297
|
return {
|
|
189
298
|
requestId: row.requestId,
|
|
190
299
|
workflowId: row.workflowId,
|
|
@@ -201,6 +310,10 @@ export function toRequestData(row) {
|
|
|
201
310
|
lastFeedBackDateTime: row.lastFeedBackDateTime,
|
|
202
311
|
...(row.planFinishDatetime ? { planFinishDatetime: row.planFinishDatetime } : {}),
|
|
203
312
|
summary: row.summary ?? '',
|
|
313
|
+
// 2026-11-05:**总是**写这个键(哪怕是空对象)。它是「还没剥离」的标记,
|
|
314
|
+
// 最后一步靠「有没有这个键」区分「数据里没这个字段」和「字段已被上一阶段剥掉」。
|
|
315
|
+
// 只在有字段时写,会让前者被误判成后者,优先组直接不重建。
|
|
316
|
+
_rawFields: rawFields,
|
|
204
317
|
};
|
|
205
318
|
}
|
|
206
319
|
export function statsOf(rows) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { workflowValidationError } from '../../errors.js';
|
|
2
|
+
import { FLOW_STATUS_HINT } from '../flow-status.js';
|
|
3
|
+
import { TIME_DESCRIPTIONS, SORT_OPTIONS } from '../read.js';
|
|
2
4
|
import { planTodoOutput } from './todoOutputPlanner.js';
|
|
3
5
|
import { assertKnownKeys, buildSkillTiming, CATEGORY_VALUES, DEFAULT_CATEGORY, DEFAULT_FETCH_LIMIT, DEFAULT_TOP_N, FETCH_PAGE_SIZE, GROUP_BY_VALUES, MAX_FETCH_LIMIT, MAX_FETCH_PAGES, STAGE_VALUES, workflowSuccess, } from './todoSmartConvert.core.js';
|
|
4
6
|
import { collectRawTodos } from './todoSmartConvert.collect.js';
|
|
5
7
|
import { runSmartConvert } from './todoSmartConvert.aggregate.js';
|
|
6
8
|
import { runGroup } from './todoSmartConvert.group.js';
|
|
7
9
|
import { inferStage, readStage } from './todoSmartConvert.pipeline.js';
|
|
8
|
-
import { runSmartGroup, assemblePriorityGroup } from './todoSmartConvert.smartGroup.js';
|
|
10
|
+
import { runSmartGroup, assemblePriorityGroup, stripPriorityRawFields } from './todoSmartConvert.smartGroup.js';
|
|
9
11
|
import { runSummary, runSummaryContext } from './todoSmartConvert.summary.js';
|
|
10
12
|
import { runSubGroup } from './todoSmartConvert.subGroup.js';
|
|
11
13
|
import { runGroupSummary, runGroupSummaryContext } from './todoSmartConvert.groupSummary.js';
|
|
@@ -83,11 +85,41 @@ const inputSchema = schemaOf({
|
|
|
83
85
|
tabName: { type: 'string' },
|
|
84
86
|
subCategory: { type: 'string' },
|
|
85
87
|
isremarks: { type: 'string', description: '备注筛选(getTodoListData params.isremarks),多个数字用英文逗号拼接,仅作用于本汇总取数' },
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
// 以下筛选条件与 `workflow.search` 逐字对齐(2026-11-06):取数走同一个 buildSearchQuery,
|
|
89
|
+
// 校验/澄清/报文形态完全一致,只是 search 的查询模式开关(sort/totalOnly/batchType/planJson/queryJson)不在此列。
|
|
90
|
+
workflow: { type: 'array', items: { type: 'string' }, description: '工作流条件,多个 or;支持 "名称(ID)";纯名称多命中/0 命中返回澄清候选' },
|
|
91
|
+
workflowTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
92
|
+
creator: { type: 'string', description: '发起人姓名,支持 "名称(ID)";纯名称多命中返回澄清候选,0 命中报错' },
|
|
93
|
+
creatorDept: { type: 'string', description: '发起人部门;纯名称多命中返回澄清候选,0 命中报错' },
|
|
94
|
+
creatorSubcom: { type: 'string', description: '发起人分部;纯名称多命中返回澄清候选,0 命中报错' },
|
|
95
|
+
workflowType: { type: 'string', description: '工作流类型;纯名称多命中返回澄清候选,0 命中报错' },
|
|
96
|
+
requestName: { type: 'string', description: '流程标题 like 模糊' },
|
|
97
|
+
requestNameTerm: { type: 'string', enum: ['in', 'notin', 'eq', 'ne'] },
|
|
98
|
+
requestMark: { type: 'string', description: '流程编号 like 模糊' },
|
|
99
|
+
requestMarkTerm: { type: 'string', enum: ['in', 'notin', 'eq', 'ne'] },
|
|
100
|
+
requestLevel: { type: 'string', description: '紧急程度名称(CLI 按当前环境等级列表转 ID);0 命中报错并列出可选等级' },
|
|
101
|
+
requestId: { type: 'string', description: '按 requestId 精确过滤,逗号分隔' },
|
|
102
|
+
exRequestId: { type: 'string', description: '排除 requestId,逗号分隔' },
|
|
103
|
+
nodeId: { type: 'string', description: '当前节点 ID,逗号分隔可多值(只能填节点 ID,不能填节点名称)' },
|
|
104
|
+
nodeIdTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
105
|
+
flowStatus: { type: 'string', description: `流程状态(选项类,多选):${FLOW_STATUS_HINT}` },
|
|
106
|
+
flowStatusTerm: { type: 'string', enum: ['in', 'notin'] },
|
|
107
|
+
createTime: { type: 'string', description: TIME_DESCRIPTIONS.createTime },
|
|
108
|
+
operateTime: { type: 'string', description: TIME_DESCRIPTIONS.operateTime },
|
|
109
|
+
receiveTime: { type: 'string', description: TIME_DESCRIPTIONS.receiveTime },
|
|
110
|
+
finishTime: { type: 'string', description: TIME_DESCRIPTIONS.finishTime },
|
|
111
|
+
filterFields: {
|
|
112
|
+
type: 'array',
|
|
113
|
+
items: { type: 'object' },
|
|
114
|
+
description: '表单字段筛选条件:[{"fieldName":"字段名(字段ID)","term":"...","value":...}];必须同时传且只传一个 workflow,'
|
|
115
|
+
+ 'fieldName 会按该工作流真实表单字段解析(解析不出唯一字段时返回澄清并列出候选)',
|
|
116
|
+
},
|
|
117
|
+
conditionType: { type: 'string', enum: ['and', 'or'], default: 'and' },
|
|
118
|
+
sort: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: '排序:"排序方式:asc|desc",多组逗号分隔(翻页时每页带同一份排序)。'
|
|
121
|
+
+ `可用排序方式:${Object.keys(SORT_OPTIONS).join('/')};也可直接传 orderkey 数字`,
|
|
122
|
+
},
|
|
91
123
|
groupFocus: { type: 'string' },
|
|
92
124
|
maxCharsPerBatch: { type: 'integer', minimum: 500, maximum: 200000, default: 24000 },
|
|
93
125
|
maxItemsPerBatch: { type: 'integer', minimum: 1, maximum: 500, default: 100 },
|
|
@@ -144,12 +176,22 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
144
176
|
const resumed = stage === 'collect' && hasItems;
|
|
145
177
|
/**
|
|
146
178
|
* 把「建议优先处理的流程」拼到**最终结构**上(2026-11-03 用户定:放到最后生成)。
|
|
147
|
-
* 只在会产出成品结构的阶段(summary / groupSummary)调用;幂等,重复调用不会叠加。
|
|
179
|
+
* 只在会产出成品结构的阶段(summary / subGroup / groupSummary)调用;幂等,重复调用不会叠加。
|
|
180
|
+
*
|
|
181
|
+
* `stripRawFields`(2026-11-05):优先组规则用的原始字段(`requestData._rawFields`)要活到
|
|
182
|
+
* **最后一个阶段**才剥离——中间阶段一旦剥掉,下一阶段就再也判不了「今天到期」这类条件。
|
|
183
|
+
* 所以 summary / subGroup 传 false(保留),只有终态 groupSummary 传 true。
|
|
148
184
|
*/
|
|
149
|
-
const withPriorityView = (data, extraWarnings) => {
|
|
150
|
-
if ((args.groupBy ?? 'workflow') !== 'workflow')
|
|
151
|
-
|
|
152
|
-
|
|
185
|
+
const withPriorityView = (data, extraWarnings, options) => {
|
|
186
|
+
if ((args.groupBy ?? 'workflow') !== 'workflow') {
|
|
187
|
+
// 不生成优先组,但优先组规则用的临时字段仍要按同一时机剥掉
|
|
188
|
+
const groups = data.wfIdGroup ?? [];
|
|
189
|
+
return {
|
|
190
|
+
data: { ...data, wfIdGroup: options.stripRawFields ? stripPriorityRawFields(groups) : groups },
|
|
191
|
+
warnings: extraWarnings,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
const { groups, warning } = assemblePriorityGroup(data.wfIdGroup ?? [], { stripRawFields: options.stripRawFields });
|
|
153
195
|
return {
|
|
154
196
|
data: { ...data, wfIdGroup: groups },
|
|
155
197
|
warnings: warning ? [...extraWarnings, warning] : extraWarnings,
|
|
@@ -194,7 +236,7 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
194
236
|
baseWarnings = [...baseWarnings, ...sub.warnings];
|
|
195
237
|
subGrouped = true;
|
|
196
238
|
}
|
|
197
|
-
const final = withPriorityView(baseData, baseWarnings);
|
|
239
|
+
const final = withPriorityView(baseData, baseWarnings, { stripRawFields: false });
|
|
198
240
|
if (args.withGroupSummaryContext === true) {
|
|
199
241
|
const context = await runGroupSummaryContext({
|
|
200
242
|
wfIdGroup: final.data.wfIdGroup,
|
|
@@ -220,7 +262,8 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
220
262
|
}
|
|
221
263
|
if (stage === 'subGroup') {
|
|
222
264
|
const result = await runSubGroup(args, env);
|
|
223
|
-
|
|
265
|
+
// subGroup 之后还有 groupSummaryContext / groupSummary,属中间态 ⇒ 原始字段先留着
|
|
266
|
+
const final = withPriorityView(result.data, result.warnings, { stripRawFields: false });
|
|
224
267
|
return finish(env, args, startedAt, stage, final.data, {
|
|
225
268
|
branch: 'todo-smart-convert', stage, aiGrouped: Array.isArray(args.aiGroups), subGrouped: true,
|
|
226
269
|
}, final.warnings);
|
|
@@ -236,7 +279,7 @@ export const workflowTodoSmartConvertOperations = [{
|
|
|
236
279
|
throw workflowValidationError('ai_group_summaries_required', 'stage=groupSummary 需要 aiGroupSummaries:先执行 stage=groupSummaryContext', { retryAllowed: false });
|
|
237
280
|
}
|
|
238
281
|
const result = await runGroupSummary(args, env);
|
|
239
|
-
const final = withPriorityView(result.data, result.warnings);
|
|
282
|
+
const final = withPriorityView(result.data, result.warnings, { stripRawFields: true });
|
|
240
283
|
return finish(env, args, startedAt, stage, final.data, {
|
|
241
284
|
branch: 'todo-smart-convert', stage, aiSummarized: true, ...result.meta,
|
|
242
285
|
}, final.warnings);
|
|
@@ -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, selectPriorityRows, sortPriorityRows, } from './todoSmartConvert.group.js';
|
|
4
|
+
import { configuredPrioritySort, describePrioritySort, 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, generalRules, primeRules } from './aigroupRules.js';
|
|
6
|
+
import { activeRuleFor, evaluateFocusKeywords, generalRules, priorityRuleExpr, 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;
|
|
@@ -29,26 +29,32 @@ export function groupItemsOf(group) {
|
|
|
29
29
|
* - 叠加视图语义不变:入选条目仍保留在原工作流分组里 ⇒ `Σcount` 仍大于 `totalCount`
|
|
30
30
|
* (`totalCount` 始终按去重条数计);
|
|
31
31
|
* - 判定字段(`overTime` / `userOverTime` / `requestLevel`)都在 `requestData` 上,不必回查列表;
|
|
32
|
-
*
|
|
32
|
+
* 组内排序口径外置在 `generalRules.priorityGroup.sort`(2026-11-05 用户定:到期时间正序 →
|
|
33
|
+
* 紧急程度倒序 → 接收时间倒序),实现见 `sortPriorityRows`;没配则回落「接收时间升序」。
|
|
33
34
|
*/
|
|
34
|
-
export function assemblePriorityGroup(groups) {
|
|
35
|
-
const
|
|
35
|
+
export function assemblePriorityGroup(groups, options = {}) {
|
|
36
|
+
const all = groups ?? [];
|
|
37
|
+
const base = all.filter((group) => group.id !== PRIORITY_GROUP_ID && group.topPriority !== true);
|
|
36
38
|
const pgConfig = generalRules()?.priorityGroup ?? null;
|
|
37
39
|
const title = pgConfig?.title?.trim() || PRIORITY_GROUP_TITLE;
|
|
38
|
-
|
|
40
|
+
// 规则没配 ⇒ 不输出优先组(2026-11-05 起不再有内置兜底口径)
|
|
41
|
+
const expr = priorityRuleExpr();
|
|
42
|
+
if (!expr)
|
|
43
|
+
return { groups: base };
|
|
39
44
|
const rows = base.flatMap((group) => rowsOfGroup(group));
|
|
40
45
|
if (rows.length === 0)
|
|
41
|
-
return { groups:
|
|
42
|
-
const selection = selectPriorityRows(rows,
|
|
43
|
-
const
|
|
46
|
+
return { groups: all };
|
|
47
|
+
const selection = selectPriorityRows(rows, expr);
|
|
48
|
+
const sortKeys = configuredPrioritySort();
|
|
49
|
+
const selected = sortPriorityRows(selection.rows, sortKeys);
|
|
50
|
+
const strip = options.stripRawFields !== false;
|
|
44
51
|
if (selected.length === 0) {
|
|
45
|
-
|
|
52
|
+
// 一条都没命中:旧 priority 组一并剔除(一律按规则重建),不能原样留着
|
|
53
|
+
return {
|
|
54
|
+
groups: strip ? stripPriorityRawFields(base) : base,
|
|
55
|
+
warning: `「${title}」规则表达式未命中任何条目(共判定 ${selection.evaluatedCount} 条),故不输出该分组`,
|
|
56
|
+
};
|
|
46
57
|
}
|
|
47
|
-
const levelText = selection.targetLevel === 2
|
|
48
|
-
? '紧急(requestLevel=2)'
|
|
49
|
-
: selection.targetLevel === 1
|
|
50
|
-
? '重要(requestLevel=1;本次无 2 级数据,已按规则降级取 1,0 级不取)'
|
|
51
|
-
: '无等级(本次整批没有 ≥1 级的条目,只按超时筛)';
|
|
52
58
|
const priorityGroup = {
|
|
53
59
|
id: PRIORITY_GROUP_ID,
|
|
54
60
|
topPriority: true,
|
|
@@ -60,13 +66,33 @@ export function assemblePriorityGroup(groups) {
|
|
|
60
66
|
displayItems: requestItemsOf(selected.map((row) => ({ ...row }))),
|
|
61
67
|
};
|
|
62
68
|
return {
|
|
63
|
-
groups: [priorityGroup, ...base],
|
|
64
|
-
warning: `「${title}
|
|
65
|
-
+
|
|
69
|
+
groups: strip ? stripPriorityRawFields([priorityGroup, ...base]) : [priorityGroup, ...base],
|
|
70
|
+
warning: `「${title}」按规则表达式筛出 ${selected.length}/${selection.evaluatedCount} 条`
|
|
71
|
+
+ `(组内按 ${describePrioritySort(sortKeys)} 排序);`
|
|
66
72
|
+ `这 ${selected.length} 条同时保留在各自工作流分组中(叠加视图:Σcount 会大于 totalCount,`
|
|
67
73
|
+ 'totalCount 按去重条数计)',
|
|
68
74
|
};
|
|
69
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* 剥掉优先组规则用的临时字段(`requestData._rawFields`)。
|
|
78
|
+
*
|
|
79
|
+
* 这些字段只是为了让规则穿过中间阶段才带的,最终输出必须回到 14 个字段。
|
|
80
|
+
* 所有产出成品结构的分支都要调它——包括 `groupBy` 不是 workflow、不生成优先组的那条早退路径,
|
|
81
|
+
* 否则临时字段会直接漏进最终 JSON。
|
|
82
|
+
*/
|
|
83
|
+
export function stripPriorityRawFields(groups) {
|
|
84
|
+
for (const group of groups) {
|
|
85
|
+
for (const item of group.displayItems) {
|
|
86
|
+
if (item.type === 'request') {
|
|
87
|
+
delete item.requestData._rawFields;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
for (const row of item.requestDatas)
|
|
91
|
+
delete row._rawFields;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return groups;
|
|
95
|
+
}
|
|
70
96
|
/**
|
|
71
97
|
* 校验并索引 `aiGroups`。
|
|
72
98
|
*
|
|
@@ -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
|
|