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
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
共享底座用于所有 `weaver-
|
|
1
|
+
共享底座用于所有 `weaver-e10-*` 业务 Skill。入口 `SKILL.md` 保留安装检查、E10 认证、JSON 输出、大结果渲染、高风险写入和安全边界的强触发索引;细节拆到 `references/`:
|
|
2
2
|
|
|
3
|
-
- `weaver-
|
|
3
|
+
- `weaver-e10-installation.md`:安装、构建、全局 link、当前 skill 列表。
|
|
4
4
|
- `e10-auth-and-session.md`:登录、profile、auth 文件、E10 会话和 `WEAVER_*` 环境变量。
|
|
5
5
|
- `json-output-contract.md`:stdout/stderr、JSON envelope、退出码、脚本判断规则、大结果渲染和分页控量。
|
|
6
6
|
- `high-risk-write.md`:`prepare -> apply`、用户确认、continuation 和停止条件。
|
|
7
7
|
|
|
8
|
-
认证状态只能通过 `weaver-work-cli auth root/status/profile list/profile current`、`weaver-work-cli doctor --e10` 和业务命令 JSON 错误判断;禁止 Agent
|
|
8
|
+
认证状态只能通过 `weaver-work-cli auth root/status/profile list/profile current`、`weaver-work-cli doctor --e10` 和业务命令 JSON 错误判断;禁止 Agent 直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
9
|
+
|
|
10
|
+
生成或更新 docs、Skill reference、提示词和命令示例时,必须同时兼容 Windows 和 macOS/Linux。凡涉及 JSON 输入、用户目录、路径分隔符、Python 启动器、文件删除、目录查看或文件比对,必须同时给 Windows PowerShell 与 macOS/Linux(bash/zsh)两套示例,并让 Agent 根据当前系统和 shell 选择。简单 JSON 优先写 `--input-json '<json>'`;复杂 JSON 用临时 UTF-8 文件和 `--input <path>`。Windows/PowerShell 示例不要使用 `printf`、`$HOME/...`、`~/...`、bash 反斜杠续行、`rm/ls/diff/python3` 等 Unix-only 写法。
|
|
9
11
|
|
|
10
12
|
涉及附件、图片、本地文件、远程 URL 文件或文件内容解析的操作,Agent 必须先提醒用户文件内容可能被上传到业务系统、OCR/解析服务,并可能进入当前大模型上下文;只有用户明确确认后才能继续读取、上传、解析、OCR 或导入文件。生成单接口 reference 时,需要在对应“注意”里标记该确认要求。
|
|
11
13
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
本业务域用于把用户提供的泛微/E10 新业务模块文档、接口说明、代码或既有 Skill 转换成 `weaver-e10-*` Agent Skill。入口 `SKILL.md` 保持 weaver 风格:共享前置、适用范围、生成流程、更新检测和产物边界;具体执行细节拆到 `references/`:
|
|
2
|
+
|
|
3
|
+
- `business-skill-generation.md`:从用户源资料盘点、抽取业务语义、同步实现 CLI 到生成 artifact 的完整流程。
|
|
4
|
+
- `module-cli-generation.md`:`src/shortcuts/<module>` 的命令注册、schema/run、operation manifest、错误 envelope、测试和高风险写入确认规范。
|
|
5
|
+
- `weaver-skill-style.md`:`SKILL.md`、`references/`、`product.json`、`skill-template/business-info.json` 和 `skill-template/domains/<module>.md` 的风格与结构约定。
|
|
6
|
+
- `source-update-detection.md`:`source-manifest.json` 结构、源资料 sha256 聚合、`sourceChunks` / `operationImpact` 小范围影响索引、已有 Skill 更新检测和用户确认规则。
|
|
7
|
+
- `detector-validation.md`:集成泛微技能检测工具,约束 frontmatter、目录层级、纯文本内容、安全红线和最终检测命令。
|
|
8
|
+
- `post-generation-install.md`:检测通过后弹框确认是否安装,用户同意后打包并安装到当前智能体 skills 目录;不支持自动安装时只报告 zip 和原因。
|
|
9
|
+
|
|
10
|
+
当源文档或代码发生变化时,必须先比较 manifest 与当前源资料;如果已有 operation 影响索引,要列出变化 chunk、锚点和可能影响的 operation、schema、reference、测试或写入确认链。检测到差异后只摘要变更并询问用户是否转换,不能默认覆盖已有 Skill。
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
本业务域用于 E10 文书定档案管理。入口 `SKILL.md` 按飞书 `lark-approval` 风格组织:CRITICAL 共享前置、路由优先级、高优先级语义、逐 operation 命令表、处理链、执行原则、写操作失败决策树和“不在范围”。具体用法拆到 `references/`:
|
|
2
|
+
|
|
3
|
+
- `archive-agent-entry.md`:schema、统一 `archive run` 入口、stdin/文件 JSON 调用方式和输出约定。
|
|
4
|
+
- `archive-fonds.md`:全宗列表与预归档电子文件库节点识别(上传的 treeId 来源)。
|
|
5
|
+
- `archive-search.md`:全文检索可借档案,结果行的 `id`/`formId` 复用规则。
|
|
6
|
+
- `archive-info.md`:档案基本信息查询(`{档案ID}_{表单ID}` 与 `dataId+formId` 两种输入)。
|
|
7
|
+
- `archive-borrow-car.md`:借阅车列表(首选自定义接口、失败自动回退)与加入借阅车的 `prepare -> apply` 协议。
|
|
8
|
+
- `archive-borrow-list.md`:借阅单列表与详情(下载前置校验依赖详情)。
|
|
9
|
+
- `archive-download.md`:借阅单原文打包下载的 `prepare -> apply`、异步进度轮询和本地落盘规则。
|
|
10
|
+
- `archive-flow.md`:从借阅车/检索结果发起借阅、借阅单续借的流程创建页 URL 生成。
|
|
11
|
+
- `archive-upload.md`:本地文件上传到预归档电子文件库的 `prepare -> apply` 协议。
|
|
12
|
+
- `archive-disabled-capabilities.md`:借阅提交、借阅车移除等暂未暴露能力的处理边界。
|
|
13
|
+
|
|
14
|
+
Agent 调优重点:
|
|
15
|
+
|
|
16
|
+
- `weaver-work-cli archive schema` 是 operation 合约第一信息源。
|
|
17
|
+
- 业务输入不得包含 Cookie、ETEAMSID、Token 或内部控制字段。
|
|
18
|
+
- 写操作只接受 CLI 生成的 continuation,不手工构造或复用。
|
|
19
|
+
- 借阅车/借阅单列表优先自定义接口;接口未发布时 CLI 自动回退 ebuilder 链路,回退行的字段更少(`fields`/`display`)。
|
|
20
|
+
- 下载为异步任务:`.apply` 会轮询打包进度并落盘,不要按超时立即重试。
|
|
21
|
+
- 发起借阅/续借只返回 URL,不自动打开浏览器;必须把 URL 交给用户并说明需在浏览器完成填写与提交。
|
|
22
|
+
- 结果为 `partial/write_uncertain` 时停止,不自动重放写请求。
|
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
- `invoice-ocr-preview.md`:OCR 预览,不描述为已入票夹。
|
|
9
9
|
- `invoice-validation-preview.md`:查验预览,不回写票夹。
|
|
10
10
|
- `invoice-download.md`:下载发票附件。
|
|
11
|
+
- `invoice-browse-field-data.md`:生成流程表单发票浏览按钮字段对象。
|
|
11
12
|
- `invoice-import.md`:导入发票文件的 `prepare -> apply` 写入协议。
|
|
12
13
|
- `invoice-add.md`:手工新增发票的 `prepare -> apply` 写入协议。
|
|
13
14
|
- `invoice-update.md`:编辑发票的 `prepare -> apply` 写入协议。
|
|
14
15
|
- `invoice-delete.md`:删除发票的 `prepare -> apply` 写入协议。
|
|
16
|
+
- `invoice-reim.md`:发票报销自动填单的查询、组装和报销单创建/更新确认链。
|
|
17
|
+
- `invoice-issuing.md`:智能开票或存台账的开票 payload 确认链。
|
|
15
18
|
- `invoice-disabled-capabilities.md`:共享、转让、标签等暂未暴露能力的处理边界。
|
|
16
19
|
|
|
17
20
|
Agent 调优重点:
|
|
@@ -20,4 +23,5 @@ Agent 调优重点:
|
|
|
20
23
|
- 业务输入不得包含 Cookie、ETEAMSID、Token 或内部控制字段。
|
|
21
24
|
- 写操作只接受 CLI 生成的 continuation,不手工构造或复用。
|
|
22
25
|
- `validate=false` 只能说明跳过查验,不能描述为查验通过。
|
|
26
|
+
- 报销单创建、报销单更新、开票和存台账必须先展示 payload 摘要并取得明确确认。
|
|
23
27
|
- 结果为 `partial/write_uncertain` 时停止,不自动重放写请求。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
本业务域用于泛微 E10 易秒办即时通讯(消息/群组/会话/系统消息),包括读与写。入口 `SKILL.md` 先路由到 `weaver-e10-shared/SKILL.md`,再给出 Reference 路由表、关键差异(消息行已解析且标注「我」、人名走 hrm、uid/cid 字符串化、单页不翻全量且边界去重、时间范围转 id 区间、1303 空页说明、媒体需下载落地、展示完整不截断)与写操作 prepare→apply 协议。具体用法拆到 `references/`:
|
|
2
|
+
|
|
3
|
+
- `person.md`:姓名/工号/手机/邮箱解析、uid 批量解析(人名唯一合法来源,走 hrm)。
|
|
4
|
+
- `field-resolution.md`:名称 → ID 判定、同名消歧、未匹配处理、接口间上下文传递契约。
|
|
5
|
+
- `msg-read.md`:单聊/群聊消息拉取、群置顶、阅读状态(只读;1303=无记录按空处理)。
|
|
6
|
+
- `msg-write.md`:发单聊/群聊(文本/图片/文件)、撤回、群消息置顶的 prepare→apply 写入协议。
|
|
7
|
+
- `ding-write.md`:普通必达与转必达(createDing)、仅未读/指定接收人的 prepare→apply 写入协议。
|
|
8
|
+
- `group-read.md`:群搜索/信息/成员/群主管理员/存在性/公告(只读)。
|
|
9
|
+
- `group-write.md`:建群/邀请/踢/退/解散/申请入群/改群属性/群名/群公告的 prepare→apply 写入协议。
|
|
10
|
+
- `session-sysmsg.md`:会话列表与系统消息分组/类型/消息查询。
|
|
11
|
+
- `file-user-i18n.md`:文件上传/预览 URL/下载落地、用户在线状态、i18n 标签翻译。
|
|
12
|
+
- `safety-boundaries.md`:红线(禁操作人字段、人名走 hrm、id 非 0 字符串、不本地过滤、不自动全量翻页、拒绝空白消息、15 秒超时、未匹配不猜测、禁止拉全量统计、完整展示)、写链停止条件、已知限制、数据对不上提问模板。
|
|
13
|
+
- `error-codes.md`:业务错误码含义与处理建议(群 12xx / 消息 15xx / 数据 13xx + CLI 校验错误)。
|
|
14
|
+
- `source-manifest.json`:源资料清单与 sha256 指纹,用于源资料更新检测。
|
|
15
|
+
|
|
16
|
+
调优重点:
|
|
17
|
+
|
|
18
|
+
- `weaver-work-cli yimiaoban schema` 是 operation 合约第一信息源;所有 operation 名与 `inputSchema` 以它为准。
|
|
19
|
+
- 人名/群成员姓名一律由 CLI 走 hrm 解析;会话副标题与消息内容媒体展示用 `[图片]名称`/`[文件]名称`/`[视频]名称`、必达加 `[必达]`,媒体预览/下载 URL 需登录态,真正查看用 `file.download` 落地。
|
|
20
|
+
- 消息正文完整展示不截断;`|` 转义、换行保留提示;禁止把长文缩成摘要后再展示。
|
|
21
|
+
- 写操作只接受 CLI 签发的 continuation;`apply` 不确定结果时先只读回查,不自动重试。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
本业务域用于 E10 资管家资产管理。入口 `SKILL.md` 按飞书 `lark-approval` 风格组织:CRITICAL 共享前置、版本门禁、路由优先级、高优先级语义、逐 operation 命令表、处理链、执行原则、写操作失败决策树和“不在范围”。具体用法拆到 `references/`:
|
|
2
|
+
|
|
3
|
+
- `ziguanjia-agent-entry.md`:schema、统一 `asset run` 入口、版本门禁。
|
|
4
|
+
- `ziguanjia-query.md`:资产列表 / 详情 / 领用 / 报修 / 采购查询。
|
|
5
|
+
- `ziguanjia-resolve.md`:存放地点 / 资产状态 / 资产类型名称解析成 ID。
|
|
6
|
+
- `ziguanjia-create.md`:新增资产的 `prepare -> apply` 写入协议。
|
|
7
|
+
- `ziguanjia-update.md`:修改资产的 `prepare -> apply` 写入协议。
|
|
8
|
+
- `ziguanjia-use.md`:资产领用的 `prepare -> apply` 写入协议。
|
|
9
|
+
- `ziguanjia-return.md`:资产归还的查询候选 + `prepare -> apply` 协议。
|
|
10
|
+
- `ziguanjia-repair.md`:资产报修的查询候选 + `prepare -> apply` 协议。
|
|
11
|
+
- `ziguanjia-purch.md`:资产采购申请的 `prepare -> apply` 写入协议。
|
|
12
|
+
- `ziguanjia-depre.md`:资产折旧计提的 `prepare -> apply` 写入协议。
|
|
13
|
+
- `ziguanjia-disabled-capabilities.md`:调拨、审批、图片上传等暂未暴露能力的处理边界。
|
|
14
|
+
|
|
15
|
+
Agent 调优重点:
|
|
16
|
+
|
|
17
|
+
- `weaver-work-cli asset schema` 是 operation 合约第一信息源。
|
|
18
|
+
- 业务输入不得包含 Cookie、ETEAMSID、Token 或内部控制字段。
|
|
19
|
+
- 所有写操作只接受 CLI 生成的 continuation,不手工构造或复用;`confirm:true` 与 `continuation` 必须同时出现于 apply。
|
|
20
|
+
- 版本门禁未通过时写操作会 STOP,不执行任何资产请求。
|
|
21
|
+
- 结果为 `partial/write_uncertain` 时停止,不自动重放写请求。
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: weaver-work-cli
|
|
3
|
+
display_name: 泛微工作CLI
|
|
4
|
+
display_name_en: Weaver Work CLI
|
|
3
5
|
description: "泛微工作 CLI 聚合能力入口:{{meta_description}}"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
description_zh: "泛微工作 CLI 聚合能力入口:{{meta_description}}"
|
|
7
|
+
description_en: "{{meta_description_en}}"
|
|
8
|
+
version: {{meta_version}}
|
|
9
|
+
author: 泛微网络科技股份有限公司
|
|
10
|
+
agent_created: true
|
|
11
|
+
requires:
|
|
12
|
+
bins: ["weaver-work-cli"]
|
|
7
13
|
---
|
|
8
14
|
|
|
9
15
|
# weaver-work-cli 聚合 Skill
|
|
10
16
|
|
|
11
|
-
你是 `weaver-work-cli` 的聚合路由层。你的职责是先判断用户要使用哪个 `weaver-
|
|
17
|
+
你是 `weaver-work-cli` 的聚合路由层。你的职责是先判断用户要使用哪个 `weaver-e10-*` 子能力,再读取并遵循对应子能力的说明。
|
|
12
18
|
|
|
13
19
|
聚合 Skill 不直接承载具体 API 操作步骤。除非对应子能力已被读取,否则不要仅根据本文件拼命令、猜参数或执行复杂操作。
|
|
14
20
|
|
|
15
|
-
所有子能力统一收纳在当前 Skill 的 `references/` 目录。选择 `weaver-
|
|
21
|
+
所有子能力统一收纳在当前 Skill 的 `references/` 目录。选择 `weaver-e10-foo` 后,直接读取 `references/weaver-e10-foo/SKILL.md`;不要再次调用独立 Skill,也不要遍历整个 references 目录。
|
|
16
22
|
|
|
17
23
|
{{shared_body}}
|
|
18
24
|
|
|
@@ -22,7 +28,7 @@ metadata:
|
|
|
22
28
|
2. 直接读取 `references/<skill-name>/SKILL.md` 加载所选子能力。
|
|
23
29
|
3. 仅使用本文件列出的路由与对应子能力入口;目标能力未列出时明确说明无法路由。
|
|
24
30
|
4. 仅读取当前已选子能力明确要求的前置文件和 reference。
|
|
25
|
-
5. 按目标子能力说明执行;安装、E10 认证、JSON 输出和高风险写入优先遵循 `weaver-
|
|
31
|
+
5. 按目标子能力说明执行;安装、E10 认证、JSON 输出和高风险写入优先遵循 `weaver-e10-shared`。
|
|
26
32
|
|
|
27
33
|
## 能力路由
|
|
28
34
|
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: weaver-
|
|
2
|
+
name: weaver-e10-{{module}}
|
|
3
|
+
display_name: "{{display_name}}"
|
|
4
|
+
display_name_en: "{{display_name_en}}"
|
|
3
5
|
description: "{{meta_description}}"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
description_zh: "{{meta_description_zh}}"
|
|
7
|
+
description_en: "{{meta_description_en}}"
|
|
8
|
+
version: {{meta_version}}
|
|
9
|
+
author: 泛微网络科技股份有限公司
|
|
10
|
+
agent_created: true
|
|
11
|
+
requires:
|
|
12
|
+
bins: ["weaver-work-cli"]
|
|
13
|
+
cliHelp: "weaver-work-cli {{command}} --help"
|
|
8
14
|
---
|
|
9
15
|
|
|
10
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-
|
|
11
|
-
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...`
|
|
12
|
-
所有命令通过 `weaver-work-cli --json {{command}} run <operation>
|
|
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 {{command}} run <operation>` 执行:简单 JSON 优先传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应的文件,查参数结构,不要猜字段;**references 是第一信息源**,`weaver-work-cli {{command}} schema` 是 operation、字段和风险等级的合约来源。
|
|
19
|
+
生成或改写的 docs、reference、提示词和命令示例必须同时兼容 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 写法。
|
|
13
20
|
涉及附件、图片、本地文件、远程 URL 文件或文件内容解析的 operation,执行前必须提醒用户:文件内容可能被上传到业务系统、OCR/解析服务,并可能进入当前大模型上下文用于理解和处理;必须等待用户明确确认后才继续。
|
|
14
21
|
|
|
15
22
|
## 路由优先级(先判断是不是 {{title}},再选 operation)
|
|
16
23
|
|
|
17
24
|
{{routing_priority}}
|
|
18
25
|
|
|
19
|
-
### 明确归 `weaver-
|
|
26
|
+
### 明确归 `weaver-e10-{{module}}` 的高优先级语义
|
|
20
27
|
|
|
21
28
|
{{intent_bullets}}
|
|
22
29
|
|
|
@@ -65,9 +72,18 @@ metadata:
|
|
|
65
72
|
|
|
66
73
|
{{write_uncertain_tree}}
|
|
67
74
|
|
|
75
|
+
Windows PowerShell:
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
weaver-work-cli {{command}} schema
|
|
79
|
+
weaver-work-cli --json {{command}} run {{command}}.operation --input-json '{"key":"value"}'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
macOS/Linux(bash/zsh):
|
|
83
|
+
|
|
68
84
|
```bash
|
|
69
85
|
weaver-work-cli {{command}} schema
|
|
70
|
-
weaver-work-cli --json {{command}} run
|
|
86
|
+
weaver-work-cli --json {{command}} run {{command}}.operation --input-json '{"key":"value"}'
|
|
71
87
|
```
|
|
72
88
|
|
|
73
89
|
## 不在本 skill 范围
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weaver-e10-calendar
|
|
3
|
+
display_name: 泛微E10日程管理
|
|
4
|
+
display_name_en: Weaver E10 Calendar
|
|
5
|
+
description: 泛微E10日程管理的查询与写操作能力,支持创建、查询列表、查询详情、查询总数、更新、删除日程,查询日程类型与紧急程度,以及应用版本检测,通过 weaver-work-cli calendar 命令执行。
|
|
6
|
+
description_zh: 泛微E10日程管理的查询与写操作能力,支持创建、查询列表、查询详情、查询总数、更新、删除日程,查询日程类型与紧急程度,以及应用版本检测,通过 weaver-work-cli calendar 命令执行。
|
|
7
|
+
description_en: Weaver E10 calendar capabilities, including create, list, get, count, update and delete schedules, query schedule type and priority dictionaries, and check app version, delivered through the weaver-work-cli calendar command.
|
|
8
|
+
version: 1.1.0
|
|
9
|
+
author: 泛微网络科技股份有限公司
|
|
10
|
+
agent_created: true
|
|
11
|
+
requires:
|
|
12
|
+
bins: ["weaver-work-cli"]
|
|
13
|
+
cliHelp: "weaver-work-cli calendar --help"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# 泛微E10日程管理
|
|
17
|
+
|
|
18
|
+
**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`,安装或读取失败时必须停止执行。**
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
本技能覆盖日程管理业务域:**创建日程**、**查询列表**、**查询详情**、**查询总数**、**更新日程**、**删除日程**、**查询类型/紧急程度字典**、**应用版本检测**。写操作(创建/更新/删除)全部走 prepare→apply 确认协议。
|
|
22
|
+
|
|
23
|
+
## 命令入口
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
weaver-work-cli calendar --help
|
|
27
|
+
weaver-work-cli calendar schema
|
|
28
|
+
weaver-work-cli --json calendar run <operation> --input-json '{"key":"value"}'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`schema` 是可用能力的唯一事实来源。禁止把本技能或源文档里的接口路径当成可直接调用的地址,也禁止把未出现在 `schema` 中的能力当作可用 operation。
|
|
32
|
+
|
|
33
|
+
## 认证
|
|
34
|
+
|
|
35
|
+
所有请求复用 `weaver-work-cli` 托管的 E10 会话,业务输入只描述业务对象和意图。所有 `datajson` 结构接口的 `header.operator` 由 CLI 自动填充为当前登录用户,无需在输入中提供。
|
|
36
|
+
|
|
37
|
+
凭证必须由 E10 命名凭据插件提供,由 `weaver-work-cli auth` 托管获取。禁止硬编码地址、账号、口令、Cookie、ETEAMSID 或其它会话凭据,禁止用浏览器自动化绕过登录流程,禁止读取、列出、打印或解析认证目录与文件。认证诊断只能通过 `weaver-work-cli auth` 系列命令、`weaver-work-cli doctor --e10` 和业务命令返回的 JSON 错误完成。
|
|
38
|
+
|
|
39
|
+
## Reference 路由表
|
|
40
|
+
|
|
41
|
+
命中任一条件时,执行下一步前读取对应 reference。
|
|
42
|
+
|
|
43
|
+
| 触发条件 | Reference |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| 查看日程列表、按关键字/时间范围找日程、为更新/删除取日程 ID | [`references/calendar-query.md`](references/calendar-query.md) |
|
|
46
|
+
| 查询日程详情、查询日程总数 | [`references/calendar-query.md`](references/calendar-query.md) |
|
|
47
|
+
| 查询日程类型、查询紧急程度(创建/更新前取选项 ID) | [`references/calendar-dict.md`](references/calendar-dict.md) |
|
|
48
|
+
| 创建日程、修改日程、删除日程(写,prepare→apply) | [`references/calendar-write.md`](references/calendar-write.md) |
|
|
49
|
+
| 判断日程应用是否安装、版本检测、详情卡片页链接 | [`references/calendar-app-check.md`](references/calendar-app-check.md) |
|
|
50
|
+
|
|
51
|
+
## 高优先级语义
|
|
52
|
+
|
|
53
|
+
- **日程**:calendar / agenda,用户常说「日程」「安排」「提醒」「日程列表」「这周有什么安排」。
|
|
54
|
+
- **关键字段**:`agn_name`(名称)、`start_time`/`end_time`(起止,`yyyy-MM-dd HH:mm`)、`participants`(参与人人员 ID)、`agn_type`(类型选项 ID)、`priority`(紧急程度选项 ID)。
|
|
55
|
+
- **ID 语义**:`agn_type` 与 `priority` 必须传**选项 ID**(先通过 `calendar.type.list` / `calendar.priority.list` 获取),不是 `meeting`/`high` 之类语义字符串。`participants` 必须传**人员 ID**(通过 weaver-e10-hrm 解析姓名),不是姓名。
|
|
56
|
+
- **Switch 字段**:`all_day`、`remind`、`part_receipt` 必须传数字 `0`/`1`,禁止布尔值。
|
|
57
|
+
- **时间格式**:`start_time`/`end_time` 为 `yyyy-MM-dd HH:mm`(不含秒);`next_start_remind`/`next_end_remind` 为 `yyyy-MM-dd HH:mm:ss`(含秒)。
|
|
58
|
+
|
|
59
|
+
## 关键业务规则(CLI 已内置)
|
|
60
|
+
|
|
61
|
+
- **参与人默认带当前人**:未传 `participants` 时,CLI 自动用当前登录用户;额外指定他人时当前人仍默认包含,除非用户明确表示自己不参与。
|
|
62
|
+
- **时长默认 1 小时**:只传 `start_time` 未传 `end_time` 时,CLI 自动补 `end_time = start_time + 1 小时`。
|
|
63
|
+
- **更新为全量覆盖**:`calendar.update.prepare` 会先查询当前日程详情并合并用户修改,避免遗漏字段。
|
|
64
|
+
- **列表默认一页**:`page_no`/`page_size` 默认 1/10,不自动翻页。
|
|
65
|
+
|
|
66
|
+
## 处理链(写操作)
|
|
67
|
+
|
|
68
|
+
创建、更新、删除日程必须走 prepare→apply:
|
|
69
|
+
|
|
70
|
+
1. `prepare` 只归一化输入、查当前数据(更新/删除时)、生成预览和 continuation,**不写入**。
|
|
71
|
+
2. 向用户摘要目标、差异、风险。
|
|
72
|
+
3. 用户明确确认后调用 `apply`,必须带 `confirm=true` 和 prepare 返回的 continuation。
|
|
73
|
+
4. `apply` 遇到网络中断/不确定结果时返回 `partial/write_uncertain`,**禁止自动重试**,先做只读回查。
|
|
74
|
+
|
|
75
|
+
## 失败处理
|
|
76
|
+
|
|
77
|
+
- 遇到 `partial`、`write_uncertain`、登录失效、回查失败或网络中断,立即停止当前写流程,不自动重试写入。
|
|
78
|
+
- 认证类错误(`authentication`/`session_expired`):引导用户执行 `weaver-work-cli auth login`,不要用其他方式排查。
|
|
79
|
+
- 接口返回 404 或提示「找不到动作流」:日程应用可能未安装,先运行 `calendar.app.check` 检测,再决定是否停止。
|
|
80
|
+
- 业务失败看 stderr JSON 的 `error.type` / `error.subtype` / `error.message`。
|
|
81
|
+
|
|
82
|
+
## 不在范围
|
|
83
|
+
|
|
84
|
+
- 参与人「姓名 → 人员 ID」解析不在此技能内,交给 weaver-e10-hrm skill。
|
|
85
|
+
- 禁止绕过 CLI 直接 curl/fetch 访问 E10 接口。
|
|
86
|
+
- 禁止把未出现在 `calendar schema` 中的能力当作可用 operation。
|
|
87
|
+
|
|
88
|
+
## 平台兼容
|
|
89
|
+
|
|
90
|
+
命令示例同时兼容 Windows 与 macOS/Linux。简单 JSON 用 `--input-json`,复杂 JSON 存 UTF-8 文件后用 `--input <path>`。
|
|
91
|
+
|
|
92
|
+
Windows PowerShell:
|
|
93
|
+
|
|
94
|
+
```powershell
|
|
95
|
+
weaver-work-cli --json calendar run calendar.list --input-json '{"page_no":1,"page_size":10}'
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
macOS/Linux(bash/zsh):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
printf '%s\n' '{"page_no":1,"page_size":10}' | weaver-work-cli --json calendar run calendar.list --input -
|
|
102
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# 应用版本检测与详情卡片页链接
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
判断「日程」应用是否安装、版本是否满足要求,或需要日程详情卡片页链接时使用。全部为只读操作。
|
|
6
|
+
|
|
7
|
+
## operation 清单
|
|
8
|
+
|
|
9
|
+
| operation | 用途 |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `calendar.app.check` | 检测应用安装状态与版本(要求 >= 4.1.4),并返回日程表单 ID |
|
|
12
|
+
|
|
13
|
+
## 何时触发
|
|
14
|
+
|
|
15
|
+
- 日程接口返回 404,或提示「找不到动作流 / 动作流 ID 不存在」。
|
|
16
|
+
- `status: false` 且语义含「不存在」「未找到」「不支持」。
|
|
17
|
+
- 用户主动问版本或「为什么用不了」。
|
|
18
|
+
|
|
19
|
+
权限不足、字段校验报错、查询结果为空、网络超时**不触发**版本检测。
|
|
20
|
+
|
|
21
|
+
## 命令
|
|
22
|
+
|
|
23
|
+
Windows PowerShell:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
weaver-work-cli --json calendar run calendar.app.check --input-json '{}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
macOS/Linux(bash/zsh):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
printf '%s\n' '{}' | weaver-work-cli --json calendar run calendar.app.check --input -
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 输出处理
|
|
36
|
+
|
|
37
|
+
返回字段:`installed`(是否安装)、`appId`、`commitVersion`、`versionOk`(版本是否 >= 4.1.4)、`minRequiredVersion`、`formId`(日程表单 ID)、`status`(`OK` / `NOT_INSTALLED` / `VERSION_TOO_LOW`)。
|
|
38
|
+
|
|
39
|
+
- `status=NOT_INSTALLED`:停止调用所有日程接口,提示用户先安装「日程」应用。
|
|
40
|
+
- `status=VERSION_TOO_LOW`:停止调用,提示当前版本低于 4.1.4,请升级。
|
|
41
|
+
- `status=OK`:可用,按原始接口错误如实报告。
|
|
42
|
+
|
|
43
|
+
## 详情卡片页链接
|
|
44
|
+
|
|
45
|
+
查询列表/详情时,日程名称可渲染为可点击链接跳转详情卡片页:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
https://<E10环境地址>/sp/ebdfpage/card/0/{表单ID}/{日程ID}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `<E10环境地址>`:当前 E10 环境域名。
|
|
52
|
+
- `{表单ID}`:`calendar.app.check` 返回的 `formId`。
|
|
53
|
+
- `{日程ID}`:`calendar.list` 返回的 `agenda[].id` 或 `calendar.get` 返回的 `mainTable.id`。
|
|
54
|
+
|
|
55
|
+
`formId` 为空(获取偶发空返回重试后仍失败)时降级为纯文本展示,不阻断查询结果。
|
|
56
|
+
|
|
57
|
+
## 注意
|
|
58
|
+
|
|
59
|
+
- `appId` 会随应用重装/迁移变化,禁止硬编码。
|
|
60
|
+
- 版本比较按 `.` 分段转整数逐段比较,不做字符串比较(CLI 已内置)。
|
|
61
|
+
- 默认不主动做版本校验,只在出现异常时检测。
|
|
62
|
+
|
|
63
|
+
## 失败处理
|
|
64
|
+
|
|
65
|
+
- 三步 GET 接口失败或返回空:CLI 会给出 `installed=false` 与原因,据此向用户说明,不做盲目重试。
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 查询日程类型 / 紧急程度(字典)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
创建或更新日程前,需要确认 `agn_type`(日程类型)或 `priority`(紧急程度)的可选值、拿选项 ID 时使用。全部为只读操作。
|
|
6
|
+
|
|
7
|
+
## operation 清单
|
|
8
|
+
|
|
9
|
+
| operation | 用途 | 必填 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `calendar.type.list` | 查询日程类型选项列表(`agn_type` 可选值) | 无 |
|
|
12
|
+
| `calendar.priority.list` | 查询日程紧急程度选项列表(`priority` 可选值) | 无 |
|
|
13
|
+
|
|
14
|
+
## 输入要点
|
|
15
|
+
|
|
16
|
+
- 可选 `type_name` / `priority_name`:按名称筛选。**不可传空字符串**(会返回空列表),查询全部时省略此字段。
|
|
17
|
+
- 可选 `pageNo`(默认 1)、`pageSize`(默认 10)。
|
|
18
|
+
|
|
19
|
+
## 命令
|
|
20
|
+
|
|
21
|
+
查询全部类型(Windows PowerShell):
|
|
22
|
+
|
|
23
|
+
```powershell
|
|
24
|
+
weaver-work-cli --json calendar run calendar.type.list --input-json '{}'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
查询全部类型(macOS/Linux bash/zsh):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
printf '%s\n' '{}' | weaver-work-cli --json calendar run calendar.type.list --input -
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
查询全部紧急程度:
|
|
34
|
+
|
|
35
|
+
```powershell
|
|
36
|
+
weaver-work-cli --json calendar run calendar.priority.list --input-json '{}'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 输出处理
|
|
40
|
+
|
|
41
|
+
- 业务数据在 `data.datajson.datas[]`,每个元素是 `mainTable`。
|
|
42
|
+
- 类型 `mainTable` 含 `id`/`type_name`/`type_code`/`is_enable`/`is_default`/`type_desc`。
|
|
43
|
+
- 紧急程度 `mainTable` 含 `id`/`priority_name`/`is_enable`/`default_priority`。
|
|
44
|
+
- **写入时 `agn_type` / `priority` 传返回的 `id`**;`type_code` 仅供展示,不可作为选项值传入。
|
|
45
|
+
|
|
46
|
+
## 注意
|
|
47
|
+
|
|
48
|
+
- `is_enable="0"` 的选项已禁用,通常不用于新建日程。
|
|
49
|
+
- `is_default="1"` / `default_priority="1"` 为系统默认项。
|
|
50
|
+
- 选项列表可会话内缓存复用,无需每次写操作前重复查询。
|
|
51
|
+
|
|
52
|
+
## 失败处理
|
|
53
|
+
|
|
54
|
+
- `enum_invalid`:筛选名或分页参数非法。
|
|
55
|
+
- 返回空列表:确认没有传空字符串筛选名。
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# 查询日程列表 / 详情 / 总数
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
查看日程列表、按关键字或时间范围找日程、查询单条日程详情、查询日程总数时使用。全部为只读操作,也作为更新/删除前的辅助查询。
|
|
6
|
+
|
|
7
|
+
## operation 清单
|
|
8
|
+
|
|
9
|
+
| operation | 用途 | 必填 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `calendar.list` | 分页查询日程列表,支持时间范围与关键字筛选 | 无(全部可选) |
|
|
12
|
+
| `calendar.get` | 按日程数据 ID 查询单条完整信息 | `id` |
|
|
13
|
+
| `calendar.count` | 查询日程总数量 | 无 |
|
|
14
|
+
|
|
15
|
+
## 输入要点
|
|
16
|
+
|
|
17
|
+
- `calendar.list` 可选字段:`start_time`/`end_time`(`yyyy-MM-dd HH:mm`)、`keywork`(关键字,字段名拼写为 `keywork` 非 `keyword`)、`page_no`(默认 1)、`page_size`(默认 10)。
|
|
18
|
+
- `calendar.get` 必填 `id`:日程数据 ID,来自 `calendar.list` 返回的 `agenda[].id`。
|
|
19
|
+
- `calendar.count` 无入参。
|
|
20
|
+
|
|
21
|
+
## 命令
|
|
22
|
+
|
|
23
|
+
查询列表(Windows PowerShell):
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
weaver-work-cli --json calendar run calendar.list --input-json '{"page_no":1,"page_size":10}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
查询列表(macOS/Linux bash/zsh):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
printf '%s\n' '{"page_no":1,"page_size":10}' | weaver-work-cli --json calendar run calendar.list --input -
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
按关键字检索:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
weaver-work-cli --json calendar run calendar.list --input-json '{"keywork":"项目周会"}'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
查询详情:
|
|
42
|
+
|
|
43
|
+
```powershell
|
|
44
|
+
weaver-work-cli --json calendar run calendar.get --input-json '{"id":"1304552516098269190"}'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
查询总数:
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
weaver-work-cli --json calendar run calendar.count --input-json '{}'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 输出处理
|
|
54
|
+
|
|
55
|
+
- `calendar.list` 业务数据在 `data.actionData.responseData.customData.mainTable`,含 `count`(总数)、`pageNo`、`pageSize`、`hasNext`、`agenda[]`(列表)。`agenda[]` 元素含 `id`/`agn_name`/`participates`(姓名数组)/`start_time`/`end_time`/`agn_desc`/`location`。
|
|
56
|
+
- `calendar.get` 业务数据在 `data.datajson.datas[0].mainTable`,含完整字段。ID 不存在时 `datas` 为空数组。
|
|
57
|
+
- `calendar.count` 业务数据在 `data.datajson.datas`(数字)。
|
|
58
|
+
- 选项类字段(`agn_type`/`priority`/`start_reminder`/`remind_type` 等)返回 `[{name,id}]` 数组,展示取 `name`,写入取 `id`。
|
|
59
|
+
|
|
60
|
+
## 注意
|
|
61
|
+
|
|
62
|
+
- `calendar.list` 返回的 `participates` 是参与人**姓名**数组,写入时需要人员 ID(交 weaver-e10-hrm 解析)。
|
|
63
|
+
- 列表默认一页(1/10),`hasNext=true` 时提示用户是否翻页。
|
|
64
|
+
- 涉及附件、图片或文件内容解析时,必须先说明文件内容可能进入大模型上下文,获得用户明确确认后才继续。
|
|
65
|
+
|
|
66
|
+
## 失败处理
|
|
67
|
+
|
|
68
|
+
- `id_invalid`:`calendar.get` 的 `id` 不是合法日程 ID。
|
|
69
|
+
- 结果为空:列表 `agenda` 为空数组、详情 `datas` 为空数组,向用户说明未查到,不视为接口失败。
|
|
70
|
+
- 返回 `business_error` 或 404:先运行 `calendar.app.check` 判断应用是否安装。
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# 创建 / 更新 / 删除日程(写操作)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
创建日程、修改日程、删除日程时使用。全部为**高风险写操作**,必须走 prepare→apply 确认协议。
|
|
6
|
+
|
|
7
|
+
## operation 清单
|
|
8
|
+
|
|
9
|
+
| 用途 | prepare | apply |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| 创建日程 | `calendar.create.prepare` | `calendar.create.apply` |
|
|
12
|
+
| 更新日程(全量覆盖) | `calendar.update.prepare` | `calendar.update.apply` |
|
|
13
|
+
| 删除日程(不可逆) | `calendar.delete.prepare` | `calendar.delete.apply` |
|
|
14
|
+
|
|
15
|
+
## 写操作确认协议
|
|
16
|
+
|
|
17
|
+
1. `prepare` 只归一化输入、补默认值、查当前数据(更新/删除时)、生成预览和 continuation,**不写入**。
|
|
18
|
+
2. 向用户摘要目标、差异、风险和确认条件。
|
|
19
|
+
3. 用户明确确认后调用 `apply`,必须带 `confirm=true` 和 prepare 返回的 continuation。
|
|
20
|
+
4. `apply` 校验 session、目标 ID 和字段指纹未变化;网络中断返回 `partial/write_uncertain`,**禁止自动重试**,先做只读回查。
|
|
21
|
+
|
|
22
|
+
continuation 绑定当前登录环境与操作人,10 分钟有效。租户或账号变化触发 `context_mismatch`,字段与 prepare 快照不一致触发 `target_changed`,均需重新 `prepare`。
|
|
23
|
+
|
|
24
|
+
## 创建日程
|
|
25
|
+
|
|
26
|
+
必填 `agn_name`、`start_time`、`agn_type`、`priority`;`end_time` 缺省自动 `start_time + 1 小时`;`participants` 缺省自动带当前操作人。
|
|
27
|
+
|
|
28
|
+
第一步 prepare(Windows PowerShell):
|
|
29
|
+
|
|
30
|
+
```powershell
|
|
31
|
+
weaver-work-cli --json calendar run calendar.create.prepare --input-json '{"agn_name":"项目周会","start_time":"2026-08-15 09:00","agn_type":"1147539906291523593","priority":"1147539666016624641"}'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
macOS/Linux(bash/zsh):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
printf '%s\n' '{"agn_name":"项目周会","start_time":"2026-08-15 09:00","agn_type":"1147539906291523593","priority":"1147539666016624641"}' | weaver-work-cli --json calendar run calendar.create.prepare --input -
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
第二步 apply(把 `--input-json` 换成 prepare 返回的 continuation,并加 `confirm`):
|
|
41
|
+
|
|
42
|
+
```powershell
|
|
43
|
+
weaver-work-cli --json calendar run calendar.create.apply --input-json '{"agn_name":"项目周会","start_time":"2026-08-15 09:00","agn_type":"1147539906291523593","priority":"1147539666016624641","confirm":true,"continuation":"<prepare返回的token>"}'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 更新日程(全量覆盖)
|
|
47
|
+
|
|
48
|
+
`calendar.update.prepare` 先查当前详情再合并用户修改。只传 `id` 加要改的字段即可,未传字段保留原值。
|
|
49
|
+
|
|
50
|
+
第一步 prepare:
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
weaver-work-cli --json calendar run calendar.update.prepare --input-json '{"id":"1304552516098269190","place":"B栋5楼会议室","start_time":"2026-08-15 14:00"}'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
第二步 apply:
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
weaver-work-cli --json calendar run calendar.update.apply --input-json '{"id":"1304552516098269190","place":"B栋5楼会议室","start_time":"2026-08-15 14:00","confirm":true,"continuation":"<prepare返回的token>"}'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 删除日程(不可逆)
|
|
63
|
+
|
|
64
|
+
第一步 prepare:
|
|
65
|
+
|
|
66
|
+
```powershell
|
|
67
|
+
weaver-work-cli --json calendar run calendar.delete.prepare --input-json '{"id":"1304552516098269190"}'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
第二步 apply:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
weaver-work-cli --json calendar run calendar.delete.apply --input-json '{"id":"1304552516098269190","confirm":true,"continuation":"<prepare返回的token>"}'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 字段说明(创建/更新 mainTable)
|
|
77
|
+
|
|
78
|
+
- `agn_name`(String,必填):日程名称。
|
|
79
|
+
- `start_time`/`end_time`(Date,`yyyy-MM-dd HH:mm`):起止时间。
|
|
80
|
+
- `participants`(人员 ID 字符串,多个逗号分隔):参与人。
|
|
81
|
+
- `agn_type`/`priority`(选项 ID):日程类型/紧急程度,先查字典。
|
|
82
|
+
- Switch 字段 `all_day`/`remind`/`part_receipt`:数字 `0`/`1`,禁止布尔值。
|
|
83
|
+
- 提醒:`start_reminder`/`end_reminder`(`NOW`/`M5`/`M15`/`H1`/`D1`/`CUSTOM`)、`remind_type`(`system`/`message`/`email`)。
|
|
84
|
+
- 重复:`repeat_type`(`NONE`/`D1`/`W1`/`W2`/`M1`/`CUSTOM`)、`repeat_custom_type`(`D`/`W`/`M`)、`repeat_custom_cycle`、`repeat_week_unit`(`MO`~`SU`)、`repeat_month_unit`(`1`~`31`)、`repeat_end_type`(`0`/`1`/`2`)、`repeat_end_date`、`repeat_end_num`。
|
|
85
|
+
|
|
86
|
+
## 注意
|
|
87
|
+
|
|
88
|
+
- 写操作请求带 `Content-Type: application/json; charset=utf-8`,中文字段(`agn_name`/`agn_desc`/`place`)按 UTF-8 写入,由 CLI 自动处理。
|
|
89
|
+
- 参与人姓名 → 人员 ID 交 weaver-e10-hrm 解析;类型/紧急程度名称 → 选项 ID 先查字典。
|
|
90
|
+
- 删除不可逆,务必先 prepare 展示日程详情并获得用户明确确认。
|
|
91
|
+
|
|
92
|
+
## 失败处理
|
|
93
|
+
|
|
94
|
+
- `confirmation.required`:`apply` 未带 `confirm=true`。
|
|
95
|
+
- `continuation_invalid` / `continuation_expired` / `continuation_mismatch`:continuation 无效/过期/不匹配,重新 prepare。
|
|
96
|
+
- `target_changed`:字段与 prepare 快照不一致,重新 prepare。
|
|
97
|
+
- `partial/write_uncertain`:请求已发送但结果不确定,禁止自动重试,用 `calendar.get`/`calendar.list` 回查。
|