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,56 @@
|
|
|
1
|
+
import { readCache, writeCache, cacheScopeSuffix } from './cache.js';
|
|
2
|
+
const DRAFT_TTL_MS = 30 * 60 * 1000;
|
|
3
|
+
const MAX_DRAFTS = 30;
|
|
4
|
+
function draftKey(scope, userId) {
|
|
5
|
+
return `draft-v1-${scope}-${userId}`;
|
|
6
|
+
}
|
|
7
|
+
function normName(name) {
|
|
8
|
+
return name.trim().replace(/\s+/g, '¤');
|
|
9
|
+
}
|
|
10
|
+
async function loadAll(env) {
|
|
11
|
+
const session = await env.host.getSession();
|
|
12
|
+
const userId = String(session?.userId ?? '').trim();
|
|
13
|
+
const key = draftKey(await cacheScopeSuffix(env), userId);
|
|
14
|
+
const hit = await readCache(env, key, { ttlMs: DRAFT_TTL_MS * 2 });
|
|
15
|
+
const now = Date.now();
|
|
16
|
+
const all = {};
|
|
17
|
+
for (const [name, draft] of Object.entries(hit?.data ?? {})) {
|
|
18
|
+
if (draft && now - Number(draft.updatedAt || 0) <= DRAFT_TTL_MS)
|
|
19
|
+
all[name] = draft;
|
|
20
|
+
}
|
|
21
|
+
return { key, all };
|
|
22
|
+
}
|
|
23
|
+
/** 取一场会议上次确认的要素(按会议名匹配,30 分钟内有效)。 */
|
|
24
|
+
export async function loadMeetingDraft(env, mtName) {
|
|
25
|
+
const name = normName(mtName);
|
|
26
|
+
if (!name)
|
|
27
|
+
return null;
|
|
28
|
+
const { all } = await loadAll(env);
|
|
29
|
+
return all[name] ?? null;
|
|
30
|
+
}
|
|
31
|
+
/** 记录/更新一场会议已确认的要素。 */
|
|
32
|
+
export async function saveMeetingDraft(env, draft) {
|
|
33
|
+
const name = normName(draft.mtName);
|
|
34
|
+
if (!name || !draft.begin)
|
|
35
|
+
return;
|
|
36
|
+
const { key, all } = await loadAll(env);
|
|
37
|
+
all[name] = { ...draft, updatedAt: Date.now() };
|
|
38
|
+
const names = Object.keys(all);
|
|
39
|
+
if (names.length > MAX_DRAFTS) {
|
|
40
|
+
names.sort((a, b) => all[a].updatedAt - all[b].updatedAt)
|
|
41
|
+
.slice(0, names.length - MAX_DRAFTS)
|
|
42
|
+
.forEach((old) => delete all[old]);
|
|
43
|
+
}
|
|
44
|
+
await writeCache(env, key, all);
|
|
45
|
+
}
|
|
46
|
+
/** 提交成功后清掉这场会议的草稿。 */
|
|
47
|
+
export async function clearMeetingDraft(env, mtName) {
|
|
48
|
+
const name = normName(mtName);
|
|
49
|
+
if (!name)
|
|
50
|
+
return;
|
|
51
|
+
const { key, all } = await loadAll(env);
|
|
52
|
+
if (!all[name])
|
|
53
|
+
return;
|
|
54
|
+
delete all[name];
|
|
55
|
+
await writeCache(env, key, all);
|
|
56
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../../errors.js';
|
|
3
4
|
import { meetingSuccess, SCHEMA_ID } from '../types.js';
|
|
@@ -58,7 +59,6 @@ async function buildPersonnelText(env, data) {
|
|
|
58
59
|
}
|
|
59
60
|
return out;
|
|
60
61
|
}
|
|
61
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
62
62
|
/**
|
|
63
63
|
* EB 响应成功判定。
|
|
64
64
|
* EB 的响应体与标准版不同:成功时顶层常为 `{datajson:{...}}`(可能不带 status/code),
|
|
@@ -232,7 +232,12 @@ function buildReadInputSchema(endpoint) {
|
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
properties.pageNo = { type: 'integer', minimum: 1, description: '页码,默认 1' };
|
|
235
|
-
properties.pageSize = { type: 'integer', minimum: 1, maximum: 200, description: '每页条数,默认 20' };
|
|
235
|
+
properties.pageSize = { type: 'integer', minimum: 1, maximum: 200, description: '每页条数,默认 50(注意:本环境服务端单页实际只回 10~20 条,传更大也无效;要全量请传 all:true)' };
|
|
236
|
+
properties.all = {
|
|
237
|
+
type: 'boolean',
|
|
238
|
+
description: 'true = 自动翻页拉全量(最多 50 页)。查台账/列清单时**建议直接传 true**,'
|
|
239
|
+
+ '否则只回第 1 页(本环境实测 10 条),容易误判"接口读不全"',
|
|
240
|
+
};
|
|
236
241
|
if (endpoint.countPk) {
|
|
237
242
|
properties.withCount = { type: 'boolean', description: '是否先查总数(默认 true,条件与列表一致)' };
|
|
238
243
|
}
|
|
@@ -343,10 +348,60 @@ function buildReadOperation(endpoint) {
|
|
|
343
348
|
return meetingSuccess(endpoint.operation, { data, count: rows.length }, endpoint.notes ? { meta: { notes: endpoint.notes } } : {});
|
|
344
349
|
}
|
|
345
350
|
const pageNo = typeof args.pageNo === 'number' ? args.pageNo : 1;
|
|
346
|
-
const pageSize = typeof args.pageSize === 'number' ? args.pageSize :
|
|
351
|
+
const pageSize = typeof args.pageSize === 'number' ? args.pageSize : 50;
|
|
347
352
|
// 服务端过滤条件:count 与 list 必须用**同一份**,否则 total 与当页行数对不上
|
|
348
353
|
// (总数是不带过滤的、列表是过滤后的,用户会看到"共 155 间"却只回 1 条)。
|
|
349
354
|
const mainTableFilters = pickMainTableFilters(args, endpoint.mainTableParams);
|
|
355
|
+
// ⛔ 2026-11-06 真机:本环境服务端**单页固定回 10 条**(pageSize=200 也无效),
|
|
356
|
+
// 以前只回第 1 页又只给一句"还有 X 条未取到"的弱提示,agent 直接当成"接口读不全",
|
|
357
|
+
// 对用户说"台账 155 条但只返回 10 间"。这里支持 all:true 一次性翻到底。
|
|
358
|
+
if (args.all === true) {
|
|
359
|
+
const collected = [];
|
|
360
|
+
let pages = 0;
|
|
361
|
+
let totalKnown = 0;
|
|
362
|
+
for (let p = 1; p <= 50; p += 1) {
|
|
363
|
+
const pageResponse = await env.host.request({
|
|
364
|
+
method: 'POST',
|
|
365
|
+
path,
|
|
366
|
+
operation: endpoint.operation,
|
|
367
|
+
query: { ...query, pageNo: p, pageSize },
|
|
368
|
+
body: queryBody(session.userId, { pageNo: p, pageSize }, mainTableFilters),
|
|
369
|
+
acceptBusiness,
|
|
370
|
+
});
|
|
371
|
+
const { rows: pageRows, total: pageTotal } = extractEbRows(pageResponse);
|
|
372
|
+
pages = p;
|
|
373
|
+
totalKnown = Number(pageTotal ?? totalKnown) || totalKnown;
|
|
374
|
+
if (pageRows.length === 0)
|
|
375
|
+
break;
|
|
376
|
+
collected.push(...pageRows);
|
|
377
|
+
if (totalKnown > 0 && collected.length >= totalKnown)
|
|
378
|
+
break;
|
|
379
|
+
if (pageRows.length < 10)
|
|
380
|
+
break; // 服务端单页上限 10
|
|
381
|
+
}
|
|
382
|
+
const allRows = Object.keys(mainTableFilters).length === 0
|
|
383
|
+
? collected
|
|
384
|
+
: collected.filter((row) => {
|
|
385
|
+
const main = (row?.mainTable ?? row ?? {});
|
|
386
|
+
return Object.entries(mainTableFilters).every(([key, value]) => {
|
|
387
|
+
const cell = main[key];
|
|
388
|
+
return cell !== undefined && cell !== null && String(cell).includes(String(value));
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
return meetingSuccess(endpoint.operation, {
|
|
392
|
+
total: allRows.length,
|
|
393
|
+
pageNo: 1,
|
|
394
|
+
pageSize: allRows.length,
|
|
395
|
+
count: allRows.length,
|
|
396
|
+
pagesFetched: pages,
|
|
397
|
+
all: true,
|
|
398
|
+
rows: allRows,
|
|
399
|
+
filters: { ...query, ...mainTableFilters },
|
|
400
|
+
}, {
|
|
401
|
+
...(endpoint.notes ? { meta: { notes: endpoint.notes } } : {}),
|
|
402
|
+
...(allRows.length === 0 && endpoint.emptyHint ? { warnings: [endpoint.emptyHint] } : {}),
|
|
403
|
+
});
|
|
404
|
+
}
|
|
350
405
|
let total;
|
|
351
406
|
if (endpoint.countPk && args.withCount !== false) {
|
|
352
407
|
const countResponse = await env.host.request({
|
|
@@ -447,7 +502,7 @@ function buildReadOperation(endpoint) {
|
|
|
447
502
|
// ⚠️ 分页提示:本页条数 < 总数时明确告诉调用方"还有没取到的",
|
|
448
503
|
// 避免只看本页就下结论(2026-10-23 我本人就因此误判"该环境只有 10 个会议",
|
|
449
504
|
// 实际 total=46,只是第一页 + stdout 预览把数组截到 10 条)。
|
|
450
|
-
// 注意:
|
|
505
|
+
// 注意:2026-11-06 真机实测,本环境服务端**会把单页压到 10 条**(pageSize=200 也无效),
|
|
451
506
|
// 所以这里只提示翻页/加大 pageSize,不要写成"服务端限制"。
|
|
452
507
|
const effectiveTotal = Math.max(resolvedTotal, rows.length);
|
|
453
508
|
const pageWarnings = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readCache, writeCache, cacheScopeSuffix } from './cache.js';
|
|
2
|
-
const PERSON_TTL_MS = 24 * 60 * 60 * 1000;
|
|
2
|
+
const PERSON_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
3
3
|
const BATCH_MAX = 100;
|
|
4
4
|
function personKey(scope) {
|
|
5
5
|
return `person-v1-${scope}`;
|
|
@@ -7,7 +7,7 @@ function personKey(scope) {
|
|
|
7
7
|
/** 读缓存里的全部人员(id → 记录),过期的条目会被丢弃。 */
|
|
8
8
|
async function readAll(env) {
|
|
9
9
|
const scope = await cacheScopeSuffix(env);
|
|
10
|
-
const hit = await readCache(env, personKey(scope), { ttlMs: PERSON_TTL_MS *
|
|
10
|
+
const hit = await readCache(env, personKey(scope), { ttlMs: PERSON_TTL_MS * 2 });
|
|
11
11
|
if (!hit)
|
|
12
12
|
return {};
|
|
13
13
|
const now = Date.now();
|
|
@@ -2,13 +2,39 @@ import { meetingSuccess, schemaOf, SCHEMA_DATETIME_MINUTE } from '../types.js';
|
|
|
2
2
|
import { EB_BASE, ebBusinessSuccess, extractEbRows, queryBody } from './factory.js';
|
|
3
3
|
import { readCache, writeCache, cacheScopeSuffix } from './cache.js';
|
|
4
4
|
import { busyRoomIds } from './usage-cache.js';
|
|
5
|
+
/**
|
|
6
|
+
* 从会议室名称/描述推断楼层(名称优先,其次描述)。
|
|
7
|
+
* 规则:中文「一楼/二层」、`1F/3楼/10层` 直接取;否则看名称开头的 3~4 位数字
|
|
8
|
+
* (3 位取首位:120→1;4 位取前两位:1007→10;带后缀 601-8→6)。
|
|
9
|
+
*/
|
|
10
|
+
export function inferRoomFloor(name, desc = '') {
|
|
11
|
+
const cnDigits = { 一: 1, 二: 2, 三: 3, 四: 4, 五: 5, 六: 6, 七: 7, 八: 8, 九: 9, 十: 10 };
|
|
12
|
+
const fromText = (text) => {
|
|
13
|
+
const cn = text.match(/([一二三四五六七八九十])\s*(?:楼|层)/u);
|
|
14
|
+
if (cn)
|
|
15
|
+
return cnDigits[cn[1]] ?? null;
|
|
16
|
+
const en = text.match(/(\d{1,2})\s*(?:F|f|楼|层)(?!\d)/u);
|
|
17
|
+
if (en)
|
|
18
|
+
return Number(en[1]);
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
const byText = fromText(name) ?? fromText(desc);
|
|
22
|
+
if (byText)
|
|
23
|
+
return byText;
|
|
24
|
+
const lead = name.match(/^\s*(\d{3,4})/u);
|
|
25
|
+
if (!lead)
|
|
26
|
+
return null;
|
|
27
|
+
const digits = lead[1];
|
|
28
|
+
return digits.length === 4 ? Number(digits.slice(0, 2)) : Number(digits[0]);
|
|
29
|
+
}
|
|
5
30
|
// 会议室台账缓存 24h(用户 2026-10-30 明确要求:不要为了新鲜度把 TTL 缩到 15 分钟,太频繁)。
|
|
6
31
|
// 「刚导入/新建的会议室看不到」靠两层兜底解决,而不是靠缩短 TTL:
|
|
7
32
|
// ① **建会链路强制拉最新**(create.flow.prepare / quick / create.suggest 传 refreshRooms: true)——
|
|
8
33
|
// 这些是"要下单"的场景,宁可多一次请求也必须准;
|
|
9
34
|
// ② **候选为空且来自缓存 → 自动强制重拉重算**(见下方 candidates.length === 0 分支)。
|
|
10
35
|
// 纯查询(room.recommend)走 24h 缓存保持快;缓存超过 STALE_NOTICE_MS 会在 warnings 提示可用 refresh 刷新。
|
|
11
|
-
|
|
36
|
+
// 2026-11-06 用户要求:会议室台账 7 天过期(原 24h,太短,几乎每次都在重拉)
|
|
37
|
+
const ROOMS_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
12
38
|
const STALE_NOTICE_MS = 4 * 60 * 60 * 1000;
|
|
13
39
|
const FREQUENT_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
14
40
|
const FREQUENT_WINDOW_DAYS = 180;
|
|
@@ -70,11 +96,12 @@ function normalizeRoom(row) {
|
|
|
70
96
|
// 于是「带客户优先接待类」里**按描述文案判定**那一半从来没生效过(只有名称含「接待」的能命中)。
|
|
71
97
|
// 例:广州会议室四 的描述「用来接待重要来宾…」明明写着,却被当普通房间。
|
|
72
98
|
roomDesc: toText(main.room_desc).trim(),
|
|
99
|
+
floor: inferRoomFloor(toText(main.room_name).trim(), toText(main.room_desc).trim()),
|
|
73
100
|
};
|
|
74
101
|
}
|
|
75
102
|
/** 全量会议室:优先缓存(24h),`refresh:true` 强制重拉。 */
|
|
76
103
|
export async function loadRooms(env, options = {}) {
|
|
77
|
-
const key = `rooms-
|
|
104
|
+
const key = `rooms-v4-${await cacheScopeSuffix(env)}`;
|
|
78
105
|
const warnings = [];
|
|
79
106
|
if (!options.refresh) {
|
|
80
107
|
const cached = await readCache(env, key, { ttlMs: ROOMS_TTL_MS });
|
|
@@ -242,8 +269,19 @@ export async function recommendRooms(env, input) {
|
|
|
242
269
|
continue;
|
|
243
270
|
if (requirement.mrType && room.mrType !== requirement.mrType)
|
|
244
271
|
continue;
|
|
245
|
-
if (
|
|
272
|
+
if (input.floor !== undefined && input.floor !== null && room.floor !== input.floor)
|
|
246
273
|
continue;
|
|
274
|
+
// 「一楼」「1F」这类说法:调用方可能塞进 placeKeyword,这里按楼层解释一次
|
|
275
|
+
if (requirement.placeKeyword) {
|
|
276
|
+
const floorHint = inferRoomFloor(String(requirement.placeKeyword));
|
|
277
|
+
if (floorHint !== null && /楼|层|F/iu.test(String(requirement.placeKeyword))) {
|
|
278
|
+
if (room.floor !== floorHint)
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
else if (!room.place.includes(requirement.placeKeyword)) {
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
247
285
|
if (requirement.nameKeyword && !room.name.includes(requirement.nameKeyword))
|
|
248
286
|
continue;
|
|
249
287
|
if (requirement.equipmentsKeyword && !room.equipments.includes(requirement.equipmentsKeyword))
|
|
@@ -303,6 +341,7 @@ export async function recommendRooms(env, input) {
|
|
|
303
341
|
place: room.place,
|
|
304
342
|
equipments: room.equipments,
|
|
305
343
|
roomAttrText: room.roomAttrText,
|
|
344
|
+
...(room.floor !== null && room.floor !== undefined ? { floor: room.floor } : {}),
|
|
306
345
|
...(String(room.roomDesc ?? '').trim() !== '' ? { roomDesc: String(room.roomDesc).trim() } : {}),
|
|
307
346
|
frequentCount: freq?.count ?? 0,
|
|
308
347
|
score,
|
|
@@ -389,7 +428,8 @@ export const ebRoomRecommendOperation = {
|
|
|
389
428
|
mrType: { type: 'string', description: '会议室类型 id(mr_type)' },
|
|
390
429
|
roomAttr: { type: 'string', enum: ['0', '1', '2'], description: '会议室属性:0 实体 / 1 虚拟 / 2 组合' },
|
|
391
430
|
equipmentsKeyword: { type: 'string', description: '设备关键词(模糊匹配 equipments,如 投影/视频)' },
|
|
392
|
-
hasCustomer: { type: 'boolean', description: '本次会议是否带客户:true
|
|
431
|
+
hasCustomer: { type: 'boolean', description: '本次会议是否带客户:true 时优先推荐接待类会议室(名称或描述含 接待/招待/贵宾/商务 的加 35 分)' },
|
|
432
|
+
floor: { type: 'number', description: '只要某层(如 1 表示一楼):按会议室名称/描述推断楼层过滤(120会议室=1楼、1007会议室=10楼、601-8=6楼)' },
|
|
393
433
|
topN: { type: 'number', description: '返回候选数量(默认 3,最多 10)' },
|
|
394
434
|
refresh: { type: 'boolean', description: 'true=刷新会议室全量与常用记录缓存' },
|
|
395
435
|
includeBusy: { type: 'boolean', description: 'true=把该时段已被占用的会议室也返回(排在最后,带说明)' },
|
|
@@ -413,6 +453,8 @@ export const ebRoomRecommendOperation = {
|
|
|
413
453
|
// 2026-11-04 修:以前漏了它 —— 用户传了 hasCustomer,打分却读 requirement.hasCustomer,永远 false
|
|
414
454
|
...(args.hasCustomer === true ? { hasCustomer: true } : {}),
|
|
415
455
|
},
|
|
456
|
+
// ⛔ floor 是 RecommendRoomInput 的**顶层**字段(放 requirement 里会被忽略,2026-11-06 踩到)
|
|
457
|
+
...(Number.isFinite(Number(args.floor)) ? { floor: Number(args.floor) } : {}),
|
|
416
458
|
...(args.topN !== undefined ? { topN: Number(args.topN) } : {}),
|
|
417
459
|
...(args.refresh === true ? { refreshRooms: true, refreshFrequent: true } : {}),
|
|
418
460
|
...(args.includeBusy === true ? { includeBusy: true } : {}),
|
|
@@ -439,7 +481,7 @@ export async function rememberFrequentRoom(env, roomId) {
|
|
|
439
481
|
if (!id)
|
|
440
482
|
return false;
|
|
441
483
|
const scope = await cacheScopeSuffix(env);
|
|
442
|
-
const roomsCached = await readCache(env, `rooms-
|
|
484
|
+
const roomsCached = await readCache(env, `rooms-v4-${scope}`, { ttlMs: ROOMS_TTL_MS });
|
|
443
485
|
const name = roomsCached?.data?.find((room) => room.id === id)?.name ?? '';
|
|
444
486
|
if (!name)
|
|
445
487
|
return false;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 邀请函 → E10 文档(2026-11-06 用户需求)。
|
|
3
|
+
*
|
|
4
|
+
* 链路:`meeting.invitation.render`(模板填充,已有)→ `caizhilian.document.create-office`
|
|
5
|
+
* (上传 Office 文件并直接生成文档,源 create_office_document)→ 返回 `docId`。
|
|
6
|
+
*
|
|
7
|
+
* 拿到 docId 后由建会链路写入表单「邀请函」字段(Document 组件):
|
|
8
|
+
* `extraFields: { "邀请函": [{ id: docId, name: 文档名 }] }`
|
|
9
|
+
* (字段值格式 2026-11-06 真机实测:键用**字段 id** 1334688905776169004,值 `[{id,name}]`;
|
|
10
|
+
* 传 dataKey `yqh` 服务端认不到;隐藏字段同样能写入。)
|
|
11
|
+
*/
|
|
12
|
+
import { win32 } from 'node:path';
|
|
13
|
+
import { meetingValidationError } from '../errors.js';
|
|
14
|
+
import { meetingSuccess, SCHEMA_ID } from './types.js';
|
|
15
|
+
/** 邀请函默认落库目录(2026-11-06 用户指定:文档中心目录 300,公共文档)。 */
|
|
16
|
+
const DEFAULT_FOLDER_ID = '300';
|
|
17
|
+
const DEFAULT_FOLDER_TYPE = 'company';
|
|
18
|
+
function normalizeWinPath(path) {
|
|
19
|
+
// ⛔ create-office 的 apply 会拿 file_path 字符串和 prepare 时的指纹**逐字**比对,
|
|
20
|
+
// 斜杠方向不同就报「参数 file_path 与 prepare 时不一致」(2026-11-06 真机踩到)。
|
|
21
|
+
// 统一成 Windows 反斜杠绝对路径。
|
|
22
|
+
return win32.normalize(path);
|
|
23
|
+
}
|
|
24
|
+
const meetingInvitationPublish = {
|
|
25
|
+
name: 'meeting.invitation.publish',
|
|
26
|
+
resource: 'invitation',
|
|
27
|
+
method: 'publish',
|
|
28
|
+
action: 'meeting.invitation.publish',
|
|
29
|
+
summary: '生成邀请函并**发布成 E10 文档**:模板填充 → 上传到文档中心(默认目录 300)→ 返回 docId。'
|
|
30
|
+
+ '拿到后把 `extraFields: {"邀请函":[{"id":docId,"name":文档名}]}` 传给建会接口即可写进表单。'
|
|
31
|
+
+ '会真实创建文档(需 confirm: true)。',
|
|
32
|
+
capability: 'invitation',
|
|
33
|
+
risk: 'high-risk-write',
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
properties: {
|
|
38
|
+
mtId: { ...SCHEMA_ID, description: '会议 id(与下面字段二选一):有则按真实会议数据生成' },
|
|
39
|
+
mt_name: { type: 'string', description: '会议名称(无 mtId 时必填)' },
|
|
40
|
+
begin_datetime: { type: 'string', description: '开始时间 yyyy-MM-dd HH:mm' },
|
|
41
|
+
end_datetime: { type: 'string', description: '结束时间 yyyy-MM-dd HH:mm' },
|
|
42
|
+
address: { type: 'string', description: '会议地点(名称)' },
|
|
43
|
+
hrm_members: { type: 'string', description: '参会人姓名(逗号/顿号分隔)' },
|
|
44
|
+
mt_desc: { type: 'string', description: '会议内容' },
|
|
45
|
+
org_members: { type: 'string', description: '落款单位' },
|
|
46
|
+
caller: { type: 'string', description: '召集人' },
|
|
47
|
+
contacter: { type: 'string', description: '联系人' },
|
|
48
|
+
total_member: { type: 'string', description: '参会人数' },
|
|
49
|
+
extra: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
additionalProperties: { type: 'string' },
|
|
52
|
+
description: '自定义字段(如 guest_org=客户单位;agenda=议程)',
|
|
53
|
+
},
|
|
54
|
+
doc_name: { type: 'string', description: '文档名,默认「邀请函-<会议名>-<日期>」' },
|
|
55
|
+
folder_id: { type: 'string', description: `文档中心目录 id,默认 ${DEFAULT_FOLDER_ID}` },
|
|
56
|
+
folder_type: { type: 'string', enum: ['company', 'privy', 'sys'], description: `目录类型,默认 ${DEFAULT_FOLDER_TYPE}` },
|
|
57
|
+
confirm: { type: 'boolean', description: '必须显式传 true —— 会真实创建一篇文档' },
|
|
58
|
+
},
|
|
59
|
+
required: ['confirm'],
|
|
60
|
+
},
|
|
61
|
+
handler: async (args, env) => {
|
|
62
|
+
if (args.confirm !== true) {
|
|
63
|
+
throw meetingValidationError('confirm_required', '会真实创建文档,必须显式传 confirm: true(可先不带 confirm 调 meeting.invitation.render 预览正文)');
|
|
64
|
+
}
|
|
65
|
+
const { getMeetingOperation } = await import('./registry.js');
|
|
66
|
+
const render = getMeetingOperation('meeting.invitation.render');
|
|
67
|
+
const rendered = await render.handler({
|
|
68
|
+
...(args.mtId !== undefined ? { mtId: args.mtId } : {}),
|
|
69
|
+
...(args.mt_name !== undefined ? { mt_name: args.mt_name } : {}),
|
|
70
|
+
...(args.begin_datetime !== undefined ? { begin_datetime: args.begin_datetime } : {}),
|
|
71
|
+
...(args.end_datetime !== undefined ? { end_datetime: args.end_datetime } : {}),
|
|
72
|
+
...(args.address !== undefined ? { address: args.address } : {}),
|
|
73
|
+
...(args.hrm_members !== undefined ? { hrm_members: args.hrm_members } : {}),
|
|
74
|
+
...(args.mt_desc !== undefined ? { mt_desc: args.mt_desc } : {}),
|
|
75
|
+
...(args.org_members !== undefined ? { org_members: args.org_members } : {}),
|
|
76
|
+
...(args.caller !== undefined ? { caller: args.caller } : {}),
|
|
77
|
+
...(args.contacter !== undefined ? { contacter: args.contacter } : {}),
|
|
78
|
+
...(args.total_member !== undefined ? { total_member: args.total_member } : {}),
|
|
79
|
+
...(args.extra !== undefined ? { extra: args.extra } : {}),
|
|
80
|
+
}, env);
|
|
81
|
+
const filePath = String(rendered?.data?.filePath ?? '').trim();
|
|
82
|
+
if (!filePath)
|
|
83
|
+
throw meetingValidationError('render_failed', '邀请函 docx 未生成(render 未返回 filePath)');
|
|
84
|
+
const session = await env.host.getSession();
|
|
85
|
+
const authorId = String(session?.userId ?? '').trim();
|
|
86
|
+
if (!authorId)
|
|
87
|
+
throw meetingValidationError('session_missing', '拿不到当前登录人,无法创建文档');
|
|
88
|
+
const docName = String(args.doc_name ?? '').trim()
|
|
89
|
+
|| String(rendered?.data?.fileName ?? '').replace(/\.docx$/i, '')
|
|
90
|
+
|| '邀请函';
|
|
91
|
+
const caizhilianArgs = {
|
|
92
|
+
file_path: normalizeWinPath(filePath),
|
|
93
|
+
name: docName,
|
|
94
|
+
folder_id: String(args.folder_id ?? DEFAULT_FOLDER_ID),
|
|
95
|
+
folder_type: String(args.folder_type ?? DEFAULT_FOLDER_TYPE),
|
|
96
|
+
author_id: authorId,
|
|
97
|
+
};
|
|
98
|
+
const { executeCaizhilianOperation } = await import('../../caizhilian/operations.js');
|
|
99
|
+
const { createCaizhilianHost } = await import('../../caizhilian/host.js');
|
|
100
|
+
const { createCaizhilianContinuationSigner } = await import('../../caizhilian/continuation.js');
|
|
101
|
+
const caizhilianEnv = {
|
|
102
|
+
ctx: env.ctx,
|
|
103
|
+
host: createCaizhilianHost(env.ctx),
|
|
104
|
+
continuation: createCaizhilianContinuationSigner(env.ctx),
|
|
105
|
+
};
|
|
106
|
+
// prepare 只校验/预览;apply 用**完全相同**的入参 + continuation 才不会被判「目标变了」
|
|
107
|
+
const prepared = await executeCaizhilianOperation('caizhilian.document.create-office.prepare', caizhilianArgs, caizhilianEnv);
|
|
108
|
+
const continuation = String(prepared?.data?.continuation ?? '');
|
|
109
|
+
if (!continuation) {
|
|
110
|
+
throw meetingValidationError('publish_prepare_failed', 'create-office.prepare 未返回 continuation');
|
|
111
|
+
}
|
|
112
|
+
const applied = await executeCaizhilianOperation('caizhilian.document.create-office.apply', { ...caizhilianArgs, continuation, confirm: true }, caizhilianEnv);
|
|
113
|
+
const docId = String(applied?.data?.doc_id ?? '').trim();
|
|
114
|
+
if (!docId)
|
|
115
|
+
throw meetingValidationError('publish_failed', 'create-office.apply 未返回 doc_id');
|
|
116
|
+
return meetingSuccess('meeting.invitation.publish', {
|
|
117
|
+
docId,
|
|
118
|
+
docName,
|
|
119
|
+
filePath,
|
|
120
|
+
folderId: caizhilianArgs.folder_id,
|
|
121
|
+
folderType: caizhilianArgs.folder_type,
|
|
122
|
+
// 直接可用的表单字段值(建会时放进 extraFields.邀请函)
|
|
123
|
+
formFieldValue: [{ id: docId, name: docName }],
|
|
124
|
+
// 对话里要贴正文,别只给 id
|
|
125
|
+
text: rendered?.data?.text ?? '',
|
|
126
|
+
pendingFields: rendered?.data?.pendingFields ?? [],
|
|
127
|
+
}, {
|
|
128
|
+
...(Array.isArray(applied?.warnings) && applied.warnings.length > 0 ? { warnings: applied.warnings } : {}),
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
export const meetingInvitationPublishOperations = [meetingInvitationPublish];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../errors.js';
|
|
3
4
|
import { meetingSuccess, SCHEMA_ID } from './types.js';
|
|
4
5
|
import { assertMeetingExists, mergeSnapshot, toIdString } from './shared.js';
|
|
5
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
6
6
|
function fingerprint(value) {
|
|
7
7
|
return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { meetingPartialError, meetingValidationError } from '../errors.js';
|
|
3
4
|
import { meetingSuccess, SCHEMA_ID } from './types.js';
|
|
4
5
|
import { extractRows, mergeSnapshot, pickBusinessInput, toIdString } from './shared.js';
|
|
5
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
6
6
|
function fingerprint(value) {
|
|
7
7
|
return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
|
|
8
8
|
}
|
|
@@ -17,6 +17,7 @@ import { meetingMinuteFromGroupChatOperations } from './from-group-chat.js';
|
|
|
17
17
|
import { meetingDecisionNotifyOperations } from './task-notify.js';
|
|
18
18
|
import { meetingPipelineOperations } from './pipeline.js';
|
|
19
19
|
import { meetingInvitationOperations } from './invitation.js';
|
|
20
|
+
import { meetingInvitationPublishOperations } from './invitation-publish.js';
|
|
20
21
|
import { meetingQrOperations } from './qrcode.js';
|
|
21
22
|
import { meetingSummaryOperations } from './summary.js';
|
|
22
23
|
import { meetingFormFieldOperations } from './form-fields.js';
|
|
@@ -42,6 +43,7 @@ function buildRegistry() {
|
|
|
42
43
|
...meetingDecisionNotifyOperations,
|
|
43
44
|
...meetingPipelineOperations,
|
|
44
45
|
...meetingInvitationOperations,
|
|
46
|
+
...meetingInvitationPublishOperations,
|
|
45
47
|
...meetingQrOperations,
|
|
46
48
|
...meetingSummaryOperations,
|
|
47
49
|
...meetingFormFieldOperations,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { meetingConfirmationError, meetingPartialError, meetingValidationError } from '../errors.js';
|
|
3
4
|
import { meetingSuccess, SCHEMA_ID } from './types.js';
|
|
4
5
|
import { extractRows, mergeSnapshot, pickBusinessInput, toIdString } from './shared.js';
|
|
5
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
6
6
|
function fingerprint(value) {
|
|
7
7
|
return createHash('sha256').update(JSON.stringify(value ?? null)).digest('hex').slice(0, 32);
|
|
8
8
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createOkrContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createOkrContinuationSigner } from './continuation.js';
|
|
4
5
|
import { okrValidationError } from './errors.js';
|
|
5
6
|
import { createOkrHost } from './host.js';
|
|
@@ -83,6 +84,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
83
84
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
84
85
|
}
|
|
85
86
|
catch (error) {
|
|
87
|
+
reportPlatformError(error);
|
|
86
88
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
87
89
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
88
90
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { okrApiError, okrPartialError, okrValidationError } from '../errors.js';
|
|
2
3
|
import { businessMessage, isDatajsonSuccess, isFlagSuccess } from '../host.js';
|
|
3
4
|
import { buildStandardSaveBody, createDetailUrlResolver, fetchGoalRaw, goalPrincipalId, okrAbsoluteUrl, resolveLink, } from './link.js';
|
|
4
5
|
import { assertLinkSupported, compact, ebPeriodFields, ensureConfirmLease, fingerprint, optionValue, resolvePeriod, toIdString, toPersonIdListText, toPersonIdString, } from './shared.js';
|
|
5
6
|
import { okrSuccess, schemaOf, SCHEMA_DATE, SCHEMA_ID, SCHEMA_ID_LIST_TEXT, SCHEMA_PERSON_ID, SCHEMA_PERIOD_TYPE, SCHEMA_QUARTER, SCHEMA_SCOPE, } from './types.js';
|
|
6
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
7
7
|
/** ebuilder 新建目标接口支持的 mainTable 字段(源资料 okr_createGoal 传入字段)。 */
|
|
8
8
|
const EB_CREATE_KEYS = [
|
|
9
9
|
'principal_dept',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createPlanContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createPlanContinuationSigner } from './continuation.js';
|
|
4
5
|
import { planValidationError } from './errors.js';
|
|
5
6
|
import { createPlanHost } from './host.js';
|
|
@@ -83,6 +84,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
83
84
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
84
85
|
}
|
|
85
86
|
catch (error) {
|
|
87
|
+
reportPlatformError(error);
|
|
86
88
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
87
89
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
88
90
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_SECONDS } from '../../../core/continuation-ttl.js';
|
|
1
2
|
import { isPlanErrorType, planApiError, planPartialError, planValidationError } from '../errors.js';
|
|
2
3
|
import { businessMessage, isDatajsonSuccess, isFlagSuccess, isWeaverCodeSuccess, } from '../host.js';
|
|
3
4
|
import { POST_STATUS_LABELS, SCHEMA_ID, SCHEMA_REPORT_TYPE, planSuccess, schemaOf, } from './types.js';
|
|
4
5
|
import { assertLinkSupported, assertReportType, compact, defaultRemindContent, ensureConfirmLease, fingerprint, resolveSerialNumber, resolveYear, toIdListText, toIdString, } from './shared.js';
|
|
5
6
|
import { buildDetailUrl, lookupReport, resolveLink } from './link.js';
|
|
6
|
-
const CONTINUATION_TTL_SECONDS = 600;
|
|
7
7
|
const REMIND_MESSAGE_EVENT_CODE = 14;
|
|
8
8
|
const BODY_KEYS = ['content', 'summary', 'plans'];
|
|
9
9
|
function textField(value, field) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CONTINUATION_TTL_MS } from '../../core/continuation-ttl.js';
|
|
1
2
|
import { createHmac, randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
3
|
import { existsSync } from 'node:fs';
|
|
3
4
|
import { chmod, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
@@ -35,7 +36,7 @@ function signature(payload, key) {
|
|
|
35
36
|
}
|
|
36
37
|
export function createProjectContinuationSigner(ctx) {
|
|
37
38
|
return {
|
|
38
|
-
async issue(payload, ttlMs =
|
|
39
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
39
40
|
const issuedAt = Date.now();
|
|
40
41
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
41
42
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
|
+
import { reportPlatformError } from '../../core/error-codes.js';
|
|
3
4
|
import { createProjectContinuationSigner } from './continuation.js';
|
|
4
5
|
import { createProjectHost } from './host.js';
|
|
5
6
|
import { projectManifest } from './manifest.js';
|
|
@@ -79,6 +80,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
79
80
|
ctx.output.write(successEnvelope(operation, result), { json: true });
|
|
80
81
|
}
|
|
81
82
|
catch (error) {
|
|
83
|
+
reportPlatformError(error);
|
|
82
84
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
83
85
|
process.exitCode = isCliError(error) ? error.exitCode : ExitCode.GeneralError;
|
|
84
86
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reception 域常量。
|
|
3
|
+
*
|
|
4
|
+
* 与环境有关的路径一律不写死在这里:状态目录由 `stateRoot(ctx)` 提供,
|
|
5
|
+
* 模板与 render.py 由技能包自带、通过参数或快照同目录推导。
|
|
6
|
+
*/
|
|
7
|
+
/** 目标流程名。可用 --workflow 覆盖,用于同租户内的变体流程。 */
|
|
8
|
+
export const DEFAULT_WORKFLOW = '泛微客户参观接待流程';
|
|
9
|
+
/** 状态目录名,落在 `<stateRoot>/reception/` 下,跟 profile 走。 */
|
|
10
|
+
export const STATE_SUBDIR = 'reception';
|
|
11
|
+
/** 产物默认输出目录(宿主不传 --out-dir 时)。 */
|
|
12
|
+
export const DEFAULT_OUT_DIR_WIN = '.reception-cli/out';
|
|
13
|
+
export const DEFAULT_OUT_DIR_POSIX = '/workspace/files';
|
|
14
|
+
/** 后勤 6 项 + 手机号:不给预设选项,一律手动填写。 */
|
|
15
|
+
export const LOGISTICS_FIELDS = ['headcount', 'meetingRoom', 'pickup', 'meal', 'hotel', 'gift'];
|
|
16
|
+
export const LOGISTICS_LABEL = {
|
|
17
|
+
headcount: '人数',
|
|
18
|
+
meetingRoom: '会议室',
|
|
19
|
+
pickup: '接送/用车',
|
|
20
|
+
meal: '用餐',
|
|
21
|
+
hotel: '住宿',
|
|
22
|
+
gift: '伴手礼',
|
|
23
|
+
mobile: '手机',
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 面板标题。宿主硬约束(实测):title 严格单行,超长直接截断成「…」。
|
|
27
|
+
* 只留一句短话,完整样例放 placeholder,口径放 hint(不渲染,仅模型兜底)。
|
|
28
|
+
*/
|
|
29
|
+
export const LOGISTICS_TITLE = '接待细节(人数、具体安排、用餐情况等)';
|
|
30
|
+
/** 输入框灰字:固定字段清单。样例里的手机号会被宿主脱敏成 [[PHONE_001]],所以不给样例。 */
|
|
31
|
+
export const LOGISTICS_PLACEHOLDER = '客户人数、是否会议、是否接送、是否用餐、是否代订住宿、是否伴手礼、陪同人员手机号';
|
|
32
|
+
/** 模型侧兜底口径。宿主不渲染 hint,切勿并入 title。 */
|
|
33
|
+
export const LOGISTICS_HINT = [
|
|
34
|
+
'照输入框灰字样例写,逗号或「|」隔开都行;没定的项直接不写。',
|
|
35
|
+
'人数:如「10人」',
|
|
36
|
+
'会议室:总部129 / 总部130 / 总部131,或「不需会议室」',
|
|
37
|
+
'接送/用车:如「虹桥接机2辆商务车 10:00」或「不用车」',
|
|
38
|
+
'用餐:公司食堂 / 小餐厅 / 外部餐厅 / 不用餐',
|
|
39
|
+
'住宿:如「2间大床房住1晚」或「不住」',
|
|
40
|
+
'伴手礼:如「礼盒每人1份」或「不用」',
|
|
41
|
+
'手机:11 位,只用于行程单显示接待人联系方式(系统不查员工手机号)',
|
|
42
|
+
].join('\n');
|
|
43
|
+
/** 客户需求面板的固定选项。取值为原文,模型检索案例时直接用它拼检索词。 */
|
|
44
|
+
export const CUSTOMER_NEED_OPTIONS = [
|
|
45
|
+
'了解泛微产品与政务行业解决方案',
|
|
46
|
+
'参观总部环境与展厅,了解公司实力',
|
|
47
|
+
'交流具体项目合作与实施细节',
|
|
48
|
+
'暂未确定,先进待办',
|
|
49
|
+
];
|
|
50
|
+
/** 快照文件的 kind 标识,用于拒收无关 JSON。 */
|
|
51
|
+
export const SNAPSHOT_KIND = 'reception-fields-snapshot';
|
|
52
|
+
/** python 探测结果的缓存时长(7 天)。 */
|
|
53
|
+
export const PYTHON_CACHE_TTL_MS = 7 * 24 * 3600 * 1000;
|