weaver-work-cli 0.1.2 → 0.1.5
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 +176 -78
- 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 +159 -54
- 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 +345 -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 +24 -0
- package/dist/shortcuts/invoice/host.js +99 -94
- package/dist/shortcuts/invoice/index.js +58 -59
- package/dist/shortcuts/invoice/manifest.js +200 -3
- package/dist/shortcuts/invoice/operations/browse-field.js +17 -0
- package/dist/shortcuts/invoice/operations/issuing.js +198 -0
- 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 +247 -0
- 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/meeting/continuation.js +70 -0
- package/dist/shortcuts/meeting/errors.js +63 -0
- package/dist/shortcuts/meeting/host.js +167 -0
- package/dist/shortcuts/meeting/index.js +123 -0
- package/dist/shortcuts/meeting/manifest.js +64 -0
- package/dist/shortcuts/meeting/operations/catalogs.js +58 -0
- package/dist/shortcuts/meeting/operations/change.js +242 -0
- package/dist/shortcuts/meeting/operations/conflicts.js +142 -0
- package/dist/shortcuts/meeting/operations/create.js +349 -0
- package/dist/shortcuts/meeting/operations/env.js +191 -0
- package/dist/shortcuts/meeting/operations/lifecycle.js +139 -0
- package/dist/shortcuts/meeting/operations/meetings.js +73 -0
- package/dist/shortcuts/meeting/operations/receipts.js +195 -0
- package/dist/shortcuts/meeting/operations/registry.js +47 -0
- package/dist/shortcuts/meeting/operations/rooms.js +132 -0
- package/dist/shortcuts/meeting/operations/shared.js +112 -0
- package/dist/shortcuts/meeting/operations/signs.js +41 -0
- package/dist/shortcuts/meeting/operations/types.js +25 -0
- package/dist/shortcuts/meeting/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/dist/shortcuts/yimiaoban/continuation.js +70 -0
- package/dist/shortcuts/yimiaoban/errors.js +61 -0
- package/dist/shortcuts/yimiaoban/host.js +469 -0
- package/dist/shortcuts/yimiaoban/index.js +271 -0
- package/dist/shortcuts/yimiaoban/manifest.js +28 -0
- package/dist/shortcuts/yimiaoban/operations/file-user.js +288 -0
- package/dist/shortcuts/yimiaoban/operations/group-read.js +477 -0
- package/dist/shortcuts/yimiaoban/operations/group-write.js +591 -0
- package/dist/shortcuts/yimiaoban/operations/msg-parse.js +429 -0
- package/dist/shortcuts/yimiaoban/operations/msg-sync.js +519 -0
- package/dist/shortcuts/yimiaoban/operations/msg-write.js +593 -0
- package/dist/shortcuts/yimiaoban/operations/person.js +102 -0
- package/dist/shortcuts/yimiaoban/operations/registry.js +38 -0
- package/dist/shortcuts/yimiaoban/operations/session.js +437 -0
- package/dist/shortcuts/yimiaoban/operations/shared.js +236 -0
- package/dist/shortcuts/yimiaoban/operations/types.js +27 -0
- package/dist/shortcuts/yimiaoban/operations/write-util.js +78 -0
- package/dist/shortcuts/yimiaoban/operations.js +8 -0
- package/docs/SKILL.md +11 -7
- package/docs/_catalog.md +28 -5
- package/docs/agent-invoice.md +19 -9
- package/docs/agent-skill-install.md +141 -22
- 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 +61 -20
- package/docs/jiuchuanhui.md +131 -0
- package/docs/meeting.md +48 -0
- package/docs/operation-manual.md +443 -0
- package/docs/plan.md +82 -0
- package/docs/wenshuding.md +129 -0
- package/docs/yimiaoban.md +86 -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 +16 -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/meeting.md +3 -0
- package/skill-template/domains/plan.md +17 -0
- package/skill-template/domains/qiyecheng.md +17 -0
- package/skill-template/domains/shared.md +5 -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/yimiaoban.md +21 -0
- package/skill-template/domains/ziguanjia.md +21 -0
- package/skill-template/master-skill-template.md +12 -6
- package/skill-template/skill-template.md +26 -10
- package/skills/weaver-e10-calendar/SKILL.md +102 -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 +103 -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 +88 -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 +175 -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 +102 -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 +152 -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-meeting/SKILL.md +106 -0
- package/skills/weaver-e10-meeting/product.json +8 -0
- package/skills/weaver-e10-meeting/references/meeting-change.md +67 -0
- package/skills/weaver-e10-meeting/references/meeting-create.md +52 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +57 -0
- package/skills/weaver-e10-meeting/references/meeting-queries.md +61 -0
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +48 -0
- package/skills/weaver-e10-meeting/references/meeting-update.md +7 -0
- package/skills/weaver-e10-meeting/references/source-manifest.json +50 -0
- package/skills/weaver-e10-plan/SKILL.md +140 -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 +119 -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 +90 -0
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +127 -0
- package/skills/{weaver-work-cli-shared → weaver-e10-shared}/references/json-output-contract.md +34 -0
- package/skills/weaver-e10-shared/references/weaver-e10-installation.md +110 -0
- package/skills/weaver-e10-skill-maker/SKILL.md +78 -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 +158 -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-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-agent-entry.md +16 -9
- 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-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-download.md +9 -2
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-enterprise-list.md +12 -4
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-file-upload.md +9 -2
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-import.md +16 -7
- 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 +12 -4
- package/skills/{weaver-work-cli-invoice → weaver-e10-yepiaotong}/references/invoice-personal-list.md +12 -4
- 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 +9 -2
- 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-yimiaoban/SKILL.md +104 -0
- package/skills/weaver-e10-yimiaoban/product.json +8 -0
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +68 -0
- package/skills/weaver-e10-yimiaoban/references/error-codes.md +85 -0
- package/skills/weaver-e10-yimiaoban/references/field-resolution.md +46 -0
- package/skills/weaver-e10-yimiaoban/references/file-user-i18n.md +54 -0
- package/skills/weaver-e10-yimiaoban/references/group-read.md +55 -0
- package/skills/weaver-e10-yimiaoban/references/group-write.md +72 -0
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +59 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +64 -0
- package/skills/weaver-e10-yimiaoban/references/person.md +44 -0
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +61 -0
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +47 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +485 -0
- package/skills/weaver-e10-ziguanjia/SKILL.md +163 -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 -122
- package/skills/weaver-work-cli-invoice/references/invoice-disabled-capabilities.md +0 -26
- package/skills/weaver-work-cli-shared/SKILL.md +0 -63
- package/skills/weaver-work-cli-shared/references/e10-auth-and-session.md +0 -90
- package/skills/weaver-work-cli-shared/references/weaver-work-cli-installation.md +0 -73
- /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,101 @@
|
|
|
1
|
+
# 泛微技能检测工具集成
|
|
2
|
+
|
|
3
|
+
生成或更新业务模块 Skill 后,必须用泛微技能检测工具做静态质检。目标是让产物同时符合 WorkBuddy 平台规范、泛微专项安全合规要求和通用质量规则。
|
|
4
|
+
|
|
5
|
+
## 检测工具来源
|
|
6
|
+
|
|
7
|
+
检测工具不是生成出的业务 Skill 的一部分。运行时按以下顺序定位:
|
|
8
|
+
|
|
9
|
+
1. 用户本轮明确提供的检测工具目录。
|
|
10
|
+
2. 当前工作区中与 `weaver-work-cli` 同级的 `weaver-skill-detector-1.0.13` 目录。
|
|
11
|
+
3. 如果以上都不可用,向用户询问检测工具目录,不要自行联网下载或改用其它检测器。
|
|
12
|
+
|
|
13
|
+
不要把本机个人绝对路径写入生成出的 Skill 或 `source-manifest.json`;需要记录检测器时只写工具名、版本号或用户提供的相对位置。
|
|
14
|
+
|
|
15
|
+
检测器的 zip 输入分支使用新版 Python 标准库参数。目录检测可作为本地保底;需要检测 zip 时,优先使用 WorkBuddy 托管 Python 或 Python 3.11+。如果当前环境只有旧版 Python 且 zip 检测报运行时错误,先向用户确认可用解释器路径,不要把 zip 检测失败误判为 Skill 内容不合格。
|
|
16
|
+
|
|
17
|
+
检测命令必须同时给出 Windows PowerShell 与 macOS/Linux(bash/zsh)示例。Windows 优先使用 `py -3` 或 `py -3.11`;macOS/Linux 使用 `python3` 或用户确认的 Python 路径。Agent 先根据当前系统和 shell 选择对应示例,不确定时用 `node -p "process.platform"` 判断。不要把个人绝对路径写入生成产物。
|
|
18
|
+
|
|
19
|
+
## 必须满足的 frontmatter
|
|
20
|
+
|
|
21
|
+
默认 `weaver` 模式下,生成的 `SKILL.md` frontmatter 必须使用顶层字段,不得使用 `metadata:` 嵌套。至少包含:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
name: weaver-e10-<module>
|
|
25
|
+
display_name: 泛微<中文展示名>
|
|
26
|
+
display_name_en: Weaver <English Name>
|
|
27
|
+
description: "<200 字内的一句话中文概述,说明能力和触发场景>"
|
|
28
|
+
description_zh: "<中文简介>"
|
|
29
|
+
description_en: "<English summary>"
|
|
30
|
+
version: 1.0.0
|
|
31
|
+
author: 泛微网络科技股份有限公司
|
|
32
|
+
agent_created: true
|
|
33
|
+
requires:
|
|
34
|
+
bins: ["weaver-work-cli"]
|
|
35
|
+
cliHelp: "weaver-work-cli <command> --help"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`name` 只能使用小写字母、数字和连字符,必须以 `weaver` 开头,目录名必须与 `name` 一致。`display_name` 必须以「泛微」开头,建议不超过 20 字。`description` 保持短句,详细介绍放入 `description_zh` 和 `description_en`。
|
|
39
|
+
|
|
40
|
+
## 打包与内容约束
|
|
41
|
+
|
|
42
|
+
生成的 Skill 需要满足这些硬约束:
|
|
43
|
+
|
|
44
|
+
- 入口文件名精确为 `SKILL.md`。
|
|
45
|
+
- 目录层级不超过两级:根目录文件、二级目录文件;不要出现 `references/topic/file.md`。
|
|
46
|
+
- 文件总数不超过 300。
|
|
47
|
+
- 只包含纯文本文件;不要把图片、PDF、压缩包或构建产物放进 Skill。
|
|
48
|
+
- 所有 JSON、YAML、TOML 文件必须可解析。
|
|
49
|
+
- `SKILL.md` 中写成 Markdown 链接或反引号路径的 `references/...` 文件必须真实存在于包内。
|
|
50
|
+
- 不写默认登录地址、真实 IP、凭证、个人路径、IDE 配置目录或平台虚假技术承诺。
|
|
51
|
+
- 默认按 `weaver` 模式检测;只有用户明确说要上架千问办公或 QwenWork,才加 `--platform qwenwork`。
|
|
52
|
+
|
|
53
|
+
## 检测命令
|
|
54
|
+
|
|
55
|
+
优先检测生成出的 Skill 目录:
|
|
56
|
+
|
|
57
|
+
Windows PowerShell:
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
py -3 DETECTOR_DIR\scripts\validate_skill.py GENERATED_SKILL_DIR --json --no-html
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
macOS/Linux(bash/zsh):
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
python3 DETECTOR_DIR/scripts/validate_skill.py GENERATED_SKILL_DIR --json --no-html
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
如果还生成了发布 zip,再用 Python 3.11+ 检测 zip:
|
|
70
|
+
|
|
71
|
+
Windows PowerShell:
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
py -3.11 DETECTOR_DIR\scripts\validate_skill.py GENERATED_SKILL_ZIP --json --no-html
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
macOS/Linux(bash/zsh):
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
python3.11 DETECTOR_DIR/scripts/validate_skill.py GENERATED_SKILL_ZIP --json --no-html
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
退出码含义:
|
|
84
|
+
|
|
85
|
+
- `0`:通过或仅有警告。若有 WARN,发布前尽量修复;无法修复时向用户说明剩余风险。
|
|
86
|
+
- `1`:不通过。必须先修复 BLOCK/FAIL 项,再重新检测。
|
|
87
|
+
- `2`:输入非法。先修正路径或包结构。
|
|
88
|
+
|
|
89
|
+
不要主动使用 `--market-live`,除非用户明确要求联网核查市场可达性。
|
|
90
|
+
|
|
91
|
+
## 失败处理
|
|
92
|
+
|
|
93
|
+
检测失败时,按报告中的规则编号修复:
|
|
94
|
+
|
|
95
|
+
- frontmatter 缺字段或存在 `metadata:`:提升为顶层字段并补齐展示名、版本、作者、英文描述。
|
|
96
|
+
- 引用文件不存在:把 reference 补进包内,或移除入口里的包外 Markdown 链接。
|
|
97
|
+
- 目录层级过深:拍平 `references/` 下的子目录。
|
|
98
|
+
- 二进制或隐藏文件:从 Skill 包移除。
|
|
99
|
+
- 默认地址、凭证或真实 IP:改为用户显式提供、命名凭据或占位说明。
|
|
100
|
+
|
|
101
|
+
修复后必须重新运行检测。最终回复中说明检测结果、是否还有 WARN,以及使用的检测器版本。
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# 业务模块 CLI 生成规范
|
|
2
|
+
|
|
3
|
+
使用 Skill Maker 生成或更新业务模块时,默认同步实现 `src/shortcuts/<module>`。Agent Skill 只引用已经在 CLI 中注册并通过 `schema` 暴露的 operation。
|
|
4
|
+
|
|
5
|
+
本规范借鉴飞书 CLI 的 shortcut 纪律,但按 `weaver-work-cli` 当前 TypeScript 架构落地:飞书的 `shortcuts/<domain>` 对应这里的 `src/shortcuts/<module>`;飞书的 command-level affordance 对应这里的 `docs/<module>.md` 和 Skill references;飞书的 `--dry-run` 预览在这里优先映射为 `*.preview`、`*.prepare` 或只读回查 operation,除非本模块显式实现人类友好的 dry-run 子命令。
|
|
6
|
+
|
|
7
|
+
## 生成前先定正确实现面
|
|
8
|
+
|
|
9
|
+
开始写代码前,先建立当前合约和 owner:
|
|
10
|
+
|
|
11
|
+
- 已有模块:先读 `src/shortcuts/<module>`、`docs/<module>.md`、`skills/weaver-e10-<module>`、相关 `test/business/<module>-*.test.ts`,确认现有 command、operation、schema、输出 envelope、错误 subtype 和安全边界。
|
|
12
|
+
- 新模块:先从源资料划分“业务友好的高层 operation”和“底层接口细节”。只有能为 Agent 或人类提供稳定流程、智能默认值、安全确认、字段收敛或结果归一化时,才新增 operation。
|
|
13
|
+
- 不重复命令面:同一业务动作只能有一个 canonical operation。可选的人类友好子命令只是薄包装,最终必须调用同一个 operation 执行器。
|
|
14
|
+
- 不绕过 owner:E10 认证、profile、HTTP client 和请求拦截链归 `src/internal/e10`;业务 API 适配归本模块 `host.ts`;operation 只组织业务输入、校验、确认链和结果。
|
|
15
|
+
- 不补推测能力:缺少接口路径、请求方法、关键字段、权限/认证边界、幂等键、回查方式或写入确认条件时,先确认是否只影响局部 operation;能实现的 operation 继续实现,不能实现的列入待确认清单或禁用边界。
|
|
16
|
+
- 不空停:如果必须暂停等用户,最终回复必须列出 `operation -> 缺少事实 -> 为什么阻断`,并提出一个明确问题。不要以“实现前需确认几个高风险接口细节”“读取关键 reference 原文”作为最终回复;仓库内已经存在的 reference 应先直接读取。
|
|
17
|
+
|
|
18
|
+
## 入口与注册
|
|
19
|
+
|
|
20
|
+
CLI 命令后缀 `<command>` 使用小写字母、数字和连字符,命令名就是 `<command>`;它独立于 Skill 后缀 `<skill>`,两者可不同。operation 前缀统一用 `<command>.<action>`:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
weaver-work-cli <command>
|
|
24
|
+
weaver-work-cli <command> schema
|
|
25
|
+
weaver-work-cli --json <command> run <command>.<action> --input-json '{"key":"value"}'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
新增模块时必须更新 `src/shortcuts/index.ts`,把 `<command>Shortcut` 加入 `builtinShortcuts`。命令对象实现 `CliCommand`,`category` 使用 `shortcut`,注册方式参考 `src/shortcuts/invoice/index.ts`。命名分工:`src/shortcuts/<command>`、`docs/<command>.md`、`test/business/<command>-*.test.ts` 用 `<command>`;`skills/weaver-e10-<skill>`、`skill-template/domains/<skill>.md`、`skill-template/business-info.json` 的 key 用 `<skill>`。本规范下文的 `<module>` 均指 CLI 命令后缀 `<command>`。
|
|
29
|
+
|
|
30
|
+
## 文件结构
|
|
31
|
+
|
|
32
|
+
推荐结构:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
src/shortcuts/<module>/
|
|
36
|
+
index.ts Commander 命令注册、schema/run、可选人类友好子命令。
|
|
37
|
+
manifest.ts operation 合约清单。
|
|
38
|
+
operations.ts run 入口:选择 handler、校验输入、统一执行。
|
|
39
|
+
errors.ts 模块结构化错误。
|
|
40
|
+
host.ts 业务 API 适配,复用 E10 request runtime/session。
|
|
41
|
+
continuation.ts 只有 prepare/apply 写入链需要。
|
|
42
|
+
operations/
|
|
43
|
+
registry.ts manifest 和 handler 一一对应校验。
|
|
44
|
+
types.ts operation handler 类型。
|
|
45
|
+
shared.ts 通用输入校验、响应归一化、文件限制。
|
|
46
|
+
<operation>.ts 具体 operation。
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
小模块可以合并少量文件,但不能省略 `schema`、`run`、manifest 与 registry 对齐校验。
|
|
50
|
+
|
|
51
|
+
## operation 合约
|
|
52
|
+
|
|
53
|
+
`manifest.ts` 是 Agent 和测试的 WHAT 合约,至少暴露:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
export interface <Module>OperationContract {
|
|
57
|
+
name: string;
|
|
58
|
+
risk: string;
|
|
59
|
+
scope?: string;
|
|
60
|
+
auth?: string[];
|
|
61
|
+
permissions?: string[];
|
|
62
|
+
conditionalAuth?: Record<string, string[]>;
|
|
63
|
+
conditionalPermissions?: Record<string, string[]>;
|
|
64
|
+
deprecatedInputAliases?: Record<string, string[]>;
|
|
65
|
+
fixed?: Record<string, unknown>;
|
|
66
|
+
inputSchema: Record<string, unknown>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const <module>Operations: <Module>OperationContract[] = [
|
|
70
|
+
{
|
|
71
|
+
name: '<module>.<action>',
|
|
72
|
+
risk: 'read',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
properties: {}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
operation 名称使用 `<module>.<action>`,多级动作可用 `<module>.<object>.<action>`。`inputSchema` 必须禁止额外字段;需要二选一、至少一个、互斥、固定值或默认值时用 JSON Schema 表达,不把规则只写在说明里。源资料给出权限、scope、角色、身份或接口前置条件时,记录到 `auth`、`permissions`、`scope` 或 `fixed` 中;如果当前模块不需要这些字段,可以省略,但不能把已知权限事实只放在正文里。
|
|
83
|
+
|
|
84
|
+
如果某些权限、身份或接口只在特定执行路径需要,例如“勾选同步才需要写权限”“上传附件才需要文件接口”,用 `conditionalAuth` 或 `conditionalPermissions` 在 manifest 中声明触发条件,并在 handler 中按同一个条件校验。不要把条件权限只写进 `references/` 或错误提示里。
|
|
85
|
+
|
|
86
|
+
常用风险等级:
|
|
87
|
+
|
|
88
|
+
- `read`:只读查询。
|
|
89
|
+
- `external-read`:向外部服务查询但不写业务数据。
|
|
90
|
+
- `external-artifact`:上传或生成外部制品,但不落业务对象。
|
|
91
|
+
- `read-with-upload`:上传后只读解析或预览。
|
|
92
|
+
- `read-before-write`:写入前准备、预览、生成 continuation。
|
|
93
|
+
- `high-risk-write`:新增、编辑、删除、导入、同步等真实写入。
|
|
94
|
+
- `local-file-write`:写本地文件。
|
|
95
|
+
|
|
96
|
+
## 命令行为
|
|
97
|
+
|
|
98
|
+
每个业务命令必须提供:
|
|
99
|
+
|
|
100
|
+
- `schema`:输出 manifest,供 Agent 判断 operation、字段和风险等级。
|
|
101
|
+
- `run <operation> --input-json <json>`:从命令参数读取简单 JSON 对象并执行 operation,优先用于 Agent 示例和 Windows PowerShell。
|
|
102
|
+
- `run <operation> --input <path>`:从 JSON 文件读取对象;传 `-` 时从标准输入读取,只在当前 shell 能稳定传管道时使用。
|
|
103
|
+
- 可选的人类友好子命令:只作为薄包装,最终仍调用同一个 operation 执行器。
|
|
104
|
+
- 可选本地 introspection:复杂 JSON 输入可以提供 schema 示例或 reference,但不能为了查看 schema 要求填写业务参数。
|
|
105
|
+
|
|
106
|
+
命令示例和生成出的 Markdown 必须同时兼容 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 <path>`。Windows/PowerShell 下不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法,不要把任一平台专属命令写成唯一默认步骤。
|
|
107
|
+
|
|
108
|
+
`--json` 成功输出统一 envelope:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"schemaVersion": 1,
|
|
113
|
+
"ok": true,
|
|
114
|
+
"operation": "<module>.<action>",
|
|
115
|
+
"data": {},
|
|
116
|
+
"meta": { "status": "COMPLETE" },
|
|
117
|
+
"warnings": []
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
失败输出统一 envelope:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"schemaVersion": 1,
|
|
126
|
+
"ok": false,
|
|
127
|
+
"error": {
|
|
128
|
+
"type": "validation",
|
|
129
|
+
"subtype": "input_invalid",
|
|
130
|
+
"message": "输入不合法",
|
|
131
|
+
"retryable": false
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
结构化错误要能被 `toErrorEnvelope` 转换。校验失败用 usage exit code;认证、网络、策略、需要确认、写入不确定分别使用现有 `ExitCode` 语义。
|
|
137
|
+
|
|
138
|
+
把这些视为公共兼容合约:operation 名称、字段名、默认值、固定业务参数、输出 envelope、错误 type/subtype、exit code、文件落点和覆盖策略。修改时必须同步更新测试、Skill reference 和 docs;不要为了兼容旧输入静默替换语义。确需兼容别名或旧字段时,在输入归一化阶段显式处理,并测试“新旧同时出现”的冲突规则。
|
|
139
|
+
|
|
140
|
+
## 输入兼容与归一化
|
|
141
|
+
|
|
142
|
+
字段名以 `manifest.ts` 的 `inputSchema` 为准。源资料、历史脚本或旧 Skill 里出现多个同义字段时,先选一个 canonical 字段;只有用户明确要求兼容旧输入,或已发布版本已经接受旧字段,才在 manifest 中记录 `deprecatedInputAliases`。
|
|
143
|
+
|
|
144
|
+
归一化只能发生在 `operations/shared.ts` 或清晰命名的 `normalizeInput()` 阶段,且必须早于业务 host 调用。不要在 `host.ts`、HTTP body 拼装或结果处理里偷偷接受旧字段。旧字段和新字段同时出现时必须报结构化校验错误,不能让任一方静默覆盖另一方。
|
|
145
|
+
|
|
146
|
+
归一化测试至少断言:旧字段能映射到 canonical 字段;canonical 字段保持原样;新旧字段同时出现会失败;错误的别名值不会绕过 `inputSchema` 的枚举、格式、互斥或固定值约束。
|
|
147
|
+
|
|
148
|
+
## E10 与业务 API
|
|
149
|
+
|
|
150
|
+
E10 业务模块必须复用 `src/internal/e10` 的 session、profile 和 request runtime,不直接读取认证文件、Cookie、Keychain 或 legacy auth 目录,也不在业务 `host.ts` 中直接调用 `fetch`。业务 host 只封装本模块需要的请求方法,负责:
|
|
151
|
+
|
|
152
|
+
- 统一 base URL、headers 和 session 失效处理。
|
|
153
|
+
- 把源资料里的接口路径映射为明确方法。
|
|
154
|
+
- 归一化业务成功、业务错误、登录超时和网络异常。
|
|
155
|
+
- 对上传、下载、本地文件读取设置大小、类型和覆盖保护。
|
|
156
|
+
|
|
157
|
+
公共 E10 request runtime 提供统一拦截能力:`beforeRequest` 可在安全校验内调整 query、body、form、普通 header 和 timeout;不得修改 path,不得写入 Cookie、ETEAMSID、token、Authorization 等保留凭据头。`afterResponse` 默认只用于观察、记录和抛出结构化错误,不作为业务成功语义的任意改写入口。模块特有 token、业务成功码、重试和响应归一化仍留在模块 `host.ts`,不要放进全局 runtime。
|
|
158
|
+
|
|
159
|
+
如果源资料没有说明接口路径、请求方法、必要字段、分页语义、返回结构或错误码,不要猜;先把已确认 operation 继续落地,再向用户列出剩余缺口并等待补充。
|
|
160
|
+
|
|
161
|
+
用户或工作区文件访问必须在模块内集中校验。读取、上传、下载和写本地文件前,operation 要限制文件类型、大小、父目录存在性、路径逃逸和覆盖行为;Skill 层的风险提醒不能替代 CLI 层校验。
|
|
162
|
+
|
|
163
|
+
## guidance 分工
|
|
164
|
+
|
|
165
|
+
参考飞书 CLI 的 affordance/Skill 分层,weaver 中按以下边界维护:
|
|
166
|
+
|
|
167
|
+
- `manifest.ts` / `schema` 拥有 WHAT:operation、字段、风险、固定参数、权限或身份事实。
|
|
168
|
+
- `docs/<module>.md` 拥有维护者和命令级 WHEN:模块来源、命令结构、operation 表、何时用哪个 operation、已知限制。
|
|
169
|
+
- `skills/weaver-e10-<module>/SKILL.md` 拥有领域路由、共享规则入口、跨 operation 工作流和安全边界。
|
|
170
|
+
- `references/*.md` 拥有条件化 HOW:具体命令示例、输入摘要、输出处理、失败处理和回查策略。
|
|
171
|
+
|
|
172
|
+
不要在 docs 或 Skill 中重复整份 schema;需要字段细节时让 Agent 读取 `weaver-work-cli <module> schema` 或对应 reference。所有 shipped reference 路径必须真实存在,入口里不要链接不会随包发布的源码文件。
|
|
173
|
+
|
|
174
|
+
## 高风险写入
|
|
175
|
+
|
|
176
|
+
新增、编辑、删除、导入、同步等写操作必须优先设计为 `prepare -> apply`。这相当于飞书 shortcut 的 high-risk `--yes` 与 `--dry-run` 纪律,但 weaver 的确认必须沉到 CLI operation 中:
|
|
177
|
+
|
|
178
|
+
1. `prepare` 做只读回查、输入归一化、差异摘要和 continuation 签发,不真实写入。
|
|
179
|
+
2. Agent 把目标、差异、风险和确认条件摘要给用户。
|
|
180
|
+
3. 用户明确确认后,`apply` 必须要求 `confirm: true` 和有效 continuation。
|
|
181
|
+
4. `apply` 校验 session、目标 ID、文件 sha256 或业务对象指纹没有变化。
|
|
182
|
+
5. 写请求已发送后,如遇网络中断、部分成功或回查失败,返回 `partial/write_uncertain`,禁止自动重复提交。
|
|
183
|
+
|
|
184
|
+
写操作不能只有 Skill 层确认;CLI 必须强制确认链。
|
|
185
|
+
|
|
186
|
+
只读预览、外部查询、上传后解析等非写入风险,优先命名为 `*.preview` 或 `*.validate.preview`,并在 `risk` 中标明 `external-read`、`external-artifact` 或 `read-with-upload`。能本地预览请求形状但不触网的模块,可额外提供 dry-run,但它不能替代 `prepare -> apply`。
|
|
187
|
+
|
|
188
|
+
## 测试与文档
|
|
189
|
+
|
|
190
|
+
新增或更新业务 CLI 时同步维护:
|
|
191
|
+
|
|
192
|
+
- `test/business/<module>-*.test.ts`:覆盖 manifest、固定字段、输入校验、核心 operation、写入确认和不确定结果。
|
|
193
|
+
- `docs/<module>.md`:说明模块来源、CLI 结构、operation 表、常见命令和安全边界。
|
|
194
|
+
- `skills/weaver-e10-<module>`:只引用已实现 operation,并与 `weaver-work-cli <module> schema` 保持一致。
|
|
195
|
+
|
|
196
|
+
测试断言至少覆盖:
|
|
197
|
+
|
|
198
|
+
- manifest 和 registry 一一对应:每个 operation 有 handler,每个 handler 在 schema 中暴露。
|
|
199
|
+
- schema 合约:operation 名称、risk、scope/auth/permissions、`additionalProperties: false`、required/oneOf/const/default 等关键字段。
|
|
200
|
+
- 请求形状:用 fake host 断言 method、path、query、body、固定业务参数和分页默认值,避免只测返回文本。
|
|
201
|
+
- 错误形状:校验失败、认证失败、业务失败、网络失败、结果不确定都返回稳定 type/subtype 和 exit code。
|
|
202
|
+
- 高风险写入:`prepare` 不写入;`apply` 缺少 `confirm: true` 或 continuation 必失败;目标、session、文件 sha256 或业务指纹变化必须失败;写请求发出后的不确定结果不能自动重试。
|
|
203
|
+
- 文件操作:本地输入文件存在、类型、大小、路径逃逸;下载或导出拒绝覆盖已存在文件。
|
|
204
|
+
- 命令输入:`--input-json`、`--input <path>` 和 `--input -` 的解析行为一致;`--input-json` 与 `--input` 同时出现时报结构化校验错误;UTF-8 BOM 文件能正常读取。
|
|
205
|
+
- Skill/CLI 一致性:抽取 Skill 和 reference 中的 `run <operation>` 示例,断言 operation 在 manifest 中存在;示例使用的字段必须在 schema 中存在。
|
|
206
|
+
- 示例安全:docs、tips、reference 示例只用 `PLACEHOLDER_VALUE`、`example.test` 或明显假 ID,不出现真实 IP、内网域名、Cookie、Token、手机号、邮箱或个人路径;PowerShell 命令块里不要使用会被解释为重定向的裸尖括号占位符。
|
|
207
|
+
- 更新路径:源资料变化时,测试或文档要证明 CLI、Skill、manifest、business-info 和 domain 同步更新;如果 manifest 存在 `operationImpact`,要优先覆盖受影响 operation、schema 字段、reference 和写入确认链。
|
|
208
|
+
- Git 更新语义回归:基于 `OLD_REF..NEW_REF` 更新时,不只检查生成产物存在;还要为受影响 operation 补充或更新 golden tests,断言用户意图会路由到正确 operation、字段 canonical 化与旧字段兼容策略、固定参数/默认值/枚举、写入确认链和错误 envelope。`major` 兼容性变化必须有测试覆盖迁移或拒绝策略。
|
|
209
|
+
|
|
210
|
+
验证命令:
|
|
211
|
+
|
|
212
|
+
Windows PowerShell:
|
|
213
|
+
|
|
214
|
+
```powershell
|
|
215
|
+
npm test -- "test/business/MODULE_NAME-*.test.ts"
|
|
216
|
+
npm test -- test/skills/layout.test.ts
|
|
217
|
+
npm run build
|
|
218
|
+
weaver-work-cli MODULE_NAME schema
|
|
219
|
+
py -3 DETECTOR_DIR\scripts\validate_skill.py skills\weaver-e10-MODULE_NAME --json --no-html
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
macOS/Linux(bash/zsh):
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npm test -- "test/business/MODULE_NAME-*.test.ts"
|
|
226
|
+
npm test -- test/skills/layout.test.ts
|
|
227
|
+
npm run build
|
|
228
|
+
weaver-work-cli MODULE_NAME schema
|
|
229
|
+
python3 DETECTOR_DIR/scripts/validate_skill.py skills/weaver-e10-MODULE_NAME --json --no-html
|
|
230
|
+
```
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# 检测通过后的安装确认
|
|
2
|
+
|
|
3
|
+
业务模块 Skill 生成并通过泛微技能检测工具后,必须询问用户是否把它安装到当前使用的智能体。安装会改变用户本机 Agent 的 skills 目录,因此不能跳过确认。
|
|
4
|
+
|
|
5
|
+
## 触发条件
|
|
6
|
+
|
|
7
|
+
只有同时满足以下条件,才进入安装确认:
|
|
8
|
+
|
|
9
|
+
- `skills/weaver-e10-<module>` 已生成或更新完成。
|
|
10
|
+
- 泛微技能检测工具默认 `weaver` 模式结果为 `PASS`,或仅有用户明确接受的 WARN。
|
|
11
|
+
- `weaver-work-cli skills list` 能读到生成后的 Skill。
|
|
12
|
+
|
|
13
|
+
检测失败、检测未运行、当前 Skill 不在 `weaver-work-cli/skills` 下、或用户尚未确认安装时,不要执行安装。
|
|
14
|
+
|
|
15
|
+
## 弹框确认
|
|
16
|
+
|
|
17
|
+
优先使用当前宿主支持的弹框、确认 UI 或用户输入工具询问:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
业务模块 Skill 已生成并通过检测。是否安装到当前智能体?
|
|
21
|
+
|
|
22
|
+
将安装:
|
|
23
|
+
- weaver-e10-shared
|
|
24
|
+
- weaver-e10-<module>
|
|
25
|
+
|
|
26
|
+
目标目录:<detected-agent-skills-root>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
如果当前智能体没有弹框或确认 UI,退化为普通对话提问。无论使用哪种方式,必须得到用户明确同意后才安装;用户没有回复、关闭弹框或选择取消时,只报告生成目录和检测结果。
|
|
30
|
+
|
|
31
|
+
## 当前智能体目录
|
|
32
|
+
|
|
33
|
+
按当前宿主识别目标目录:
|
|
34
|
+
|
|
35
|
+
- Codex:优先环境变量 `CODEX_HOME` 下的 `skills` 子目录;未设置时使用用户主目录下的 `.codex/skills`(Windows PowerShell:`$env:USERPROFILE\.codex\skills`;macOS/Linux:`$HOME/.codex/skills`)。
|
|
36
|
+
- WorkBuddy:使用用户主目录下的 `.workbuddy/skills`(Windows PowerShell:`$env:USERPROFILE\.workbuddy\skills`;macOS/Linux:`$HOME/.workbuddy/skills`)。
|
|
37
|
+
- 用户显式指定目录:以用户指定为准。
|
|
38
|
+
- 其它智能体:只有当宿主暴露明确的本地 skills 根目录且当前进程可写时才自动安装;否则说明当前智能体不支持自动安装。
|
|
39
|
+
|
|
40
|
+
不要同时安装到多个 Agent 目录,除非用户明确要求。不要猜测隐藏目录或扫描用户主目录寻找其它 Agent。
|
|
41
|
+
|
|
42
|
+
## 打包
|
|
43
|
+
|
|
44
|
+
用户确认安装后,先生成归档,再执行安装。`scripts/package-skill.mjs` 使用纯 Node 生成 ZIP,不依赖系统 `zip`/`unzip` 命令;仓库内生成的 Skill 使用:
|
|
45
|
+
|
|
46
|
+
Windows PowerShell:
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
node scripts/package-skill.mjs MODULE_NAME "C:\path\to\weaver-e10-MODULE_NAME-skill.zip"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
macOS/Linux(bash/zsh):
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
node scripts/package-skill.mjs MODULE_NAME "/path/to/weaver-e10-MODULE_NAME-skill.zip"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
归档路径建议放在临时目录或仓库 `dist/`,最终回复说明 zip 路径和 sha256。若脚本不可用或写入目标失败,先说明无法打包;不要继续自动安装未打包产物,除非用户明确接受只做目录安装。
|
|
59
|
+
|
|
60
|
+
## 安装
|
|
61
|
+
|
|
62
|
+
用户确认后,使用 `weaver-work-cli` 自带安装命令安装当前模块。它会自动带上 shared:
|
|
63
|
+
|
|
64
|
+
Windows PowerShell:
|
|
65
|
+
|
|
66
|
+
```powershell
|
|
67
|
+
weaver-work-cli skills install MODULE_NAME --target-dir "C:\path\to\agent-skills"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
macOS/Linux(bash/zsh):
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
weaver-work-cli skills install MODULE_NAME --target-dir "/path/to/agent-skills"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
如果 `weaver-work-cli` 全局命令不可用,但当前仓库已构建,可以用当前构建产物执行同等命令:
|
|
77
|
+
|
|
78
|
+
Windows PowerShell:
|
|
79
|
+
|
|
80
|
+
```powershell
|
|
81
|
+
node dist/index.js skills install MODULE_NAME --target-dir "C:\path\to\agent-skills"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
macOS/Linux(bash/zsh):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
node dist/index.js skills install MODULE_NAME --target-dir "/path/to/agent-skills"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
安装后验证目标目录中存在:
|
|
91
|
+
|
|
92
|
+
- `weaver-e10-shared/SKILL.md`
|
|
93
|
+
- `weaver-e10-<module>/SKILL.md`
|
|
94
|
+
|
|
95
|
+
若目标目录不可写、当前智能体不支持本地 Skill、或安装命令失败,停止并报告原因、zip 路径和手动安装命令;不要改装到其它目录。
|
|
96
|
+
|
|
97
|
+
## 完成回复
|
|
98
|
+
|
|
99
|
+
最终回复要包含:
|
|
100
|
+
|
|
101
|
+
- Skill 目录。
|
|
102
|
+
- 检测器结果和版本。
|
|
103
|
+
- 是否已打包、zip 路径和 sha256。
|
|
104
|
+
- 用户是否选择安装。
|
|
105
|
+
- 如果已安装,说明目标智能体和 skills 目录;如果未安装,说明未安装原因。
|