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
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
stateDir
|
|
5
|
+
} from "./chunk-AJ62BGAW.js";
|
|
6
|
+
import {
|
|
7
|
+
reportPlatformError
|
|
8
|
+
} from "./chunk-6N4JPNFL.js";
|
|
9
|
+
import {
|
|
10
|
+
CONTINUATION_TTL_MS
|
|
11
|
+
} from "./chunk-7BDPM5ST.js";
|
|
3
12
|
import {
|
|
4
13
|
E10ApiError,
|
|
5
14
|
createE10RequestRuntime,
|
|
6
15
|
isE10SessionExpiredResponse,
|
|
7
16
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6NXT4ICB.js";
|
|
9
18
|
import {
|
|
10
19
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
11
|
-
getActiveProfile
|
|
12
|
-
|
|
20
|
+
getActiveProfile,
|
|
21
|
+
hasXiaoEEnv,
|
|
22
|
+
writeWithRetry
|
|
23
|
+
} from "./chunk-U6R6FZHD.js";
|
|
13
24
|
import {
|
|
14
25
|
CliError,
|
|
15
26
|
isCliError,
|
|
16
27
|
toErrorEnvelope
|
|
17
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UG5G54VL.js";
|
|
18
29
|
import "./chunk-BUSC6UAE.js";
|
|
19
30
|
|
|
20
31
|
// src/shortcuts/archive/index.ts
|
|
@@ -420,7 +431,7 @@ function signature(payload, key) {
|
|
|
420
431
|
}
|
|
421
432
|
function createArchiveContinuationSigner(ctx) {
|
|
422
433
|
return {
|
|
423
|
-
async issue(payload, ttlMs =
|
|
434
|
+
async issue(payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
424
435
|
const issuedAt = Date.now();
|
|
425
436
|
const body = encode({ ...payload, issuedAt, expiresAt: issuedAt + ttlMs });
|
|
426
437
|
const sig = signature(body, await loadKey(ctx));
|
|
@@ -658,6 +669,37 @@ function schemaOf(properties, options = {}) {
|
|
|
658
669
|
|
|
659
670
|
// src/shortcuts/archive/operations/shared.ts
|
|
660
671
|
var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
672
|
+
function buildOpenAction(ctx, url, title = "\u6253\u5F00\u94FE\u63A5") {
|
|
673
|
+
const base = {
|
|
674
|
+
url,
|
|
675
|
+
markdown: `[${title}](${url})`,
|
|
676
|
+
requiresHostAction: true,
|
|
677
|
+
opened: false,
|
|
678
|
+
clientAction: { type: "openUrl", url }
|
|
679
|
+
};
|
|
680
|
+
if (!isXiaoECtx(ctx)) return { ...base, hasXiaoEEnv: false };
|
|
681
|
+
return {
|
|
682
|
+
...base,
|
|
683
|
+
hasXiaoEEnv: true,
|
|
684
|
+
browserTool: buildBrowserToolPayload(url, title)
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
function isXiaoECtx(ctx) {
|
|
688
|
+
const options = typeof ctx?.getGlobalOptions === "function" ? ctx.getGlobalOptions() : void 0;
|
|
689
|
+
return hasXiaoEEnv(ctx?.env ?? process.env, options);
|
|
690
|
+
}
|
|
691
|
+
function buildBrowserToolPayload(url, title) {
|
|
692
|
+
return {
|
|
693
|
+
version: "1.0",
|
|
694
|
+
callId: "archive_open",
|
|
695
|
+
toolId: "open_web",
|
|
696
|
+
// activate: false / autoOpen: false —— 不自动激活、不自动弹出,由用户在客户端里自行点击打开
|
|
697
|
+
arguments: { url, title, activate: false, autoOpen: false }
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
function buildBrowserToolCell(url, title = "\u6253\u5F00\u6863\u6848") {
|
|
701
|
+
return `<browsertool>${JSON.stringify(buildBrowserToolPayload(url, title))}</browsertool>`;
|
|
702
|
+
}
|
|
661
703
|
function asObject(value) {
|
|
662
704
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
663
705
|
throw archiveValidationError("input_not_object", "\u8F93\u5165\u5FC5\u987B\u662F JSON \u5BF9\u8C61");
|
|
@@ -833,7 +875,7 @@ function requireConfirm(args, action) {
|
|
|
833
875
|
});
|
|
834
876
|
}
|
|
835
877
|
}
|
|
836
|
-
async function issueLease(env, action, payload, ttlMs =
|
|
878
|
+
async function issueLease(env, action, payload, ttlMs = CONTINUATION_TTL_MS) {
|
|
837
879
|
const session = await env.host.getSession();
|
|
838
880
|
const continuation = await env.continuation.issue(
|
|
839
881
|
{
|
|
@@ -1055,7 +1097,7 @@ var prelibList = {
|
|
|
1055
1097
|
},
|
|
1056
1098
|
{ description: "\u67E5\u8BE2\u7535\u5B50\u6587\u4EF6\u5E93\u5217\u8868" }
|
|
1057
1099
|
),
|
|
1058
|
-
handler: async (args, { host }) => {
|
|
1100
|
+
handler: async (args, { ctx, host }) => {
|
|
1059
1101
|
const node = await resolveEfileNode(host, optionalText(args.treeId));
|
|
1060
1102
|
const detail = await fetchTreeDetail(host, node.treeId);
|
|
1061
1103
|
const page = await fetchPrelibDatas(host, node, detail, args.pageNo);
|
|
@@ -1066,6 +1108,15 @@ var prelibList = {
|
|
|
1066
1108
|
const path = `${PRELIB_FILE_LIB_EDIT_PATH}?${new URLSearchParams({ singleMetaId: id, treeId: node.treeId }).toString()}`;
|
|
1067
1109
|
return id && root ? `${root}${path}` : "";
|
|
1068
1110
|
});
|
|
1111
|
+
const firstColumn = String(page.visibleColumns[0]?.dataIndex ?? "");
|
|
1112
|
+
const rowNames = openUrls.map((url, index) => {
|
|
1113
|
+
if (!url) return "";
|
|
1114
|
+
return String(
|
|
1115
|
+
page.displayData[index]?.[firstColumn] ?? page.rows[index]?.[firstColumn] ?? "\u6253\u5F00\u6863\u6848"
|
|
1116
|
+
);
|
|
1117
|
+
});
|
|
1118
|
+
const openEnv = buildOpenAction(ctx, openUrls[0] ?? "", "\u6253\u5F00\u6863\u6848");
|
|
1119
|
+
const browserToolCells = openEnv.hasXiaoEEnv ? openUrls.map((url, index) => url ? buildBrowserToolCell(url, rowNames[index]) : "") : void 0;
|
|
1069
1120
|
return archiveSuccess(
|
|
1070
1121
|
"archive.prelib.list",
|
|
1071
1122
|
{
|
|
@@ -1077,7 +1128,10 @@ var prelibList = {
|
|
|
1077
1128
|
url1: detail.url1,
|
|
1078
1129
|
...detail.boxUrl ? { boxUrl: detail.boxUrl } : {},
|
|
1079
1130
|
...page,
|
|
1080
|
-
openUrls
|
|
1131
|
+
openUrls,
|
|
1132
|
+
hasXiaoEEnv: openEnv.hasXiaoEEnv,
|
|
1133
|
+
...browserToolCells ? { browserToolCells } : {},
|
|
1134
|
+
requiresHostAction: openEnv.requiresHostAction
|
|
1081
1135
|
},
|
|
1082
1136
|
{ count: page.rows.length, nodeName: node.nodeName }
|
|
1083
1137
|
);
|
|
@@ -1323,6 +1377,7 @@ var prelibOpen = {
|
|
|
1323
1377
|
url: root ? `${root}${path}` : path
|
|
1324
1378
|
};
|
|
1325
1379
|
});
|
|
1380
|
+
const open = links.length === 1 ? buildOpenAction(env.ctx, String(links[0].url), "\u6253\u5F00\u6863\u6848") : null;
|
|
1326
1381
|
return archiveSuccess(
|
|
1327
1382
|
"archive.prelib.open",
|
|
1328
1383
|
{
|
|
@@ -1331,8 +1386,16 @@ var prelibOpen = {
|
|
|
1331
1386
|
metadataId,
|
|
1332
1387
|
count: links.length,
|
|
1333
1388
|
links,
|
|
1334
|
-
...
|
|
1335
|
-
|
|
1389
|
+
...open ? {
|
|
1390
|
+
url: open.url,
|
|
1391
|
+
markdown: open.markdown,
|
|
1392
|
+
hasXiaoEEnv: open.hasXiaoEEnv,
|
|
1393
|
+
...open.browserTool ? { browserTool: open.browserTool } : {},
|
|
1394
|
+
requiresHostAction: open.requiresHostAction,
|
|
1395
|
+
opened: open.opened,
|
|
1396
|
+
clientAction: open.clientAction
|
|
1397
|
+
} : {},
|
|
1398
|
+
hint: open?.hasXiaoEEnv ? "\u59CB\u7EC8\u628A markdown \u7684 Markdown \u8D85\u94FE\u63A5\uFF08a \u6807\u7B7E\uFF09\u8FD4\u56DE\uFF0C\u4FDD\u8BC1\u53EF\u70B9\u51FB\uFF08\u9700\u5DF2\u767B\u5F55\u8BE5\u73AF\u5883\u4E14\u6709\u8BE5\u6863\u6848\u67E5\u770B\u6743\u9650\uFF09\uFF1BbrowserTool \u662F <browsertool> \u7684\u53C2\u6570\uFF0C\u5E8F\u5217\u5316\u6210\u5355\u884C\u6807\u7B7E\u540E\u653E\u5728\u8FD9\u6761\u6570\u636E\u4E4B\u540E\u5355\u72EC\u4E00\u884C\u6E32\u67D3\uFF0C\u5C0FE \u5BA2\u6237\u7AEF\u636E\u6B64\u5728\u53F3\u4FA7\u5185\u7F6E\u6D4F\u89C8\u5668\u6253\u5F00\uFF1Bopened \u6052\u4E3A false" : "\u59CB\u7EC8\u628A markdown \u7684 Markdown \u8D85\u94FE\u63A5\uFF08a \u6807\u7B7E\uFF09\u8FD4\u56DE\uFF0C\u4FDD\u8BC1\u53EF\u70B9\u51FB\uFF08\u9700\u5DF2\u767B\u5F55\u8BE5\u73AF\u5883\u4E14\u6709\u8BE5\u6863\u6848\u67E5\u770B\u6743\u9650\uFF09\uFF1B\u6253\u5F00\u52A8\u4F5C\u6309 clientAction\uFF08type: openUrl\uFF09\u7531\u5BBF\u4E3B\u6267\u884C\uFF0C\u8D70\u7CFB\u7EDF\u9ED8\u8BA4\u6D4F\u89C8\u5668\uFF1BCLI \u4E0D\u81EA\u52A8\u6253\u5F00\u6D4F\u89C8\u5668"
|
|
1336
1399
|
}
|
|
1337
1400
|
);
|
|
1338
1401
|
}
|
|
@@ -1484,6 +1547,8 @@ var searchOperations = [searchRun];
|
|
|
1484
1547
|
|
|
1485
1548
|
// src/shortcuts/archive/operations/getPageUrl.ts
|
|
1486
1549
|
import { randomBytes as randomBytes3 } from "node:crypto";
|
|
1550
|
+
import { mkdirSync, readFileSync } from "node:fs";
|
|
1551
|
+
import { join } from "node:path";
|
|
1487
1552
|
var ARCHIVE_APP_TAG = "archive_wsd";
|
|
1488
1553
|
var BORROW_CAR_TAG = "uf_arc_borrow_car";
|
|
1489
1554
|
var BORROWING_TAG = "uf_arc_borrowing";
|
|
@@ -1598,6 +1663,62 @@ async function fetchArchiveListDatas(host, target, pageNo, logFlag) {
|
|
|
1598
1663
|
...total === void 0 ? {} : { total }
|
|
1599
1664
|
};
|
|
1600
1665
|
}
|
|
1666
|
+
var borrowFormIdCache = /* @__PURE__ */ new Map();
|
|
1667
|
+
var FORM_ID_CACHE_FILE = "archive-form-ids.json";
|
|
1668
|
+
function borrowFormIdCacheKey(session) {
|
|
1669
|
+
const baseUrl = String(session?.baseUrl ?? "").replace(/\/+$/, "");
|
|
1670
|
+
return `${baseUrl}|${String(session?.tenantKey ?? "")}`;
|
|
1671
|
+
}
|
|
1672
|
+
function readFormIdCache(ctx) {
|
|
1673
|
+
try {
|
|
1674
|
+
const raw = readFileSync(join(stateDir(ctx), FORM_ID_CACHE_FILE), "utf8");
|
|
1675
|
+
const parsed = JSON.parse(raw);
|
|
1676
|
+
const forms = parsed?.forms;
|
|
1677
|
+
if (!forms || typeof forms !== "object") return {};
|
|
1678
|
+
const out = {};
|
|
1679
|
+
for (const [key, value] of Object.entries(forms)) {
|
|
1680
|
+
const text = String(value ?? "").trim();
|
|
1681
|
+
if (text) out[key] = text;
|
|
1682
|
+
}
|
|
1683
|
+
return out;
|
|
1684
|
+
} catch {
|
|
1685
|
+
return {};
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
function persistFormIdCache(ctx, key, formId) {
|
|
1689
|
+
try {
|
|
1690
|
+
const dir = stateDir(ctx);
|
|
1691
|
+
mkdirSync(dir, { recursive: true });
|
|
1692
|
+
const forms = { ...readFormIdCache(ctx), [key]: formId };
|
|
1693
|
+
writeWithRetry(
|
|
1694
|
+
join(dir, FORM_ID_CACHE_FILE),
|
|
1695
|
+
`${JSON.stringify({ version: 1, forms }, null, 2)}
|
|
1696
|
+
`,
|
|
1697
|
+
{ mode: 384 }
|
|
1698
|
+
);
|
|
1699
|
+
} catch {
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
async function resolveBorrowFormId(host, session, ctx) {
|
|
1703
|
+
const key = borrowFormIdCacheKey(session);
|
|
1704
|
+
const cached = borrowFormIdCache.get(key);
|
|
1705
|
+
if (cached) return cached;
|
|
1706
|
+
const persisted = readFormIdCache(ctx)[key];
|
|
1707
|
+
if (persisted) {
|
|
1708
|
+
borrowFormIdCache.set(key, persisted);
|
|
1709
|
+
return persisted;
|
|
1710
|
+
}
|
|
1711
|
+
try {
|
|
1712
|
+
const target = await resolveArchiveListTarget(host, { sign: BORROWING_TAG, viewMode: "myBorrow" });
|
|
1713
|
+
const formId = String(target?.objId ?? "").trim();
|
|
1714
|
+
if (!formId) return "";
|
|
1715
|
+
borrowFormIdCache.set(key, formId);
|
|
1716
|
+
persistFormIdCache(ctx, key, formId);
|
|
1717
|
+
return formId;
|
|
1718
|
+
} catch {
|
|
1719
|
+
return "";
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1601
1722
|
|
|
1602
1723
|
// src/shortcuts/archive/operations/borrow-car.ts
|
|
1603
1724
|
var CAR_ADD = "archive.borrow-car.add";
|
|
@@ -1791,6 +1912,23 @@ function isExpired(returnDateTime, now = Date.now()) {
|
|
|
1791
1912
|
const due = parseDateTime(returnDateTime);
|
|
1792
1913
|
return due === void 0 ? false : now > due;
|
|
1793
1914
|
}
|
|
1915
|
+
function borrowCardPath(formId, dataId) {
|
|
1916
|
+
return `/sp/ebdfpage/card/0/${formId}/${dataId}`;
|
|
1917
|
+
}
|
|
1918
|
+
function borrowCardLink(session, formId, dataId) {
|
|
1919
|
+
if (!formId || !dataId) return void 0;
|
|
1920
|
+
const viewPath = borrowCardPath(formId, dataId);
|
|
1921
|
+
const root = String(session?.baseUrl ?? "").replace(/\/+$/, "");
|
|
1922
|
+
return { viewPath, url: root ? `${root}${viewPath}` : viewPath };
|
|
1923
|
+
}
|
|
1924
|
+
function borrowOpenFields(session, formId, dataId, title, xiaoE) {
|
|
1925
|
+
const link = borrowCardLink(session, formId, dataId);
|
|
1926
|
+
if (!link) return {};
|
|
1927
|
+
return {
|
|
1928
|
+
...link,
|
|
1929
|
+
...xiaoE ? { browserToolCell: buildBrowserToolCell(link.url, title || "\u6253\u5F00\u501F\u9605\u5355") } : {}
|
|
1930
|
+
};
|
|
1931
|
+
}
|
|
1794
1932
|
function normalizeBorrowListRow(mainTable, index) {
|
|
1795
1933
|
const row = mainTable && typeof mainTable === "object" ? mainTable : {};
|
|
1796
1934
|
return {
|
|
@@ -1848,29 +1986,57 @@ var borrowListList = {
|
|
|
1848
1986
|
pageNo: { type: "integer", minimum: 1, description: "\u9875\u7801\uFF0C\u9ED8\u8BA4 1" },
|
|
1849
1987
|
pageSize: { type: "integer", minimum: 1, description: "\u6BCF\u9875\u6761\u6570\uFF0C\u9ED8\u8BA4 10" }
|
|
1850
1988
|
}),
|
|
1851
|
-
handler: async (args, { host }) => {
|
|
1989
|
+
handler: async (args, { ctx, host }) => {
|
|
1852
1990
|
const pageNo = positiveInt(args.pageNo, "pageNo", 1);
|
|
1853
1991
|
const pageSize = positiveInt(args.pageSize, "pageSize", 10);
|
|
1854
1992
|
const session = await host.getSession();
|
|
1993
|
+
const formId = await resolveBorrowFormId(host, session, ctx);
|
|
1994
|
+
const xiaoE = isXiaoECtx(ctx);
|
|
1855
1995
|
const custom = await listByCustomApi2(host, session.userId, pageNo, pageSize);
|
|
1856
1996
|
if (custom) {
|
|
1997
|
+
const rows2 = custom.rows.map((row) => ({
|
|
1998
|
+
...row,
|
|
1999
|
+
...borrowOpenFields(session, formId, row.dataId, row.name, xiaoE)
|
|
2000
|
+
}));
|
|
1857
2001
|
return archiveSuccess(
|
|
1858
2002
|
"archive.borrow-list.list",
|
|
1859
|
-
{
|
|
2003
|
+
{
|
|
2004
|
+
source: "myBorrowList",
|
|
2005
|
+
pageNo,
|
|
2006
|
+
pageSize,
|
|
2007
|
+
count: custom.count,
|
|
2008
|
+
...formId ? { formId } : {},
|
|
2009
|
+
hasXiaoEEnv: xiaoE,
|
|
2010
|
+
rows: rows2
|
|
2011
|
+
},
|
|
1860
2012
|
{ source: "myBorrowList" }
|
|
1861
2013
|
);
|
|
1862
2014
|
}
|
|
1863
2015
|
const target = await resolveArchiveListTarget(host, { sign: BORROWING_TAG, viewMode: "myBorrow" });
|
|
1864
2016
|
const page = await fetchArchiveListDatas(host, target, pageNo);
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1867
|
-
dataId
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2017
|
+
const targetFormId = formId || String(target.objId ?? "");
|
|
2018
|
+
const rows = page.rows.map((row, index) => {
|
|
2019
|
+
const dataId = String(row.id ?? "");
|
|
2020
|
+
const display = page.displayRows[index];
|
|
2021
|
+
const title = String(display?.name ?? row.name ?? "");
|
|
2022
|
+
return {
|
|
2023
|
+
index: index + 1,
|
|
2024
|
+
dataId,
|
|
2025
|
+
fields: row,
|
|
2026
|
+
...display ? { display } : {},
|
|
2027
|
+
...borrowOpenFields(session, targetFormId, dataId, title, xiaoE)
|
|
2028
|
+
};
|
|
2029
|
+
});
|
|
1871
2030
|
return archiveSuccess(
|
|
1872
2031
|
"archive.borrow-list.list",
|
|
1873
|
-
{
|
|
2032
|
+
{
|
|
2033
|
+
source: "ebuilder",
|
|
2034
|
+
pageNo: page.pageNo,
|
|
2035
|
+
count: rows.length,
|
|
2036
|
+
...targetFormId ? { formId: targetFormId } : {},
|
|
2037
|
+
hasXiaoEEnv: xiaoE,
|
|
2038
|
+
rows
|
|
2039
|
+
},
|
|
1874
2040
|
{ source: "ebuilder", viewSource: target.viewSource }
|
|
1875
2041
|
);
|
|
1876
2042
|
}
|
|
@@ -1926,7 +2092,7 @@ var borrowListDetail = {
|
|
|
1926
2092
|
{ dataId: { type: "string", pattern: "^\\d+$", description: "\u501F\u9605\u5355\u4E3B\u8868\u6570\u636E ID" } },
|
|
1927
2093
|
{ required: ["dataId"], description: "\u501F\u9605\u5355\u8BE6\u60C5" }
|
|
1928
2094
|
),
|
|
1929
|
-
handler: async (args, { host }) => {
|
|
2095
|
+
handler: async (args, { ctx, host }) => {
|
|
1930
2096
|
const dataId = args.dataId;
|
|
1931
2097
|
if (dataId === void 0 || dataId === null || !/^\d+$/.test(String(dataId))) {
|
|
1932
2098
|
throw archiveValidationError("data_id_invalid", "dataId \u5FC5\u586B\u4E14\u4E3A\u6570\u5B57 ID");
|
|
@@ -1934,16 +2100,47 @@ var borrowListDetail = {
|
|
|
1934
2100
|
const session = await host.getSession();
|
|
1935
2101
|
const detail = await fetchBorrowDetail(host, session.userId, String(dataId));
|
|
1936
2102
|
const root = String(session?.baseUrl ?? "").replace(/\/+$/, "");
|
|
2103
|
+
const xiaoE = isXiaoECtx(ctx);
|
|
1937
2104
|
const details = detail.details.map((item) => ({
|
|
1938
2105
|
...item,
|
|
1939
2106
|
arcDangan: item.arcDangan.map((arc) => {
|
|
1940
2107
|
const [arcId, arcFormId = ""] = String(arc.id ?? "").split("_");
|
|
1941
2108
|
if (!arcId || !arcFormId) return arc;
|
|
1942
2109
|
const viewPath = `/sp/custom/archive/archiveView?arcId=${arcId}&arcFormId=${arcFormId}`;
|
|
1943
|
-
|
|
2110
|
+
const url = root ? `${root}${viewPath}` : viewPath;
|
|
2111
|
+
const name = String(arc.name ?? "\u6253\u5F00\u6863\u6848");
|
|
2112
|
+
return {
|
|
2113
|
+
...arc,
|
|
2114
|
+
viewPath,
|
|
2115
|
+
url,
|
|
2116
|
+
// 小E 环境:明细表最后一列“操作”放该档案的单行 <browsertool>,与档案同一行;非小E 不带该字段
|
|
2117
|
+
...xiaoE ? { browserToolCell: buildBrowserToolCell(url, name) } : {}
|
|
2118
|
+
};
|
|
1944
2119
|
})
|
|
1945
2120
|
}));
|
|
1946
|
-
|
|
2121
|
+
const openEnv = buildOpenAction(ctx, String(details[0]?.arcDangan?.[0]?.url ?? ""), "\u6253\u5F00\u6863\u6848");
|
|
2122
|
+
const borrowFormId = await resolveBorrowFormId(host, session, ctx);
|
|
2123
|
+
const selfLink = borrowCardLink(session, borrowFormId, String(detail.dataId || dataId));
|
|
2124
|
+
const selfOpen = selfLink ? buildOpenAction(ctx, selfLink.url, String(detail.name || "\u6253\u5F00\u501F\u9605\u5355")) : void 0;
|
|
2125
|
+
return archiveSuccess(
|
|
2126
|
+
"archive.borrow-list.detail",
|
|
2127
|
+
{
|
|
2128
|
+
...detail,
|
|
2129
|
+
details,
|
|
2130
|
+
...borrowFormId ? { formId: borrowFormId } : {},
|
|
2131
|
+
...selfLink ? {
|
|
2132
|
+
viewPath: selfLink.viewPath,
|
|
2133
|
+
url: selfLink.url,
|
|
2134
|
+
markdown: `[\u6253\u5F00\u501F\u9605\u5355](${selfLink.url})`
|
|
2135
|
+
} : {},
|
|
2136
|
+
...selfOpen?.browserTool ? { browserTool: selfOpen.browserTool } : {},
|
|
2137
|
+
hasXiaoEEnv: xiaoE,
|
|
2138
|
+
requiresHostAction: openEnv.requiresHostAction,
|
|
2139
|
+
opened: openEnv.opened,
|
|
2140
|
+
clientAction: openEnv.clientAction
|
|
2141
|
+
},
|
|
2142
|
+
{ count: details.length }
|
|
2143
|
+
);
|
|
1947
2144
|
}
|
|
1948
2145
|
};
|
|
1949
2146
|
var borrowListOperations = [borrowListList, borrowListDetail];
|
|
@@ -2195,6 +2392,45 @@ var SEARCH_APPLY = "archive.flow.search.apply";
|
|
|
2195
2392
|
var RENEW_APPLY = "archive.flow.renew.apply";
|
|
2196
2393
|
var ARC_ID_PATTERN = /^\d+_\d+$/;
|
|
2197
2394
|
var NUMERIC_PATTERN = /^\d+$/;
|
|
2395
|
+
var DATE_ONLY_PATTERN = /^\d{4}-\d{2}-\d{2}$/u;
|
|
2396
|
+
var DATE_TIME_PATTERN = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(:\d{2})?$/u;
|
|
2397
|
+
var DEFAULT_BORROW_DAYS = 7;
|
|
2398
|
+
function requireReason(value) {
|
|
2399
|
+
const reason = String(value ?? "").trim();
|
|
2400
|
+
if (!reason) {
|
|
2401
|
+
throw archiveValidationError("reason_required", "\u8BF7\u5148\u5411\u7528\u6237\u786E\u8BA4\u501F\u9605\u539F\u56E0\uFF08reason\uFF09\u540E\u518D\u53D1\u8D77\u501F\u9605");
|
|
2402
|
+
}
|
|
2403
|
+
if (reason.length > 200) {
|
|
2404
|
+
throw archiveValidationError("reason_too_long", "\u501F\u9605\u539F\u56E0\u4E0D\u80FD\u8D85\u8FC7 200 \u5B57");
|
|
2405
|
+
}
|
|
2406
|
+
return reason;
|
|
2407
|
+
}
|
|
2408
|
+
function formatDate(date) {
|
|
2409
|
+
const pad = (value) => String(value).padStart(2, "0");
|
|
2410
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
2411
|
+
}
|
|
2412
|
+
function resolveReturnDateTime(value, now = /* @__PURE__ */ new Date()) {
|
|
2413
|
+
const raw = String(value ?? "").trim();
|
|
2414
|
+
if (!raw) {
|
|
2415
|
+
return { text: formatDate(new Date(now.getTime() + DEFAULT_BORROW_DAYS * 24 * 3600 * 1e3)), defaulted: true };
|
|
2416
|
+
}
|
|
2417
|
+
const normalized = raw.replace("T", " ");
|
|
2418
|
+
const withTime = DATE_ONLY_PATTERN.test(normalized) ? `${normalized} 00:00:00` : normalized;
|
|
2419
|
+
if (!DATE_TIME_PATTERN.test(withTime)) {
|
|
2420
|
+
throw archiveValidationError(
|
|
2421
|
+
"return_date_time_invalid",
|
|
2422
|
+
"\u9884\u8BA1\u5F52\u8FD8\u65F6\u95F4\u683C\u5F0F\u5E94\u4E3A YYYY-MM-DD \u6216 YYYY-MM-DD HH:mm:ss"
|
|
2423
|
+
);
|
|
2424
|
+
}
|
|
2425
|
+
const parsed = Date.parse(withTime.replace(" ", "T"));
|
|
2426
|
+
if (Number.isNaN(parsed)) {
|
|
2427
|
+
throw archiveValidationError("return_date_time_invalid", "\u9884\u8BA1\u5F52\u8FD8\u65F6\u95F4\u65E0\u6CD5\u89E3\u6790\uFF0C\u8BF7\u68C0\u67E5\u65E5\u671F\u662F\u5426\u6709\u6548");
|
|
2428
|
+
}
|
|
2429
|
+
if (parsed < now.getTime()) {
|
|
2430
|
+
throw archiveValidationError("return_date_time_invalid", "\u9884\u8BA1\u5F52\u8FD8\u65F6\u95F4\u4E0D\u80FD\u65E9\u4E8E\u5F53\u524D\u65F6\u95F4");
|
|
2431
|
+
}
|
|
2432
|
+
return { text: formatDate(new Date(parsed)), defaulted: false };
|
|
2433
|
+
}
|
|
2198
2434
|
function requireArcIds(value, field) {
|
|
2199
2435
|
if (!Array.isArray(value) || value.length === 0) {
|
|
2200
2436
|
throw archiveValidationError("arc_ids_required", `${field} \u5FC5\u586B\u4E14\u81F3\u5C11\u4E00\u9879`);
|
|
@@ -2247,18 +2483,27 @@ async function addCache(host, value, logFlag) {
|
|
|
2247
2483
|
}
|
|
2248
2484
|
function buildFlowUrl(baseUrl, workflowId, params) {
|
|
2249
2485
|
const root = baseUrl.replace(/\/+$/, "");
|
|
2250
|
-
const search =
|
|
2486
|
+
const search = Object.entries(params).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&");
|
|
2251
2487
|
return `${root}/sp/workflow/flowpage/fullCreate/${workflowId}?${search}`;
|
|
2252
2488
|
}
|
|
2253
|
-
function flowResult(action, baseUrl, workflowId, params, extra = {}) {
|
|
2489
|
+
function flowResult(ctx, action, baseUrl, workflowId, params, extra = {}) {
|
|
2490
|
+
const url = buildFlowUrl(baseUrl, workflowId, params);
|
|
2491
|
+
const open = buildOpenAction(ctx, url, "\u586B\u5199\u5E76\u63D0\u4EA4");
|
|
2254
2492
|
return archiveSuccess(
|
|
2255
2493
|
action,
|
|
2256
2494
|
{
|
|
2257
2495
|
...extra,
|
|
2258
2496
|
workflowId,
|
|
2259
|
-
url
|
|
2497
|
+
url,
|
|
2260
2498
|
params,
|
|
2261
|
-
|
|
2499
|
+
markdown: open.markdown,
|
|
2500
|
+
hasXiaoEEnv: open.hasXiaoEEnv,
|
|
2501
|
+
// 小E 环境:给出 <browsertool> 需要的参数,由调用方渲染成单行标签放在业务数据之后
|
|
2502
|
+
...open.browserTool ? { browserTool: open.browserTool } : {},
|
|
2503
|
+
requiresHostAction: open.requiresHostAction,
|
|
2504
|
+
opened: open.opened,
|
|
2505
|
+
clientAction: open.clientAction,
|
|
2506
|
+
hint: open.hasXiaoEEnv ? "\u59CB\u7EC8\u628A markdown \u7684 Markdown \u8D85\u94FE\u63A5\uFF08a \u6807\u7B7E\uFF09\u8FD4\u56DE\uFF0C\u4FDD\u8BC1\u53EF\u70B9\u51FB\uFF1BbrowserTool \u662F <browsertool> \u7684\u53C2\u6570\uFF0C\u5E8F\u5217\u5316\u6210\u5355\u884C\u6807\u7B7E\u540E\u653E\u5728\u8FD9\u6761\u6570\u636E\u4E4B\u540E\u5355\u72EC\u4E00\u884C\u6E32\u67D3\uFF0C\u5C0FE \u5BA2\u6237\u7AEF\u636E\u6B64\u5728\u53F3\u4FA7\u5185\u7F6E\u6D4F\u89C8\u5668\u6253\u5F00\uFF1Bopened \u6052\u4E3A false" : "\u59CB\u7EC8\u628A markdown \u7684 Markdown \u8D85\u94FE\u63A5\uFF08a \u6807\u7B7E\uFF09\u8FD4\u56DE\uFF0C\u4FDD\u8BC1\u53EF\u70B9\u51FB\uFF1B\u6253\u5F00\u52A8\u4F5C\u6309 clientAction\uFF08type: openUrl\uFF09\u7531\u5BBF\u4E3B\u6267\u884C\uFF0C\u8D70\u7CFB\u7EDF\u9ED8\u8BA4\u6D4F\u89C8\u5668\uFF1BCLI \u4E0E Agent \u90FD\u4E0D\u8981\u6267\u884C open/start"
|
|
2262
2507
|
},
|
|
2263
2508
|
{ wrote: true }
|
|
2264
2509
|
);
|
|
@@ -2274,9 +2519,14 @@ var flowBorrowCarPrepare = {
|
|
|
2274
2519
|
inputSchema: schemaOf(
|
|
2275
2520
|
{
|
|
2276
2521
|
arcIds: { type: "array", items: { type: "string" }, description: "\u6863\u6848\u6807\u8BC6\u6570\u7EC4\uFF0C\u5143\u7D20\u4E3A {\u6863\u6848ID}_{\u8868\u5355ID}" },
|
|
2277
|
-
carIds: { type: "array", items: { type: "string" }, description: "\u501F\u9605\u8F66\u8BB0\u5F55 ID \u6570\u7EC4\uFF0C\u4E0E arcIds \u4E00\u4E00\u5BF9\u5E94" }
|
|
2522
|
+
carIds: { type: "array", items: { type: "string" }, description: "\u501F\u9605\u8F66\u8BB0\u5F55 ID \u6570\u7EC4\uFF0C\u4E0E arcIds \u4E00\u4E00\u5BF9\u5E94" },
|
|
2523
|
+
reason: { type: "string", description: "\u501F\u9605\u539F\u56E0\uFF08\u5FC5\u586B\uFF0C\u5BF9\u8BDD\u4E2D\u5411\u7528\u6237\u786E\u8BA4\uFF09" },
|
|
2524
|
+
returnDateTime: {
|
|
2525
|
+
type: "string",
|
|
2526
|
+
description: "\u9884\u8BA1\u5F52\u8FD8\u65F6\u95F4 YYYY-MM-DD \u6216 YYYY-MM-DD HH:mm:ss\uFF1B\u4E0D\u4F20\u65F6\u9ED8\u8BA4\u5F53\u524D\u65F6\u95F4 + 7 \u5929"
|
|
2527
|
+
}
|
|
2278
2528
|
},
|
|
2279
|
-
{ required: ["arcIds", "carIds"], description: "\u4ECE\u501F\u9605\u8F66\u53D1\u8D77\u501F\u9605" }
|
|
2529
|
+
{ required: ["arcIds", "carIds", "reason"], description: "\u4ECE\u501F\u9605\u8F66\u53D1\u8D77\u501F\u9605" }
|
|
2280
2530
|
),
|
|
2281
2531
|
handler: async (args, env) => {
|
|
2282
2532
|
const arcIds = requireArcIds(args.arcIds, "arcIds");
|
|
@@ -2284,13 +2534,30 @@ var flowBorrowCarPrepare = {
|
|
|
2284
2534
|
if (arcIds.length !== carIds.length) {
|
|
2285
2535
|
throw archiveValidationError("id_count_mismatch", "arcIds \u4E0E carIds \u6570\u91CF\u5FC5\u987B\u4E00\u81F4");
|
|
2286
2536
|
}
|
|
2537
|
+
const reason = requireReason(args.reason);
|
|
2538
|
+
const returnDateTime = resolveReturnDateTime(args.returnDateTime);
|
|
2287
2539
|
const workflowId = await fetchWorkflowId(env.host);
|
|
2288
|
-
const { continuation, expiresInMs } = await issueLease(env, BORROW_CAR_APPLY, {
|
|
2540
|
+
const { continuation, expiresInMs } = await issueLease(env, BORROW_CAR_APPLY, {
|
|
2541
|
+
workflowId,
|
|
2542
|
+
arcIds,
|
|
2543
|
+
carIds,
|
|
2544
|
+
reason,
|
|
2545
|
+
returnDateTime: returnDateTime.text,
|
|
2546
|
+
returnDateTimeDefaulted: returnDateTime.defaulted
|
|
2547
|
+
});
|
|
2289
2548
|
return archiveSuccess(
|
|
2290
2549
|
"archive.flow.borrow-car.prepare",
|
|
2291
2550
|
{
|
|
2292
|
-
preview: {
|
|
2293
|
-
|
|
2551
|
+
preview: {
|
|
2552
|
+
workflowId,
|
|
2553
|
+
count: arcIds.length,
|
|
2554
|
+
arcIds,
|
|
2555
|
+
carIds,
|
|
2556
|
+
reason,
|
|
2557
|
+
returnDateTime: returnDateTime.text,
|
|
2558
|
+
...returnDateTime.defaulted ? { returnDateTimeDefaulted: true } : {}
|
|
2559
|
+
},
|
|
2560
|
+
hint: "\u7968\u636E\u5DF2\u5C31\u7EEA\uFF1A\u76F4\u63A5\u8C03\u7528 archive.flow.borrow-car.apply\uFF08CLI\uFF1Aarchive flow borrow-car-apply --continuation <token> --yes\uFF09\uFF0C\u4E0D\u8981\u518D\u5411\u7528\u6237\u4E8C\u6B21\u786E\u8BA4\u2014\u2014\u7528\u6237\u6253\u5F00\u94FE\u63A5\u70B9\u300C\u586B\u5199\u5E76\u63D0\u4EA4\u300D\u5373\u4E3A\u786E\u8BA4",
|
|
2294
2561
|
continuation
|
|
2295
2562
|
},
|
|
2296
2563
|
{ requiresConfirmation: true, expiresInMs }
|
|
@@ -2321,10 +2588,13 @@ var flowBorrowCarApply = {
|
|
|
2321
2588
|
if (!workflowId || arcIds.length === 0 || arcIds.length !== carIds.length) {
|
|
2322
2589
|
throw archiveValidationError("continuation_payload_invalid", "\u786E\u8BA4\u7968\u636E\u7F3A\u5C11 workflowId / arcIds / carIds");
|
|
2323
2590
|
}
|
|
2591
|
+
const reason = requireReason(lease.reason);
|
|
2592
|
+
const returnDateTime = resolveReturnDateTime(lease.returnDateTime);
|
|
2324
2593
|
const arcIndex = await addCache(env.host, arcIds.join(","), "borrowCart");
|
|
2325
2594
|
const carIndex = await addCache(env.host, carIds.join(","), "borrowCart");
|
|
2326
2595
|
const session = await env.host.getSession();
|
|
2327
2596
|
return flowResult(
|
|
2597
|
+
env.ctx,
|
|
2328
2598
|
BORROW_CAR_APPLY,
|
|
2329
2599
|
session.baseUrl,
|
|
2330
2600
|
workflowId,
|
|
@@ -2334,9 +2604,18 @@ var flowBorrowCarApply = {
|
|
|
2334
2604
|
isAddIdentify: "1",
|
|
2335
2605
|
isBorrow: "1",
|
|
2336
2606
|
arcDataId: `arcCache_${arcIndex}`,
|
|
2337
|
-
arcBorrowCarIds: `arcCache_${carIndex}
|
|
2607
|
+
arcBorrowCarIds: `arcCache_${carIndex}`,
|
|
2608
|
+
reason,
|
|
2609
|
+
return_date_time: returnDateTime.text
|
|
2338
2610
|
},
|
|
2339
|
-
{
|
|
2611
|
+
{
|
|
2612
|
+
mode: "borrowCar",
|
|
2613
|
+
count: arcIds.length,
|
|
2614
|
+
caches: { arcDataId: arcIndex, arcBorrowCarIds: carIndex },
|
|
2615
|
+
reason,
|
|
2616
|
+
returnDateTime: returnDateTime.text,
|
|
2617
|
+
...returnDateTime.defaulted ? { returnDateTimeDefaulted: true } : {}
|
|
2618
|
+
}
|
|
2340
2619
|
);
|
|
2341
2620
|
}
|
|
2342
2621
|
};
|
|
@@ -2349,18 +2628,40 @@ var flowSearchPrepare = {
|
|
|
2349
2628
|
capability: "archive",
|
|
2350
2629
|
risk: READ,
|
|
2351
2630
|
inputSchema: schemaOf(
|
|
2352
|
-
{
|
|
2353
|
-
|
|
2631
|
+
{
|
|
2632
|
+
arcIds: { type: "array", items: { type: "string" }, description: "\u6863\u6848\u6807\u8BC6\u6570\u7EC4\uFF0C\u5143\u7D20\u4E3A {\u6863\u6848ID}_{\u8868\u5355ID}" },
|
|
2633
|
+
reason: { type: "string", description: "\u501F\u9605\u539F\u56E0\uFF08\u5FC5\u586B\uFF0C\u5BF9\u8BDD\u4E2D\u5411\u7528\u6237\u786E\u8BA4\uFF09" },
|
|
2634
|
+
returnDateTime: {
|
|
2635
|
+
type: "string",
|
|
2636
|
+
description: "\u9884\u8BA1\u5F52\u8FD8\u65F6\u95F4 YYYY-MM-DD \u6216 YYYY-MM-DD HH:mm:ss\uFF1B\u4E0D\u4F20\u65F6\u9ED8\u8BA4\u5F53\u524D\u65F6\u95F4 + 7 \u5929"
|
|
2637
|
+
}
|
|
2638
|
+
},
|
|
2639
|
+
{ required: ["arcIds", "reason"], description: "\u4ECE\u68C0\u7D22\u7ED3\u679C\u53D1\u8D77\u501F\u9605" }
|
|
2354
2640
|
),
|
|
2355
2641
|
handler: async (args, env) => {
|
|
2356
2642
|
const arcIds = requireArcIds(args.arcIds, "arcIds");
|
|
2643
|
+
const reason = requireReason(args.reason);
|
|
2644
|
+
const returnDateTime = resolveReturnDateTime(args.returnDateTime);
|
|
2357
2645
|
const workflowId = await fetchWorkflowId(env.host);
|
|
2358
|
-
const { continuation, expiresInMs } = await issueLease(env, SEARCH_APPLY, {
|
|
2646
|
+
const { continuation, expiresInMs } = await issueLease(env, SEARCH_APPLY, {
|
|
2647
|
+
workflowId,
|
|
2648
|
+
arcIds,
|
|
2649
|
+
reason,
|
|
2650
|
+
returnDateTime: returnDateTime.text,
|
|
2651
|
+
returnDateTimeDefaulted: returnDateTime.defaulted
|
|
2652
|
+
});
|
|
2359
2653
|
return archiveSuccess(
|
|
2360
2654
|
"archive.flow.search.prepare",
|
|
2361
2655
|
{
|
|
2362
|
-
preview: {
|
|
2363
|
-
|
|
2656
|
+
preview: {
|
|
2657
|
+
workflowId,
|
|
2658
|
+
count: arcIds.length,
|
|
2659
|
+
arcIds,
|
|
2660
|
+
reason,
|
|
2661
|
+
returnDateTime: returnDateTime.text,
|
|
2662
|
+
...returnDateTime.defaulted ? { returnDateTimeDefaulted: true } : {}
|
|
2663
|
+
},
|
|
2664
|
+
hint: "\u7968\u636E\u5DF2\u5C31\u7EEA\uFF1A\u76F4\u63A5\u8C03\u7528 archive.flow.search.apply\uFF08CLI\uFF1Aarchive flow search-apply --continuation <token> --yes\uFF09\uFF0C\u4E0D\u8981\u518D\u5411\u7528\u6237\u4E8C\u6B21\u786E\u8BA4\u2014\u2014\u7528\u6237\u6253\u5F00\u94FE\u63A5\u70B9\u300C\u586B\u5199\u5E76\u63D0\u4EA4\u300D\u5373\u4E3A\u786E\u8BA4",
|
|
2364
2665
|
continuation
|
|
2365
2666
|
},
|
|
2366
2667
|
{ requiresConfirmation: true, expiresInMs }
|
|
@@ -2390,9 +2691,12 @@ var flowSearchApply = {
|
|
|
2390
2691
|
if (!workflowId || arcIds.length === 0) {
|
|
2391
2692
|
throw archiveValidationError("continuation_payload_invalid", "\u786E\u8BA4\u7968\u636E\u7F3A\u5C11 workflowId / arcIds");
|
|
2392
2693
|
}
|
|
2694
|
+
const reason = requireReason(lease.reason);
|
|
2695
|
+
const returnDateTime = resolveReturnDateTime(lease.returnDateTime);
|
|
2393
2696
|
const arcIndex = await addCache(env.host, arcIds.join(","));
|
|
2394
2697
|
const session = await env.host.getSession();
|
|
2395
2698
|
return flowResult(
|
|
2699
|
+
env.ctx,
|
|
2396
2700
|
SEARCH_APPLY,
|
|
2397
2701
|
session.baseUrl,
|
|
2398
2702
|
workflowId,
|
|
@@ -2401,9 +2705,18 @@ var flowSearchApply = {
|
|
|
2401
2705
|
isCreate: "1",
|
|
2402
2706
|
isAddIdentify: "1",
|
|
2403
2707
|
isBorrow: "1",
|
|
2404
|
-
arcDataId: `arcCache_${arcIndex}
|
|
2708
|
+
arcDataId: `arcCache_${arcIndex}`,
|
|
2709
|
+
reason,
|
|
2710
|
+
return_date_time: returnDateTime.text
|
|
2405
2711
|
},
|
|
2406
|
-
{
|
|
2712
|
+
{
|
|
2713
|
+
mode: "search",
|
|
2714
|
+
count: arcIds.length,
|
|
2715
|
+
caches: { arcDataId: arcIndex },
|
|
2716
|
+
reason,
|
|
2717
|
+
returnDateTime: returnDateTime.text,
|
|
2718
|
+
...returnDateTime.defaulted ? { returnDateTimeDefaulted: true } : {}
|
|
2719
|
+
}
|
|
2407
2720
|
);
|
|
2408
2721
|
}
|
|
2409
2722
|
};
|
|
@@ -2416,21 +2729,42 @@ var flowRenewPrepare = {
|
|
|
2416
2729
|
capability: "archive",
|
|
2417
2730
|
risk: READ,
|
|
2418
2731
|
inputSchema: schemaOf(
|
|
2419
|
-
{
|
|
2420
|
-
|
|
2732
|
+
{
|
|
2733
|
+
dataId: { type: "string", pattern: "^\\d+$", description: "\u501F\u9605\u5355\u4E3B\u8868\u6570\u636E ID" },
|
|
2734
|
+
reason: { type: "string", description: "\u7EED\u501F\u4E8B\u7531\uFF08\u5FC5\u586B\uFF0C\u5BF9\u8BDD\u4E2D\u5411\u7528\u6237\u786E\u8BA4\uFF09" },
|
|
2735
|
+
returnDateTime: {
|
|
2736
|
+
type: "string",
|
|
2737
|
+
description: "\u7EED\u501F\u540E\u7684\u9884\u8BA1\u5F52\u8FD8\u65F6\u95F4 YYYY-MM-DD\uFF1B\u4E0D\u4F20\u65F6\u9ED8\u8BA4\u5F53\u524D\u65E5\u671F + 7 \u5929"
|
|
2738
|
+
}
|
|
2739
|
+
},
|
|
2740
|
+
{ required: ["dataId", "reason"], description: "\u501F\u9605\u5355\u7EED\u501F" }
|
|
2421
2741
|
),
|
|
2422
2742
|
handler: async (args, env) => {
|
|
2423
2743
|
const dataId = String(args.dataId ?? "").trim();
|
|
2424
2744
|
if (!NUMERIC_PATTERN.test(dataId)) {
|
|
2425
2745
|
throw archiveValidationError("data_id_invalid", "dataId \u5FC5\u586B\u4E14\u4E3A\u6570\u5B57 ID");
|
|
2426
2746
|
}
|
|
2747
|
+
const reason = requireReason(args.reason);
|
|
2748
|
+
const returnDateTime = resolveReturnDateTime(args.returnDateTime);
|
|
2427
2749
|
const workflowId = await fetchWorkflowId(env.host);
|
|
2428
|
-
const { continuation, expiresInMs } = await issueLease(env, RENEW_APPLY, {
|
|
2750
|
+
const { continuation, expiresInMs } = await issueLease(env, RENEW_APPLY, {
|
|
2751
|
+
workflowId,
|
|
2752
|
+
dataId,
|
|
2753
|
+
reason,
|
|
2754
|
+
returnDateTime: returnDateTime.text,
|
|
2755
|
+
returnDateTimeDefaulted: returnDateTime.defaulted
|
|
2756
|
+
});
|
|
2429
2757
|
return archiveSuccess(
|
|
2430
2758
|
"archive.flow.renew.prepare",
|
|
2431
2759
|
{
|
|
2432
|
-
preview: {
|
|
2433
|
-
|
|
2760
|
+
preview: {
|
|
2761
|
+
workflowId,
|
|
2762
|
+
dataId,
|
|
2763
|
+
reason,
|
|
2764
|
+
returnDateTime: returnDateTime.text,
|
|
2765
|
+
...returnDateTime.defaulted ? { returnDateTimeDefaulted: true } : {}
|
|
2766
|
+
},
|
|
2767
|
+
hint: "\u7968\u636E\u5DF2\u5C31\u7EEA\uFF1A\u76F4\u63A5\u8C03\u7528 archive.flow.renew.apply\uFF08CLI\uFF1Aarchive flow renew-apply --continuation <token> --yes\uFF09\uFF0C\u4E0D\u8981\u518D\u5411\u7528\u6237\u4E8C\u6B21\u786E\u8BA4\u2014\u2014\u7528\u6237\u6253\u5F00\u94FE\u63A5\u70B9\u300C\u586B\u5199\u5E76\u63D0\u4EA4\u300D\u5373\u4E3A\u786E\u8BA4",
|
|
2434
2768
|
continuation
|
|
2435
2769
|
},
|
|
2436
2770
|
{ requiresConfirmation: true, expiresInMs }
|
|
@@ -2461,13 +2795,29 @@ var flowRenewApply = {
|
|
|
2461
2795
|
throw archiveValidationError("continuation_payload_invalid", "\u786E\u8BA4\u7968\u636E\u7F3A\u5C11 workflowId / dataId");
|
|
2462
2796
|
}
|
|
2463
2797
|
assertLeaseTarget(lease, args, ["dataId"], RENEW_APPLY);
|
|
2798
|
+
const reason = requireReason(lease.reason);
|
|
2799
|
+
const returnDateTime = resolveReturnDateTime(lease.returnDateTime);
|
|
2464
2800
|
const session = await env.host.getSession();
|
|
2465
2801
|
return flowResult(
|
|
2802
|
+
env.ctx,
|
|
2466
2803
|
RENEW_APPLY,
|
|
2467
2804
|
session.baseUrl,
|
|
2468
2805
|
workflowId,
|
|
2469
|
-
{
|
|
2470
|
-
|
|
2806
|
+
{
|
|
2807
|
+
workflowId,
|
|
2808
|
+
isCreate: "1",
|
|
2809
|
+
arcDataId: dataId,
|
|
2810
|
+
isReNew: "1",
|
|
2811
|
+
reason,
|
|
2812
|
+
return_date_time: returnDateTime.text
|
|
2813
|
+
},
|
|
2814
|
+
{
|
|
2815
|
+
mode: "renew",
|
|
2816
|
+
dataId,
|
|
2817
|
+
reason,
|
|
2818
|
+
returnDateTime: returnDateTime.text,
|
|
2819
|
+
...returnDateTime.defaulted ? { returnDateTimeDefaulted: true } : {}
|
|
2820
|
+
}
|
|
2471
2821
|
);
|
|
2472
2822
|
}
|
|
2473
2823
|
};
|
|
@@ -2839,6 +3189,7 @@ async function executeAndPrint(ctx, operation, input) {
|
|
|
2839
3189
|
});
|
|
2840
3190
|
ctx.output.write(successEnvelope(result), { json: true });
|
|
2841
3191
|
} catch (error) {
|
|
3192
|
+
reportPlatformError(error);
|
|
2842
3193
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
2843
3194
|
process.exitCode = isCliError(error) ? error.exitCode : 1 /* GeneralError */;
|
|
2844
3195
|
}
|
|
@@ -2878,6 +3229,7 @@ async function executeSearchPrint(ctx, input, format, outputPath) {
|
|
|
2878
3229
|
}
|
|
2879
3230
|
ctx.output.raw(formatSearchText(rows, meta));
|
|
2880
3231
|
} catch (error) {
|
|
3232
|
+
reportPlatformError(error);
|
|
2881
3233
|
console.error(JSON.stringify(failureEnvelope(error), null, 2));
|
|
2882
3234
|
process.exitCode = isCliError(error) ? error.exitCode : 1 /* GeneralError */;
|
|
2883
3235
|
}
|