weaver-work-cli 0.1.8 → 0.1.21
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 +25 -17
- package/dist/cmd/action.js +76 -0
- package/dist/cmd/index.js +2 -0
- package/dist/cmd/refs/index.js +103 -0
- package/dist/cmd/register.js +31 -0
- package/dist/cmd/root.js +1 -0
- package/dist/cmd/setup/index.js +25 -5
- package/dist/cmd/skills/index.js +37 -5
- package/dist/core/connector.js +54 -0
- package/dist/core/context.js +2 -1
- package/dist/core/input.js +48 -0
- package/dist/core/output.js +298 -3
- package/dist/core/refs.js +435 -0
- package/dist/core/state.js +26 -0
- package/dist/internal/e10/auth/commands.js +34 -19
- package/dist/internal/e10/auth/session.js +74 -2
- package/dist/internal/e10/auth/xiaoe.js +359 -94
- package/dist/internal/e10/context.js +18 -6
- package/dist/internal/e10/request-runtime.js +8 -1
- package/dist/internal/skills/install.js +148 -28
- package/dist/internal/skills/reader.js +12 -9
- package/dist/shortcuts/blog/continuation.js +74 -0
- package/dist/shortcuts/blog/errors.js +60 -0
- package/dist/shortcuts/blog/host.js +175 -0
- package/dist/shortcuts/blog/index.js +324 -0
- package/dist/shortcuts/blog/manifest.js +415 -0
- package/dist/shortcuts/blog/operations/comment.js +125 -0
- package/dist/shortcuts/blog/operations/comments.js +31 -0
- package/dist/shortcuts/blog/operations/edit.js +131 -0
- package/dist/shortcuts/blog/operations/export.js +46 -0
- package/dist/shortcuts/blog/operations/like.js +80 -0
- package/dist/shortcuts/blog/operations/publish.js +157 -0
- package/dist/shortcuts/blog/operations/query-user.js +58 -0
- package/dist/shortcuts/blog/operations/query.js +96 -0
- package/dist/shortcuts/blog/operations/registry.js +54 -0
- package/dist/shortcuts/blog/operations/remind.js +176 -0
- package/dist/shortcuts/blog/operations/shared.js +330 -0
- package/dist/shortcuts/blog/operations/types.js +16 -0
- package/dist/shortcuts/blog/operations.js +9 -0
- package/dist/shortcuts/caizhilian/continuation.js +70 -0
- package/dist/shortcuts/caizhilian/errors.js +53 -0
- package/dist/shortcuts/caizhilian/host.js +190 -0
- package/dist/shortcuts/caizhilian/index.js +186 -0
- package/dist/shortcuts/caizhilian/manifest.js +42 -0
- package/dist/shortcuts/caizhilian/operations/api.js +801 -0
- package/dist/shortcuts/caizhilian/operations/confirm.js +75 -0
- package/dist/shortcuts/caizhilian/operations/files.js +306 -0
- package/dist/shortcuts/caizhilian/operations/form.js +170 -0
- package/dist/shortcuts/caizhilian/operations/handlers/collab.js +611 -0
- package/dist/shortcuts/caizhilian/operations/handlers/document.js +890 -0
- package/dist/shortcuts/caizhilian/operations/handlers/file-collection.js +1227 -0
- package/dist/shortcuts/caizhilian/operations/handlers/file-upload.js +192 -0
- package/dist/shortcuts/caizhilian/operations/handlers/fileops.js +570 -0
- package/dist/shortcuts/caizhilian/operations/handlers/folder.js +1024 -0
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +318 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-attach.js +294 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-backup.js +423 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-encrypt.js +238 -0
- package/dist/shortcuts/caizhilian/operations/handlers/setting-storage.js +364 -0
- package/dist/shortcuts/caizhilian/operations/handlers/system.js +106 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +151 -0
- package/dist/shortcuts/caizhilian/operations/shared.js +408 -0
- package/dist/shortcuts/caizhilian/operations/specs.js +698 -0
- package/dist/shortcuts/caizhilian/operations/types.js +57 -0
- package/dist/shortcuts/caizhilian/operations.js +21 -0
- package/dist/shortcuts/contract/continuation.js +70 -0
- package/dist/shortcuts/contract/errors.js +62 -0
- package/dist/shortcuts/contract/host.js +205 -0
- package/dist/shortcuts/contract/index.js +318 -0
- package/dist/shortcuts/contract/manifest.js +596 -0
- package/dist/shortcuts/contract/operations/clause-reference.js +78 -0
- package/dist/shortcuts/contract/operations/form-info.js +371 -0
- package/dist/shortcuts/contract/operations/read.js +118 -0
- package/dist/shortcuts/contract/operations/registry.js +43 -0
- package/dist/shortcuts/contract/operations/request.js +300 -0
- package/dist/shortcuts/contract/operations/shared.js +133 -0
- package/dist/shortcuts/contract/operations/subject.js +157 -0
- package/dist/shortcuts/contract/operations/template.js +81 -0
- package/dist/shortcuts/contract/operations/types.js +7 -0
- package/dist/shortcuts/contract/operations/workflow.js +52 -0
- package/dist/shortcuts/contract/operations/write.js +131 -0
- package/dist/shortcuts/contract/operations.js +8 -0
- package/dist/shortcuts/hrm/index.js +83 -2
- package/dist/shortcuts/hrm/manifest.js +16 -9
- package/dist/shortcuts/hrm/operations/employee.js +160 -30
- package/dist/shortcuts/hrm/operations/org.js +17 -3
- package/dist/shortcuts/hrm/operations/position.js +18 -2
- package/dist/shortcuts/hrm/operations/registry.js +2 -0
- package/dist/shortcuts/hrm/operations/resolve.js +449 -0
- package/dist/shortcuts/index.js +5 -1
- package/dist/shortcuts/invoice/index.js +74 -36
- package/dist/shortcuts/invoice/manifest.js +674 -4
- package/dist/shortcuts/invoice/markdown.js +172 -0
- package/dist/shortcuts/invoice/operations/add.js +3 -3
- package/dist/shortcuts/invoice/operations/delete.js +2 -2
- package/dist/shortcuts/invoice/operations/get.js +10 -2
- package/dist/shortcuts/invoice/operations/import.js +2 -2
- package/dist/shortcuts/invoice/operations/registry.js +8 -1
- package/dist/shortcuts/invoice/operations/reim-auto.js +719 -0
- package/dist/shortcuts/invoice/operations/reim.js +85 -2
- package/dist/shortcuts/invoice/operations/shared.js +75 -8
- package/dist/shortcuts/invoice/operations/update.js +2 -2
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +93 -0
- package/dist/shortcuts/invoice/operations/validate-preview.js +2 -1
- package/dist/shortcuts/invoice/projection.js +328 -0
- package/dist/shortcuts/meeting/host.js +18 -1
- package/dist/shortcuts/meeting/manifest.js +30 -18
- package/dist/shortcuts/meeting/operations/eb/catalog.js +390 -0
- package/dist/shortcuts/meeting/operations/eb/conflict.js +389 -0
- package/dist/shortcuts/meeting/operations/eb/factory.js +389 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +22 -0
- package/dist/shortcuts/meeting/operations/env.js +8 -1
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/meeting/operations/signs.js +216 -2
- package/dist/shortcuts/workflow/endpoints.js +2 -1
- package/dist/shortcuts/workflow/errors.js +8 -2
- package/dist/shortcuts/workflow/host.js +11 -4
- package/dist/shortcuts/workflow/operations/form.js +1016 -590
- package/dist/shortcuts/workflow/operations/read.js +913 -231
- package/dist/shortcuts/workflow/operations/shared.js +21 -0
- package/dist/shortcuts/workflow/operations/write.js +750 -52
- package/dist/shortcuts/workflow/operations.js +36 -10
- package/docs/_catalog.md +6 -0
- package/docs/agent-invoice.md +5 -1
- package/docs/agent-io-channel-design.md +468 -0
- package/docs/agent-skill-install.md +9 -4
- package/docs/blog.md +123 -0
- package/docs/caizhilian.md +304 -0
- package/docs/contract.md +91 -0
- package/docs/e10-auth.md +4 -2
- package/docs/hrm.md +53 -11
- package/docs/invoice.md +5 -1
- package/docs/meeting.md +1 -1
- package/docs/operation-manual.md +15 -3
- package/docs/skill-review-2026-09-19.md +2 -2
- package/package.json +1 -1
- package/scripts/package-skill.mjs +32 -20
- package/scripts/xiaoe_env.py +118 -0
- package/skill-template/business-info.json +113 -14
- package/skill-template/domains/blog.md +24 -0
- package/skill-template/domains/caizhilian.md +22 -0
- package/skill-template/domains/hrm.md +2 -1
- package/skill-template/domains/jinchengda.md +23 -0
- package/skill-template/domains/meeting.md +1 -1
- package/skill-template/domains/workflow.md +1 -1
- package/skill-template/skill-template.md +1 -1
- package/skills/weaver-e10-blog/SKILL.md +111 -0
- package/skills/weaver-e10-blog/references/blog-comment.md +51 -0
- package/skills/weaver-e10-blog/references/blog-comments.md +39 -0
- package/skills/weaver-e10-blog/references/blog-default-permission.md +38 -0
- package/skills/weaver-e10-blog/references/blog-disabled-capabilities.md +11 -0
- package/skills/weaver-e10-blog/references/blog-edit.md +51 -0
- package/skills/weaver-e10-blog/references/blog-export.md +42 -0
- package/skills/weaver-e10-blog/references/blog-like.md +50 -0
- package/skills/weaver-e10-blog/references/blog-publish.md +52 -0
- package/skills/weaver-e10-blog/references/blog-query-user.md +45 -0
- package/skills/weaver-e10-blog/references/blog-query.md +49 -0
- package/skills/weaver-e10-blog/references/blog-remind.md +51 -0
- package/skills/weaver-e10-blog/references/blog-resolve-users.md +38 -0
- package/skills/weaver-e10-blog/references/source-manifest.json +1540 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +217 -0
- package/skills/weaver-e10-caizhilian/references/agent-entry.md +106 -0
- package/skills/weaver-e10-caizhilian/references/collaboration.md +112 -0
- package/skills/weaver-e10-caizhilian/references/document.md +111 -0
- package/skills/weaver-e10-caizhilian/references/file-collection.md +173 -0
- package/skills/weaver-e10-caizhilian/references/file-upload.md +309 -0
- package/skills/weaver-e10-caizhilian/references/files.md +120 -0
- package/skills/weaver-e10-caizhilian/references/folder.md +122 -0
- package/skills/weaver-e10-caizhilian/references/org-browser.md +104 -0
- package/skills/weaver-e10-caizhilian/references/setting-attach.md +440 -0
- package/skills/weaver-e10-caizhilian/references/setting-backup.md +372 -0
- package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +399 -0
- package/skills/weaver-e10-caizhilian/references/setting-storage.md +603 -0
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +5694 -0
- package/skills/weaver-e10-caizhilian/references/withheld.md +93 -0
- package/skills/weaver-e10-caizhilian/references/write-protocol.md +120 -0
- package/skills/weaver-e10-calendar/SKILL.md +4 -3
- package/skills/weaver-e10-ebuilder-form/SKILL.md +4 -9
- package/skills/weaver-e10-ebuilder-form/references/context-routing.md +0 -9
- package/skills/weaver-e10-ebuilder-form/references/custom-api.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/fields-browser.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/list-nlist.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/openapi-read.md +1 -5
- package/skills/weaver-e10-ebuilder-form/references/openapi-write.md +1 -5
- package/skills/weaver-e10-esb/SKILL.md +2 -2
- package/skills/weaver-e10-esb/references/source-manifest.json +9 -9
- package/skills/weaver-e10-hrm/SKILL.md +104 -9
- package/skills/weaver-e10-hrm/references/employee.md +89 -15
- package/skills/weaver-e10-hrm/references/org.md +114 -5
- package/skills/weaver-e10-hrm/references/position.md +14 -7
- package/skills/weaver-e10-hrm/references/source-manifest.json +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +167 -0
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +82 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +69 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +78 -0
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +27 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +71 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +94 -0
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +89 -0
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +77 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +66 -0
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +94 -0
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +259 -0
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +5 -11
- package/skills/weaver-e10-jucailin/SKILL.md +4 -3
- package/skills/weaver-e10-mail/SKILL.md +4 -11
- package/skills/weaver-e10-meeting/SKILL.md +66 -32
- package/skills/weaver-e10-meeting/references/meeting-change.md +5 -2
- package/skills/weaver-e10-meeting/references/meeting-create.md +2 -1
- package/skills/weaver-e10-meeting/references/meeting-eb.md +114 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +9 -8
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +35 -7
- package/skills/weaver-e10-meeting/references/meeting-update.md +1 -1
- package/skills/weaver-e10-okr/SKILL.md +6 -11
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-plan/SKILL.md +3 -3
- package/skills/weaver-e10-plan/references/plan-collect-and-compose.md +1 -1
- package/skills/weaver-e10-plan/references/plan-overview-and-routing.md +1 -1
- package/skills/weaver-e10-plan/references/source-manifest.json +13 -13
- package/skills/weaver-e10-qiyecheng/SKILL.md +4 -10
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +9 -9
- package/skills/weaver-e10-shared/SKILL.md +42 -34
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +16 -43
- package/skills/weaver-e10-shared/references/json-output-contract.md +20 -11
- package/skills/weaver-e10-shared/references/non-interactive-environment.md +21 -14
- package/skills/weaver-e10-shijingran/SKILL.md +2 -1
- package/skills/weaver-e10-shijingran/references/source-manifest.json +9 -9
- package/skills/weaver-e10-skill-maker/SKILL.md +4 -10
- package/skills/weaver-e10-skill-maker/references/business-skill-generation.md +5 -3
- package/skills/weaver-e10-skill-maker/references/module-cli-generation.md +12 -27
- package/skills/weaver-e10-skill-maker/references/module-gap-audit-and-repair.md +17 -5
- package/skills/weaver-e10-skill-maker/references/source-update-detection.md +4 -27
- package/skills/weaver-e10-skill-maker/references/weaver-skill-style.md +1 -1
- package/skills/weaver-e10-wenshuding/SKILL.md +5 -16
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +7 -7
- package/skills/weaver-e10-workflow/SKILL.md +41 -46
- package/skills/weaver-e10-workflow/references/source-manifest.json +39 -75
- package/skills/weaver-e10-workflow/references/workflow-batch.md +90 -29
- package/skills/weaver-e10-workflow/references/workflow-create.md +83 -109
- package/skills/weaver-e10-workflow/references/workflow-memory.md +19 -9
- package/skills/weaver-e10-workflow/references/workflow-operate.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-query.md +40 -27
- package/skills/weaver-e10-workflow/references/workflow-share.md +18 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +3 -4
- package/skills/weaver-e10-yepiaotong/SKILL.md +74 -39
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +22 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +3 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +135 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +15 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-summarize.py +217 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +88 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +7 -2
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +89 -9
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +1 -0
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +70 -49
- package/skills/weaver-e10-yepiaotong/references/reim-fast-path.md +119 -0
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +55 -36
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +4 -0
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +149 -0
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +125 -5
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +430 -63
- package/skills/weaver-e10-yimiaoban/SKILL.md +4 -12
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
- package/skills/weaver-e10-ziguanjia/SKILL.md +2 -1
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-agent-entry.md +3 -3
- package/tools/weaver-skill-detector-1.0.13/SKILL.md +9 -9
- package/tools/weaver-skill-detector-1.0.13/references/checklist.md +3 -3
- package/tools/weaver-skill-detector-1.0.13/scripts/__pycache__/validate_skill.cpython-313.pyc +0 -0
- package/tools/weaver-skill-detector-1.0.13/scripts/validate_skill.py +98 -91
- package/scripts/sync-connector-skills.mjs +0 -172
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
本业务域用于泛微 E10 今承达合同管理。入口 `SKILL.md` 按飞书 `lark-approval` 风格组织:CRITICAL 共享前置、路由优先级、选命令表、处理链、执行原则、写操作失败决策树和“不在本 skill 范围”。具体用法拆到 `references/`:
|
|
2
|
+
|
|
3
|
+
- `contract-agent-entry.md`:schema、`contract run` 统一入口、退出码与输入方式。
|
|
4
|
+
- `contract-template-selector.md`:合同类型树、模板分类树、模板列表与模板详情。
|
|
5
|
+
- `contract-clause-recommender.md`:条款标签、条款分类树、条款搜索、条款列表与条款组。
|
|
6
|
+
- `contract-clause-reference-save.md`:已引用条款查询与条款引用写入的 `prepare -> apply` 协议。
|
|
7
|
+
- `contract-signing-subjects.md`:应用 Tag、表单 Tag、字段定义、字段选项与签约主体查询。
|
|
8
|
+
- `contract-subject-create.md`:新建签约主体的 `prepare -> apply` 写入协议。
|
|
9
|
+
- `contract-workflow-discovery.md`:workflowId、表单字段与字段选项的运行时解析链。
|
|
10
|
+
- `contract-request-write.md`:创建、保存、提交、催办四个写操作的确认链与错误边界。
|
|
11
|
+
- `contract-request-status.md`:流程状态、签字意见与 `flowStatus.code` 枚举。
|
|
12
|
+
- `contract-disabled-capabilities.md`:企业资信、撤回/退回等未实现能力的处理边界。
|
|
13
|
+
- `source-manifest.json`:源资料指纹,用于后续更新检测。
|
|
14
|
+
|
|
15
|
+
Agent 调优重点:
|
|
16
|
+
|
|
17
|
+
- `weaver-work-cli contract schema` 是 operation 合约第一信息源。
|
|
18
|
+
- 业务输入不得包含 `userid`、`userId`、Cookie、ETEAMSID、Token 或内部控制字段,用户 ID 由 CLI 从会话注入。
|
|
19
|
+
- 环境相关 ID(`appId`、`objId`、`formId`、`workflowId`、`nodeId`)必须运行时解析,未找到就停止,不使用标准环境 ID 兜底。
|
|
20
|
+
- 各接口成功码不统一(`code=0`、`code=200`、`message.code="0"`、`message.errcode="0"`),HTTP 200 不等于业务成功。
|
|
21
|
+
- 写操作只接受 CLI 生成的 continuation,不手工构造或复用;提交审批与催办需要与“创建并保存”分开的第二次确认。
|
|
22
|
+
- 提交后必须回读 `contract.request.status` 的 `flowStatus.code`(1 审批中 / 3 已归档)才算生效。
|
|
23
|
+
- 结果为 `partial/write_uncertain` 时停止,不自动重放写请求。
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# 会议(meeting)业务域
|
|
2
2
|
|
|
3
|
-
会议域覆盖 E10 标准版会议应用:环境模式探测、会议列表、会议室与占用视图、会议类型、冲突检测、预约会议(prepare/apply 确认链)、回执与签到查询。入口 `SKILL.md` 只做路由;具体命令、字段约束与失败处理拆到 `references/`(meeting-queries / meeting-create / meeting-receipts-signs)。关键安全边界:预约与回执更新是高风险写,必须走 prepare→用户确认→apply
|
|
3
|
+
会议域覆盖 E10 标准版会议应用:环境模式探测、会议列表、会议室与占用视图、会议类型、冲突检测、预约会议(prepare/apply 确认链)、回执与签到查询。入口 `SKILL.md` 只做路由;具体命令、字段约束与失败处理拆到 `references/`(meeting-queries / meeting-create / meeting-receipts-signs)。关键安全边界:预约与回执更新是高风险写,必须走 prepare→用户确认→apply;冲突命中严格按应用设置处置(禁止提交→直接拒绝;仅提醒→告知用户,用户坚持时仍可继续提交);EB 版链路与工作流建会在 v1 未实现,见 manifest 的 withheldOperations。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- `workflow-operate.md`:单条流程同意/提交/退回/转办/委托/转发/抄送/加审/收回/结束/征询/删除/催办的 `prepare -> apply` 写入协议。
|
|
7
7
|
- `workflow-batch.md`:批量提交/置已读/催办/共享/转发/退回的 6 个**单命令**写入协议。
|
|
8
8
|
- `workflow-share.md`:单条流程共享给人员/部门/分部/群组/角色/岗位/所有人的 `prepare -> apply` 写入协议。
|
|
9
|
-
- `workflow-create.md`:发起流程的 `
|
|
9
|
+
- `workflow-create.md`:发起流程的 `createForm -> createRequest` 两条命令链(工作流解析、载入表单、必填校验与落盘收敛在命令内部)。
|
|
10
10
|
- `workflow-edit.md`:修改已存在流程表单的 `editLoad -> editPrepare -> editApply` 确认链。
|
|
11
11
|
- `workflow-memory.md`:记忆偏好读取、`oaContext`(OA 版本 + 当前用户身份)与语义记忆保存。
|
|
12
12
|
- `source-manifest.json`:源资料指纹、sourceChunks、operationImpact 与生成产物基线,供源资料更新检测。
|
|
@@ -13,7 +13,7 @@ requires:
|
|
|
13
13
|
cliHelp: "weaver-work-cli {{command}} --help"
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON
|
|
16
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。安装或读取失败时必须停止执行;命令均成功后重新读取共享规则,仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
17
17
|
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
18
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
19
|
若 `schema` 或 reference 提供 `inputExamples`,优先复用其中和当前意图最接近的样例并只替换用户明确给出的值;标记为 `synthetic` 的样例需要业务复核,不能当作源资料事实。若 operation 标记了 `missingExamples` 或参数覆盖矩阵中的 `needs-confirmation` 字段,先向用户说明缺少哪些入参事实并索取补充,不要通过反复尝试不同 JSON 格式来猜。
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weaver-e10-blog
|
|
3
|
+
display_name: 泛微E10工作日报
|
|
4
|
+
display_name_en: Weaver E10 Daily Report
|
|
5
|
+
description: "泛微 E10 工作日报的查询、发布、编辑、评论、点赞、提醒与 Excel 导出能力,通过 weaver-work-cli blog 命令执行。"
|
|
6
|
+
description_zh: "泛微 E10 工作日报全流程:群体日报查询(下属/关注)、单人日报查询、HRM 姓名解析、评论查询、默认共享查询、日报导出 xlsx,以及发布、编辑、评论、点赞、提醒的 prepare -> apply 写入确认链。"
|
|
7
|
+
description_en: "Full lifecycle of Weaver E10 daily reports: group and personal queries, HRM name resolution, comments, default sharing, Excel export, and prepare -> apply confirmation chains for publish, edit, comment, like, and remind operations."
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
author: 泛微网络科技股份有限公司
|
|
10
|
+
agent_created: true
|
|
11
|
+
requires:
|
|
12
|
+
bins: ["weaver-work-cli"]
|
|
13
|
+
cliHelp: "weaver-work-cli blog --help"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# weaver-work-cli 日报助手
|
|
17
|
+
|
|
18
|
+
**CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md),其中包含安装、E10 认证、JSON 输出和高风险写入规则。若共享规则不存在、CLI 未安装或读取失败,说明本技能的必需依赖缺失,必须调用宿主提供的提问/确认弹框,向用户说明必须补齐 `weaver-work-cli` 与共享 skill `weaver-e10-shared`(不补齐本技能无法执行)及补齐计划,并把下面两条待执行命令原样完整展示在确认信息中;Agent 不能在未确认时自行安装。用户明确确认后,Agent 必须直接代为按顺序执行且每条仅执行一次,不得要求或引导用户手动执行:① 缺 CLI 时执行 `npm install -g weaver-work-cli`;② 再执行 `weaver-work-cli skills install shared --target-dir <SKILLS_ROOT>` 装回共享 skill,`<SKILLS_ROOT>` 取本 SKILL.md 所在目录的上一级绝对目录(即与本技能同级的 skills 根目录),不要省略 `--target-dir`——省略会装进默认目录,导致本技能依然读不到共享规则。命令均成功后重新读取共享规则;仍读不到就停止并把结果报告用户,不得凭猜测继续。**
|
|
19
|
+
**`--is-connector` 判据**:用户明确使用连接器、或上下文要求用连接器完成任务 → 传 `true`;本次任务或上下文直接选择单独技能 → 不传;用户没有明确说明时,按**正在运行的这份 Skill 是哪一级**定——**用户级(条目标 `(user)`)不传,连接器级(标 `(connector)`)传**(同名 Skill 只会运行用户级那一份)。传 `true` 时不要再写 `--profile` / `--base-url`。完整规则见 [`../weaver-e10-shared/SKILL.md`](../weaver-e10-shared/SKILL.md)。
|
|
20
|
+
|
|
21
|
+
认证和登录态只能按共享规则通过 `weaver-work-cli auth ...` 命令判断;禁止直接读取、列出、打印或解析用户主目录下的旧 `.e10-cli`、auth、config 或 Keychain 数据。
|
|
22
|
+
所有命令通过 `weaver-work-cli --json blog run <operation>` 执行:简单 JSON 优先传 `--input-json '<json>'`,复杂或多行 JSON 先写入 UTF-8 文件再传 `--input <path>`,只有确认当前 shell 能稳定传管道时才使用 `--input -`。调用前先按需读取 references 下对应文件;**references 是第一信息源**,`weaver-work-cli blog schema` 是 operation、字段和风险等级的合约来源,不要靠反复尝试不同 JSON 格式来猜字段。
|
|
23
|
+
命令示例、提示词和临时说明必须同时兼容 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 写法。
|
|
24
|
+
|
|
25
|
+
## 适用场景与触发条件
|
|
26
|
+
|
|
27
|
+
触发条件:用户提到「日报」「工作日报」「写日报」「查日报」「日报补交」「未提交日报」「催交日报」「提醒交日报」「下属日报」「我关注的人的日报」「日报评论」「点赞日报」「导出日报」「日报 Excel」等意图,或需要把某人姓名解析为 E10 人员后再查日报。
|
|
28
|
+
|
|
29
|
+
典型适用场景:
|
|
30
|
+
- 查询下属/关注人群体的日报提交与补交情况(blog.query)
|
|
31
|
+
- 按日期区间逐日查询单人日报与提交状态(blog.query_user)
|
|
32
|
+
- 把姓名、工号模糊信息解析成 E10 userId(blog.resolve_users)
|
|
33
|
+
- 查询某篇日报的评论(blog.comments)、导出日报 Excel(blog.export)
|
|
34
|
+
- 发布/编辑/评论/点赞/催交日报(prepare -> apply 确认链,写入类高风险操作)
|
|
35
|
+
|
|
36
|
+
不适用:人事档案、考勤、薪酬、流程审批等非日报意图。
|
|
37
|
+
|
|
38
|
+
## 路由优先级
|
|
39
|
+
|
|
40
|
+
1. 用户意图涉及工作日报(日报、日志、补交、催交、提醒交日报)→ 本模块。
|
|
41
|
+
2. 先读 `weaver-work-cli blog schema` 确认 operation 合约,再按命令表选 operation。
|
|
42
|
+
3. 人事档案、考勤、薪酬等非日报意图 → 不属于本模块。
|
|
43
|
+
|
|
44
|
+
## 高优先级语义
|
|
45
|
+
|
|
46
|
+
- 业务对象:工作日报(blog)。别名:日报、工作日报、日志、补交、催交。
|
|
47
|
+
- **查指定个人**只能用 `blog.query_user`(按天扫描,区间上限 62 天);不要尝试按 userId 列表批量查个人——服务端会忽略该过滤并静默返回当前登录人自己的日报。
|
|
48
|
+
- **查群体**(直接下属 / 间接下属 / 全部下属 / 我关注的人)用 `blog.query` 的 `user_type`。
|
|
49
|
+
- 补交状态由 CLI 按「提交时间 vs 日报日期是否同日」判定,输出为 `正常` / `补交` / `未提交`,不要使用其它口径。
|
|
50
|
+
- 提醒默认文案固定为「请填写 YYYY年 M月 D日 的日报!」,日期与输入 `date` 一致。
|
|
51
|
+
- HRM 解析人员取 `user_id`;姓名同名多命中时 CLI 会报错并列出候选,改用 `user_id` 指定。
|
|
52
|
+
|
|
53
|
+
## 命令表
|
|
54
|
+
|
|
55
|
+
| 用户意图 | operation | reference |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| 查群体日报(下属 / 我关注的人) | `blog.query` | [blog-query.md](references/blog-query.md) |
|
|
58
|
+
| 查某人某天 / 某段日报 | `blog.query_user` | [blog-query-user.md](references/blog-query-user.md) |
|
|
59
|
+
| 按姓名解析 userId | `blog.resolve_users` | [blog-resolve-users.md](references/blog-resolve-users.md) |
|
|
60
|
+
| 查某条日报的评论 | `blog.comments` | [blog-comments.md](references/blog-comments.md) |
|
|
61
|
+
| 查某日期默认共享对象 | `blog.default_permission` | [blog-default-permission.md](references/blog-default-permission.md) |
|
|
62
|
+
| 导出日报为 xlsx | `blog.export` | [blog-export.md](references/blog-export.md) |
|
|
63
|
+
| 发布日报 | `blog.publish.prepare` → `blog.publish.apply` | [blog-publish.md](references/blog-publish.md) |
|
|
64
|
+
| 编辑指定日期日报 | `blog.edit.prepare` → `blog.edit.apply` | [blog-edit.md](references/blog-edit.md) |
|
|
65
|
+
| 评论指定日报 | `blog.comment.prepare` → `blog.comment.apply` | [blog-comment.md](references/blog-comment.md) |
|
|
66
|
+
| 点赞 / 取消点赞 | `blog.like.prepare` → `blog.like.apply` | [blog-like.md](references/blog-like.md) |
|
|
67
|
+
| 提醒提交日报 | `blog.remind.prepare` → `blog.remind.apply` | [blog-remind.md](references/blog-remind.md) |
|
|
68
|
+
| 暂未支持的能力 | — | [blog-disabled-capabilities.md](references/blog-disabled-capabilities.md) |
|
|
69
|
+
|
|
70
|
+
统一 JSON 入口:
|
|
71
|
+
|
|
72
|
+
Windows PowerShell:
|
|
73
|
+
|
|
74
|
+
```powershell
|
|
75
|
+
weaver-work-cli --json blog run blog.query --input-json '{"user_type":"myFollow","start_date":"2026-09-14","end_date":"2026-09-16"}'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
macOS/Linux(bash/zsh):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
weaver-work-cli --json blog run blog.query --input-json '{"user_type":"myFollow","start_date":"2026-09-14","end_date":"2026-09-16"}'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 处理链
|
|
85
|
+
|
|
86
|
+
- **日报提交情况报表**:`blog.query`(user_type 按意图选择)→ 汇总 `submit_status` → 向用户输出按人统计表。未提交按人天取 `not_submitted[]`;`not_submitted_people[]` 是整窗完全没交的人(用于催交)。
|
|
87
|
+
- **发布**:`blog.publish.prepare`(自动查当日是否已有日报、回填默认共享)→ 向用户复述日期与内容 → 用户确认 → `blog.publish.apply --yes`(CLI 回查验证)。
|
|
88
|
+
- **编辑**:`blog.edit.prepare`(自动取原内容与差异)→ 复述原内容与新内容 → 用户确认 → `blog.edit.apply --yes`。
|
|
89
|
+
- **评论 / 点赞**:`prepare` 定位目标日报(无日报即报错,不询问)→ 用户确认 → `apply --yes`。
|
|
90
|
+
- **提醒**:`blog.remind.prepare`(解析被提醒人 + 默认文案)→ 复述人员与文案 → 用户确认 → `blog.remind.apply --yes`(逐人发送)。
|
|
91
|
+
|
|
92
|
+
## 执行原则
|
|
93
|
+
|
|
94
|
+
- 最小必要查询:先 `schema`,再按需读 reference;列表结果只保留任务所需字段,回复时给摘要与统计,不粘贴超长 JSON。
|
|
95
|
+
- 业务输入只描述业务对象和意图;认证、Cookie、ETEAMSID、Token 全部由 CLI 托管,禁止出现在输入中。
|
|
96
|
+
- 错误以 JSON envelope 的 `error.type/subtype` 驱动:`name_ambiguous` 列出候选后改用 user_id;`range_too_large` 缩小区间;`output_exists` 换输出路径。
|
|
97
|
+
- 导出属于本地文件写入:`output` 指向已存在文件时 CLI 拒绝覆盖。
|
|
98
|
+
|
|
99
|
+
## 写操作失败决策树
|
|
100
|
+
|
|
101
|
+
1. `confirmation.required` → 向用户复述 prepare 返回的目标、差异与文案,取得明确确认后带 `confirm=true` 重调 apply;不要伪造 continuation。
|
|
102
|
+
2. `target_changed` / `publish_already_exists` → 重新 prepare,再向用户确认。
|
|
103
|
+
3. `partial/write_uncertain` → 停止,不做任何写重试;用 `blog.query_user` 只读回查后向用户报告。
|
|
104
|
+
4. `authentication/session_expired` → 按 shared 规则先向用户确认 E10 登录域名,再引导登录。
|
|
105
|
+
|
|
106
|
+
## 不在范围
|
|
107
|
+
|
|
108
|
+
- 禁止绕过 CLI 直接 `curl`/`fetch` E10 日报接口,禁止读取或拼装 Cookie、ETEAMSID。
|
|
109
|
+
- 按 userId 列表批量查个人日报未暴露(服务端忽略该过滤,详见 disabled-capabilities)。
|
|
110
|
+
- EB 日报应用接口族(ebuilder / secondev)未暴露;当前租户未启用 EB 日报应用。
|
|
111
|
+
- 删除日报、撤销已发送提醒未提供。
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 评论日报(blog.comment prepare -> apply)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
对某条日报发表评论。目标日报必须存在:`prepare` 阶段按「blog_id」或「日期 + 人员」自动定位,找不到即报错(不询问、不猜测)。
|
|
6
|
+
|
|
7
|
+
## 输入要点(prepare)
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| blog_id | 与 date 二选一 | 日报记录 id |
|
|
12
|
+
| date | 与 blog_id 二选一 | 日报归属日期,配合 user_id / name 定位 |
|
|
13
|
+
| user_id / name | 否(二选一) | 目标人员;都缺省时定位当前登录人当天日报 |
|
|
14
|
+
| content | 是 | 评论内容 |
|
|
15
|
+
|
|
16
|
+
## 命令
|
|
17
|
+
|
|
18
|
+
Windows PowerShell:
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
weaver-work-cli --json blog run blog.comment.prepare --input-json '{"name":"PLACEHOLDER_NAME","date":"2026-08-18","content":"辛苦了,已核对。"}'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
用户确认后:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
weaver-work-cli --json blog run blog.comment.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
macOS/Linux(bash/zsh):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
weaver-work-cli --json blog run blog.comment.prepare --input-json '{"date":"2026-08-18","content":"辛苦了,已核对。"}'
|
|
34
|
+
weaver-work-cli --json blog run blog.comment.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 输出处理
|
|
38
|
+
|
|
39
|
+
1. prepare 返回目标日报摘要(`target_content_text`)与评论内容、continuation。
|
|
40
|
+
2. 向用户复述目标日报与评论内容,确认后调 apply。
|
|
41
|
+
3. apply 通过评论列表回查验证,返回 `comment_id`。
|
|
42
|
+
|
|
43
|
+
## 注意
|
|
44
|
+
|
|
45
|
+
- 评论对目标日报的可见人群可见;发送前必须确认内容。
|
|
46
|
+
- 目标日期无日报时报 `target_missing`,如实向用户报告「对应日期 X 人员 X 无日报,无法评论」。
|
|
47
|
+
|
|
48
|
+
## 失败处理
|
|
49
|
+
|
|
50
|
+
- `target_missing` / `name_ambiguous` / `name_not_found`:按错误详情处理。
|
|
51
|
+
- `partial/write_uncertain`:停止重试,用 `blog.comments` 回查后报告。
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# 评论查询(blog.comments)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
查看某条日报下已有的评论列表(分页)。
|
|
6
|
+
|
|
7
|
+
## 输入要点
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| blog_id | 是 | 日报记录 id |
|
|
12
|
+
| page_no / page_size | 否 | 默认 1 / 20,page_size 上限 100 |
|
|
13
|
+
|
|
14
|
+
## 命令
|
|
15
|
+
|
|
16
|
+
Windows PowerShell:
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
weaver-work-cli --json blog run blog.comments --input-json '{"blog_id":"1000000000000000001"}'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
macOS/Linux(bash/zsh):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
weaver-work-cli --json blog run blog.comments --input-json '{"blog_id":"1000000000000000001","page_size":50}'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 输出处理
|
|
29
|
+
|
|
30
|
+
- `total_count`:评论总数;`comments[]` 含评论人(`commentor.name`)、`content`、`create_time`。
|
|
31
|
+
- 需要目标日报 id 但只知道「人 + 日期」时,用 `blog.comment.prepare`(内部自动定位)。
|
|
32
|
+
|
|
33
|
+
## 注意
|
|
34
|
+
|
|
35
|
+
- 只读操作,无需确认。
|
|
36
|
+
|
|
37
|
+
## 失败处理
|
|
38
|
+
|
|
39
|
+
- `business_error`:透出服务端 message,检查 blog_id 是否有效。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 默认共享查询(blog.default_permission)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
发布前想确认某日期会共享给哪些对象;一般无需单独调用——`blog.publish.prepare` 默认自动回填默认共享(`share_default=true`)。
|
|
6
|
+
|
|
7
|
+
## 输入要点
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| date | 是 | 日报归属日期 `YYYY-MM-DD` |
|
|
12
|
+
|
|
13
|
+
## 命令
|
|
14
|
+
|
|
15
|
+
Windows PowerShell:
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
weaver-work-cli --json blog run blog.default_permission --input-json '{"date":"2026-09-17"}'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
macOS/Linux(bash/zsh):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
weaver-work-cli --json blog run blog.default_permission --input-json '{"date":"2026-09-17"}'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 输出处理
|
|
28
|
+
|
|
29
|
+
- `list[]`:默认共享对象数组(`obj_id` 展示名、`_entityType` 类型等)。
|
|
30
|
+
- `list` 为空表示该日期无默认共享。
|
|
31
|
+
|
|
32
|
+
## 注意
|
|
33
|
+
|
|
34
|
+
- 只读操作,无需确认。
|
|
35
|
+
|
|
36
|
+
## 失败处理
|
|
37
|
+
|
|
38
|
+
- `business_error`:透出服务端 message。
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# 暂未暴露的能力(处理边界)
|
|
2
|
+
|
|
3
|
+
以下能力在源资料中存在或被提及,但 CLI 未暴露对应 operation。用户提出时如实说明并停止,不要绕过 CLI 构造请求。
|
|
4
|
+
|
|
5
|
+
| 能力 | 原因 | 建议话术 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| 按 userId 列表批量查个人日报 | 服务端忽略该过滤(`filter.userIds`/`empIds`/`userId`/`creator`),恒定返回登录人自己的日报且不报错,会造成「查 A 得到 B」的静默错误 | 「按人查请逐人查询,我用 query_user 按天扫描」 |
|
|
8
|
+
| `unRead` 时间段查询 | 该接口在当前租户三种请求形态实测恒返回空列表 | 「统一改用群体查询或单人查询」 |
|
|
9
|
+
| EB 日报应用接口族(查询/发布/编辑/删除) | 依赖租户启用 EB 日报应用;当前租户未启用,接口族与标准日报完全不同且启用状态需逐租户探测 | 「当前环境使用标准日报接口,能力一致」 |
|
|
10
|
+
| 删除日报 / 撤回已发送提醒 | 源资料未提供可靠接口 | 「暂不支持,请在客户端手动处理」 |
|
|
11
|
+
| 附件上传 / @ 提醒 | 源资料未给出经过验证的完整契约 | 「暂不支持」 |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 编辑日报(blog.edit prepare -> apply)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
修改已存在的日报正文(自己的或有权操作的目标人员日报)。目标当天无日报时报错,应改用发布。
|
|
6
|
+
|
|
7
|
+
## 输入要点(prepare)
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| user_id / name | 否(二选一) | 目标人员;都不传时编辑当前登录人的日报 |
|
|
12
|
+
| date | 是 | 日报归属日期 |
|
|
13
|
+
| content | 是 | 新正文;纯文本自动包裹 `<p>` |
|
|
14
|
+
|
|
15
|
+
## 命令
|
|
16
|
+
|
|
17
|
+
Windows PowerShell:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
weaver-work-cli --json blog run blog.edit.prepare --input-json '{"date":"2026-09-17","content":"修正后的日报内容。"}'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
用户确认后:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
weaver-work-cli --json blog run blog.edit.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
macOS/Linux(bash/zsh):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
weaver-work-cli --json blog run blog.edit.prepare --input-json '{"user_id":"1000000000000000001","date":"2026-08-18","content":"<p>修正后的日报内容。</p>"}'
|
|
33
|
+
weaver-work-cli --json blog run blog.edit.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 输出处理
|
|
37
|
+
|
|
38
|
+
1. prepare 返回原内容(`original.content_text`)与新内容、差异摘要和 continuation。
|
|
39
|
+
2. 向用户复述原内容与新内容,取得明确确认后调 apply。
|
|
40
|
+
3. apply 回查验证内容已更新,返回 `updated=true, verified=true`。
|
|
41
|
+
|
|
42
|
+
## 注意
|
|
43
|
+
|
|
44
|
+
- 编辑覆盖整篇正文,不是追加;确认时让用户看清原内容。
|
|
45
|
+
- 内容与新内容相同时 prepare 报 `changes_noop`。
|
|
46
|
+
|
|
47
|
+
## 失败处理
|
|
48
|
+
|
|
49
|
+
- `edit_target_missing`:目标当天无日报,建议改用发布。
|
|
50
|
+
- `target_changed`:确认期间日报被修改,重新 prepare。
|
|
51
|
+
- `partial/write_uncertain`:停止重试,用 `blog.query_user` 回查后报告。
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 日报导出(blog.export)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
把日期段内的日报导出为本地 `.xlsx` 文件。
|
|
6
|
+
|
|
7
|
+
## 输入要点
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| start_date / end_date | 是 | 日期范围(含边界) |
|
|
12
|
+
| output | 是 | 本地输出路径,必须是 `.xlsx` 文件;已存在时 CLI 拒绝覆盖 |
|
|
13
|
+
| page_size | 否 | 默认 200 |
|
|
14
|
+
|
|
15
|
+
## 命令
|
|
16
|
+
|
|
17
|
+
Windows PowerShell:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
weaver-work-cli --json blog run blog.export --input-json '{"start_date":"2026-08-01","end_date":"2026-08-31","output":"C:\\tmp\\blog-2026-08.xlsx"}'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
macOS/Linux(bash/zsh):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
weaver-work-cli --json blog run blog.export --input-json '{"start_date":"2026-08-01","end_date":"2026-08-31","output":"/tmp/blog-2026-08.xlsx"}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 输出处理
|
|
30
|
+
|
|
31
|
+
- `output`:落盘路径;`bytes`:文件大小。
|
|
32
|
+
- 导出范围为当前账号**有权限查看的全部日报**(不限于本人);xlsx 第一行是标题,第二行是表头(姓名 / 部门 / 日报日期 / 提交状态 / 日报提交时间 / 是否隐藏 / 日报内容)。
|
|
33
|
+
|
|
34
|
+
## 注意
|
|
35
|
+
|
|
36
|
+
- 这是本地文件写入:`output_exists` 时换路径或先征得用户同意移除旧文件,不要静默覆盖。
|
|
37
|
+
- 导出的日报内容会进入本地文件;如需把文件内容发给外部服务或进入大模型上下文,先向用户确认。
|
|
38
|
+
|
|
39
|
+
## 失败处理
|
|
40
|
+
|
|
41
|
+
- `output_parent_missing` / `output_parent_invalid`:先创建输出目录。
|
|
42
|
+
- `export_failed`:服务端返回了非 xlsx 内容,错误详情带响应预览,向用户报告。
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# 点赞 / 取消点赞(blog.like prepare -> apply)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
对某条日报点赞或取消点赞。目标日报必须存在,`prepare` 阶段自动定位。
|
|
6
|
+
|
|
7
|
+
## 输入要点(prepare)
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| blog_id | 与 date 二选一 | 日报记录 id |
|
|
12
|
+
| date | 与 blog_id 二选一 | 日报归属日期,配合 user_id / name 定位 |
|
|
13
|
+
| user_id / name | 否(二选一) | 目标人员;都缺省时定位当前登录人当天日报 |
|
|
14
|
+
| cancel | 否 | 默认 false=点赞(vote);true=取消点赞(cancelVote) |
|
|
15
|
+
|
|
16
|
+
## 命令
|
|
17
|
+
|
|
18
|
+
Windows PowerShell:
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
weaver-work-cli --json blog run blog.like.prepare --input-json '{"name":"PLACEHOLDER_NAME","date":"2026-08-18"}'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
用户确认后:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
weaver-work-cli --json blog run blog.like.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
macOS/Linux(bash/zsh):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
weaver-work-cli --json blog run blog.like.prepare --input-json '{"date":"2026-08-18","cancel":true}'
|
|
34
|
+
weaver-work-cli --json blog run blog.like.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 输出处理
|
|
38
|
+
|
|
39
|
+
- `action`:`vote` / `cancelVote`;`receipt` 是服务端回执文案(如「点赞成功!」)。
|
|
40
|
+
- 点赞状态没有只读回查接口,动作是否生效以业务码为准(`verified=false` 属预期,不是失败)。
|
|
41
|
+
|
|
42
|
+
## 注意
|
|
43
|
+
|
|
44
|
+
- 目标日期无日报时报 `target_missing`,如实报告「对应日报不存在,无法点赞」。
|
|
45
|
+
- 不要为了「确认生效」而重复发送同一动作。
|
|
46
|
+
|
|
47
|
+
## 失败处理
|
|
48
|
+
|
|
49
|
+
- `target_missing`:报告目标不存在。
|
|
50
|
+
- `business_error`:透出服务端 message。
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 发布日报(blog.publish prepare -> apply)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
为当前登录人新建指定日期的日报。只能发布自己的日报;当天已有日报时 prepare 会直接报错(防重复提交),应改用 blog.edit。
|
|
6
|
+
|
|
7
|
+
## 输入要点(prepare)
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| date | 是 | 日报归属日期 `YYYY-MM-DD` |
|
|
12
|
+
| content | 是 | 正文;纯文本自动包裹 `<p>`,HTML 原样保留 |
|
|
13
|
+
| share_default | 否 | 默认 true:自动回填该日期默认共享对象;false 表示仅自己可见 |
|
|
14
|
+
|
|
15
|
+
## 命令
|
|
16
|
+
|
|
17
|
+
Windows PowerShell:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
weaver-work-cli --json blog run blog.publish.prepare --input-json '{"date":"2026-09-17","content":"今日完成:接口联调;明日计划:冒烟测试。"}'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
用户确认后:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
weaver-work-cli --json blog run blog.publish.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
macOS/Linux(bash/zsh):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
weaver-work-cli --json blog run blog.publish.prepare --input-json '{"date":"2026-09-17","content":"今日完成:接口联调;明日计划:冒烟测试。"}'
|
|
33
|
+
weaver-work-cli --json blog run blog.publish.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 输出处理
|
|
37
|
+
|
|
38
|
+
1. prepare 返回 `status=AWAITING_CONFIRMATION`、日期、内容与 continuation(10 分钟有效)。
|
|
39
|
+
2. 向用户复述日期与内容,取得明确确认(如「确认发布」)后才能调 apply。
|
|
40
|
+
3. apply 内部回查验证:返回 `blog_id` 与 `submit_status`(当天补交属正常现象)。
|
|
41
|
+
|
|
42
|
+
## 注意
|
|
43
|
+
|
|
44
|
+
- 日报正文会进入业务系统并对共享对象可见;发布前必须逐字确认内容来自用户。
|
|
45
|
+
- continuation 由 CLI 签发,禁止手工构造或复用过期 token。
|
|
46
|
+
|
|
47
|
+
## 失败处理
|
|
48
|
+
|
|
49
|
+
- `publish_already_exists`:当天已有日报,向用户说明并建议改用编辑。
|
|
50
|
+
- `target_changed`:确认期间出现了日报,重新 prepare。
|
|
51
|
+
- `confirmation.required`:未带 `confirm=true`。
|
|
52
|
+
- `partial/write_uncertain`:停止重试,用 `blog.query_user` 回查后报告。
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 单人日报查询(blog.query_user)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
查「某一个具体的人」某天或某段时间的日报详情,以及判断某人某天是否提交。这是按人查询的唯一路径——群体接口的按 userId 过滤会被服务端忽略并静默返回登录人自己的日报,禁止使用。
|
|
6
|
+
|
|
7
|
+
## 输入要点
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| user_id / name | 否 | 目标人员 userId 或姓名(姓名经 HRM 精确解析,同名多命中报错);**两者都不传时默认查当前登录人**,是「查我自己的日报」的唯一路径 |
|
|
12
|
+
| date | 是 | 起始日期 `YYYY-MM-DD` |
|
|
13
|
+
| end_date | 否 | 结束日期(含);缺省只查当天。区间按天逐日扫描,上限 62 天 |
|
|
14
|
+
|
|
15
|
+
## 命令
|
|
16
|
+
|
|
17
|
+
Windows PowerShell:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
weaver-work-cli --json blog run blog.query_user --input-json '{"name":"PLACEHOLDER_NAME","date":"2026-08-18"}'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
macOS/Linux(bash/zsh):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
weaver-work-cli --json blog run blog.query_user --input-json '{"user_id":"1000000000000000001","date":"2026-08-15","end_date":"2026-08-20"}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 输出处理
|
|
30
|
+
|
|
31
|
+
- `items[]`:每天一条,`date` 为 `YYYY-MM-DD`;`found=true` 表示当天有日报,`blog.content_text` 是去标签正文,`blog.create_time_str` 是实际提交时间。
|
|
32
|
+
- `items[].submit_status`:`正常` / `补交` / `未提交`(无日报的天为 `未提交`),与 `blog.query` 口径一致。
|
|
33
|
+
- `submitted_days` / `normal_days` / `later_days` / `missing_days`:区间内的已提交、正常、补交、未提交天数汇总,可直接用于按人报表。
|
|
34
|
+
- 编辑 / 评论 / 点赞前的目标定位也可以直接用对应的 prepare 操作(内部同样按此接口解析),无需先手动查 id。
|
|
35
|
+
|
|
36
|
+
## 注意
|
|
37
|
+
|
|
38
|
+
- 区间上限 62 天;查询跨月报表时按月分段调用。
|
|
39
|
+
- `blog.hasData` 字段不可靠,是否提交以 `found` 为准(CLI 已归一化)。
|
|
40
|
+
|
|
41
|
+
## 失败处理
|
|
42
|
+
|
|
43
|
+
- `name_not_found`:请用户确认姓名或改传 user_id。
|
|
44
|
+
- `name_ambiguous`:报错里带 `candidates[]`,让用户挑选后改传 user_id。
|
|
45
|
+
- `range_too_large`:缩小日期范围。
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 群体日报查询(blog.query)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
查「一群人」某天 / 某段时间的日报提交情况:直接下属、间接下属、全部下属、我关注的人。按人查单个目标改用 `blog.query_user`。
|
|
6
|
+
|
|
7
|
+
## 输入要点
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| user_type | 是 | `directSubordinate`(直接下属)/ `indirectSubordinate`(间接下属)/ `allSubordinate`(全部下属)/ `myFollow`(我关注的人) |
|
|
12
|
+
| start_date / end_date | 是 | `YYYY-MM-DD`,含边界 |
|
|
13
|
+
| keywords | 否 | 内容关键字服务端过滤,可传空串 |
|
|
14
|
+
| page_size | 否 | 默认 300(上限 300)。服务端返回行数 ≈ 人数 × 天数,窗口大时务必保持默认值 |
|
|
15
|
+
| page_no | 否 | 默认 1。服务端实测**忽略** pageNo,调大不会拿到更多数据,不要靠翻页取数 |
|
|
16
|
+
|
|
17
|
+
## 命令
|
|
18
|
+
|
|
19
|
+
Windows PowerShell:
|
|
20
|
+
|
|
21
|
+
```powershell
|
|
22
|
+
weaver-work-cli --json blog run blog.query --input-json '{"user_type":"directSubordinate","start_date":"2026-09-14","end_date":"2026-09-16"}'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
macOS/Linux(bash/zsh):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
weaver-work-cli --json blog run blog.query --input-json '{"user_type":"myFollow","start_date":"2026-09-14","end_date":"2026-09-16"}'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 输出处理
|
|
32
|
+
|
|
33
|
+
- `items[]`:每人每天一行,含 `date`(`YYYY-MM-DD`)、`username`、`submit_status`、`blog`(未提交时为 `null`)。
|
|
34
|
+
- `submit_status`:`正常` / `补交` / `未提交`(CLI 按「提交时间 vs 日报日期是否同日」判定,不要用原始 later 字段)。
|
|
35
|
+
- `not_submitted[]`:未提交的**人天**列表 `{date, user_id, username}`;同一人只缺个别日期也会列出,可直接用于催交。
|
|
36
|
+
- `not_submitted_people[]`:整个窗口内一条日报都没有的人(「完全没交」名单);`missing_count` 是未提交人天数。
|
|
37
|
+
- `submitted_count` / `people`:统计与人员清单。
|
|
38
|
+
- `_note` 出现时说明**单页 300 行已顶满、窗口更早的部分没取到**(服务端忽略 pageNo,无法翻页)。此时不要重试或调大 page_no;应缩小日期范围或减少人员范围后重查,并向用户说明只覆盖到哪个日期。
|
|
39
|
+
|
|
40
|
+
## 注意
|
|
41
|
+
|
|
42
|
+
- 返回较大时只向用户呈现统计摘要和异常行,不粘贴全部 items。
|
|
43
|
+
- 查「我关注的人」是合法的 user_type;不要尝试其它写法(follow、myAttention 等)。
|
|
44
|
+
|
|
45
|
+
## 失败处理
|
|
46
|
+
|
|
47
|
+
- `range_too_large`:缩小区间(`start_date` 到 `end_date` 按天计数,**上限 62 天**,与 `blog.query_user` 口径一致)。
|
|
48
|
+
- `session_expired`:按 shared 规则确认登录域名后重新登录。
|
|
49
|
+
- 返回 0 条:如实告知该范围无数据,不要自动换 user_type 重试。
|