@rezti/dsh-rez-suite 0.1.49 → 0.1.51
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/CHANGELOG.md +13 -2
- package/README.md +3 -3
- package/README.zh.md +2 -2
- package/cordis.patch.yml +1 -1
- package/lib/client.d.ts +31 -3
- package/lib/client.js +343 -7
- package/lib/index.js +244 -15
- package/lib/style.css +7 -0
- package/package.json +12 -11
- package/src/boss/mount.ts +4 -3
- package/src/boss/register.ts +1 -1
- package/src/boss/seed.ts +34 -0
- package/src/changelog.ts +48 -0
- package/src/channel-board.ts +55 -0
- package/src/client/locales.ts +62 -6
- package/src/client/panel/BoardTab.tsx +136 -0
- package/src/client/panel/ConfigTab.tsx +2 -2
- package/src/client/panel/StatusTab.tsx +31 -0
- package/src/client/panel/panel.module.css +7 -0
- package/src/client/settings-card.tsx +4 -1
- package/src/index.ts +3 -2
- package/src/protocol.ts +14 -0
- package/src/routes.ts +7 -1
- package/src/tools.ts +49 -6
- package/src/wecom-cli.ts +125 -0
- package/templates/boss/ops/AGENTS.md +2 -0
- package/templates/shared/wecom-cli.SOURCE.md +9 -0
- package/templates/shared/wecom-office/SKILL.md +32 -0
- package/templates/shared/wecomcli-calendar/SKILL.md +303 -0
- package/templates/shared/wecomcli-calendar/references/calendar-agenda.md +224 -0
- package/templates/shared/wecomcli-calendar/references/calendar-cancel.md +108 -0
- package/templates/shared/wecomcli-calendar/references/calendar-create.md +238 -0
- package/templates/shared/wecomcli-calendar/references/calendar-freebusy.md +207 -0
- package/templates/shared/wecomcli-calendar/references/calendar-meeting-room.md +170 -0
- package/templates/shared/wecomcli-calendar/references/calendar-search.md +206 -0
- package/templates/shared/wecomcli-calendar/references/calendar-update.md +272 -0
- package/templates/shared/wecomcli-contact/SKILL.md +58 -0
- package/templates/shared/wecomcli-disk/SKILL.md +389 -0
- package/templates/shared/wecomcli-doc/SKILL.md +137 -0
- package/templates/shared/wecomcli-doc/references/doc-contents-append.md +20 -0
- package/templates/shared/wecomcli-doc/references/doc-contents-overwrite.md +27 -0
- package/templates/shared/wecomcli-doc/references/doc-create.md +161 -0
- package/templates/shared/wecomcli-doc/scripts/build_docx.py +1375 -0
- package/templates/shared/wecomcli-doc-manage/SKILL.md +132 -0
- package/templates/shared/wecomcli-doc-manage/references/doc-members-update.md +24 -0
- package/templates/shared/wecomcli-doc-manage/references/doc-names-update.md +20 -0
- package/templates/shared/wecomcli-doc-manage/references/doc-rules-update.md +22 -0
- package/templates/shared/wecomcli-email/SKILL.md +218 -0
- package/templates/shared/wecomcli-email/references/forward-mail.md +131 -0
- package/templates/shared/wecomcli-email/references/get-mail.md +166 -0
- package/templates/shared/wecomcli-email/references/reply-mail.md +138 -0
- package/templates/shared/wecomcli-email/references/search-mail.md +111 -0
- package/templates/shared/wecomcli-email/references/security.md +53 -0
- package/templates/shared/wecomcli-email/references/send-mail.md +186 -0
- package/templates/shared/wecomcli-email/references/send-schedule.md +83 -0
- package/templates/shared/wecomcli-media/SKILL.md +98 -0
- package/templates/shared/wecomcli-meeting/SKILL.md +373 -0
- package/templates/shared/wecomcli-meeting/references/meeting-cancel.md +113 -0
- package/templates/shared/wecomcli-meeting/references/meeting-create.md +167 -0
- package/templates/shared/wecomcli-meeting/references/meeting-list.md +226 -0
- package/templates/shared/wecomcli-meeting/references/meeting-original-get.md +98 -0
- package/templates/shared/wecomcli-meeting/references/meeting-search.md +173 -0
- package/templates/shared/wecomcli-meeting/references/meeting-update.md +217 -0
- package/templates/shared/wecomcli-message/SKILL.md +200 -0
- package/templates/shared/wecomcli-shared/SKILL.md +73 -0
- package/templates/shared/wecomcli-sheet/SKILL.md +172 -0
- package/templates/shared/wecomcli-sheet/references/sheet-contents-update.md +47 -0
- package/templates/shared/wecomcli-sheet/references/sheet-ranges-get.md +45 -0
- package/templates/shared/wecomcli-sheet/references/sheet-rows-append.md +45 -0
- package/templates/shared/wecomcli-sheet/references/sheet-subsheets-add.md +26 -0
- package/templates/shared/wecomcli-sheet/references/sheet-subsheets-delete.md +20 -0
- package/templates/shared/wecomcli-smartpage/SKILL.md +170 -0
- package/templates/shared/wecomcli-smartpage/references/data-driven-pages.md +50 -0
- package/templates/shared/wecomcli-smartpage/references/formula/arraylist.md +369 -0
- package/templates/shared/wecomcli-smartpage/references/formula/datetime.md +283 -0
- package/templates/shared/wecomcli-smartpage/references/formula/logic.md +247 -0
- package/templates/shared/wecomcli-smartpage/references/formula/math.md +362 -0
- package/templates/shared/wecomcli-smartpage/references/formula/operators.md +246 -0
- package/templates/shared/wecomcli-smartpage/references/formula/pageblock.md +76 -0
- package/templates/shared/wecomcli-smartpage/references/formula/templates.md +410 -0
- package/templates/shared/wecomcli-smartpage/references/formula/text.md +377 -0
- package/templates/shared/wecomcli-smartpage/references/formula/user.md +22 -0
- package/templates/shared/wecomcli-smartpage/references/formula-reference.md +192 -0
- package/templates/shared/wecomcli-smartpage/references/mdx-syntax.md +739 -0
- package/templates/shared/wecomcli-smartpage/references/smartpage-edit.md +506 -0
- package/templates/shared/wecomcli-smartsheet/SKILL.md +154 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/README.md +53 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/ai_efficiency.md +709 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/connect_to_app.md +380 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/financial_accounting.md +369 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/hr_and_administration.md +475 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/ledger_records.md +156 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/manufacturing.md +395 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/marketing.md +186 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/office_essentials.md +299 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/personal_efficiency.md +70 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/procurement_logistics.md +325 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/project_management.md +564 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_customer.md +222 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_ops.md +105 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_project.md +109 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/rd_process_research.md +92 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/sales_and_operations.md +446 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/store_management.md +431 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/team_tasks.md +274 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/wechat_customer.md +384 -0
- package/templates/shared/wecomcli-smartsheet/assets/templates/work_report.md +100 -0
- package/templates/shared/wecomcli-smartsheet/references/common.md +143 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-chart-types.md +95 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-edit.md +589 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-field-types.md +438 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-formula.md +845 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-read.md +391 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-record-values.md +201 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-view-types.md +356 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-webhook-examples.md +176 -0
- package/templates/shared/wecomcli-smartsheet/references/smart-sheet-webhook.md +169 -0
- package/templates/shared/wecomcli-todo/SKILL.md +76 -0
- package/templates/shared/wecomcli-todo/references/todo-create.md +137 -0
- package/templates/shared/wecomcli-todo/references/todo-delete.md +63 -0
- package/templates/shared/wecomcli-todo/references/todo-finish.md +72 -0
- package/templates/shared/wecomcli-todo/references/todo-get.md +66 -0
- package/templates/shared/wecomcli-todo/references/todo-list.md +133 -0
- package/templates/shared/wecomcli-todo/references/todo-update.md +112 -0
- package/templates/staff/design/AGENTS.md +2 -1
- package/templates/staff/ecommerce/.agents/skills/ops-ecommerce/SKILL.md +6 -0
- package/templates/staff/ecommerce/AGENTS.md +49 -0
- package/templates/staff/ecommerce/BOOTSTRAP.md +23 -0
- package/templates/staff/ecommerce/IDENTITY.md +8 -0
- package/templates/staff/ecommerce/MEMORY.md +9 -0
- package/templates/staff/ecommerce/PRIORITIES.md +3 -0
- package/templates/staff/ecommerce/SOUL.md +5 -0
- package/templates/staff/ecommerce/USER.md +8 -0
- package/templates/staff/hr/.agents/skills/staff-onboard-keys/SKILL.md +3 -3
- package/templates/staff/publish/.agents/skills/ops-publish/SKILL.md +6 -0
- package/templates/staff/publish/AGENTS.md +59 -0
- package/templates/staff/publish/BOOTSTRAP.md +23 -0
- package/templates/staff/publish/IDENTITY.md +8 -0
- package/templates/staff/publish/MEMORY.md +9 -0
- package/templates/staff/publish/PRIORITIES.md +3 -0
- package/templates/staff/publish/SOUL.md +6 -0
- package/templates/staff/publish/USER.md +8 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# 创建 docx 文件
|
|
2
|
+
|
|
3
|
+
模型只需写一份 JSONL 描述文件(**不需要写 Python 脚本**),由分发器 `build_docx.py` 把每条命令派发到对应函数完成 `.docx` 生成
|
|
4
|
+
|
|
5
|
+
# 整体工作流
|
|
6
|
+
|
|
7
|
+
| 步骤 | 命令 | 说明 |
|
|
8
|
+
|------------|----------------------------------------------------------------------------------|---|
|
|
9
|
+
| 1. 写 jsonl | `Write` 工具 | 输出一个 `*.jsonl` 文件 |
|
|
10
|
+
| 2. 生成 docx | `python build_docx.py <*.jsonl>` | 自动应用默认样式 → 按 `action` 派发 → 输出 `.docx` |
|
|
11
|
+
|
|
12
|
+
> **`build_docx.py` 位置**:(即与 当前 `references/` 同级的 `scripts/` 目录下)
|
|
13
|
+
|
|
14
|
+
# JSONL 书写规范
|
|
15
|
+
|
|
16
|
+
## 格式
|
|
17
|
+
|
|
18
|
+
- 文件后缀:`.jsonl`
|
|
19
|
+
- 每行一个 JSON 对象,结构固定为:
|
|
20
|
+
```json
|
|
21
|
+
{"action": "<函数名>", "params": {<入参对象>}}
|
|
22
|
+
```
|
|
23
|
+
- 每个 JSON 对象必须压缩到单行
|
|
24
|
+
- 整个 `.jsonl` 文件中不得出现空行(行与行之间直接相连)
|
|
25
|
+
|
|
26
|
+
## 所有 action 一览
|
|
27
|
+
|
|
28
|
+
| Action | 用途 |
|
|
29
|
+
|---|----------------------------------|
|
|
30
|
+
| `add_paragraph` | 段落(纯文本 / 列表样式 / Subtitle / 多 run 混排格式) |
|
|
31
|
+
| `add_heading` | **所有标题**:封面主标题(level=0,即 Title) + 章节标题(level=1~4) |
|
|
32
|
+
| `add_table` | 固定布局表格 |
|
|
33
|
+
| `add_page_break` | 分页 |
|
|
34
|
+
|
|
35
|
+
> **硬性规则**:任何"标题"性质的文本(封面主标题、章节/小节标题)一律使用 `add_heading`,**禁止**用 `add_paragraph` + `style: "Title"` 的写法。仅当确实需要"副标题段落"时才使用 `add_paragraph` + `style: "Subtitle"`。
|
|
36
|
+
|
|
37
|
+
## action详解
|
|
38
|
+
|
|
39
|
+
### `add_paragraph` — 段落
|
|
40
|
+
|
|
41
|
+
可写纯文本、套用列表样式、套用 Subtitle、或多 run 混排格式。
|
|
42
|
+
|
|
43
|
+
> 注意:本 action **不**用于生成"标题"。封面主标题、章节标题一律使用 `add_heading`。
|
|
44
|
+
|
|
45
|
+
| 参数 | 类型 | 默认 | 说明 |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| `text` | string | — | 单 run 纯文本(与 `runs` 二选一;同时传以 `runs` 为准) |
|
|
48
|
+
| `runs` | array | — | 多 run 混排,元素见下表 |
|
|
49
|
+
| `style` | string | — | 内置样式名:`List Bullet` / `List Number` / `Subtitle` |
|
|
50
|
+
| `alignment` | string | — | 段落级对齐:`left` / `center` / `right` / `justify` |
|
|
51
|
+
|
|
52
|
+
`runs` 元素字段(仅字符级格式,无段落级字段):
|
|
53
|
+
|
|
54
|
+
| 字段 | 类型 | 说明 |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `text` | string | 文本 |
|
|
57
|
+
| `bold` / `italic` / `underline` | bool | 粗体 / 斜体 / 下划线 |
|
|
58
|
+
| `color_hex` | string | 字色(6 位 hex,无 `#`) |
|
|
59
|
+
| `size_pt` | number | 字号 |
|
|
60
|
+
| `font` | string | 西文字体 |
|
|
61
|
+
| `east_asia_font` | string | 中文字体 |
|
|
62
|
+
|
|
63
|
+
纯文本:
|
|
64
|
+
```jsonl
|
|
65
|
+
{"action": "add_paragraph", "params": {"text": "这是一段正文。"}}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Title / Subtitle(封面级):
|
|
69
|
+
- **Title 必须用 `add_heading` + `level: 0`**,**禁止**写成 `add_paragraph` + `style: "Title"`
|
|
70
|
+
- Subtitle 才使用 `add_paragraph` + `style: "Subtitle"`
|
|
71
|
+
|
|
72
|
+
```jsonl
|
|
73
|
+
{"action": "add_heading", "params": {"text": "项目周报", "level": 0}}
|
|
74
|
+
{"action": "add_paragraph", "params": {"text": "2026 年第 22 周", "style": "Subtitle"}}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
列表(必须用内置样式,绝不手写 `•` 或 `1.`):
|
|
78
|
+
|
|
79
|
+
| 级别 | Bullet 样式 | Number 样式 |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| 0 | `List Bullet` | `List Number` |
|
|
82
|
+
| 1 | `List Bullet 2` | `List Number 2` |
|
|
83
|
+
| 2 | `List Bullet 3` | `List Number 3` |
|
|
84
|
+
|
|
85
|
+
> 内置最深 3 级;如需更深嵌套,应重组内容结构而非手写 `List Bullet 4`(不存在该样式,运行会报错)
|
|
86
|
+
|
|
87
|
+
```jsonl
|
|
88
|
+
{"action": "add_paragraph", "params": {"text": "一级要点", "style": "List Bullet"}}
|
|
89
|
+
{"action": "add_paragraph", "params": {"text": "二级要点", "style": "List Bullet 2"}}
|
|
90
|
+
{"action": "add_paragraph", "params": {"text": "编号 1", "style": "List Number"}}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
混排格式(同样要压缩到单行):
|
|
94
|
+
```jsonl
|
|
95
|
+
{"action": "add_paragraph", "params": {"runs": [{"text": "重要:"}, {"text": "请按时提交", "bold": true, "color_hex": "C00000"}, {"text": ",谢谢配合。"}]}}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `add_heading` — 标题(封面主标题 + 章节标题)
|
|
99
|
+
|
|
100
|
+
**所有标题统一使用本 action**。封面主标题用 `level: 0`(对应 Word 的 Title 样式),章节标题用 `level: 1~4`。
|
|
101
|
+
|
|
102
|
+
| 参数 | 类型 | 默认 | 说明 |
|
|
103
|
+
|---|---|---|-----------|
|
|
104
|
+
| `text` | string | `""` | 标题文本 |
|
|
105
|
+
| `level` | int | 1 | 标题级别:`0` = 封面主标题(Title),`1~4` = 一~四级章节标题 |
|
|
106
|
+
|
|
107
|
+
```jsonl
|
|
108
|
+
{"action": "add_heading", "params": {"text": "项目周报", "level": 0}}
|
|
109
|
+
{"action": "add_heading", "params": {"text": "第一章 引言", "level": 1}}
|
|
110
|
+
{"action": "add_heading", "params": {"text": "1.1 背景", "level": 2}}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### `add_table` — 固定布局表格
|
|
114
|
+
|
|
115
|
+
| 参数 | 类型 | 默认 | 说明 |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| `data` | array<array> | — | **必填**:二维数组,每个元素是一个 cell |
|
|
118
|
+
|
|
119
|
+
**Cell 的两种合法形态**(**不支持 `runs` 多 run 混排**):
|
|
120
|
+
|
|
121
|
+
| 形态 | 示例 | 说明 |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| 字符串 | `"docid"` | 纯文本 cell |
|
|
124
|
+
| 单 run 对象 | `{"text": "字段", "bold": true, "color_hex": "FF0000"}` | 整个 cell 共享一组字符格式 |
|
|
125
|
+
|
|
126
|
+
Cell 对象支持的字段与 `add_paragraph.runs` 的元素字段完全一致:
|
|
127
|
+
`text` / `bold` / `italic` / `underline` / `color_hex` / `size_pt` / `font` / `east_asia_font`。
|
|
128
|
+
|
|
129
|
+
> **重要**:单元格内**无法做"段内局部高亮"**(即一句话里只标红其中几个字)。如有此类需求,请把高亮文本拆出表格,作为表格上方/下方的独立 `add_paragraph + runs` 段落。
|
|
130
|
+
|
|
131
|
+
写 `data`(二维数组),只描述每行内容,首行加粗即可。**整条 JSON 必须压缩到单行**:
|
|
132
|
+
|
|
133
|
+
```jsonl
|
|
134
|
+
{"action": "add_table", "params": {"data": [[{"text": "字段", "bold": true}, {"text": "类型", "bold": true}, {"text": "说明", "bold": true}], ["docid", "string", "文档 ID"], ["url", "string", "访问链接"]]}}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### `add_page_break` — 分页
|
|
138
|
+
|
|
139
|
+
无任何参数,传空对象即可。
|
|
140
|
+
|
|
141
|
+
```jsonl
|
|
142
|
+
{"action": "add_page_break", "params": {}}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 五、完整示例
|
|
146
|
+
|
|
147
|
+
> 注意:示例展示的是**最终 jsonl 文件的真实形态**——每行一条 action,表格压缩为单行,行间无空行。
|
|
148
|
+
|
|
149
|
+
```jsonl
|
|
150
|
+
{"action": "add_heading", "params": {"text": "项目周报", "level": 0}}
|
|
151
|
+
{"action": "add_paragraph", "params": {"text": "2026 年第 22 周", "style": "Subtitle"}}
|
|
152
|
+
{"action": "add_heading", "params": {"text": "一、本周进展", "level": 1}}
|
|
153
|
+
{"action": "add_paragraph", "params": {"text": "完成核心模块开发,进入联调阶段。"}}
|
|
154
|
+
{"action": "add_paragraph", "params": {"text": "完成 API 设计评审", "style": "List Bullet"}}
|
|
155
|
+
{"action": "add_paragraph", "params": {"text": "完成 60% 核心代码", "style": "List Bullet"}}
|
|
156
|
+
{"action": "add_paragraph", "params": {"text": "联调开始", "style": "List Bullet 2"}}
|
|
157
|
+
{"action": "add_heading", "params": {"text": "二、风险提示", "level": 1}}
|
|
158
|
+
{"action": "add_paragraph", "params": {"runs": [{"text": "需重点关注:"}, {"text": "依赖方接口延期", "bold": true, "color_hex": "C00000"}, {"text": ",预计影响排期 2 天。"}]}}
|
|
159
|
+
{"action": "add_heading", "params": {"text": "三、下周计划", "level": 1}}
|
|
160
|
+
{"action": "add_table", "params": {"data": [[{"text": "任务", "bold": true}, {"text": "负责人", "bold": true}, {"text": "DDL", "bold": true}], ["完成联调", "张三", "周三"], ["性能压测", "李四", "周四"], ["发版评审", "王五", "周五"]]}}
|
|
161
|
+
```
|