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
package/README.md
CHANGED
|
@@ -9,12 +9,32 @@
|
|
|
9
9
|
- Node.js >= 18
|
|
10
10
|
- npm
|
|
11
11
|
|
|
12
|
+
## 跨平台命令约定
|
|
13
|
+
|
|
14
|
+
文档中的 CLI 示例按环境选择执行。完全相同的 `node`、`npm`、`git` 和 `weaver-work-cli` 命令可作为通用示例;涉及 JSON 输入、用户目录、文件删除/比对、Python 启动器或路径分隔符时,同时给 Windows PowerShell 和 macOS/Linux(bash/zsh)两套示例。Agent 应先判断当前环境:Windows 或 PowerShell 用 Windows 示例;macOS/Linux、bash 或 zsh 用 macOS/Linux 示例;不确定时先通过宿主环境或 `node -p "process.platform"` 判断。Windows/PowerShell 下不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法。
|
|
15
|
+
|
|
16
|
+
简单 JSON 输入优先使用 `--input-json`,避免不同 shell 对管道和引号的处理差异:
|
|
17
|
+
|
|
18
|
+
Windows PowerShell:
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0}'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
macOS/Linux(bash/zsh):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0}'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
复杂 JSON 或包含多行内容时,建议先保存为 UTF-8 `.json` 文件,再按平台传给 `--input`:Windows PowerShell 用 `--input "C:\path\to\input.json"`,macOS/Linux 用 `--input "/path/to/input.json"`。当前 CLI 会兼容 Windows PowerShell 常见 UTF-8 BOM 文件。文档、提示词和 Skill Maker 生成内容都要保持这种双平台口径,不把单一平台命令写成唯一默认步骤。
|
|
31
|
+
|
|
12
32
|
## 下载后快速运行
|
|
13
33
|
|
|
14
34
|
从代码仓库获取项目:
|
|
15
35
|
|
|
16
|
-
```
|
|
17
|
-
git clone
|
|
36
|
+
```text
|
|
37
|
+
git clone GIT_REPO_URL weaver-work-cli
|
|
18
38
|
cd weaver-work-cli
|
|
19
39
|
npm install
|
|
20
40
|
npm run build
|
|
@@ -23,14 +43,14 @@ node dist/index.js --help
|
|
|
23
43
|
|
|
24
44
|
开发阶段可以直接从源码运行:
|
|
25
45
|
|
|
26
|
-
```
|
|
46
|
+
```text
|
|
27
47
|
npm run dev -- --help
|
|
28
48
|
npm run dev -- commands list
|
|
29
49
|
```
|
|
30
50
|
|
|
31
51
|
构建后的本地验证:
|
|
32
52
|
|
|
33
|
-
```
|
|
53
|
+
```text
|
|
34
54
|
npm run build
|
|
35
55
|
node dist/index.js --version
|
|
36
56
|
node dist/index.js commands list
|
|
@@ -41,9 +61,22 @@ node dist/index.js doctor --e10
|
|
|
41
61
|
|
|
42
62
|
从当前源码目录安装到全局命令:
|
|
43
63
|
|
|
64
|
+
Windows PowerShell:
|
|
65
|
+
|
|
66
|
+
```powershell
|
|
67
|
+
# 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
|
|
68
|
+
cd C:\path\to\weaver-work-cli
|
|
69
|
+
npm install
|
|
70
|
+
npm run build
|
|
71
|
+
npm link
|
|
72
|
+
weaver-work-cli --help
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
macOS/Linux(bash/zsh):
|
|
76
|
+
|
|
44
77
|
```bash
|
|
45
|
-
#
|
|
46
|
-
cd
|
|
78
|
+
# 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
|
|
79
|
+
cd /path/to/weaver-work-cli
|
|
47
80
|
npm install
|
|
48
81
|
npm run build
|
|
49
82
|
npm link
|
|
@@ -52,18 +85,31 @@ weaver-work-cli --help
|
|
|
52
85
|
|
|
53
86
|
打包后全局安装:
|
|
54
87
|
|
|
88
|
+
Windows PowerShell:
|
|
89
|
+
|
|
90
|
+
```powershell
|
|
91
|
+
# 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
|
|
92
|
+
cd C:\path\to\weaver-work-cli
|
|
93
|
+
npm run build
|
|
94
|
+
npm pack
|
|
95
|
+
npm install -g .\weaver-work-cli-0.1.2.tgz
|
|
96
|
+
weaver-work-cli --version
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
macOS/Linux(bash/zsh):
|
|
100
|
+
|
|
55
101
|
```bash
|
|
56
|
-
#
|
|
57
|
-
cd
|
|
102
|
+
# 在克隆到本地的仓库根目录执行(将示例路径替换为实际路径)
|
|
103
|
+
cd /path/to/weaver-work-cli
|
|
58
104
|
npm run build
|
|
59
105
|
npm pack
|
|
60
|
-
npm install -g ./weaver-work-cli-0.1.
|
|
106
|
+
npm install -g ./weaver-work-cli-0.1.2.tgz
|
|
61
107
|
weaver-work-cli --version
|
|
62
108
|
```
|
|
63
109
|
|
|
64
110
|
发布到 npm 或公司私有 registry 后,可以直接安装:
|
|
65
111
|
|
|
66
|
-
```
|
|
112
|
+
```text
|
|
67
113
|
npm install -g weaver-work-cli
|
|
68
114
|
weaver-work-cli setup invoice
|
|
69
115
|
```
|
|
@@ -74,28 +120,53 @@ Agent Skill 文档都包含在这个 npm 包中;普通 CLI 用户不需要再
|
|
|
74
120
|
|
|
75
121
|
首次启用发票业务时:
|
|
76
122
|
|
|
77
|
-
```
|
|
123
|
+
```text
|
|
78
124
|
weaver-work-cli setup invoice
|
|
79
|
-
weaver-work-cli auth login --base-url "https://weapp.xxx.cn"
|
|
125
|
+
weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --agent_type "<当前智能体名称>"
|
|
80
126
|
weaver-work-cli invoice schema
|
|
81
127
|
```
|
|
82
128
|
|
|
83
129
|
如果要让 Codex/Agent 一键识别发票业务,把随包 Skill 安装到 Codex skills 目录:
|
|
84
130
|
|
|
85
|
-
```
|
|
131
|
+
```text
|
|
86
132
|
weaver-work-cli setup invoice --install-skill
|
|
87
133
|
# 或只安装 Skill
|
|
88
|
-
weaver-work-cli skills install
|
|
134
|
+
weaver-work-cli skills install yepiaotong
|
|
89
135
|
```
|
|
90
136
|
|
|
91
|
-
`skills install
|
|
92
|
-
`weaver-
|
|
93
|
-
`CODEX_HOME`
|
|
94
|
-
|
|
137
|
+
`skills install yepiaotong` 会同时安装 `weaver-e10-shared` 和
|
|
138
|
+
`weaver-e10-yepiaotong`。默认目标目录优先使用环境变量 `CODEX_HOME` 下的
|
|
139
|
+
`skills` 子目录;未设置 `CODEX_HOME` 时使用用户主目录下的 `.codex/skills`
|
|
140
|
+
(Windows PowerShell 示例:`"$env:USERPROFILE\.codex\skills"`);需要自定义时可加
|
|
141
|
+
`--target-dir <path>`。默认目标面向 Codex CLI;WorkBuddy 等桌面 Agent 的
|
|
142
|
+
用户级 Skill 目录不是默认目标,需显式指定:
|
|
95
143
|
|
|
96
|
-
|
|
144
|
+
Windows PowerShell:
|
|
145
|
+
|
|
146
|
+
```powershell
|
|
147
|
+
weaver-work-cli skills install yepiaotong --target-dir "$env:USERPROFILE\.workbuddy\skills"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
macOS/Linux(bash/zsh):
|
|
97
151
|
|
|
98
152
|
```bash
|
|
153
|
+
weaver-work-cli skills install yepiaotong --target-dir "$HOME/.workbuddy/skills"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
如果要让 Agent 根据用户提供的新业务模块文档或代码同步生成/更新业务 CLI 和
|
|
157
|
+
weaver 风格的业务 Skill,在生成后按泛微技能检测工具做静态质检,并在检测
|
|
158
|
+
通过后询问是否安装到当前智能体,可安装 Skill Maker:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
weaver-work-cli skills install skill-maker
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
各 Agent 环境的 skill 目录、从本地开发仓库升级到最新版的完整流程与验证
|
|
165
|
+
步骤见 `docs/agent-skill-install.md`。
|
|
166
|
+
|
|
167
|
+
卸载全局命令:
|
|
168
|
+
|
|
169
|
+
```text
|
|
99
170
|
npm unlink -g weaver-work-cli
|
|
100
171
|
# 或
|
|
101
172
|
npm uninstall -g weaver-work-cli
|
|
@@ -103,7 +174,7 @@ npm uninstall -g weaver-work-cli
|
|
|
103
174
|
|
|
104
175
|
## 常用命令
|
|
105
176
|
|
|
106
|
-
```
|
|
177
|
+
```text
|
|
107
178
|
weaver-work-cli --help
|
|
108
179
|
weaver-work-cli --version
|
|
109
180
|
weaver-work-cli commands list
|
|
@@ -113,15 +184,15 @@ weaver-work-cli docs copy
|
|
|
113
184
|
weaver-work-cli doctor --e10
|
|
114
185
|
weaver-work-cli setup invoice
|
|
115
186
|
weaver-work-cli skills list
|
|
116
|
-
weaver-work-cli skills read weaver-
|
|
117
|
-
weaver-work-cli skills install
|
|
187
|
+
weaver-work-cli skills read weaver-e10-yepiaotong
|
|
188
|
+
weaver-work-cli skills install yepiaotong
|
|
118
189
|
weaver-work-cli invoice schema
|
|
119
|
-
weaver-work-cli --json invoice run invoice.list --input
|
|
190
|
+
weaver-work-cli --json invoice run invoice.list --input-json '{"page_size":10,"start_pos":0}'
|
|
120
191
|
```
|
|
121
192
|
|
|
122
193
|
为了兼容 E10 使用习惯,`auth` 命令保留在顶层;同时也支持 `e10 auth` 命名空间:
|
|
123
194
|
|
|
124
|
-
```
|
|
195
|
+
```text
|
|
125
196
|
weaver-work-cli auth status
|
|
126
197
|
weaver-work-cli e10 auth status
|
|
127
198
|
```
|
|
@@ -130,43 +201,59 @@ weaver-work-cli e10 auth status
|
|
|
130
201
|
|
|
131
202
|
方式一:浏览器 OAuth2.0 登录,推荐优先使用。
|
|
132
203
|
|
|
133
|
-
```
|
|
204
|
+
```text
|
|
134
205
|
weaver-work-cli auth login --base-url "https://weapp.xxx.cn"
|
|
135
206
|
```
|
|
136
207
|
|
|
137
208
|
等价命令:
|
|
138
209
|
|
|
139
|
-
```
|
|
210
|
+
```text
|
|
140
211
|
weaver-work-cli auth oidc --base-url "https://weapp.xxx.cn"
|
|
141
212
|
```
|
|
142
213
|
|
|
214
|
+
在小 E 宿主环境中,`auth login` / `auth oidc` / `auth xiaoe` 会先读取宿主注入的
|
|
215
|
+
`XIAOE_*` 环境变量,匹配当前登录域名对应的统一登录凭证。匹配成功时直接保存登录态,
|
|
216
|
+
并固定使用 `agentType=Xiao.E`;未显式传域名时,会优先使用小 E 环境变量里的首个
|
|
217
|
+
支持域名,其次才使用当前 profile 配置,仍没有支持域名时保留资料包默认域名
|
|
218
|
+
`https://www.e-cology.com.cn`。小 E 凭证校验失败、当前域名不在支持范围内,
|
|
219
|
+
或客户切换了访问域名时,会自动降级到原浏览器 OAuth2.0 登录。业务命令在未显式
|
|
220
|
+
指定 `--auth` / `--profile` 时,也会自动优先尝试小 E 统一登录。也可以显式使用:
|
|
221
|
+
|
|
222
|
+
```text
|
|
223
|
+
weaver-work-cli auth xiaoe
|
|
224
|
+
```
|
|
225
|
+
|
|
143
226
|
默认本地回调地址为 `http://127.0.0.1:19800/callback`。如果端口被占用:
|
|
144
227
|
|
|
145
|
-
```
|
|
228
|
+
```text
|
|
146
229
|
weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --port 19801
|
|
147
230
|
```
|
|
148
231
|
|
|
149
|
-
需要区分客户端来源时,可以指定 `agent_type
|
|
232
|
+
需要区分客户端来源时,可以指定 `agent_type`。未显式传入时,CLI 会尝试从
|
|
233
|
+
`WEAVER_AGENT_TYPE`、`WORKBUDDY_AGENT_TYPE`、`CODEX_AGENT_TYPE` 以及
|
|
234
|
+
`WORKBUDDY_*` / `CODEX_*` 环境变量推断当前智能体,最后回落为 `weaver-work-cli`。
|
|
235
|
+
浏览器授权地址会同时携带 `agent_type=<value>` 和 `from=<value>`,其中 `from`
|
|
236
|
+
用于 E10 授权确认页展示客户端名称:
|
|
150
237
|
|
|
151
|
-
```
|
|
152
|
-
weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --agent_type
|
|
238
|
+
```text
|
|
239
|
+
weaver-work-cli auth login --base-url "https://weapp.xxx.cn" --agent_type workbuddy
|
|
153
240
|
```
|
|
154
241
|
|
|
155
242
|
方式二:手动写入浏览器中的 `ETEAMSID`。
|
|
156
243
|
|
|
157
|
-
```
|
|
244
|
+
```text
|
|
158
245
|
weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn"
|
|
159
246
|
```
|
|
160
247
|
|
|
161
248
|
如果 E10 环境需要区分 agent:
|
|
162
249
|
|
|
163
|
-
```
|
|
164
|
-
weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn" --agent_type
|
|
250
|
+
```text
|
|
251
|
+
weaver-work-cli auth set --eteamsid "PCACCOUNT_xxx" --base-url "https://weapp.xxx.cn" --agent_type workbuddy
|
|
165
252
|
```
|
|
166
253
|
|
|
167
254
|
查看登录状态:
|
|
168
255
|
|
|
169
|
-
```
|
|
256
|
+
```text
|
|
170
257
|
weaver-work-cli auth status
|
|
171
258
|
weaver-work-cli auth status --no-check
|
|
172
259
|
weaver-work-cli --json auth status --no-check
|
|
@@ -174,7 +261,7 @@ weaver-work-cli --json auth status --no-check
|
|
|
174
261
|
|
|
175
262
|
查看当前用户:
|
|
176
263
|
|
|
177
|
-
```
|
|
264
|
+
```text
|
|
178
265
|
weaver-work-cli auth whoami
|
|
179
266
|
weaver-work-cli auth whoami --live
|
|
180
267
|
weaver-work-cli auth whoami --json
|
|
@@ -182,18 +269,14 @@ weaver-work-cli auth whoami --json
|
|
|
182
269
|
|
|
183
270
|
清理当前 profile 的登录状态:
|
|
184
271
|
|
|
185
|
-
```
|
|
272
|
+
```text
|
|
186
273
|
weaver-work-cli auth logout
|
|
187
|
-
weaver-work-cli --profile
|
|
274
|
+
weaver-work-cli --profile PROFILE_NAME auth logout
|
|
188
275
|
```
|
|
189
276
|
|
|
190
277
|
`auth logout` 只删除本地 auth 文件,不删除 profile 配置和 keychain 密钥。
|
|
191
278
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
eval "$(weaver-work-cli auth export-weaver-env)"
|
|
196
|
-
```
|
|
279
|
+
需要给子进程使用 E10 登录态时优先使用 `weaver-work-cli run ...`,两端一致可用。`weaver-work-cli auth export-weaver-env` 可按 shell 输出当前会话可执行的环境变量设置语句,默认 `--shell auto` 会在 Windows 输出 PowerShell 语法,在 macOS/Linux 输出 POSIX shell 语法;也可显式使用 `--shell powershell` 或 `--shell posix`。不要手工打印或转贴 `WEAVER_*` 值。
|
|
197
280
|
|
|
198
281
|
导出的环境变量包括:
|
|
199
282
|
|
|
@@ -205,31 +288,45 @@ eval "$(weaver-work-cli auth export-weaver-env)"
|
|
|
205
288
|
|
|
206
289
|
通过 `weaver-work-cli run` 执行外部命令时,CLI 会在前置钩子中自动注入上述 `WEAVER_*` 变量:
|
|
207
290
|
|
|
208
|
-
```
|
|
291
|
+
```text
|
|
209
292
|
weaver-work-cli run node -e "console.log(process.env.WEAVER_BASE_URL || 'no e10 auth')"
|
|
210
293
|
```
|
|
211
294
|
|
|
295
|
+
如必须导出到当前 shell,按环境选择:
|
|
296
|
+
|
|
297
|
+
Windows PowerShell:
|
|
298
|
+
|
|
299
|
+
```powershell
|
|
300
|
+
Invoke-Expression (weaver-work-cli auth export-weaver-env --shell powershell)
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
macOS/Linux(bash/zsh):
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
eval "$(weaver-work-cli auth export-weaver-env --shell posix)"
|
|
307
|
+
```
|
|
308
|
+
|
|
212
309
|
## Profile 管理
|
|
213
310
|
|
|
214
311
|
鉴权文件默认由 `weaver-work-cli` 独立管理:
|
|
215
312
|
|
|
216
|
-
-
|
|
217
|
-
- Profile
|
|
218
|
-
- 当前激活 profile
|
|
313
|
+
- 鉴权根目录:通过 `weaver-work-cli auth root` 查看;默认位于用户主目录下的 `.weaver-work-cli/e10`(Windows PowerShell:`$env:USERPROFILE\.weaver-work-cli\e10`;macOS/Linux:`$HOME/.weaver-work-cli/e10`)
|
|
314
|
+
- Profile 目录:`profiles/<profile>`(位于鉴权根目录下)
|
|
315
|
+
- 当前激活 profile:`profile`(位于鉴权根目录下)
|
|
219
316
|
- Keychain service/account:`weaver-work-cli` / `auth-key`
|
|
220
317
|
|
|
221
|
-
CLI 默认不读取、不迁移 `e10-login` / `e10-cli`
|
|
318
|
+
CLI 默认不读取、不迁移 `e10-login` / `e10-cli` 的旧 `.e10-cli` 登录态;
|
|
222
319
|
打包给用户后,用户必须通过 `weaver-work-cli auth login` 或
|
|
223
320
|
`weaver-work-cli auth set` 建立本插件自己的登录状态。确需复用外部 auth 文件时,
|
|
224
321
|
可以显式使用 `--auth <path>` 或 `E10_AUTH_PATH`。
|
|
225
322
|
|
|
226
323
|
常用 profile 命令:
|
|
227
324
|
|
|
228
|
-
```
|
|
325
|
+
```text
|
|
229
326
|
weaver-work-cli auth profile list
|
|
230
327
|
weaver-work-cli auth profile current
|
|
231
|
-
weaver-work-cli auth profile use
|
|
232
|
-
weaver-work-cli --profile
|
|
328
|
+
weaver-work-cli auth profile use PROFILE_NAME
|
|
329
|
+
weaver-work-cli --profile PROFILE_NAME auth status
|
|
233
330
|
```
|
|
234
331
|
|
|
235
332
|
支持的鉴权相关环境变量:
|
|
@@ -266,8 +363,8 @@ src/
|
|
|
266
363
|
services/ 可复用的非业务服务。
|
|
267
364
|
docs/ 随包发布的 CLI 文档。
|
|
268
365
|
skills/ 随包发布的 Agent Skills;入口 SKILL.md 做路由,细节放 references/。
|
|
269
|
-
weaver-
|
|
270
|
-
weaver-
|
|
366
|
+
weaver-e10-shared/ 所有业务 Skill 共享的安装、认证、JSON 和写入规则。
|
|
367
|
+
weaver-e10-yepiaotong/ 业票通业务 Skill。
|
|
271
368
|
skill-template/ 新增或重写业务 Skill 时使用的模板来源,参考 lark-cli 的 skill-template。
|
|
272
369
|
templates/ 后续 shortcut 脚手架模板。
|
|
273
370
|
scripts/ 维护脚本。
|
|
@@ -280,16 +377,16 @@ test/ Node 内置测试运行器测试。
|
|
|
280
377
|
|
|
281
378
|
- `cmd`:稳定的系统/平台命令,例如 `config`、`doctor`、`run`、`e10 auth`、`skills list/read`。
|
|
282
379
|
- `shortcuts`:业务友好的高层命令,例如 `invoice list`、`invoice import prepare`;按 `src/shortcuts/<business-module>` 分模块维护,模块内每个业务 operation 用相对独立的 class 封装。
|
|
283
|
-
- `skills`:Agent 可读的使用说明和引用文件;按 `skills/weaver-
|
|
380
|
+
- `skills`:Agent 可读的使用说明和引用文件;按 `skills/weaver-e10-<business-module>` 分模块维护。业务入口 `SKILL.md` 只放路由、前置要求和执行原则,具体 operation、工作流、错误处理放到 `references/*.md`;公共规则只放在 `weaver-e10-shared`。
|
|
284
381
|
- `skill-template`:维护者新增业务 Skill 时的模板来源,作用类似飞书 CLI 的 `skill-template`。`master-skill-template.md` 用于未来聚合入口,`skill-template.md` 用于单业务 Skill,`business-info.json` 记录路由关键词,`domains/*.md` 记录当前业务域应拆出的 reference 与 Agent 调优重点。
|
|
285
382
|
|
|
286
383
|
## 新增业务 Shortcut
|
|
287
384
|
|
|
288
385
|
业务 shortcut 统一创建在 `src/shortcuts/<name>` 下,不和框架内置命令、E10 共享适配混放。
|
|
289
|
-
配套 Agent Skill 统一创建在 `skills/weaver-
|
|
386
|
+
配套 Agent Skill 统一创建在 `skills/weaver-e10-<name>`:
|
|
290
387
|
|
|
291
388
|
```text
|
|
292
|
-
skills/weaver-
|
|
389
|
+
skills/weaver-e10-<name>/
|
|
293
390
|
SKILL.md 入口路由:共享 Skill、schema、reference 索引、禁用边界。
|
|
294
391
|
product.json 可选:业务 Skill 包元信息。
|
|
295
392
|
references/
|
|
@@ -298,48 +395,62 @@ skills/weaver-work-cli-<name>/
|
|
|
298
395
|
<name>-write.md prepare/apply 写入协议、确认和回查。
|
|
299
396
|
```
|
|
300
397
|
|
|
301
|
-
|
|
398
|
+
新增业务模块时默认同步维护 `src/shortcuts/<name>` 和 `skills/weaver-e10-<name>`。Skill Maker 会参考 `skill-template/skill-template.md`、`skill-template/domains/<name>.md` 和自身 CLI 生成规范;入口文件不要复制大段接口细节,让 Agent 按用户意图读取最小必要 reference。
|
|
302
399
|
|
|
303
|
-
当前已内置 `
|
|
400
|
+
当前已内置 `yepiaotong` shortcut,用于 E10 业票通发票管理。典型调用:
|
|
304
401
|
|
|
305
|
-
```
|
|
306
|
-
weaver-work-cli --json invoice list --input
|
|
307
|
-
weaver-work-cli --json invoice enterprise list --input
|
|
308
|
-
weaver-work-cli --json invoice get --fid
|
|
402
|
+
```text
|
|
403
|
+
weaver-work-cli --json invoice list --input-json '{"page_size":10,"start_pos":0}'
|
|
404
|
+
weaver-work-cli --json invoice enterprise list --input-json '{"page_size":10,"start_pos":0}'
|
|
405
|
+
weaver-work-cli --json invoice get --fid INVOICE_FID
|
|
309
406
|
weaver-work-cli --json invoice upload --file ./invoice.pdf
|
|
310
407
|
weaver-work-cli --json invoice ocr preview --file ./invoice.pdf
|
|
311
|
-
weaver-work-cli --json invoice validate preview --fid
|
|
312
|
-
weaver-work-cli --json invoice download --fid
|
|
408
|
+
weaver-work-cli --json invoice validate preview --fid INVOICE_FID --scope personal
|
|
409
|
+
weaver-work-cli --json invoice download --fid INVOICE_FID --file-id FILE_ID --output ./invoice.pdf
|
|
313
410
|
```
|
|
314
411
|
|
|
315
412
|
写操作固定使用 `prepare -> apply`:
|
|
316
413
|
|
|
414
|
+
Windows PowerShell:
|
|
415
|
+
|
|
416
|
+
```powershell
|
|
417
|
+
weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./invoice.pdf"}'
|
|
418
|
+
|
|
419
|
+
weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
|
|
420
|
+
|
|
421
|
+
weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
macOS/Linux(bash/zsh):
|
|
425
|
+
|
|
317
426
|
```bash
|
|
318
|
-
|
|
319
|
-
| weaver-work-cli --json invoice import prepare --input -
|
|
427
|
+
weaver-work-cli --json invoice run invoice.ocr.preview --input-json '{"file":"./invoice.pdf"}'
|
|
320
428
|
|
|
321
|
-
|
|
322
|
-
|
|
429
|
+
weaver-work-cli --json invoice import prepare --input-json '{"file":"./invoice.pdf","validate":true,"syncToOa":true}'
|
|
430
|
+
|
|
431
|
+
weaver-work-cli --json invoice import apply --input-json '{"file":"./invoice.pdf","continuation":"PREPARE_CONTINUATION","confirm":true}'
|
|
323
432
|
```
|
|
324
433
|
|
|
325
|
-
Agent 应优先调用 `weaver-work-cli --json invoice run <operation> --input
|
|
434
|
+
Agent 应优先调用 `weaver-work-cli --json invoice run <operation> --input-json '<json>'`,复杂输入或文件化输入使用 `--input <path>`,并读取 `weaver-work-cli invoice schema` 获取 operation 契约。共享、转让和标签接口因缺少稳定 ID 来源和写后回查契约,当前不暴露给 Agent。
|
|
435
|
+
|
|
436
|
+
输出处理参考飞书 CLI 的 Agent 友好实践,但当前项目仍是轻量输出层:`ctx.output.write` 在 JSON 模式下直接把完整 envelope 打到 stdout,失败写 stderr;暂未提供通用 `--jq`、`--format table/ndjson` 或 `--page-all`。因此业务 Skill 会预先要求 Agent 控制响应量:列表默认 `page_size=10`,按业务分页字段继续;给用户只渲染摘要、关键字段、数量和下一步,超长详情/OCR/调试 JSON 优先落本地文件并返回路径。
|
|
326
437
|
|
|
327
438
|
如需交付通用 Agent Skill 包:
|
|
328
439
|
|
|
329
|
-
```
|
|
440
|
+
```text
|
|
330
441
|
npm run build:skill -- invoice
|
|
331
442
|
# 或保留的 invoice 便捷命令
|
|
332
|
-
npm run build:
|
|
443
|
+
npm run build:yepiaotong-skill
|
|
333
444
|
```
|
|
334
445
|
|
|
335
|
-
输出文件默认在 `dist/weaver-
|
|
446
|
+
输出文件默认在 `dist/weaver-e10-yepiaotong-skill.zip`。该 zip 主要用于
|
|
336
447
|
Codex/Agent 平台导入、离线分发或版本归档;日常推荐直接通过 npm 包内置内容
|
|
337
|
-
执行 `weaver-work-cli skills install
|
|
338
|
-
`weaver-
|
|
448
|
+
执行 `weaver-work-cli skills install yepiaotong`。zip 包包含
|
|
449
|
+
`weaver-e10-yepiaotong` 和共享的 `weaver-e10-shared`,要求用户本机已安装
|
|
339
450
|
可用的 `weaver-work-cli`。
|
|
340
451
|
如需打包全部 Skill:
|
|
341
452
|
|
|
342
|
-
```
|
|
453
|
+
```text
|
|
343
454
|
npm run build:skill
|
|
344
455
|
```
|
|
345
456
|
|
|
@@ -405,7 +516,7 @@ export const builtinShortcuts: CliCommand[] = [
|
|
|
405
516
|
|
|
406
517
|
验证命令是否注册成功:
|
|
407
518
|
|
|
408
|
-
```
|
|
519
|
+
```text
|
|
409
520
|
npm run build
|
|
410
521
|
node dist/index.js commands list
|
|
411
522
|
node dist/index.js workflow --help
|
|
@@ -415,7 +526,7 @@ node dist/index.js workflow --help
|
|
|
415
526
|
|
|
416
527
|
## 发布前验证
|
|
417
528
|
|
|
418
|
-
```
|
|
529
|
+
```text
|
|
419
530
|
npm run build
|
|
420
531
|
npm test
|
|
421
532
|
npm pack --dry-run
|
package/dist/cmd/setup/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export const setupCommand = {
|
|
|
22
22
|
? options
|
|
23
23
|
: {};
|
|
24
24
|
const authFile = findAuthFile(ctx.cwd, ctx.getGlobalOptions());
|
|
25
|
-
const packagedSkills = resolvePackagedSkillNames(SKILLS_DIR, '
|
|
25
|
+
const packagedSkills = resolvePackagedSkillNames(SKILLS_DIR, 'yepiaotong');
|
|
26
26
|
const checks = [
|
|
27
27
|
{
|
|
28
28
|
name: 'node',
|
|
@@ -36,7 +36,7 @@ export const setupCommand = {
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
name: 'invoiceSkillPackaged',
|
|
39
|
-
ok: packagedSkills.includes('weaver-
|
|
39
|
+
ok: packagedSkills.includes('weaver-e10-yepiaotong'),
|
|
40
40
|
detail: packagedSkills.join(', '),
|
|
41
41
|
},
|
|
42
42
|
{
|
|
@@ -46,14 +46,14 @@ export const setupCommand = {
|
|
|
46
46
|
},
|
|
47
47
|
];
|
|
48
48
|
const skillInstall = opts.installSkill
|
|
49
|
-
? installPackagedSkills(SKILLS_DIR, opts.skillTargetDir || defaultCodexSkillsRoot(ctx.env), '
|
|
49
|
+
? installPackagedSkills(SKILLS_DIR, opts.skillTargetDir || defaultCodexSkillsRoot(ctx.env), 'yepiaotong')
|
|
50
50
|
: null;
|
|
51
51
|
const nextActions = [];
|
|
52
52
|
if (!checks.find((check) => check.name === 'e10Auth')?.ok) {
|
|
53
|
-
nextActions.push('Run: weaver-work-cli auth login --base-url <E10_BASE_URL>');
|
|
53
|
+
nextActions.push('Run: weaver-work-cli auth login --base-url <E10_BASE_URL> --agent_type <agent_type>');
|
|
54
54
|
}
|
|
55
55
|
if (!skillInstall) {
|
|
56
|
-
nextActions.push('Optional Agent setup: weaver-work-cli skills install
|
|
56
|
+
nextActions.push('Optional Agent setup: weaver-work-cli skills install yepiaotong');
|
|
57
57
|
}
|
|
58
58
|
nextActions.push('Verify invoice operations: weaver-work-cli invoice schema');
|
|
59
59
|
const ok = checks.every((check) => check.ok);
|
package/dist/cmd/skills/index.js
CHANGED
|
@@ -55,7 +55,7 @@ export const skillsCommand = {
|
|
|
55
55
|
}));
|
|
56
56
|
skills.command('install')
|
|
57
57
|
.description('Install packaged skills into Codex skills directory')
|
|
58
|
-
.argument('[target]', 'skill name, short name such as
|
|
58
|
+
.argument('[target]', 'skill name (weaver-e10-* or legacy weaver-work-cli-*), short name such as skill-maker, or all', 'all')
|
|
59
59
|
.option('--target-dir <path>', 'override target skills directory')
|
|
60
60
|
.action(action((ctx, target, options) => {
|
|
61
61
|
const opts = options && typeof options === 'object' ? options : {};
|
package/dist/core/hooks.js
CHANGED
|
@@ -6,6 +6,7 @@ export class HookManager {
|
|
|
6
6
|
beforeRun: [],
|
|
7
7
|
afterRun: [],
|
|
8
8
|
};
|
|
9
|
+
e10RequestInterceptors = [];
|
|
9
10
|
register(hooks) {
|
|
10
11
|
for (const [name, handler] of Object.entries(hooks)) {
|
|
11
12
|
if (handler) {
|
|
@@ -38,4 +39,10 @@ export class HookManager {
|
|
|
38
39
|
await hook(ctx, result);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
42
|
+
registerE10RequestInterceptor(interceptor) {
|
|
43
|
+
this.e10RequestInterceptors.push(interceptor);
|
|
44
|
+
}
|
|
45
|
+
getE10RequestInterceptors() {
|
|
46
|
+
return this.e10RequestInterceptors;
|
|
47
|
+
}
|
|
41
48
|
}
|
package/dist/index.js
CHANGED
|
File without changes
|