weaver-work-cli 0.1.1 → 0.1.4
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 +187 -76
- package/dist/cmd/setup/index.js +5 -5
- package/dist/cmd/skills/index.js +1 -1
- package/dist/core/hooks.js +7 -0
- package/dist/index.js +0 -0
- package/dist/internal/e10/auth/commands.js +160 -55
- package/dist/internal/e10/auth/crypto.js +7 -22
- package/dist/internal/e10/auth/session.js +1 -1
- package/dist/internal/e10/auth/xiaoe.js +268 -0
- package/dist/internal/e10/context.js +16 -2
- package/dist/internal/e10/index.js +1 -0
- package/dist/internal/e10/request-runtime.js +344 -0
- package/dist/internal/skills/install.js +48 -6
- package/dist/internal/skills/reader.js +27 -0
- package/dist/shortcuts/archive/continuation.js +70 -0
- package/dist/shortcuts/archive/errors.js +53 -0
- package/dist/shortcuts/archive/host.js +197 -0
- package/dist/shortcuts/archive/index.js +363 -0
- package/dist/shortcuts/archive/manifest.js +45 -0
- package/dist/shortcuts/archive/operations/archive-info.js +55 -0
- package/dist/shortcuts/archive/operations/borrow-car.js +146 -0
- package/dist/shortcuts/archive/operations/borrow-list.js +200 -0
- package/dist/shortcuts/archive/operations/confirm.js +46 -0
- package/dist/shortcuts/archive/operations/download.js +238 -0
- package/dist/shortcuts/archive/operations/flow-url.js +240 -0
- package/dist/shortcuts/archive/operations/fonds.js +95 -0
- package/dist/shortcuts/archive/operations/getPageUrl.js +137 -0
- package/dist/shortcuts/archive/operations/registry.js +43 -0
- package/dist/shortcuts/archive/operations/search.js +88 -0
- package/dist/shortcuts/archive/operations/shared.js +120 -0
- package/dist/shortcuts/archive/operations/types.js +23 -0
- package/dist/shortcuts/archive/operations/upload.js +182 -0
- package/dist/shortcuts/archive/operations.js +13 -0
- package/dist/shortcuts/archive/render/search-format.js +276 -0
- package/dist/shortcuts/archive/render/search-view.js +125 -0
- package/dist/shortcuts/asset/continuation.js +70 -0
- package/dist/shortcuts/asset/errors.js +67 -0
- package/dist/shortcuts/asset/host.js +438 -0
- package/dist/shortcuts/asset/index.js +255 -0
- package/dist/shortcuts/asset/manifest.js +471 -0
- package/dist/shortcuts/asset/operations/query.js +249 -0
- package/dist/shortcuts/asset/operations/registry.js +85 -0
- package/dist/shortcuts/asset/operations/shared.js +100 -0
- package/dist/shortcuts/asset/operations/type-cache.js +49 -0
- package/dist/shortcuts/asset/operations/types.js +1 -0
- package/dist/shortcuts/asset/operations/viewlink.js +117 -0
- package/dist/shortcuts/asset/operations/write.js +435 -0
- package/dist/shortcuts/asset/operations.js +9 -0
- package/dist/shortcuts/calendar/continuation.js +70 -0
- package/dist/shortcuts/calendar/errors.js +53 -0
- package/dist/shortcuts/calendar/host.js +148 -0
- package/dist/shortcuts/calendar/index.js +125 -0
- package/dist/shortcuts/calendar/manifest.js +26 -0
- package/dist/shortcuts/calendar/operations/read.js +259 -0
- package/dist/shortcuts/calendar/operations/registry.js +31 -0
- package/dist/shortcuts/calendar/operations/shared.js +132 -0
- package/dist/shortcuts/calendar/operations/types.js +25 -0
- package/dist/shortcuts/calendar/operations/write.js +439 -0
- package/dist/shortcuts/calendar/operations.js +8 -0
- package/dist/shortcuts/ehr/continuation.js +70 -0
- package/dist/shortcuts/ehr/errors.js +53 -0
- package/dist/shortcuts/ehr/host.js +213 -0
- package/dist/shortcuts/ehr/index.js +205 -0
- package/dist/shortcuts/ehr/manifest.js +47 -0
- package/dist/shortcuts/ehr/operations/attend-read.js +373 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +514 -0
- package/dist/shortcuts/ehr/operations/hr-contact.js +363 -0
- package/dist/shortcuts/ehr/operations/hr-ds.js +298 -0
- package/dist/shortcuts/ehr/operations/hr-report.js +386 -0
- package/dist/shortcuts/ehr/operations/recruit-write.js +1629 -0
- package/dist/shortcuts/ehr/operations/recruit.js +803 -0
- package/dist/shortcuts/ehr/operations/registry.js +43 -0
- package/dist/shortcuts/ehr/operations/salary.js +319 -0
- package/dist/shortcuts/ehr/operations/shared.js +246 -0
- package/dist/shortcuts/ehr/operations/types.js +25 -0
- package/dist/shortcuts/ehr/operations.js +25 -0
- package/dist/shortcuts/esb/continuation.js +70 -0
- package/dist/shortcuts/esb/errors.js +65 -0
- package/dist/shortcuts/esb/host.js +187 -0
- package/dist/shortcuts/esb/index.js +112 -0
- package/dist/shortcuts/esb/manifest.js +91 -0
- package/dist/shortcuts/esb/operations/input-format.js +31 -0
- package/dist/shortcuts/esb/operations/registry.js +48 -0
- package/dist/shortcuts/esb/operations/shared.js +152 -0
- package/dist/shortcuts/esb/operations/trigger.js +76 -0
- package/dist/shortcuts/esb/operations/types.js +21 -0
- package/dist/shortcuts/esb/operations.js +15 -0
- package/dist/shortcuts/fna/continuation.js +70 -0
- package/dist/shortcuts/fna/errors.js +59 -0
- package/dist/shortcuts/fna/host.js +146 -0
- package/dist/shortcuts/fna/index.js +111 -0
- package/dist/shortcuts/fna/manifest.js +41 -0
- package/dist/shortcuts/fna/operations/budget.js +124 -0
- package/dist/shortcuts/fna/operations/expense-center.js +148 -0
- package/dist/shortcuts/fna/operations/invoice-writeoff.js +212 -0
- package/dist/shortcuts/fna/operations/loan.js +195 -0
- package/dist/shortcuts/fna/operations/registry.js +35 -0
- package/dist/shortcuts/fna/operations/shared.js +210 -0
- package/dist/shortcuts/fna/operations/types.js +25 -0
- package/dist/shortcuts/fna/operations.js +19 -0
- package/dist/shortcuts/hrm/errors.js +38 -0
- package/dist/shortcuts/hrm/host.js +156 -0
- package/dist/shortcuts/hrm/index.js +111 -0
- package/dist/shortcuts/hrm/manifest.js +32 -0
- package/dist/shortcuts/hrm/operations/employee.js +338 -0
- package/dist/shortcuts/hrm/operations/org.js +110 -0
- package/dist/shortcuts/hrm/operations/position.js +176 -0
- package/dist/shortcuts/hrm/operations/registry.js +33 -0
- package/dist/shortcuts/hrm/operations/shared.js +143 -0
- package/dist/shortcuts/hrm/operations/types.js +23 -0
- package/dist/shortcuts/hrm/operations.js +19 -0
- package/dist/shortcuts/index.js +20 -0
- package/dist/shortcuts/invoice/host.js +99 -94
- package/dist/shortcuts/invoice/index.js +65 -61
- package/dist/shortcuts/invoice/manifest.js +222 -14
- package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
- package/dist/shortcuts/invoice/operations/issuing.js +198 -0
- package/dist/shortcuts/invoice/operations/ocr-preview.js +6 -3
- package/dist/shortcuts/invoice/operations/registry.js +17 -0
- package/dist/shortcuts/invoice/operations/reim.js +401 -0
- package/dist/shortcuts/invoice/operations/shared.js +271 -6
- package/dist/shortcuts/invoice/operations/validate-preview.js +1 -1
- package/dist/shortcuts/jiuchuanhui/cache.js +441 -0
- package/dist/shortcuts/jiuchuanhui/continuation.js +70 -0
- package/dist/shortcuts/jiuchuanhui/errors.js +59 -0
- package/dist/shortcuts/jiuchuanhui/host.js +159 -0
- package/dist/shortcuts/jiuchuanhui/index.js +109 -0
- package/dist/shortcuts/jiuchuanhui/manifest.js +469 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +214 -0
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +157 -0
- package/dist/shortcuts/jiuchuanhui/operations/generic.js +146 -0
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +133 -0
- package/dist/shortcuts/jiuchuanhui/operations/shared.js +158 -0
- package/dist/shortcuts/jiuchuanhui/operations/types.js +1 -0
- package/dist/shortcuts/jiuchuanhui/operations.js +8 -0
- package/dist/shortcuts/mail/continuation.js +70 -0
- package/dist/shortcuts/mail/errors.js +53 -0
- package/dist/shortcuts/mail/host.js +182 -0
- package/dist/shortcuts/mail/index.js +519 -0
- package/dist/shortcuts/mail/manifest.js +38 -0
- package/dist/shortcuts/mail/operations/mail-blacklist.js +79 -0
- package/dist/shortcuts/mail/operations/mail-contacts.js +195 -0
- package/dist/shortcuts/mail/operations/mail-manage.js +335 -0
- package/dist/shortcuts/mail/operations/mail-read.js +508 -0
- package/dist/shortcuts/mail/operations/mail-send.js +474 -0
- package/dist/shortcuts/mail/operations/mail-sign.js +203 -0
- package/dist/shortcuts/mail/operations/mail-template.js +170 -0
- package/dist/shortcuts/mail/operations/registry.js +41 -0
- package/dist/shortcuts/mail/operations/shared.js +64 -0
- package/dist/shortcuts/mail/operations/types.js +27 -0
- package/dist/shortcuts/mail/operations.js +19 -0
- package/dist/shortcuts/plan/continuation.js +70 -0
- package/dist/shortcuts/plan/errors.js +70 -0
- package/dist/shortcuts/plan/host.js +180 -0
- package/dist/shortcuts/plan/index.js +150 -0
- package/dist/shortcuts/plan/manifest.js +53 -0
- package/dist/shortcuts/plan/operations/link.js +256 -0
- package/dist/shortcuts/plan/operations/read.js +259 -0
- package/dist/shortcuts/plan/operations/registry.js +33 -0
- package/dist/shortcuts/plan/operations/shared.js +246 -0
- package/dist/shortcuts/plan/operations/types.js +49 -0
- package/dist/shortcuts/plan/operations/version.js +49 -0
- package/dist/shortcuts/plan/operations/write.js +710 -0
- package/dist/shortcuts/plan/operations.js +8 -0
- package/docs/SKILL.md +11 -7
- package/docs/_catalog.md +23 -5
- package/docs/agent-invoice.md +31 -10
- package/docs/agent-skill-install.md +211 -0
- package/docs/calendar.md +87 -0
- package/docs/e10-auth.md +28 -9
- package/docs/ehr.md +186 -0
- package/docs/esb.md +64 -0
- package/docs/fna.md +72 -0
- package/docs/hrm.md +89 -0
- package/docs/invoice.md +66 -20
- package/docs/jiuchuanhui.md +131 -0
- package/docs/operation-manual.md +443 -0
- package/docs/plan.md +82 -0
- package/docs/wenshuding.md +129 -0
- package/docs/ziguanjia.md +89 -0
- package/package.json +4 -4
- package/scripts/package-skill.mjs +127 -34
- package/scripts/postbuild.mjs +13 -0
- package/skill-template/business-info.json +13 -2
- package/skill-template/domains/calendar.md +15 -0
- package/skill-template/domains/esb.md +13 -0
- package/skill-template/domains/hrm.md +16 -0
- package/skill-template/domains/jiuchuanhui.md +23 -0
- package/skill-template/domains/jucailin.md +22 -0
- package/skill-template/domains/mail.md +21 -0
- package/skill-template/domains/plan.md +17 -0
- package/skill-template/domains/qiyecheng.md +17 -0
- package/skill-template/domains/shared.md +9 -3
- package/skill-template/domains/skill-maker.md +10 -0
- package/skill-template/domains/wenshuding.md +22 -0
- package/skill-template/domains/{invoice.md → yepiaotong.md} +4 -0
- package/skill-template/domains/ziguanjia.md +21 -0
- package/skill-template/master-skill-template.md +12 -6
- package/skill-template/skill-template.md +40 -9
- package/skills/weaver-e10-calendar/SKILL.md +101 -0
- package/skills/weaver-e10-calendar/product.json +8 -0
- package/skills/weaver-e10-calendar/references/calendar-app-check.md +65 -0
- package/skills/weaver-e10-calendar/references/calendar-dict.md +55 -0
- package/skills/weaver-e10-calendar/references/calendar-query.md +70 -0
- package/skills/weaver-e10-calendar/references/calendar-write.md +97 -0
- package/skills/weaver-e10-calendar/references/source-manifest.json +54 -0
- package/skills/weaver-e10-esb/SKILL.md +102 -0
- package/skills/weaver-e10-esb/product.json +8 -0
- package/skills/weaver-e10-esb/references/input-format.md +52 -0
- package/skills/weaver-e10-esb/references/source-manifest.json +242 -0
- package/skills/weaver-e10-esb/references/trigger.md +99 -0
- package/skills/weaver-e10-hrm/SKILL.md +87 -0
- package/skills/weaver-e10-hrm/product.json +8 -0
- package/skills/weaver-e10-hrm/references/employee.md +109 -0
- package/skills/weaver-e10-hrm/references/org.md +95 -0
- package/skills/weaver-e10-hrm/references/position.md +95 -0
- package/skills/weaver-e10-hrm/references/source-manifest.json +121 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +174 -0
- package/skills/weaver-e10-jiuchuanhui/product.json +8 -0
- package/skills/weaver-e10-jiuchuanhui/references/cache.md +110 -0
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +61 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-plan.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact-records.md +48 -0
- package/skills/weaver-e10-jiuchuanhui/references/contact.md +56 -0
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +69 -0
- package/skills/weaver-e10-jiuchuanhui/references/disabled-capabilities.md +24 -0
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/general-helpers.md +59 -0
- package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +60 -0
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +72 -0
- package/skills/weaver-e10-jiuchuanhui/references/source-manifest.json +2632 -0
- package/skills/weaver-e10-jucailin/SKILL.md +101 -0
- package/skills/weaver-e10-jucailin/product.json +8 -0
- package/skills/weaver-e10-jucailin/references/attend-read.md +73 -0
- package/skills/weaver-e10-jucailin/references/attend-write.md +82 -0
- package/skills/weaver-e10-jucailin/references/hr-contact.md +92 -0
- package/skills/weaver-e10-jucailin/references/hr-datasource.md +104 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-read.md +76 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +70 -0
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +35 -0
- package/skills/weaver-e10-jucailin/references/salary.md +110 -0
- package/skills/weaver-e10-jucailin/references/source-manifest.json +152 -0
- package/skills/weaver-e10-mail/SKILL.md +151 -0
- package/skills/weaver-e10-mail/product.json +8 -0
- package/skills/weaver-e10-mail/references/mail-agent-entry.md +47 -0
- package/skills/weaver-e10-mail/references/mail-attachment.md +30 -0
- package/skills/weaver-e10-mail/references/mail-blacklist.md +27 -0
- package/skills/weaver-e10-mail/references/mail-contacts.md +33 -0
- package/skills/weaver-e10-mail/references/mail-manage.md +44 -0
- package/skills/weaver-e10-mail/references/mail-read.md +76 -0
- package/skills/weaver-e10-mail/references/mail-send.md +43 -0
- package/skills/weaver-e10-mail/references/mail-sign.md +33 -0
- package/skills/weaver-e10-mail/references/mail-template.md +31 -0
- package/skills/weaver-e10-mail/references/safety-boundaries.md +32 -0
- package/skills/weaver-e10-plan/SKILL.md +139 -0
- package/skills/weaver-e10-plan/product.json +8 -0
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +123 -0
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +138 -0
- package/skills/weaver-e10-plan/references/plan-report-query.md +154 -0
- package/skills/weaver-e10-plan/references/plan-report-remind.md +104 -0
- package/skills/weaver-e10-plan/references/plan-report-write.md +162 -0
- package/skills/weaver-e10-plan/references/source-manifest.json +858 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +118 -0
- package/skills/weaver-e10-qiyecheng/product.json +8 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +65 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +56 -0
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +51 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +57 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +59 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +698 -0
- package/skills/weaver-e10-shared/SKILL.md +86 -0
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
- package/skills/weaver-e10-shared/references/json-output-contract.md +120 -0
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
- package/skills/weaver-e10-skill-maker/SKILL.md +77 -0
- package/skills/weaver-e10-skill-maker/product.json +8 -0
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +124 -0
- package/skills/weaver-e10-skill-maker/references/detector-validation.md +101 -0
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +230 -0
- package/skills/weaver-e10-skill-maker/references/post-generation-install.md +105 -0
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +261 -0
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +141 -0
- package/skills/weaver-e10-wenshuding/SKILL.md +157 -0
- package/skills/weaver-e10-wenshuding/product.json +8 -0
- package/skills/weaver-e10-wenshuding/references/archive-agent-entry.md +63 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-car.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-wenshuding/references/archive-download.md +48 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +46 -0
- package/skills/weaver-e10-wenshuding/references/archive-fonds.md +34 -0
- package/skills/weaver-e10-wenshuding/references/archive-info.md +33 -0
- package/skills/weaver-e10-wenshuding/references/archive-search.md +52 -0
- package/skills/weaver-e10-wenshuding/references/archive-upload.md +41 -0
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +517 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +184 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-add.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +47 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-browse-field-data.md +204 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-delete.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-detail.md +13 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +28 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-download.md +31 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +45 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +15 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +45 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-examples.md +120 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-field-rules.md +161 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing.md +99 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-ocr-preview.md +14 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +58 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-red.md +261 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +97 -0
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-update.md +1 -1
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-validation-preview.md +10 -3
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1340 -0
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +845 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +94 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +449 -0
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +266 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +494 -0
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +1103 -0
- package/skills/weaver-e10-ziguanjia/SKILL.md +162 -0
- package/skills/weaver-e10-ziguanjia/product.json +8 -0
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +147 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +65 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-create.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-depre.md +48 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +22 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-purch.md +57 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-query.md +62 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-repair.md +83 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-resolve.md +49 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-return.md +70 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-update.md +45 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-use.md +60 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-viewlink.md +81 -0
- package/skills/weaver-work-cli-invoice/SKILL.md +0 -103
- package/skills/weaver-work-cli-invoice/references/invoice-agent-entry.md +0 -38
- package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
- package/skills/weaver-work-cli-invoice/references/invoice-download.md +0 -22
- package/skills/weaver-work-cli-invoice/references/invoice-enterprise-list.md +0 -35
- package/skills/weaver-work-cli-invoice/references/invoice-import.md +0 -28
- package/skills/weaver-work-cli-invoice/references/invoice-personal-list.md +0 -47
- package/skills/weaver-work-cli-shared/SKILL.md +0 -53
- package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -83
- package/skills/weaver-work-cli-shared/references/json-output-contract.md +0 -61
- package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -61
- /package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/high-risk-write.md +0 -0
- /package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/product.json +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# 源资料更新检测
|
|
2
|
+
|
|
3
|
+
生成业务模块 Skill 和对应 CLI 时必须写入 `references/source-manifest.json`。后续用户提供更新后的业务模块文档或代码时,先比较 manifest 与当前源资料,再提示用户确认是否转换;用户确认后,同步更新 CLI 与 Skill。
|
|
4
|
+
|
|
5
|
+
更新检测采用两层基线:
|
|
6
|
+
|
|
7
|
+
- **文件级基线**:必须记录源资料 `path + size + sha256` 和 `aggregateSha256`,用于快速判断是否有新增、删除或整体变更。
|
|
8
|
+
- **operation 影响索引**:当源资料可稳定切块时,额外记录 `sourceChunks` 与 `operationImpact`,用于把小范围更新定位到可能受影响的 operation、reference、schema 字段、测试和风险确认链。
|
|
9
|
+
- **Git ref 范围**:当用户提供本地源码仓库、模块相对路径、旧版本 ref 和新版本 ref 时,用仓库提交记录定位业务源资料变化;Git 范围只能作为事实来源和影响分析输入,不能跳过用户确认直接覆盖产物。
|
|
10
|
+
|
|
11
|
+
文件级基线是事实判断;operation 影响索引只用于路由和影响提示。即使只命中某一个 operation,也必须阅读变化内容并完成验证,不能直接自动覆盖产物。
|
|
12
|
+
|
|
13
|
+
## Manifest 结构
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"schemaVersion": 2,
|
|
18
|
+
"module": "<command>",
|
|
19
|
+
"skill": "weaver-e10-<skill>",
|
|
20
|
+
"generatedAt": "2026-09-03T00:00:00.000Z",
|
|
21
|
+
"sourceSet": {
|
|
22
|
+
"aggregateSha256": "<sha256-of-normalized-source-list>",
|
|
23
|
+
"sourceRoots": ["<user-provided-path-or-url>"],
|
|
24
|
+
"detectionStrength": "strong",
|
|
25
|
+
"git": {
|
|
26
|
+
"repository": "<relative-or-redacted-local-repo-root-or-remote-name>",
|
|
27
|
+
"modulePaths": ["<repo-relative-module-path>"],
|
|
28
|
+
"sharedPaths": ["<optional-repo-relative-shared-path>"],
|
|
29
|
+
"baseRef": "<old-ref>",
|
|
30
|
+
"headRef": "<new-ref>",
|
|
31
|
+
"baseCommit": "<resolved-full-sha>",
|
|
32
|
+
"headCommit": "<resolved-full-sha>",
|
|
33
|
+
"comparedAt": "2026-09-03T00:00:00.000Z"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"generatedTargets": {
|
|
37
|
+
"cli": ["src/shortcuts/<command>", "src/shortcuts/index.ts"],
|
|
38
|
+
"skill": ["skills/weaver-e10-<skill>"],
|
|
39
|
+
"tests": ["test/business/<command>-*.test.ts"],
|
|
40
|
+
"docs": ["docs/<command>.md", "skill-template/domains/<skill>.md"]
|
|
41
|
+
},
|
|
42
|
+
"sources": [
|
|
43
|
+
{
|
|
44
|
+
"path": "<path>",
|
|
45
|
+
"role": "api-doc",
|
|
46
|
+
"size": 1234,
|
|
47
|
+
"sha256": "<sha256>"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"sourceChunks": [
|
|
51
|
+
{
|
|
52
|
+
"id": "<stable-business-anchor>",
|
|
53
|
+
"sourcePath": "<path>",
|
|
54
|
+
"anchor": "<heading-operation-or-method-path>",
|
|
55
|
+
"sha256": "<sha256-of-normalized-chunk>",
|
|
56
|
+
"mapsToOperations": ["<command>.<operation>"],
|
|
57
|
+
"mapsToReferences": ["references/<topic>.md"]
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"operationImpact": {
|
|
61
|
+
"<command>.<operation>": {
|
|
62
|
+
"sourceChunkIds": ["<stable-business-anchor>"],
|
|
63
|
+
"schemaFields": ["<field>"],
|
|
64
|
+
"references": ["references/<topic>.md"],
|
|
65
|
+
"tests": ["test/business/<command>-*.test.ts"],
|
|
66
|
+
"risk": "read | write-confirmed | external-read | read-with-upload",
|
|
67
|
+
"requiresConfirmationChain": false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"artifactBaseline": {
|
|
71
|
+
"aggregateSha256": "<sha256-of-generated-artifact-list>",
|
|
72
|
+
"files": [
|
|
73
|
+
{
|
|
74
|
+
"path": "skills/weaver-e10-<skill>/references/<topic>.md",
|
|
75
|
+
"role": "generated-reference",
|
|
76
|
+
"size": 1234,
|
|
77
|
+
"sha256": "<sha256>"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"notes": [
|
|
82
|
+
"只记录源资料指纹和转换摘要,不保存 Cookie、Token 或大段源正文。"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`sourceSet.aggregateSha256` 按源资料 `path + size + sha256` 排序后的稳定 JSON 计算。`artifactBaseline.aggregateSha256` 按生成产物 `path + size + sha256` 排序后的稳定 JSON 计算,只用于判断现有产物是否被手工改动,不替代源资料基线。路径可记录为用户提供的相对路径或明确 URL;本地绝对路径可能暴露用户名时,优先记录相对工作区路径。
|
|
88
|
+
不要在 manifest 中写入个人主目录绝对路径、认证路径、Cookie、Token 或大段源正文;这些内容会被泛微技能检测工具视为发布风险。
|
|
89
|
+
|
|
90
|
+
`schemaVersion: 1` 的旧 manifest 仍可读取,但只能视为文件级或弱检测基线。下次用户确认更新时,应迁移到 `schemaVersion: 2`,并尽量补齐 `sourceChunks`、`operationImpact` 和 `artifactBaseline`。
|
|
91
|
+
|
|
92
|
+
## Chunk 与影响索引
|
|
93
|
+
|
|
94
|
+
只有源资料存在稳定锚点时才写 `sourceChunks`。可用锚点包括:
|
|
95
|
+
|
|
96
|
+
- CLI operation 名,如 `invoice.update.prepare`。
|
|
97
|
+
- HTTP 方法加路径,如 `POST /api/inc/update`。
|
|
98
|
+
- Markdown 标题或 reference 主题,如 `# 编辑发票`。
|
|
99
|
+
- TypeScript 导出的 operation class、manifest entry 或测试用例名。
|
|
100
|
+
|
|
101
|
+
不要用行号、自动编号、段落顺序或模型摘要当 chunk id。chunk id 应该能跨小幅排版调整保持稳定。
|
|
102
|
+
|
|
103
|
+
`operationImpact` 记录“可能影响”,不是自动改写授权。每个 operation 尽量记录:
|
|
104
|
+
|
|
105
|
+
- `sourceChunkIds`:来自哪些源资料块。
|
|
106
|
+
- `schemaFields`:可能影响的输入字段、默认值、枚举或固定参数。
|
|
107
|
+
- `references`:对应 Skill reference。
|
|
108
|
+
- `tests`:至少应检查的测试文件。
|
|
109
|
+
- `risk`:风险等级或写入确认类别。
|
|
110
|
+
- `requiresConfirmationChain`:是否必须检查 `prepare -> apply`。
|
|
111
|
+
|
|
112
|
+
如果源资料格式混乱、只有远程弱版本号、或无法稳定切块,允许只写文件级基线,并把 `sourceSet.detectionStrength` 设为 `weak`,在 `notes` 写明限制。
|
|
113
|
+
|
|
114
|
+
## Git ref 范围更新
|
|
115
|
+
|
|
116
|
+
当用户希望根据 Git 修改记录更新已有业务模块时,开始分析前必须确认:
|
|
117
|
+
|
|
118
|
+
- 源码仓库本地路径:本地 clone 下来的完整仓库根目录,不是 GitLab/GitHub 网页地址。
|
|
119
|
+
- 仓库下模块资料相对路径:相对于仓库根目录的路径,例如 `backend/business-apis/inc/weaver-e10-yepiaotong`。
|
|
120
|
+
- 旧版本 ref:基础版本 commit、tag 或分支。
|
|
121
|
+
- 新版本 ref:更新后 commit、tag 或分支。
|
|
122
|
+
- 目标 CLI 命令后缀与目标 Skill 后缀。
|
|
123
|
+
- 参考内容、关联公共路径和特殊要求;这些可以为空,但要给用户一次补充机会。
|
|
124
|
+
|
|
125
|
+
如果用户只提供了浏览器地址,例如 `.../-/tree/master/backend/business-apis/inc/weaver-e10-yepiaotong`,只能提取候选相对路径 `backend/business-apis/inc/weaver-e10-yepiaotong`,并向用户确认本地仓库路径。没有本地仓库时,询问用户提供 clone 后路径,或明确授权 clone/fetch;不要自行联网拉取。
|
|
126
|
+
|
|
127
|
+
多次提交通常只需要“最开始的旧 ref”和“最后更新后的新 ref”。中间 ref 只在用户要求按需求阶段拆解、存在回滚/重做/冲突修正,或最终 diff 无法解释业务语义时作为辅助输入。分析时仍以 `baseRef..headRef` 的最终树差异为准,并用 `git log` 保留中间提交摘要。
|
|
128
|
+
|
|
129
|
+
必须先验证仓库、路径和 ref:
|
|
130
|
+
|
|
131
|
+
Windows PowerShell:
|
|
132
|
+
|
|
133
|
+
```powershell
|
|
134
|
+
git -C SOURCE_REPO rev-parse --show-toplevel
|
|
135
|
+
git -C SOURCE_REPO rev-parse "OLD_REF^{commit}"
|
|
136
|
+
git -C SOURCE_REPO rev-parse "NEW_REF^{commit}"
|
|
137
|
+
git -C SOURCE_REPO ls-tree -d NEW_REF -- MODULE_RELATIVE_PATH
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
macOS/Linux(bash/zsh):
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
git -C SOURCE_REPO rev-parse --show-toplevel
|
|
144
|
+
git -C SOURCE_REPO rev-parse OLD_REF^{commit}
|
|
145
|
+
git -C SOURCE_REPO rev-parse NEW_REF^{commit}
|
|
146
|
+
git -C SOURCE_REPO ls-tree -d NEW_REF -- MODULE_RELATIVE_PATH
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`OLD_REF..NEW_REF` 范围中夹杂其它模块提交不会直接污染结果,前提是所有 diff/log 命令都带路径过滤:
|
|
150
|
+
|
|
151
|
+
Windows PowerShell:
|
|
152
|
+
|
|
153
|
+
```powershell
|
|
154
|
+
git -C SOURCE_REPO diff --name-status OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
155
|
+
git -C SOURCE_REPO diff --stat OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
156
|
+
git -C SOURCE_REPO log --oneline --decorate OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
157
|
+
git -C SOURCE_REPO diff OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
macOS/Linux(bash/zsh):
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
git -C SOURCE_REPO diff --name-status OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
164
|
+
git -C SOURCE_REPO diff --stat OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
165
|
+
git -C SOURCE_REPO log --oneline --decorate OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
166
|
+
git -C SOURCE_REPO diff OLD_REF..NEW_REF -- MODULE_RELATIVE_PATH
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
如果用户提供了关联公共路径,把模块路径和公共路径一起传给 `--` 后面。若未提供公共路径,先额外查看一次全局变更摘要,只用于发现明显共享依赖,不直接纳入自动更新:
|
|
170
|
+
|
|
171
|
+
Windows PowerShell:
|
|
172
|
+
|
|
173
|
+
```powershell
|
|
174
|
+
git -C SOURCE_REPO diff --name-status OLD_REF..NEW_REF
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
macOS/Linux(bash/zsh):
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
git -C SOURCE_REPO diff --name-status OLD_REF..NEW_REF
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
看到共享 DTO、公共枚举、鉴权、路由注册或全局配置等可能影响业务模块的文件时,先在影响报告中列为“待确认公共依赖”,询问是否纳入源资料;不要静默忽略,也不要无边界地读取整个系统。
|
|
184
|
+
|
|
185
|
+
Git 差异分析的产物必须先是影响报告,不是直接改文件。影响报告至少包含:
|
|
186
|
+
|
|
187
|
+
- 输入边界:源码仓库本地路径、模块相对路径、关联公共路径、旧版本 ref、新版本 ref,以及解析后的完整 commit SHA。
|
|
188
|
+
- 提交摘要:路径过滤后的 `git log` 结果;如全局摘要显示疑似公共依赖,也列出文件路径。
|
|
189
|
+
- 文件变化:新增、删除、重命名、修改的文件数量和关键路径。
|
|
190
|
+
- 业务变化推断:新增/删除/变化的接口、字段、枚举、默认值、固定参数、流程、权限或确认链。
|
|
191
|
+
- 影响面:可能要更新的 CLI operation、`manifest.ts` schema 字段、handler、reference、测试、docs、`business-info`、domain 文件和 `source-manifest.json`。
|
|
192
|
+
- 风险分级:`patch`、`minor`、`major`。字段删除、必填项变化、语义变化、写操作确认链变化、权限变化或返回结构破坏性变化必须标为 `major`。
|
|
193
|
+
- 明确问题:是否把这些变化同步转换进目标 CLI 与目标 Skill;`major` 项必须逐项确认迁移或兼容策略。
|
|
194
|
+
|
|
195
|
+
用户确认前,不要覆盖 `src/shortcuts/<module>`、`skills/weaver-e10-<skill>`、docs、template、测试或 manifest。用户只要求“分析方案”或“生成报告”时,到影响报告为止。
|
|
196
|
+
|
|
197
|
+
## 首次生成
|
|
198
|
+
|
|
199
|
+
首次生成目标 CLI 与 Skill 时:
|
|
200
|
+
|
|
201
|
+
1. 盘点用户提供的源资料。
|
|
202
|
+
2. 计算每个源文件 sha256。
|
|
203
|
+
3. 生成 `source-manifest.json`。
|
|
204
|
+
4. 在最终回复中说明已记录源资料指纹,后续可用来检测更新。
|
|
205
|
+
|
|
206
|
+
如果用户提供的是远程文档但当前 Agent 无法稳定读取版本号或内容 hash,必须在 manifest `notes` 里写明限制,并在后续更新检测时提醒“只能做弱检测”。
|
|
207
|
+
|
|
208
|
+
## 已有 CLI/Skill 的更新检测
|
|
209
|
+
|
|
210
|
+
目标 CLI 或 Skill 已存在时,先读取:
|
|
211
|
+
|
|
212
|
+
- `skills/weaver-e10-<module>/references/source-manifest.json`
|
|
213
|
+
- 当前用户提供的源资料
|
|
214
|
+
|
|
215
|
+
然后比较:
|
|
216
|
+
|
|
217
|
+
- 新增源文件
|
|
218
|
+
- 删除源文件
|
|
219
|
+
- sha256 变化的源文件
|
|
220
|
+
- 新增、删除或 sha256 变化的 `sourceChunks`
|
|
221
|
+
- `operationImpact` 映射是否缺失、过期或与 schema/reference 不一致
|
|
222
|
+
- role 或 sourceRoots 变化
|
|
223
|
+
- manifest 缺失或 schemaVersion 不认识
|
|
224
|
+
|
|
225
|
+
比较结果为空时,不要重写 Skill;告诉用户“源资料未变化,不需要重新转换”,除非用户明确要求强制重生成。
|
|
226
|
+
|
|
227
|
+
比较结果非空时,必须先暂停并向用户确认。回复要包含:
|
|
228
|
+
|
|
229
|
+
- 变更摘要:新增、删除、变化的文件数量和关键路径。
|
|
230
|
+
- 小范围定位:如果 chunk 可比对,列出新增、删除、变化的 chunk id、锚点和对应 `mapsToOperations`。
|
|
231
|
+
- 可能影响:CLI operation、operation schema、测试、路由词、reference、禁用边界、写操作确认链。
|
|
232
|
+
- 明确问题:是否将这些变更同步转换进 `src/shortcuts/<module>` 和 `weaver-e10-<module>` Skill?
|
|
233
|
+
|
|
234
|
+
用户确认前,不要覆盖 `src/shortcuts/<module>`、`SKILL.md`、reference、business-info 或 domain 文件。
|
|
235
|
+
|
|
236
|
+
如果文件 sha256 变化但 `sourceChunks` 全部未变,优先判断为排版、说明或未映射内容变化;仍要摘要说明,并让用户确认是否需要刷新 manifest。不要因为 chunk 未变就静默改写产物。
|
|
237
|
+
|
|
238
|
+
## Manifest 缺失或不可信
|
|
239
|
+
|
|
240
|
+
如果目标 Skill 已存在但没有 `source-manifest.json`:
|
|
241
|
+
|
|
242
|
+
1. 不要假设它由本 Skill 生成。
|
|
243
|
+
2. 先把它标记为“未纳入源指纹管理的已有 Skill”。
|
|
244
|
+
3. 询问用户是否要接管并重建 manifest。
|
|
245
|
+
|
|
246
|
+
如果 manifest 指向的源路径不存在,向用户说明缺失路径并询问新的源资料位置;不要自行搜索整个磁盘。
|
|
247
|
+
|
|
248
|
+
如果 manifest 只有 `artifactBaseline` 或 `detectionStrength=weak`,只能说明“当前可检测到产物基线或源范围变化,不能精确证明原始源资料是否变化”。用户提供新的原始源资料后,应先重建强基线,再做转换。
|
|
249
|
+
|
|
250
|
+
## 更新后的写入
|
|
251
|
+
|
|
252
|
+
用户确认转换更新后:
|
|
253
|
+
|
|
254
|
+
1. 只修改受源变化影响的 CLI、operation schema、测试、入口、reference、business-info、domain 和 manifest。
|
|
255
|
+
2. 在 `source-manifest.json` 写入新的 `generatedAt`、`sourceSet.aggregateSha256` 和 sources;如果本次来自 Git ref 范围,同步记录模块相对路径、关联公共路径、旧/新 ref、解析后的完整 commit SHA 和比较时间,但不要写本地个人绝对路径、大段 diff 或提交正文。
|
|
256
|
+
3. 如果能稳定切块,同步更新 `sourceChunks` 和 `operationImpact`;不能稳定切块时保留文件级检测并写明弱检测限制。机器可读契约、OpenAPI/JSON Schema、operation manifest 或字段枚举表应作为 schema 与 handler 的优先依据。
|
|
257
|
+
4. 刷新 `artifactBaseline`,用于提示生成产物是否被手工改过。
|
|
258
|
+
5. 保留与源变化无关、用户可能手工维护的 reference 内容,除非它与新源资料冲突。`patch` / `minor` 变化可按确认范围更新;`major` 变化必须保留兼容策略、迁移说明或显式拒绝旧输入的结构化错误。
|
|
259
|
+
6. 完成后运行 CLI schema 验证、业务测试、skill 结构验证、泛微技能检测工具和相关测试。基于 Git 更新的 operation 必须有语义回归或 golden tests 覆盖,不要只依赖 artifact 文件存在性。
|
|
260
|
+
|
|
261
|
+
最终回复要明确说明:哪些源资料变化已转换成 CLI 与 Skill,哪些变化因资料不足而暂停并等待用户确认。
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# weaver-work-cli 业务 Skill 风格
|
|
2
|
+
|
|
3
|
+
`weaver-work-cli` 的业务 Skill 借鉴飞书 CLI 的组织方式,但有自己的固定边界:入口做路由,reference 写细节,共享规则集中在 `weaver-e10-shared`,业务调用必须走 `weaver-work-cli`。使用 Skill Maker 生成新业务模块时,必须同步生成或更新对应 `src/shortcuts/<module>` CLI,并让 Skill 只引用已实现的 operation。
|
|
4
|
+
|
|
5
|
+
## 目录结构
|
|
6
|
+
|
|
7
|
+
Skill 目录名用 `<skill>`(业务系统名/拼音),CLI 源码目录用 `<command>`(英文动作名):
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
skills/weaver-e10-<skill>/
|
|
11
|
+
SKILL.md
|
|
12
|
+
product.json
|
|
13
|
+
references/
|
|
14
|
+
<operation-or-topic>.md
|
|
15
|
+
source-manifest.json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
仓库内还需要同步:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
src/shortcuts/<command>/
|
|
22
|
+
docs/<command>.md
|
|
23
|
+
skill-template/business-info.json # key = weaver-e10-<skill>
|
|
24
|
+
skill-template/domains/<skill>.md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
必要时更新文档索引:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
docs/_catalog.md
|
|
31
|
+
docs/SKILL.md
|
|
32
|
+
README.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 入口 SKILL.md
|
|
36
|
+
|
|
37
|
+
入口文件保持轻量,必须包含:
|
|
38
|
+
|
|
39
|
+
- frontmatter:使用检测工具认可的顶层字段,禁止 `metadata:` 嵌套。
|
|
40
|
+
- CRITICAL:要求先读 `../weaver-e10-shared/SKILL.md`;若不存在先执行 `weaver-work-cli skills install shared --skills-dir <当前Agent的Skills目录>`,若 CLI 未安装先执行 `npm install -g weaver-work-cli`,安装或读取失败时停止。
|
|
41
|
+
- 路由优先级:先判断是否属于该业务模块,再选 operation。
|
|
42
|
+
- 高优先级语义:业务对象、别名、关键字段、常见用户说法。
|
|
43
|
+
- 命令表:用户意图、CLI operation、按需读取的 reference。
|
|
44
|
+
- 处理链:常见多步流程,尤其是文件处理和写操作确认。
|
|
45
|
+
- 执行原则:最小必要查询、大结果摘要、错误语义驱动、文件处理确认。
|
|
46
|
+
- 写操作失败决策树:涉及写操作时必须写;纯只读模块可写明没有高风险写链。
|
|
47
|
+
- 不在范围:禁止绕过 CLI、未暴露 operation、未自动化能力。
|
|
48
|
+
|
|
49
|
+
入口不要承载完整接口手册,也不要把 shared 规则全文复制一遍。基于 Git 源码更新时,也不要把 diff、提交日志或大段源码复制进 `SKILL.md`;入口只记录路由和高优先级业务语义,具体字段、命令、风险和失败处理拆到 `references/`,源资料边界与版本信息记录到 `references/source-manifest.json`。
|
|
50
|
+
|
|
51
|
+
frontmatter 推荐模板:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
name: weaver-e10-<skill>
|
|
55
|
+
display_name: 泛微<中文展示名>
|
|
56
|
+
display_name_en: Weaver <English Name>
|
|
57
|
+
description: "<200 字内的一句话中文概述,说明能力和触发场景>"
|
|
58
|
+
description_zh: "<中文简介>"
|
|
59
|
+
description_en: "<English summary>"
|
|
60
|
+
version: 1.0.0
|
|
61
|
+
author: 泛微网络科技股份有限公司
|
|
62
|
+
agent_created: true
|
|
63
|
+
requires:
|
|
64
|
+
bins: ["weaver-work-cli"]
|
|
65
|
+
cliHelp: "weaver-work-cli <command> --help"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
这些字段需通过泛微技能检测工具默认 `weaver` 模式。`display_name` 必须以「泛微」开头,`version` 必须是三段数字 SemVer,目录名必须等于 `name`(即 `weaver-e10-<skill>`,`<skill>` 用业务系统名/拼音,如 `yepiaotong`)。业务模块 Skill 的 `cliHelp` 指向 `weaver-work-cli <command> --help`,其中 `<command>` 是独立的 CLI 命令后缀(如 `invoice`),可与 `<skill>` 不同。
|
|
69
|
+
|
|
70
|
+
## Reference 写法
|
|
71
|
+
|
|
72
|
+
每个 reference 只服务一个明确意图或一小组强相关 operation。推荐结构:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
# <业务动作>
|
|
76
|
+
|
|
77
|
+
## 何时使用
|
|
78
|
+
|
|
79
|
+
## 输入要点
|
|
80
|
+
|
|
81
|
+
## 命令
|
|
82
|
+
|
|
83
|
+
Windows PowerShell:
|
|
84
|
+
|
|
85
|
+
\```powershell
|
|
86
|
+
weaver-work-cli --json MODULE_COMMAND run MODULE_NAME.operation --input-json '{"key":"value"}'
|
|
87
|
+
\```
|
|
88
|
+
|
|
89
|
+
macOS/Linux(bash/zsh):
|
|
90
|
+
|
|
91
|
+
\```bash
|
|
92
|
+
weaver-work-cli --json MODULE_COMMAND run MODULE_NAME.operation --input-json '{"key":"value"}'
|
|
93
|
+
\```
|
|
94
|
+
|
|
95
|
+
## 输出处理
|
|
96
|
+
|
|
97
|
+
## 注意
|
|
98
|
+
|
|
99
|
+
## 失败处理
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
命令示例、提示词和 docs 必须同时兼容 Windows 和 macOS/Linux。凡涉及 JSON 输入、用户目录、路径分隔符、Python 启动器、文件删除、目录查看或文件比对,必须同时给 Windows PowerShell 与 macOS/Linux(bash/zsh)两套示例;Agent 先根据当前系统和 shell 选择对应示例,不确定时用 `node -p "process.platform"` 判断。简单 JSON 优先使用 `--input-json '<json>'`;复杂 JSON 可保存为 UTF-8 文件后按平台传给 `--input`。Windows/PowerShell 示例不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法。
|
|
103
|
+
|
|
104
|
+
涉及附件、图片、本地文件、远程 URL、OCR、导入或解析时,`## 注意` 必须说明用户需先确认文件内容可能进入大模型上下文,也可能发送到业务系统或解析服务。
|
|
105
|
+
|
|
106
|
+
写入、删除、导入、更新等高风险操作必须使用 CLI 暴露的确认链。若 schema 中是 `prepare/apply`,reference 必须写清:
|
|
107
|
+
|
|
108
|
+
1. `prepare` 只预览和生成 continuation。
|
|
109
|
+
2. 向用户摘要目标、差异、风险和 continuation 绑定含义。
|
|
110
|
+
3. 用户明确确认后才调用 `apply`。
|
|
111
|
+
4. `apply` 不可盲目重试;遇到不确定结果先停止,再做一次只读回查。
|
|
112
|
+
|
|
113
|
+
## product.json
|
|
114
|
+
|
|
115
|
+
使用当前包信息,保持格式简洁:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"schemaVersion": 1,
|
|
120
|
+
"product": "weaver-work-cli",
|
|
121
|
+
"productVersion": "<package.json version>",
|
|
122
|
+
"packageName": "weaver-work-cli",
|
|
123
|
+
"command": "weaver-work-cli",
|
|
124
|
+
"nodeEngine": ">=18"
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## business-info 和 domain
|
|
129
|
+
|
|
130
|
+
`skill-template/business-info.json` 的 key 必须与 `skills/` 下的目录名一致,value 是用于聚合路由的关键词数组。关键词只放高信号业务词,不放泛词。
|
|
131
|
+
|
|
132
|
+
`skill-template/domains/<module>.md` 用一小段话说明该业务域的 reference 拆分、路由语义和关键安全边界。它必须提到 `references/`,以满足仓库结构约定。
|
|
133
|
+
|
|
134
|
+
## 常见禁止项
|
|
135
|
+
|
|
136
|
+
- 禁止要求 Agent 读取、复制或解析认证目录、Cookie、ETEAMSID、业务 Token。
|
|
137
|
+
- 禁止把源文档里的原始接口路径当成 Agent 可直接调用的路径。
|
|
138
|
+
- 禁止把未暴露在 `schema` 中的能力写成可用 operation;先按 CLI 规范实现并测试。
|
|
139
|
+
- 禁止复制大段接口文档或代码进 `SKILL.md`。
|
|
140
|
+
- 禁止新增安装后会丢失的依赖脚本;当前 Skill 安装和 ZIP 打包会过滤 `scripts/` 与 `assets/`。
|
|
141
|
+
- 禁止生成会被检测工具阻断的结构:`metadata:` 嵌套、过深目录、缺失 reference、二进制文件、默认系统地址、真实 IP 或硬编码凭证。
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weaver-e10-wenshuding
|
|
3
|
+
display_name: 泛微文书定档案
|
|
4
|
+
display_name_en: Weaver Archive
|
|
5
|
+
description: "泛微 E10 文书定档案管理:全宗与预归档库、全文检索、档案基本信息、借阅车、借阅单、原文下载、发起借阅/续借流程页与预归档上传确认链。"
|
|
6
|
+
description_zh: "泛微 E10 文书定档案管理。支持查询全宗与预归档电子文件库、全文检索可借档案、查看档案基本信息、查看借阅车并直接加入档案(免确认写操作)、查看借阅单与详情、下载借阅单原文 zip,并通过 prepare/apply 确认链处理发起借阅、续借和预归档上传。全宗信息仅在预归档上传时需要查询;借阅相关流程页面默认用系统默认浏览器打开。全文检索结果的默认返回显示样式为三段式卡片视图(标题可点击、命中词高亮、全宗/分类/日期摘要行)。"
|
|
7
|
+
description_en: "Weaver E10 Wenshuding archive skill for fonds and pre-archive libraries, full-text search, archive info, borrow car, borrow orders, original file packaging and download, borrow/renew workflow URL generation, and confirmed pre-archive upload."
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
author: 泛微网络科技股份有限公司
|
|
10
|
+
agent_created: true
|
|
11
|
+
requires:
|
|
12
|
+
bins: ["weaver-work-cli"]
|
|
13
|
+
cliHelp: "weaver-work-cli archive --help"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若不存在则必须先执行 `weaver-work-cli skills install shared --skills-dir <当前Agent的Skills目录>`,若 CLI 未安装则先执行 `npm install -g weaver-work-cli`,安装或读取失败时必须停止执行。**
|
|
17
|
+
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
18
|
+
所有命令通过 `weaver-work-cli --json archive run <operation>` 执行:简单 JSON 优先传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应的文件,查参数结构,不要猜字段;**references 是第一信息源**,`weaver-work-cli archive schema` 是 operation、字段和风险等级的合约来源。
|
|
19
|
+
命令示例、提示词和临时说明必须同时兼容 Windows 和 macOS/Linux;涉及 JSON 输入、用户目录、路径分隔符、Python 启动器、文件删除、目录查看或文件比对时,同时给 Windows PowerShell 与 macOS/Linux(bash/zsh)两套示例。Agent 先根据当前系统和 shell 选择对应示例,不确定时用 `node -p "process.platform"` 判断。Windows/PowerShell 下不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法。
|
|
20
|
+
涉及档案附件、图片、本地文件、借阅原文 zip 或文件上传的操作,执行前必须提醒用户:文件内容可能被上传到 E10 文书定档案系统、文件服务器或下载到本地磁盘,并可能进入当前大模型上下文用于理解和处理;必须等待用户明确确认后才继续。
|
|
21
|
+
|
|
22
|
+
## 路由优先级(先判断是不是文书定档案,再选 operation)
|
|
23
|
+
|
|
24
|
+
文书定档案不是通用 E10 对象。**只要用户的核心对象是档案、全宗、借阅车、借阅单、档案借阅/续借或预归档上传,就优先使用 `weaver-e10-wenshuding`。**
|
|
25
|
+
|
|
26
|
+
### 明确归 `weaver-e10-wenshuding` 的高优先级语义
|
|
27
|
+
|
|
28
|
+
出现以下任一语义时,优先走本 Skill:
|
|
29
|
+
|
|
30
|
+
- 文书定 / 档案 / 全宗 / 收集库 / 管理库 / 预归档库 / 电子文件库
|
|
31
|
+
- 档案检索 / 全文检索 / 可借档案 / 档号 / 案卷 / 保管期限 / 密级 / 库位
|
|
32
|
+
- 借阅车 / 加入借阅车 / 我的借阅车
|
|
33
|
+
- 借阅单 / 我的借阅 / 借阅记录 / 续借 / 归还期限
|
|
34
|
+
- 档案下载 / 原文下载 / 借阅单打包 / 水印件
|
|
35
|
+
- 发起借阅 / 借阅申请 / 借阅流程
|
|
36
|
+
- 预归档上传 / 电子文件上传 / 归档入库
|
|
37
|
+
|
|
38
|
+
**判定规则:** 只要最终动作是对文书定档案做查询、检索、加入借阅车、查看借阅单、下载原文、发起借阅/续借或预归档上传,就归 `weaver-e10-wenshuding`。只有当用户处理的是非档案类 E10 业务、通用工作流或尚未封装的档案能力时,才不使用本 Skill。
|
|
39
|
+
|
|
40
|
+
## 选哪个命令
|
|
41
|
+
|
|
42
|
+
| 想做什么 | 命令 | 按需读取 reference |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| 查看可用 operation、字段和风险等级 | `archive schema` | [`archive-agent-entry.md`](references/archive-agent-entry.md) |
|
|
45
|
+
| 查询全宗 / 预归档电子文件库节点 | `archive run archive.fonds.list` / `archive.prelib.tree` | [`archive-fonds.md`](references/archive-fonds.md) |
|
|
46
|
+
| 全文检索可借档案(默认卡片视图展示) | `archive run archive.search.run` | [`archive-search.md`](references/archive-search.md) |
|
|
47
|
+
| 查看档案基本信息 | `archive run archive.info.get` | [`archive-info.md`](references/archive-info.md) |
|
|
48
|
+
| 查看借阅车 | `archive run archive.borrow-car.list` | [`archive-borrow-car.md`](references/archive-borrow-car.md) |
|
|
49
|
+
| 加入借阅车(免确认) | `archive run archive.borrow-car.add` | [`archive-borrow-car.md`](references/archive-borrow-car.md) |
|
|
50
|
+
| 查看借阅单 / 详情 | `archive run archive.borrow-list.list` / `.detail` | [`archive-borrow-list.md`](references/archive-borrow-list.md) |
|
|
51
|
+
| 下载借阅单原文 | `archive run archive.borrow-list.download.prepare/apply` | [`archive-download.md`](references/archive-download.md) |
|
|
52
|
+
| 从借阅车发起借阅 | `archive run archive.flow.borrow-car.prepare/apply` | [`archive-flow.md`](references/archive-flow.md) |
|
|
53
|
+
| 从检索结果发起借阅 | `archive run archive.flow.search.prepare/apply` | [`archive-flow.md`](references/archive-flow.md) |
|
|
54
|
+
| 借阅单续借 | `archive run archive.flow.renew.prepare/apply` | [`archive-flow.md`](references/archive-flow.md) |
|
|
55
|
+
| 上传到预归档电子文件库 | `archive run archive.upload.prelib.prepare/apply` | [`archive-upload.md`](references/archive-upload.md) |
|
|
56
|
+
| 借阅提交、借阅车移除、归还/催还等未暴露能力 | 无可用命令 | [`archive-disabled-capabilities.md`](references/archive-disabled-capabilities.md) |
|
|
57
|
+
|
|
58
|
+
处理链:
|
|
59
|
+
|
|
60
|
+
- 检索并借阅:`archive.search.run` -> 用户选择条目 -> `archive.borrow-car.add`(免确认直接加入)-> 需要时 `archive.borrow-car.list` 复核
|
|
61
|
+
- 从借阅车发起借阅:`archive.borrow-car.list` 取 `arcDangan` 与 `dataId` -> `archive.flow.borrow-car.prepare` -> 用户确认 -> `.apply` -> 用系统默认浏览器打开返回的流程创建页 URL(仅用户强调内置打开时用 IDE 内置视图)
|
|
62
|
+
- 从检索结果直接发起借阅:`archive.search.run` 取 `id`+`formId` -> `archive.flow.search.prepare` -> 用户确认 -> `.apply` -> 同上默认系统浏览器打开 URL
|
|
63
|
+
- 续借:`archive.borrow-list.list` 取 `dataId` -> `archive.flow.renew.prepare` -> 用户确认 -> `.apply` -> 同上默认系统浏览器打开 URL
|
|
64
|
+
- 下载原文:`archive.borrow-list.list` 取 `dataId` -> `archive.borrow-list.download.prepare`(校验未超期且有可下载原文)-> 用户确认 -> `.apply`(轮询打包并落盘)
|
|
65
|
+
- 预归档上传:`archive.fonds.list` 取全宗 `id` -> 需要时 `archive.prelib.tree` 取 `treeId` -> `archive.upload.prelib.prepare` -> 用户确认 -> `.apply`
|
|
66
|
+
|
|
67
|
+
## 执行原则(减少误路由、误重试和无效消耗)
|
|
68
|
+
|
|
69
|
+
### 1) 先拿最小必要信息,再执行
|
|
70
|
+
|
|
71
|
+
- 只是查列表时,优先直接用 `archive.borrow-car.list` / `archive.borrow-list.list`,默认小页(`pageSize=10`)
|
|
72
|
+
- 用户没有要求全量时不要自动翻完整列表
|
|
73
|
+
- 用户已给出 `dataId` 时,不要先查列表再过滤,直接用 `archive.borrow-list.detail` 或对应 prepare
|
|
74
|
+
- 全宗 `id` 与电子文件库 `treeId` 只在预归档上传前查一次,同轮内复用;检索、借阅车、借阅单、下载等流程不需要查询全宗,已有展示位置里的全宗信息照常显示
|
|
75
|
+
|
|
76
|
+
### 1.5) 大结果只摘要给用户
|
|
77
|
+
|
|
78
|
+
- 当前 CLI 会把完整 JSON envelope 写 stdout;Agent 回复时不要原样贴完整 JSON
|
|
79
|
+
- **全文检索结果的默认返回展示样式 = 「卡片视图」**,与 `weaver-work-cli archive search --format card`(或 `archive search --key <词> --format card`)输出保持一致;**除用户明确要求其他样式(text / html / 表格)外,一律按卡片视图返回,禁止退化成普通表格或贴 JSON**:
|
|
80
|
+
- 每条固定三段:`序号. 【类型】 可点击题名链接` + 空行 + 命中高亮摘要 + 空行 + `全宗 / 分类 / 日期`;标题必须是可点击的档案视图链接(域名取当前 baseUrl)
|
|
81
|
+
- 最多先给前 10 条;不要把 `dataId`、`formId`、`arcDangan` 等内部 ID 作为展示内容,它们只用于后续 operation 入参
|
|
82
|
+
- Agent 需要卡片时优先直接调用 `archive search ... --format card` 拿渲染结果,避免手工拼字段
|
|
83
|
+
- **借阅车 / 借阅单列表的默认返回展示样式 = 「Markdown 表格」**(与检索的卡片视图区分开),除用户明确要求其他样式外一律用表格渲染:
|
|
84
|
+
- 借阅车表格列:`序号 / 题名 / 类型(className) / 分类(categoryNames) / 形成日期(fileDate)`;借阅单表格列:`序号 / 题名 / 借阅时间 / 归还时间 / 归还状态 / 是否超期`
|
|
85
|
+
- 各列取对应 operation 返回的可读字段;不要把 `dataId`、`workflowId`、`arcDangan` 等内部 ID 放进展示,它们只用于后续操作入参
|
|
86
|
+
- 表格样式:分隔行统一 `| :---: |`(表头与各列内容都居中显示);序号列只放 `1`/`2`… 纯序号,不放其他说明
|
|
87
|
+
- 最多先给前 10 条;列数多时可只保留用户关心的关键列,题名超长时省略号截断
|
|
88
|
+
- 超长响应优先落本地文件并向用户提供摘要和文件路径
|
|
89
|
+
|
|
90
|
+
### 2) 已知对象时直达动作
|
|
91
|
+
|
|
92
|
+
- 已拿到 `dataId`、档案标识或本地文件路径时,优先调用对应 operation
|
|
93
|
+
- 同一轮里已有足够的新鲜查询结果时,不要重复查询同一列表或同一详情
|
|
94
|
+
- 不要默认走 `list -> detail -> prepare -> apply` 全链路;对象已明确时应压缩步骤
|
|
95
|
+
|
|
96
|
+
### 3) 错误语义驱动,而不是盲目重试
|
|
97
|
+
|
|
98
|
+
- 失败后先看进程退出码、`error.type`、`error.subtype` 和 `error.message`
|
|
99
|
+
- **除非错误明确提示可恢复或需要补充参数,否则不要重复刷同一个 operation**
|
|
100
|
+
- 写请求已经发出后,遇到结果不确定必须停止;不要把 `.apply` 当成可重试读操作
|
|
101
|
+
- 下载是异步任务,`.apply` 会持续轮询进度;不要因为等待时间长就中断重放
|
|
102
|
+
- **错误为 `authentication` 或 `session_expired` 时:立即停止当前操作,不要用示例占位域名或自行猜域名登录,也不要盲目重试**。先读取共享规则 `../weaver-e10-shared/references/e10-auth-and-session.md`,按其中流程让用户输入 E10 登录域名或选择已有 profile,完成登录后再继续原操作。
|
|
103
|
+
|
|
104
|
+
### 4) 附件、图片和文件解析确认
|
|
105
|
+
|
|
106
|
+
- 执行 `archive.upload.prelib.prepare/apply`、`archive.borrow-list.download.prepare/apply`,或任何会读取本地文件、上传文件内容、下载借阅原文 zip、解析图片/PDF/OFD 的步骤前,必须先提醒用户文件内容可能进入大模型上下文,也可能发送到 E10 文书定档案系统或文件服务器,或落到本地磁盘。
|
|
107
|
+
- 用户未明确确认前,不要运行上传、下载或解析命令。
|
|
108
|
+
|
|
109
|
+
## 写操作失败处理:`partial/write_uncertain` 决策树
|
|
110
|
+
|
|
111
|
+
当加入借阅车、发起借阅/续借、下载或上传返回 `partial/write_uncertain`,或提示网络中断、部分成功、回查失败、回查字段不一致时,按下面规则处理:
|
|
112
|
+
|
|
113
|
+
1. **先停止盲目重试**,不要连续重复提交相同 `.apply`
|
|
114
|
+
2. 优先从以下角度解释:
|
|
115
|
+
- 写请求可能已经到达服务端,但连接在结果确认前中断
|
|
116
|
+
- 服务端可能只处理了部分档案或只完成了部分上传步骤
|
|
117
|
+
- 异步打包任务可能仍在后台进行,重新提交会再起一个任务
|
|
118
|
+
- continuation、目标文件、目标借阅单或登录上下文可能已经变化
|
|
119
|
+
3. 如需确认,只补 **一次** 只读查询(例如 `archive.borrow-car.list` 或 `archive.borrow-list.detail`),不要陷入 query/write 循环
|
|
120
|
+
4. 最终给用户明确结论、已知状态、成功/失败项和下一步人工确认建议,而不是继续无意义重试
|
|
121
|
+
|
|
122
|
+
**特别注意:** 上传和下载最容易因重复提交造成重复入库或重复打包,更要严格执行上述规则。
|
|
123
|
+
|
|
124
|
+
Windows PowerShell:
|
|
125
|
+
|
|
126
|
+
```powershell
|
|
127
|
+
weaver-work-cli archive schema
|
|
128
|
+
weaver-work-cli --json archive run archive.fonds.list --input-json '{"menuSign":"collectLib"}'
|
|
129
|
+
weaver-work-cli --json archive run archive.search.run --input-json '{"key":"会计凭证","pageNo":0,"pageSize":10}'
|
|
130
|
+
weaver-work-cli --json archive run archive.borrow-car.list --input-json '{"pageNo":1,"pageSize":10}'
|
|
131
|
+
weaver-work-cli --json archive run archive.borrow-car.add --input-json '{"formAndIds":[{"formId":"1190991330335571989","ids":["1252600626189156465"]}]}'
|
|
132
|
+
weaver-work-cli --json archive run archive.borrow-list.download.prepare --input-json '{"dataId":"1302806508947652629"}'
|
|
133
|
+
weaver-work-cli --json archive run archive.flow.borrow-car.prepare --input-json '{"arcIds":["1252600626189156465_1190991330335571989"],"carIds":["1302754028599656449"]}'
|
|
134
|
+
weaver-work-cli --json archive run archive.upload.prelib.prepare --input-json '{"file":"./档案.pdf","fondsId":"1042286256822697531"}'
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
macOS/Linux(bash/zsh):
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
weaver-work-cli archive schema
|
|
141
|
+
weaver-work-cli --json archive run archive.fonds.list --input-json '{"menuSign":"collectLib"}'
|
|
142
|
+
weaver-work-cli --json archive run archive.search.run --input-json '{"key":"会计凭证","pageNo":0,"pageSize":10}'
|
|
143
|
+
weaver-work-cli --json archive run archive.borrow-car.list --input-json '{"pageNo":1,"pageSize":10}'
|
|
144
|
+
weaver-work-cli --json archive run archive.borrow-car.add --input-json '{"formAndIds":[{"formId":"1190991330335571989","ids":["1252600626189156465"]}]}'
|
|
145
|
+
weaver-work-cli --json archive run archive.borrow-list.download.prepare --input-json '{"dataId":"1302806508947652629"}'
|
|
146
|
+
weaver-work-cli --json archive run archive.flow.borrow-car.prepare --input-json '{"arcIds":["1252600626189156465_1190991330335571989"],"carIds":["1302754028599656449"]}'
|
|
147
|
+
weaver-work-cli --json archive run archive.upload.prelib.prepare --input-json '{"file":"./档案.pdf","fondsId":"1042286256822697531"}'
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## 不在本 skill 范围
|
|
151
|
+
|
|
152
|
+
- 禁止加载原始接口文档版 Skill 代替 CLI;本 Skill 通过 `weaver-work-cli` 执行业务操作。
|
|
153
|
+
- 禁止 curl、fetch、浏览器自动化或直接访问 E10 `/api/archive/**`、`/api/ebuilder/**`、`/api/file/**`。
|
|
154
|
+
- 禁止读取或复制 CLI runtime 内部 Token、Cookie、ETEAMSID。
|
|
155
|
+
- 禁止读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
156
|
+
- 借阅申请表单提交、借阅车移除、归还/催还等能力当前未纳入 CLI manifest;需要先在页面操作或使用流程创建页 URL。
|
|
157
|
+
- 非档案类 E10 能力、通用流程编排、非文书定的表单/审批/组织等业务不由本 Skill 承载。
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# 文书定档案 CLI 入口
|
|
2
|
+
|
|
3
|
+
## 什么时候读取
|
|
4
|
+
|
|
5
|
+
首次进入文书定档案场景、需要确认 operation 清单、需要确认调用方式或输出约定时读取本文件。
|
|
6
|
+
|
|
7
|
+
## 统一入口
|
|
8
|
+
|
|
9
|
+
所有能力都通过 `weaver-work-cli archive run <operation>` 调用;`weaver-work-cli archive schema` 输出 operation、字段、风险等级和是否必须确认的合约。
|
|
10
|
+
|
|
11
|
+
| 想做什么 | Operation |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 查看全宗 | `archive.fonds.list` |
|
|
14
|
+
| 查看预归档电子文件库节点 | `archive.prelib.tree` |
|
|
15
|
+
| 全文检索可借档案 | `archive.search.run` |
|
|
16
|
+
| 查看档案基本信息 | `archive.info.get` |
|
|
17
|
+
| 查看借阅车 | `archive.borrow-car.list` |
|
|
18
|
+
| 加入借阅车(免确认) | `archive.borrow-car.add` |
|
|
19
|
+
| 查看借阅单 | `archive.borrow-list.list` |
|
|
20
|
+
| 查看借阅单详情 | `archive.borrow-list.detail` |
|
|
21
|
+
| 下载借阅单原文 | `archive.borrow-list.download.prepare` / `.apply` |
|
|
22
|
+
| 从借阅车发起借阅 | `archive.flow.borrow-car.prepare` / `.apply` |
|
|
23
|
+
| 从检索结果发起借阅 | `archive.flow.search.prepare` / `.apply` |
|
|
24
|
+
| 借阅单续借 | `archive.flow.renew.prepare` / `.apply` |
|
|
25
|
+
| 上传到预归档电子文件库 | `archive.upload.prelib.prepare` / `.apply` |
|
|
26
|
+
|
|
27
|
+
便捷子命令(`archive borrow-car list`、`archive borrow-list download-prepare` 等)与 `archive run <operation>` 等价,字段一致。
|
|
28
|
+
|
|
29
|
+
## 输入方式
|
|
30
|
+
|
|
31
|
+
- 简单 JSON:优先 `--input-json '<json>'`。
|
|
32
|
+
- 复杂或多行 JSON:先写 UTF-8 文件,再 `--input <path>`;只有确认当前 shell 能稳定传管道时才用 `--input -`。
|
|
33
|
+
|
|
34
|
+
Windows PowerShell:
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
weaver-work-cli archive schema
|
|
38
|
+
weaver-work-cli --json archive run archive.fonds.list --input-json '{"menuSign":"collectLib"}'
|
|
39
|
+
weaver-work-cli --json archive run archive.search.run --input-json '{"key":"会计凭证","pageNo":0,"pageSize":10}'
|
|
40
|
+
weaver-work-cli --json archive run archive.borrow-car.list --input-json '{"pageNo":1,"pageSize":10}'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
macOS/Linux(bash/zsh):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
weaver-work-cli archive schema
|
|
47
|
+
weaver-work-cli --json archive run archive.fonds.list --input-json '{"menuSign":"collectLib"}'
|
|
48
|
+
weaver-work-cli --json archive run archive.search.run --input-json '{"key":"会计凭证","pageNo":0,"pageSize":10}'
|
|
49
|
+
weaver-work-cli --json archive run archive.borrow-car.list --input-json '{"pageNo":1,"pageSize":10}'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 输出约定
|
|
53
|
+
|
|
54
|
+
成功写 stdout,形如 `{"schemaVersion":1,"ok":true,"operation":"...","data":{...},"meta":{...},"warnings":[]}`;失败写 stderr,形如 `{"schemaVersion":1,"ok":false,"error":{"type":"...","subtype":"...","message":"...","retryable":false}}` 并设置非 0 退出码。
|
|
55
|
+
|
|
56
|
+
列表类操作默认小页读取(`pageNo`/`pageSize`),先展示最相关的前 10 条;不要把完整 JSON 原样贴给用户,超长内容落本地文件后给路径。
|
|
57
|
+
|
|
58
|
+
## 注意
|
|
59
|
+
|
|
60
|
+
- 认证和登录态只能通过 `weaver-work-cli auth ...` 判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
61
|
+
- 错误为 `authentication` 或 `session_expired` 时立即停止,不要用示例占位域名或自行猜域名登录。
|
|
62
|
+
- 写操作(`*.apply`)必须先执行同名 `.prepare` 拿到 `continuation`,再带 `confirm=true` 执行;不要手工构造 continuation。
|
|
63
|
+
- 例外:`archive.borrow-car.add` 加入借阅车是免确认写操作,直接执行,不需要 `.prepare` / `.apply` 两段确认链。
|