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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CliError, ExitCode } from '../../core/errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* reception 域内结构化错误。
|
|
4
|
+
*
|
|
5
|
+
* 约定:
|
|
6
|
+
* - `type` 用 CLI 规范的分类词(validation / environment / business / authentication);
|
|
7
|
+
* - `subtype` 保留接待流程既有的全大写业务码(KNOWN_REQUIRED / RUN_NOT_FOUND 等),
|
|
8
|
+
* SKILL.md 与历史排障记录都按这套码检索,改小写会让文档与实现脱节。
|
|
9
|
+
*/
|
|
10
|
+
export class ReceptionCliError extends CliError {
|
|
11
|
+
type;
|
|
12
|
+
subtype;
|
|
13
|
+
retryable;
|
|
14
|
+
stage;
|
|
15
|
+
details;
|
|
16
|
+
constructor(type, subtype, message, options = {}) {
|
|
17
|
+
super(message, options.exitCode ?? ExitCode.GeneralError);
|
|
18
|
+
this.name = 'ReceptionCliError';
|
|
19
|
+
this.type = type;
|
|
20
|
+
this.subtype = subtype;
|
|
21
|
+
this.retryable = options.retryable ?? false;
|
|
22
|
+
this.stage = options.stage;
|
|
23
|
+
this.details = options.details;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** 入参问题:缺参数、JSON 不合法、校验不过。退出码 2。 */
|
|
27
|
+
export const receptionValidationError = (subtype, message, details) => new ReceptionCliError('validation', subtype, message, {
|
|
28
|
+
details,
|
|
29
|
+
exitCode: ExitCode.UsageError,
|
|
30
|
+
});
|
|
31
|
+
/** 环境问题:缺 python、缺快照、渲染脚本找不到。退出码 3。 */
|
|
32
|
+
export const receptionEnvironmentError = (subtype, message, details) => new ReceptionCliError('environment', subtype, message, {
|
|
33
|
+
details,
|
|
34
|
+
exitCode: ExitCode.AuthError,
|
|
35
|
+
});
|
|
36
|
+
/** 业务问题:渲染失败、上传失败、run 丢失。退出码 1。 */
|
|
37
|
+
export const receptionBusinessError = (subtype, message, details) => new ReceptionCliError('business', subtype, message, {
|
|
38
|
+
details,
|
|
39
|
+
exitCode: ExitCode.GeneralError,
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* run 状态缺失。
|
|
43
|
+
*
|
|
44
|
+
* 与其它业务错误分开放:调用方(doc)会捕获它走"带 --known 现场重建"的分支,
|
|
45
|
+
* 因此必须是可识别的类型,不能只是一个 message。
|
|
46
|
+
*/
|
|
47
|
+
export const receptionRunNotFound = (runId, stateDir) => new ReceptionCliError('business', 'RUN_NOT_FOUND', `找不到 run:${runId}`, {
|
|
48
|
+
exitCode: ExitCode.GeneralError,
|
|
49
|
+
details: {
|
|
50
|
+
runId,
|
|
51
|
+
stateDir,
|
|
52
|
+
hint: '把 ask 用过的 --known 与 answers 一起带上重跑 doc,CLI 会现场重建 run',
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { getE10Session } from '../../internal/e10/context.js';
|
|
2
|
+
import { E10ApiError, createE10RequestRuntime, } from '../../internal/e10/request-runtime.js';
|
|
3
|
+
import { receptionBusinessError, receptionEnvironmentError } from './errors.js';
|
|
4
|
+
import { UploadProtocolError, uploadToFileService } from './upload.js';
|
|
5
|
+
/** 单次上传的总时限。分片上传是多轮请求,留足 3 分钟。 */
|
|
6
|
+
const UPLOAD_TIMEOUT_MS = 180_000;
|
|
7
|
+
export function createReceptionHost(ctx) {
|
|
8
|
+
let cached = null;
|
|
9
|
+
async function resolve() {
|
|
10
|
+
if (cached)
|
|
11
|
+
return cached;
|
|
12
|
+
const e10 = await getE10Session(ctx);
|
|
13
|
+
if (!e10) {
|
|
14
|
+
cached = {
|
|
15
|
+
e10: null,
|
|
16
|
+
info: {
|
|
17
|
+
available: false,
|
|
18
|
+
baseUrl: '',
|
|
19
|
+
userId: '',
|
|
20
|
+
reason: '未取得 E10 会话:附件不会上传,产物按本地文件交付',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
return cached;
|
|
24
|
+
}
|
|
25
|
+
cached = {
|
|
26
|
+
e10,
|
|
27
|
+
info: { available: true, baseUrl: e10.getBaseUrl(), userId: e10.userId },
|
|
28
|
+
};
|
|
29
|
+
return cached;
|
|
30
|
+
}
|
|
31
|
+
async function getSession() {
|
|
32
|
+
return (await resolve()).info;
|
|
33
|
+
}
|
|
34
|
+
async function requireRuntime() {
|
|
35
|
+
const { e10, info } = await resolve();
|
|
36
|
+
if (!e10) {
|
|
37
|
+
throw receptionEnvironmentError('NO_SESSION', info.reason || '未取得 E10 会话');
|
|
38
|
+
}
|
|
39
|
+
return { runtime: createE10RequestRuntime(ctx, e10), session: info };
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 上传一份文件。
|
|
43
|
+
*
|
|
44
|
+
* 走 teamsCheck → preUploadCheck → module/upload 三阶段(见 `upload.ts`)。
|
|
45
|
+
* 旧的 `/api/file/upload` 已废弃,调用只会得到 200 + 空响应,别再回去。
|
|
46
|
+
*/
|
|
47
|
+
async function uploadFile(filePath, options = {}) {
|
|
48
|
+
const { e10, info } = await resolve();
|
|
49
|
+
if (!e10) {
|
|
50
|
+
return {
|
|
51
|
+
ok: false,
|
|
52
|
+
reason: 'NO_SESSION',
|
|
53
|
+
localPath: filePath,
|
|
54
|
+
error: info.reason || '无可用会话,已跳过上传(文件已生成,按本地文件交付)',
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const baseUrl = String(info.baseUrl || '').replace(/\/+$/u, '');
|
|
58
|
+
const runtime = createE10RequestRuntime(ctx, e10);
|
|
59
|
+
// 默认 document(E10 的文件归属取值);需要别的归属时用 RECEPTION_UPLOAD_MODULE 覆盖。
|
|
60
|
+
const module = options.module || process.env.RECEPTION_UPLOAD_MODULE || 'document';
|
|
61
|
+
try {
|
|
62
|
+
const uploaded = await uploadToFileService({
|
|
63
|
+
transport: {
|
|
64
|
+
post: (path, formData) => runtime.requestJson({
|
|
65
|
+
module: 'reception',
|
|
66
|
+
operation: 'reception.upload',
|
|
67
|
+
method: 'POST',
|
|
68
|
+
path,
|
|
69
|
+
formData,
|
|
70
|
+
headers: {
|
|
71
|
+
langtype: 'zh_CN',
|
|
72
|
+
referer: `${baseUrl}/`,
|
|
73
|
+
},
|
|
74
|
+
timeoutMs: UPLOAD_TIMEOUT_MS,
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
77
|
+
filePath,
|
|
78
|
+
module,
|
|
79
|
+
userId: info.userId ? String(info.userId) : undefined,
|
|
80
|
+
name: options.name,
|
|
81
|
+
});
|
|
82
|
+
return {
|
|
83
|
+
ok: true,
|
|
84
|
+
fileid: uploaded.fileid,
|
|
85
|
+
name: uploaded.name,
|
|
86
|
+
size: uploaded.size,
|
|
87
|
+
kind: uploaded.kind,
|
|
88
|
+
localPath: filePath,
|
|
89
|
+
previewUrl: `${baseUrl}/sp/file/filePreview/${uploaded.fileid}`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error instanceof UploadProtocolError) {
|
|
94
|
+
return {
|
|
95
|
+
ok: false,
|
|
96
|
+
localPath: filePath,
|
|
97
|
+
reason: error.subtype,
|
|
98
|
+
error: error.message,
|
|
99
|
+
httpStatus: error.httpStatus,
|
|
100
|
+
contentType: error.contentType,
|
|
101
|
+
detail: error.detail,
|
|
102
|
+
hint: `链路 teamsCheck → preUploadCheck → module/upload,module=${module}`,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
if (error instanceof E10ApiError) {
|
|
106
|
+
return { ok: false, localPath: filePath, reason: 'UPLOAD_NETWORK', error: `网络异常: ${error.message}` };
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
ok: false,
|
|
110
|
+
localPath: filePath,
|
|
111
|
+
reason: 'UPLOAD_LOCAL_ERROR',
|
|
112
|
+
error: `上传异常: ${error.message}`,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return { getSession, requireRuntime, uploadFile };
|
|
117
|
+
}
|
|
118
|
+
/** 未登录时不该静默继续的场景,统一用它取 baseUrl 并给出可读错误。 */
|
|
119
|
+
export async function requireBaseUrl(host) {
|
|
120
|
+
const session = await host.getSession();
|
|
121
|
+
if (!session.available || !session.baseUrl) {
|
|
122
|
+
throw receptionBusinessError('BASE_URL_MISSING', '未取得 E10 会话,无法确定环境地址');
|
|
123
|
+
}
|
|
124
|
+
return session.baseUrl;
|
|
125
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { stateRoot } from '../../core/state.js';
|
|
4
|
+
import { DEFAULT_WORKFLOW, STATE_SUBDIR } from './constants.js';
|
|
5
|
+
import { receptionValidationError } from './errors.js';
|
|
6
|
+
import { createReceptionHost } from './host.js';
|
|
7
|
+
import { assertManifestMatchesRegistry, receptionManifest } from './manifest.js';
|
|
8
|
+
import { executeReceptionOperation, normalizeInput } from './operations.js';
|
|
9
|
+
import { jsonArg, textOf } from './operations/shared.js';
|
|
10
|
+
/**
|
|
11
|
+
* 命令面。
|
|
12
|
+
*
|
|
13
|
+
* 形态选择:保留 `ask / doc / render` 三个动词 + `schema / run` 通用入口。
|
|
14
|
+
* 理由不是"省事",而是这三条命令的返回值是给宿主消费的(面板定义、browsertool),
|
|
15
|
+
* 塞进 CRUD 式 operation 语义反而更别扭;同时补 schema,让 Agent 仍能自查合约。
|
|
16
|
+
*/
|
|
17
|
+
function asOptions(value) {
|
|
18
|
+
return value && typeof value === 'object' && !Array.isArray(value)
|
|
19
|
+
? value
|
|
20
|
+
: {};
|
|
21
|
+
}
|
|
22
|
+
/** `<stateRoot>/reception/`,与 profile 同级,多环境不串。 */
|
|
23
|
+
function stateDirOf(ctx) {
|
|
24
|
+
return join(stateRoot(ctx), STATE_SUBDIR);
|
|
25
|
+
}
|
|
26
|
+
function contextOf(ctx, options) {
|
|
27
|
+
const stateDir = stateDirOf(ctx);
|
|
28
|
+
const outDir = textOf(options, 'outDir') || join(stateDir, 'out');
|
|
29
|
+
return { host: createReceptionHost(ctx), stateDir, outDir };
|
|
30
|
+
}
|
|
31
|
+
function successEnvelope(operation, state, data, warnings, next) {
|
|
32
|
+
return {
|
|
33
|
+
schemaVersion: 1,
|
|
34
|
+
ok: true,
|
|
35
|
+
operation,
|
|
36
|
+
data: data === undefined ? null : data,
|
|
37
|
+
meta: { state, ...(next ? { next } : {}) },
|
|
38
|
+
warnings,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function failureEnvelope(error) {
|
|
42
|
+
return { schemaVersion: 1, ok: false, error: toErrorEnvelope(error) };
|
|
43
|
+
}
|
|
44
|
+
async function runOperation(ctx, operation, input, options) {
|
|
45
|
+
try {
|
|
46
|
+
const result = await executeReceptionOperation(operation, input, contextOf(ctx, options));
|
|
47
|
+
const envelope = successEnvelope(operation, result.state, result.data, result.warnings || [], result.next || null);
|
|
48
|
+
ctx.output.write(envelope, { json: true });
|
|
49
|
+
// 业务上判定不成功(如 render 无任何字段有值)时用参数错误退出,便于调用方分流
|
|
50
|
+
if (result.ok === false)
|
|
51
|
+
process.exitCode = ExitCode.UsageError;
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
/*
|
|
55
|
+
* 错误信封走 stdout,与本模块的成功输出同一通道。
|
|
56
|
+
*
|
|
57
|
+
* 其它 shortcut(plan / asset)走 stderr,这里刻意不同:接待流程的调用方是模型,
|
|
58
|
+
* 它只解析 stdout;SKILL.md 的失败矩阵全部依赖 `error.subtype` 分流,
|
|
59
|
+
* 走 stderr 会被多数宿主丢掉,表现为"命令失败了但不知道为什么"。
|
|
60
|
+
*/
|
|
61
|
+
ctx.output.write(failureEnvelope(error), { json: true });
|
|
62
|
+
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function parseAnswers(options, code = 'ANSWERS') {
|
|
66
|
+
return jsonArg(options, 'answers', { code });
|
|
67
|
+
}
|
|
68
|
+
export const receptionShortcut = {
|
|
69
|
+
name: 'reception',
|
|
70
|
+
description: '泛微客户参观接待流程(面板 / 行程单与内部方案 / 填单页预填)',
|
|
71
|
+
category: 'shortcut',
|
|
72
|
+
register({ program, action }) {
|
|
73
|
+
assertManifestMatchesRegistry();
|
|
74
|
+
const reception = program.command('reception')
|
|
75
|
+
.description('泛微客户参观接待流程:出面板 → 出两份产物并挂附件 → 输出填单页 browsertool');
|
|
76
|
+
reception.command('schema')
|
|
77
|
+
.description('输出 operation 合约(Agent 自查入口)')
|
|
78
|
+
.action(action((ctx) => {
|
|
79
|
+
ctx.output.write(receptionManifest, { json: true });
|
|
80
|
+
}));
|
|
81
|
+
reception.command('run')
|
|
82
|
+
.description('按 operation 名执行(reception.ask / reception.doc / reception.render)')
|
|
83
|
+
.argument('<operation>', 'operation 名,如 reception.ask')
|
|
84
|
+
.option('--input <path>', 'JSON 入参文件,- 表示 stdin')
|
|
85
|
+
.option('--input-json <json>', '内联 JSON 入参')
|
|
86
|
+
.option('--out-dir <dir>', '产物输出目录')
|
|
87
|
+
.action(action(async (ctx, operation, options) => {
|
|
88
|
+
const opts = asOptions(options);
|
|
89
|
+
let input = {};
|
|
90
|
+
if (opts.inputJson) {
|
|
91
|
+
const parsed = jsonArg({ inputJson: opts.inputJson }, 'inputJson', { code: 'INPUT_JSON', required: true });
|
|
92
|
+
input = normalizeInput(parsed);
|
|
93
|
+
}
|
|
94
|
+
else if (typeof opts.input === 'string' && opts.input.trim() && opts.input !== '-') {
|
|
95
|
+
throw receptionValidationError('INPUT_UNSUPPORTED', '请用 --input-json 传参,或直接使用动词命令', {
|
|
96
|
+
hint: 'read 类操作没有大结果回传需求,不支持 --input 文件',
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
await runOperation(ctx, String(operation), input, opts);
|
|
100
|
+
}));
|
|
101
|
+
reception.command('ask')
|
|
102
|
+
.description('出交互面板(缺项才出屏,总屏数 ≤2)')
|
|
103
|
+
.option('--known <json>', '7 项抽取结果(内联 JSON)')
|
|
104
|
+
.option('--known-file <path>', '7 项抽取结果(JSON 文件,推荐)')
|
|
105
|
+
.option('--user <names>', '陪同人员姓名,多人逗号分隔;不传用当前登录人兜底')
|
|
106
|
+
.option('--customer <name>', '客户名称,覆盖 known.customer')
|
|
107
|
+
.option('--workflow <name>', `目标流程名,默认「${DEFAULT_WORKFLOW}」`)
|
|
108
|
+
.option('--out-dir <dir>', '产物输出目录')
|
|
109
|
+
.action(action(async (ctx, options) => {
|
|
110
|
+
const opts = asOptions(options);
|
|
111
|
+
const known = jsonArg(opts, 'known', {
|
|
112
|
+
code: 'KNOWN',
|
|
113
|
+
required: true,
|
|
114
|
+
hint: '推荐用文件传参:先写 known.json(无 BOM 的 UTF-8),再 reception ask --known-file known.json',
|
|
115
|
+
});
|
|
116
|
+
await runOperation(ctx, 'reception.ask', {
|
|
117
|
+
known,
|
|
118
|
+
user: textOf(opts, 'user') || undefined,
|
|
119
|
+
customer: textOf(opts, 'customer') || undefined,
|
|
120
|
+
workflow: textOf(opts, 'workflow') || undefined,
|
|
121
|
+
}, opts);
|
|
122
|
+
}));
|
|
123
|
+
reception.command('doc')
|
|
124
|
+
.description('生成行程单 docx + 内部参考文档 md,并上传附件(零写请求)')
|
|
125
|
+
.option('--run-id <id>', 'ask 返回的 runId')
|
|
126
|
+
.option('--known <json>', 'run 失效时用于现场重建的 7 项抽取结果')
|
|
127
|
+
.option('--known-file <path>', '同上,JSON 文件')
|
|
128
|
+
.option('--answers <json>', '面板回填值(内联 JSON)')
|
|
129
|
+
.option('--answers-file <path>', '面板回填值(JSON 文件,推荐)')
|
|
130
|
+
.option('--cases-file <path>', '案例 + 专家检索结果 JSON')
|
|
131
|
+
.option('--workflow <name>', '目标流程名')
|
|
132
|
+
.option('--out-dir <dir>', '产物输出目录')
|
|
133
|
+
.option('--snapshot <path>', '字段快照路径(同时用于推导 render.py)')
|
|
134
|
+
.option('--render-py <path>', '显式指定 render.py')
|
|
135
|
+
.option('--no-upload', '跳过附件上传,只出本地文件')
|
|
136
|
+
.action(action(async (ctx, options) => {
|
|
137
|
+
const opts = asOptions(options);
|
|
138
|
+
await runOperation(ctx, 'reception.doc', {
|
|
139
|
+
runId: textOf(opts, 'runId') || undefined,
|
|
140
|
+
known: jsonArg(opts, 'known', { code: 'KNOWN' }) || undefined,
|
|
141
|
+
answers: parseAnswers(opts) || undefined,
|
|
142
|
+
casesFile: textOf(opts, 'casesFile') || undefined,
|
|
143
|
+
workflow: textOf(opts, 'workflow') || undefined,
|
|
144
|
+
outDir: textOf(opts, 'outDir') || undefined,
|
|
145
|
+
snapshot: textOf(opts, 'snapshot') || undefined,
|
|
146
|
+
renderPy: textOf(opts, 'renderPy') || undefined,
|
|
147
|
+
noUpload: opts.upload === false,
|
|
148
|
+
}, opts);
|
|
149
|
+
}));
|
|
150
|
+
reception.command('render')
|
|
151
|
+
.description('输出填单页 browsertool(纯本地,不调接口)')
|
|
152
|
+
.option('--run-id <id>', 'ask / doc 返回的 runId')
|
|
153
|
+
.option('--answers <json>', '面板回填值(内联 JSON)')
|
|
154
|
+
.option('--answers-file <path>', '面板回填值(JSON 文件,推荐)')
|
|
155
|
+
.option('--attachment-fileid <ids>', '附件 fileid,多个逗号分隔')
|
|
156
|
+
.option('--sdk-render <type>', '打开形态:inline / popup / drawer(默认 drawer)')
|
|
157
|
+
.option('--snapshot <path>', '字段快照路径')
|
|
158
|
+
.action(action(async (ctx, options) => {
|
|
159
|
+
const opts = asOptions(options);
|
|
160
|
+
await runOperation(ctx, 'reception.render', {
|
|
161
|
+
runId: textOf(opts, 'runId') || undefined,
|
|
162
|
+
answers: parseAnswers(opts) || undefined,
|
|
163
|
+
attachmentFileid: textOf(opts, 'attachmentFileid') || undefined,
|
|
164
|
+
sdkRender: textOf(opts, 'sdkRender') || undefined,
|
|
165
|
+
snapshot: textOf(opts, 'snapshot') || undefined,
|
|
166
|
+
}, opts);
|
|
167
|
+
}));
|
|
168
|
+
reception.command('doc-render')
|
|
169
|
+
.description('一次完成「出件 + 传附件 + 拼填单参数」(doc 与 render 合并,省一次工具往返)')
|
|
170
|
+
.option('--run-id <id>', 'ask 返回的 runId')
|
|
171
|
+
.option('--known <json>', 'run 失效时用于现场重建的 7 项抽取结果')
|
|
172
|
+
.option('--known-file <path>', '同上,JSON 文件')
|
|
173
|
+
.option('--answers <json>', '面板回填值(内联 JSON)')
|
|
174
|
+
.option('--answers-file <path>', '面板回填值(JSON 文件,推荐)')
|
|
175
|
+
.option('--cases-file <path>', '案例 + 专家检索结果 JSON')
|
|
176
|
+
.option('--workflow <name>', '目标流程名')
|
|
177
|
+
.option('--out-dir <dir>', '产物输出目录')
|
|
178
|
+
.option('--snapshot <path>', '字段快照路径(同时用于推导 render.py)')
|
|
179
|
+
.option('--render-py <path>', '显式指定 render.py')
|
|
180
|
+
.option('--no-upload', '跳过附件上传,只出本地文件')
|
|
181
|
+
.option('--sdk-render <type>', '打开形态:inline / popup / drawer(默认 drawer)')
|
|
182
|
+
.action(action(async (ctx, options) => {
|
|
183
|
+
const opts = asOptions(options);
|
|
184
|
+
await runOperation(ctx, 'reception.docRender', {
|
|
185
|
+
runId: textOf(opts, 'runId') || undefined,
|
|
186
|
+
known: jsonArg(opts, 'known', { code: 'KNOWN' }) || undefined,
|
|
187
|
+
answers: parseAnswers(opts) || undefined,
|
|
188
|
+
casesFile: textOf(opts, 'casesFile') || undefined,
|
|
189
|
+
workflow: textOf(opts, 'workflow') || undefined,
|
|
190
|
+
outDir: textOf(opts, 'outDir') || undefined,
|
|
191
|
+
snapshot: textOf(opts, 'snapshot') || undefined,
|
|
192
|
+
renderPy: textOf(opts, 'renderPy') || undefined,
|
|
193
|
+
noUpload: opts.upload === false,
|
|
194
|
+
sdkRender: textOf(opts, 'sdkRender') || undefined,
|
|
195
|
+
}, opts);
|
|
196
|
+
}));
|
|
197
|
+
},
|
|
198
|
+
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { receptionOperationNames } from './operations/registry.js';
|
|
2
|
+
export const receptionOperations = [
|
|
3
|
+
{
|
|
4
|
+
name: 'reception.ask',
|
|
5
|
+
risk: 'read',
|
|
6
|
+
summary: '按 7 项抽取结果出交互面板:缺项才出屏,总屏数 ≤2(客户需求 + 接待细节)。返回 runId 供 doc 使用。',
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
additionalProperties: false,
|
|
10
|
+
required: ['known'],
|
|
11
|
+
properties: {
|
|
12
|
+
known: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
description: '模型抽取的 7 项:customer/headcount/visitDate/visitType/companions/demand/接待细节',
|
|
15
|
+
additionalProperties: true,
|
|
16
|
+
},
|
|
17
|
+
user: { type: 'string', description: '陪同人员姓名,多人用逗号分隔;不传则用当前登录人兜底' },
|
|
18
|
+
customer: { type: 'string', description: '客户名称(覆盖 known.customer)' },
|
|
19
|
+
workflow: { type: 'string', description: '目标流程名,默认「泛微客户参观接待流程」' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
outputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
runId: { type: 'string' },
|
|
26
|
+
panels: { type: 'array', items: { type: 'object' } },
|
|
27
|
+
known: { type: 'object' },
|
|
28
|
+
timings: { type: 'object' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'reception.doc',
|
|
34
|
+
risk: 'read',
|
|
35
|
+
summary: '生成客户版行程单 docx 与内部版接待交流参考文档 md,并上传两份附件拿 fileid。零写请求:流程不落库、不提交。',
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
properties: {
|
|
40
|
+
runId: { type: 'string', description: 'ask 返回的 runId;run 失效时改用 known 现场重建' },
|
|
41
|
+
known: { type: 'object', description: 'run 失效时的 7 项抽取结果,用于现场重建 run' },
|
|
42
|
+
answers: { type: 'object', description: 'ask_user 面板回填值:{customer_need, logistics, fields}' },
|
|
43
|
+
casesFile: { type: 'string', description: '案例 + 专家检索结果 JSON 文件路径(软依赖,缺省则不注入)' },
|
|
44
|
+
workflow: { type: 'string', description: '目标流程名' },
|
|
45
|
+
outDir: { type: 'string', description: '产物输出目录' },
|
|
46
|
+
noUpload: { type: 'boolean', description: '跳过附件上传,只出本地文件' },
|
|
47
|
+
snapshot: { type: 'string', description: '字段快照路径;同时用于推导技能包内 render.py 位置' },
|
|
48
|
+
renderPy: { type: 'string', description: '显式指定 render.py 路径' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
outputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
runId: { type: 'string' },
|
|
55
|
+
rebuilt: { type: 'boolean' },
|
|
56
|
+
files: { type: 'array', items: { type: 'object' } },
|
|
57
|
+
internalDoc: {
|
|
58
|
+
type: ['object', 'null'],
|
|
59
|
+
description: '内部参考文档正文 {name,path,content};null 表示没生成。模型据此在对话中原样贴出,不必再读产物文件',
|
|
60
|
+
},
|
|
61
|
+
attachments: { type: 'array', items: { type: 'object' } },
|
|
62
|
+
attachmentPending: { type: 'boolean' },
|
|
63
|
+
qa: { type: 'object' },
|
|
64
|
+
verify: { type: 'object' },
|
|
65
|
+
timings: { type: 'object' },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'reception.render',
|
|
71
|
+
risk: 'read',
|
|
72
|
+
summary: '按快照把接待数据拼成 customParams,输出 <browsertool> 供宿主打开填单页。纯本地,不调接口。',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
required: ['runId'],
|
|
77
|
+
properties: {
|
|
78
|
+
runId: { type: 'string', description: 'ask / doc 返回的 runId' },
|
|
79
|
+
answers: { type: 'object', description: '面板回填值,覆盖 run.answers' },
|
|
80
|
+
attachmentFileid: { type: 'string', description: '显式指定附件 fileid,多个用逗号分隔' },
|
|
81
|
+
sdkRender: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
enum: ['inline', 'popup', 'drawer'],
|
|
84
|
+
description: '打开形态:drawer 为右侧抽屉(默认)',
|
|
85
|
+
},
|
|
86
|
+
snapshot: { type: 'string', description: '字段快照路径' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
outputSchema: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
properties: {
|
|
92
|
+
customParams: { type: 'object' },
|
|
93
|
+
fieldAssignKeys: { type: 'string' },
|
|
94
|
+
detailRowCount: { type: 'integer' },
|
|
95
|
+
attachmentPending: { type: 'boolean' },
|
|
96
|
+
sdkRenderType: { type: 'string' },
|
|
97
|
+
todos: { type: 'array', items: { type: 'string' } },
|
|
98
|
+
browsertool: { type: 'string' },
|
|
99
|
+
browsertoolFile: { type: 'string', description: 'browsertool 落盘的绝对路径(正斜杠)' },
|
|
100
|
+
browsertoolRef: { type: 'string', description: '文件引用形态,宿主支持时模型只输出这一行' },
|
|
101
|
+
timings: { type: 'object' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'reception.docRender',
|
|
107
|
+
risk: 'read',
|
|
108
|
+
summary: '一次完成 doc + render:出 docx/md、上传附件、拼 customParams、落 browsertool。'
|
|
109
|
+
+ '两者之间没有人工确认点,合并只为省一次工具往返;失败语义与分开调用一致。',
|
|
110
|
+
inputSchema: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
runId: { type: 'string', description: 'ask 返回的 runId;run 失效时改用 known 现场重建' },
|
|
115
|
+
known: { type: 'object', description: 'run 失效时的 7 项抽取结果,用于现场重建 run' },
|
|
116
|
+
answers: { type: 'object', description: 'ask_user 面板回填值:{customer_need, logistics, fields}' },
|
|
117
|
+
casesFile: { type: 'string', description: '案例 + 专家检索结果 JSON 文件路径(软依赖)' },
|
|
118
|
+
workflow: { type: 'string', description: '目标流程名' },
|
|
119
|
+
outDir: { type: 'string', description: '产物输出目录' },
|
|
120
|
+
noUpload: { type: 'boolean', description: '跳过附件上传,只出本地文件' },
|
|
121
|
+
snapshot: { type: 'string', description: '字段快照路径;同时用于推导技能包内 render.py 位置' },
|
|
122
|
+
renderPy: { type: 'string', description: '显式指定 render.py 路径' },
|
|
123
|
+
sdkRender: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
enum: ['inline', 'popup', 'drawer'],
|
|
126
|
+
description: '填单页打开形态:drawer 为右侧抽屉(默认)',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
outputSchema: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
runId: { type: 'string' },
|
|
134
|
+
rebuilt: { type: 'boolean' },
|
|
135
|
+
files: { type: 'array', items: { type: 'object' } },
|
|
136
|
+
internalDoc: {
|
|
137
|
+
type: ['object', 'null'],
|
|
138
|
+
description: '内部参考文档正文 {name,path,content};null 表示没生成。模型据此在对话中原样贴出,不必再读产物文件',
|
|
139
|
+
},
|
|
140
|
+
attachments: { type: 'array', items: { type: 'object' } },
|
|
141
|
+
attachmentPending: { type: 'boolean' },
|
|
142
|
+
uploadDiagnostics: { type: 'array', items: { type: 'object' } },
|
|
143
|
+
customParams: { type: 'object' },
|
|
144
|
+
fieldAssignKeys: { type: 'string' },
|
|
145
|
+
detailRowCount: { type: 'integer' },
|
|
146
|
+
todos: { type: 'array', items: { type: 'string' } },
|
|
147
|
+
browsertool: { type: 'string' },
|
|
148
|
+
browsertoolFile: { type: 'string' },
|
|
149
|
+
browsertoolRef: { type: 'string' },
|
|
150
|
+
qa: { type: 'object' },
|
|
151
|
+
timings: { type: 'object' },
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
export const receptionManifest = {
|
|
157
|
+
schemaVersion: 1,
|
|
158
|
+
name: 'reception',
|
|
159
|
+
title: '泛微客户参观接待流程(面板/出件/填单页)',
|
|
160
|
+
version: '1.0.0',
|
|
161
|
+
host: 'e10-reception',
|
|
162
|
+
status: 'builtin',
|
|
163
|
+
sourceSkill: 'weaver-e10-reception-flow',
|
|
164
|
+
capabilities: ['reception'],
|
|
165
|
+
/** 全链路零写请求:只上传附件,流程由用户在页面上提交。 */
|
|
166
|
+
writePolicy: 'none',
|
|
167
|
+
operations: receptionOperations,
|
|
168
|
+
operationNames: receptionOperationNames,
|
|
169
|
+
};
|
|
170
|
+
/** 命令面自检时用;与 registry 保持一致,避免文档与实现脱节。 */
|
|
171
|
+
export function assertManifestMatchesRegistry() {
|
|
172
|
+
const declared = receptionOperations.map((item) => item.name).sort();
|
|
173
|
+
const registered = [...receptionOperationNames].sort();
|
|
174
|
+
if (declared.join(',') !== registered.join(',')) {
|
|
175
|
+
throw new Error(`manifest 与 registry 不一致:\nmanifest=${declared.join(',')}\nregistry=${registered.join(',')}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { DEFAULT_WORKFLOW } from '../constants.js';
|
|
2
|
+
import { buildPanels } from './panels.js';
|
|
3
|
+
import { newRunId, saveRun } from './runs.js';
|
|
4
|
+
import { nameList } from './shared.js';
|
|
5
|
+
export async function ask(input, ctx) {
|
|
6
|
+
const startedAt = Date.now();
|
|
7
|
+
const known = input.known || {};
|
|
8
|
+
const workflow = input.workflow || DEFAULT_WORKFLOW;
|
|
9
|
+
const warnings = [];
|
|
10
|
+
const customerKeyword = input.customer || (typeof known.customer === 'string' ? known.customer : '');
|
|
11
|
+
// 宿主已支持直接传中文,人机交互前不再查客户/人员的 ID(省掉两次接口往返)。
|
|
12
|
+
// 人员:--user 或 known.companions 里的姓名直接落到 companions;
|
|
13
|
+
// 一个都没有时,compose 用 empId(当前登录人)兜底填「参与人员」。
|
|
14
|
+
const data = { ...known };
|
|
15
|
+
delete data.customerId;
|
|
16
|
+
if (customerKeyword)
|
|
17
|
+
data.customer = customerKeyword;
|
|
18
|
+
// 主联络人优先级:`known.escorts`(明确指定的对接人)> `--user`(陪同)> `known.companions` > 登录人兜底。
|
|
19
|
+
//
|
|
20
|
+
// 事故背景:模型把对接人写在 `escorts`,同时把「当前操作人」当成陪同传给了 `--user`,
|
|
21
|
+
// 旧代码只认后两者,于是主联络人被填成操作人。
|
|
22
|
+
// 因此这里让 `escorts` 赢:它语义最明确(对接人 = 主联络人),而 `--user` 可能是操作人。
|
|
23
|
+
const escorts = nameList(known.escorts);
|
|
24
|
+
const explicitUser = nameList(input.user || '');
|
|
25
|
+
const companions = nameList(known.companions);
|
|
26
|
+
const names = escorts.length ? escorts : (explicitUser.length ? explicitUser : companions);
|
|
27
|
+
if (names.length)
|
|
28
|
+
data.companions = names.map((name) => ({ name }));
|
|
29
|
+
// ask 完全不读会话:解析会话要读加密 auth 并解 keyring,实测 ~300ms,
|
|
30
|
+
// 而 ask 只拿它填 empId(登录人兜底)和 base(拼 URL),这两件事 doc / render 阶段
|
|
31
|
+
// 本来就绕不开会话,放在那里做即可。ask 保持纯本地,冷启动从 643ms 降到 340ms。
|
|
32
|
+
data.empId = '';
|
|
33
|
+
const runId = newRunId();
|
|
34
|
+
saveRun(ctx.stateDir, {
|
|
35
|
+
runId,
|
|
36
|
+
createdAt: new Date().toISOString(),
|
|
37
|
+
workflow,
|
|
38
|
+
outDir: ctx.outDir,
|
|
39
|
+
base: '',
|
|
40
|
+
data,
|
|
41
|
+
customer: null,
|
|
42
|
+
user: null,
|
|
43
|
+
mode: 'browsertool',
|
|
44
|
+
});
|
|
45
|
+
const panels = buildPanels(data);
|
|
46
|
+
return {
|
|
47
|
+
state: 'asked',
|
|
48
|
+
ok: true,
|
|
49
|
+
data: {
|
|
50
|
+
runId,
|
|
51
|
+
known: {
|
|
52
|
+
customer: data.customer || '',
|
|
53
|
+
visitDate: data.visitDate || '',
|
|
54
|
+
visitType: data.visitType || '',
|
|
55
|
+
companions: data.companions || [],
|
|
56
|
+
// 兜底由 render 阶段补:ask 不读会话,这里恒为空
|
|
57
|
+
contactFallback: '',
|
|
58
|
+
},
|
|
59
|
+
panels,
|
|
60
|
+
timings: { totalMs: Date.now() - startedAt },
|
|
61
|
+
},
|
|
62
|
+
warnings,
|
|
63
|
+
next: {
|
|
64
|
+
command: 'ask_user(panels) → weaver-work-cli reception doc --run-id … --answers \'{...}\'',
|
|
65
|
+
reason: '一次问完;answers 原样回传',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export const askOperation = {
|
|
70
|
+
execute: (input, ctx) => ask(input, ctx),
|
|
71
|
+
};
|