weaver-work-cli 0.1.7 → 0.1.20
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 +11 -11
- 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 +432 -0
- package/dist/core/state.js +26 -0
- package/dist/internal/e10/auth/commands.js +2 -2
- package/dist/internal/e10/auth/session.js +14 -0
- package/dist/internal/e10/auth/xiaoe.js +116 -51
- package/dist/internal/e10/request-runtime.js +5 -0
- 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 +346 -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 +969 -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 +623 -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/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/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 +6 -3
- package/dist/shortcuts/workflow/operations/form.js +931 -533
- package/dist/shortcuts/workflow/operations/read.js +462 -81
- package/dist/shortcuts/workflow/operations/shared.js +44 -0
- package/dist/shortcuts/workflow/operations/write.js +760 -56
- 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 +2 -2
- package/docs/hrm.md +19 -9
- 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 +2 -2
- package/scripts/package-skill.mjs +33 -20
- 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/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 +216 -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 +136 -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 +118 -0
- package/skills/weaver-e10-caizhilian/references/org-browser.md +104 -0
- package/skills/weaver-e10-caizhilian/references/setting-attach.md +410 -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 +5079 -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 +54 -6
- package/skills/weaver-e10-hrm/references/employee.md +89 -15
- package/skills/weaver-e10-hrm/references/org.md +7 -4
- 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 +166 -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 +36 -25
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +10 -31
- package/skills/weaver-e10-shared/references/json-output-contract.md +20 -11
- 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-wenshuding/SKILL.md +5 -16
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +7 -7
- package/skills/weaver-e10-workflow/SKILL.md +32 -37
- package/skills/weaver-e10-workflow/references/source-manifest.json +40 -77
- package/skills/weaver-e10-workflow/references/workflow-batch.md +90 -29
- package/skills/weaver-e10-workflow/references/workflow-create.md +79 -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 +37 -20
- package/skills/weaver-e10-workflow/references/workflow-share.md +18 -2
- package/skills/weaver-e10-workflow/references/workflow-view.md +4 -4
- package/skills/weaver-e10-yepiaotong/SKILL.md +75 -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-issuing.md +5 -5
- 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 +90 -10
- 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,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 重试。
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# 提醒提交日报(blog.remind prepare -> apply)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
向指定人员发送「请填写日报」提醒消息。多人时逐人发送。
|
|
6
|
+
|
|
7
|
+
## 输入要点(prepare)
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| user_ids / names | 二选一 | 被提醒人列表(userId 数组、逗号分隔串或姓名数组,最多 50 人) |
|
|
12
|
+
| date | 是 | 日报归属日期,用于默认文案与年份 |
|
|
13
|
+
| content | 否 | 自定义文案;缺省生成「请填写 YYYY年 M月 D日 的日报!」 |
|
|
14
|
+
| year | 否 | 日报所属年份;缺省从 date 推断 |
|
|
15
|
+
|
|
16
|
+
## 命令
|
|
17
|
+
|
|
18
|
+
Windows PowerShell:
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
weaver-work-cli --json blog run blog.remind.prepare --input-json '{"names":["PLACEHOLDER_NAME"],"date":"2026-08-19"}'
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
用户确认后:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
weaver-work-cli --json blog run blog.remind.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.remind.prepare --input-json '{"user_ids":"1000000000000000001","date":"2026-08-19"}'
|
|
34
|
+
weaver-work-cli --json blog run blog.remind.apply --input-json '{"continuation":"<prepare 返回的 continuation>","confirm":true}'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 输出处理
|
|
38
|
+
|
|
39
|
+
1. prepare 返回被提醒人清单(`user_id` + 解析出的姓名)、文案与年份、continuation。
|
|
40
|
+
2. 向用户复述目标人员与文案,取得明确确认后调 apply。
|
|
41
|
+
3. apply 逐人发送;`succeeded[]` / `failed[]` 分别列出结果;status 为 `PARTIAL` 时如实报告失败名单。
|
|
42
|
+
|
|
43
|
+
## 注意
|
|
44
|
+
|
|
45
|
+
- 默认文案固定以「请填写」开头且包含与 `date` 一致的日期;自定义文案必须包含具体日期。
|
|
46
|
+
- 提醒是推给真人的消息,发送前必须逐项确认人名与文案。
|
|
47
|
+
|
|
48
|
+
## 失败处理
|
|
49
|
+
|
|
50
|
+
- `name_not_found` / `name_ambiguous`:修正名单后重新 prepare。
|
|
51
|
+
- `partial/write_uncertain`:已发送部分不重发;向用户报告成功与失败名单,失败者确认后重新 prepare。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# HRM 姓名解析(blog.resolve_users)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
用户只给了姓名而没有 userId,且后续需要跨多次调用复用 userId(如先查日报再提醒)时,先解析一次。
|
|
6
|
+
|
|
7
|
+
## 输入要点
|
|
8
|
+
|
|
9
|
+
| 字段 | 必填 | 说明 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| name | 是 | 员工姓名,精确匹配 |
|
|
12
|
+
|
|
13
|
+
## 命令
|
|
14
|
+
|
|
15
|
+
Windows PowerShell:
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
weaver-work-cli --json blog run blog.resolve_users --input-json '{"name":"PLACEHOLDER_NAME"}'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
macOS/Linux(bash/zsh):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
weaver-work-cli --json blog run blog.resolve_users --input-json '{"name":"PLACEHOLDER_NAME"}'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 输出处理
|
|
28
|
+
|
|
29
|
+
- `matched`:命中人数;`users[]` 含 `user_id` / `name` / `department`。
|
|
30
|
+
- 多命中时向用户列出候选让其选择,不要自行挑第一个。
|
|
31
|
+
|
|
32
|
+
## 注意
|
|
33
|
+
|
|
34
|
+
- 单次查询类操作(query_user、remind.prepare)内部已支持直接传 `name`,无需先解析。
|
|
35
|
+
|
|
36
|
+
## 失败处理
|
|
37
|
+
|
|
38
|
+
- `matched=0`:如实告知未找到该员工,请用户确认姓名。
|