wezard 2.9.0 → 3.0.2

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.
Files changed (477) hide show
  1. package/CLAUDE.md +43 -21
  2. package/README.md +37 -50
  3. package/cli/wezard.sh +59 -20
  4. package/config.example.jsonc +5 -8
  5. package/dist/cli/audit.js +11 -13
  6. package/dist/cli/audit.js.map +1 -1
  7. package/dist/cli/codex-hook.js +20 -17
  8. package/dist/cli/codex-hook.js.map +1 -1
  9. package/dist/cli/ext.js +271 -0
  10. package/dist/cli/ext.js.map +1 -0
  11. package/dist/cli/init.js +44 -13
  12. package/dist/cli/init.js.map +1 -1
  13. package/dist/cli/skills.js +113 -0
  14. package/dist/cli/skills.js.map +1 -0
  15. package/dist/cli/sync.js +3 -2
  16. package/dist/cli/sync.js.map +1 -1
  17. package/dist/cli/wx.js +7 -6
  18. package/dist/cli/wx.js.map +1 -1
  19. package/dist/daemon/aibot-media.js +28 -20
  20. package/dist/daemon/aibot-media.js.map +1 -1
  21. package/dist/daemon/apprentice.js +75 -0
  22. package/dist/daemon/apprentice.js.map +1 -0
  23. package/dist/daemon/approval.js +75 -33
  24. package/dist/daemon/approval.js.map +1 -1
  25. package/dist/daemon/channel-context.js +7 -0
  26. package/dist/daemon/channel-context.js.map +1 -1
  27. package/dist/daemon/channel-onboarding.js +61 -0
  28. package/dist/daemon/channel-onboarding.js.map +1 -0
  29. package/dist/daemon/channel-posts.js +93 -0
  30. package/dist/daemon/channel-posts.js.map +1 -0
  31. package/dist/daemon/channel-rebind.js +100 -0
  32. package/dist/daemon/channel-rebind.js.map +1 -0
  33. package/dist/daemon/channel-store.js.map +1 -1
  34. package/dist/daemon/channel.js +273 -409
  35. package/dist/daemon/channel.js.map +1 -1
  36. package/dist/daemon/chat-name.js +24 -161
  37. package/dist/daemon/chat-name.js.map +1 -1
  38. package/dist/daemon/claim.js +1 -45
  39. package/dist/daemon/claim.js.map +1 -1
  40. package/dist/daemon/classes.js +416 -0
  41. package/dist/daemon/classes.js.map +1 -0
  42. package/dist/daemon/config-api.js +6 -30
  43. package/dist/daemon/config-api.js.map +1 -1
  44. package/dist/daemon/control-socket.js +93 -0
  45. package/dist/daemon/control-socket.js.map +1 -0
  46. package/dist/daemon/danger-scrub.js +315 -0
  47. package/dist/daemon/danger-scrub.js.map +1 -0
  48. package/dist/daemon/danger.js +146 -16
  49. package/dist/daemon/danger.js.map +1 -1
  50. package/dist/daemon/detail.js +50 -22
  51. package/dist/daemon/detail.js.map +1 -1
  52. package/dist/daemon/exec-surface.js +108 -0
  53. package/dist/daemon/exec-surface.js.map +1 -0
  54. package/dist/daemon/external.js +595 -0
  55. package/dist/daemon/external.js.map +1 -0
  56. package/dist/daemon/handoff.js +51 -50
  57. package/dist/daemon/handoff.js.map +1 -1
  58. package/dist/daemon/http.js +119 -31
  59. package/dist/daemon/http.js.map +1 -1
  60. package/dist/daemon/idle-reap.js +30 -0
  61. package/dist/daemon/idle-reap.js.map +1 -0
  62. package/dist/daemon/inbound.js +436 -207
  63. package/dist/daemon/inbound.js.map +1 -1
  64. package/dist/daemon/index.js +3353 -2760
  65. package/dist/daemon/index.js.map +1 -1
  66. package/dist/daemon/last-response.js +51 -25
  67. package/dist/daemon/last-response.js.map +1 -1
  68. package/dist/daemon/legacy-panes.js +67 -0
  69. package/dist/daemon/legacy-panes.js.map +1 -0
  70. package/dist/daemon/mcp-http.js.map +1 -1
  71. package/dist/daemon/me-room.js +137 -0
  72. package/dist/daemon/me-room.js.map +1 -0
  73. package/dist/daemon/media.js +14 -0
  74. package/dist/daemon/media.js.map +1 -1
  75. package/dist/daemon/memory-steward.js +1 -1
  76. package/dist/daemon/memory-steward.js.map +1 -1
  77. package/dist/daemon/message-format.js +15 -2
  78. package/dist/daemon/message-format.js.map +1 -1
  79. package/dist/daemon/mirror-bridge.js +583 -488
  80. package/dist/daemon/mirror-bridge.js.map +1 -1
  81. package/dist/daemon/mirror-store.js +24 -0
  82. package/dist/daemon/mirror-store.js.map +1 -1
  83. package/dist/daemon/notices.js +5 -6
  84. package/dist/daemon/notices.js.map +1 -1
  85. package/dist/daemon/onboarding.js +459 -0
  86. package/dist/daemon/onboarding.js.map +1 -0
  87. package/dist/daemon/outbound.js +21 -11
  88. package/dist/daemon/outbound.js.map +1 -1
  89. package/dist/daemon/peers.js +39 -231
  90. package/dist/daemon/peers.js.map +1 -1
  91. package/dist/daemon/plan-http.js +2 -3
  92. package/dist/daemon/plan-http.js.map +1 -1
  93. package/dist/daemon/plans.js.map +1 -1
  94. package/dist/daemon/reach.js +1 -5
  95. package/dist/daemon/reach.js.map +1 -1
  96. package/dist/daemon/room-auto-adhoc.js +18 -0
  97. package/dist/daemon/room-auto-adhoc.js.map +1 -0
  98. package/dist/daemon/room-bind.js +297 -0
  99. package/dist/daemon/room-bind.js.map +1 -0
  100. package/dist/daemon/room-facts.js +35 -0
  101. package/dist/daemon/room-facts.js.map +1 -0
  102. package/dist/daemon/room-hub.js +569 -0
  103. package/dist/daemon/room-hub.js.map +1 -0
  104. package/dist/daemon/room-overdue.js +160 -0
  105. package/dist/daemon/room-overdue.js.map +1 -0
  106. package/dist/daemon/room-prune.js +74 -0
  107. package/dist/daemon/room-prune.js.map +1 -0
  108. package/dist/daemon/room-spawn.js +20 -0
  109. package/dist/daemon/room-spawn.js.map +1 -0
  110. package/dist/daemon/room-watchdog.js +175 -0
  111. package/dist/daemon/room-watchdog.js.map +1 -0
  112. package/dist/daemon/rooms.js +204 -0
  113. package/dist/daemon/rooms.js.map +1 -0
  114. package/dist/daemon/route.js +7 -18
  115. package/dist/daemon/route.js.map +1 -1
  116. package/dist/daemon/session-scan.js +1 -1
  117. package/dist/daemon/session-scan.js.map +1 -1
  118. package/dist/daemon/short-id-log.js +43 -0
  119. package/dist/daemon/short-id-log.js.map +1 -0
  120. package/dist/daemon/spawn-tmux.js +60 -45
  121. package/dist/daemon/spawn-tmux.js.map +1 -1
  122. package/dist/daemon/steward-guard.js +3 -3
  123. package/dist/daemon/steward-guard.js.map +1 -1
  124. package/dist/daemon/steward-model.js +17 -3
  125. package/dist/daemon/steward-model.js.map +1 -1
  126. package/dist/daemon/steward-repair.js +171 -0
  127. package/dist/daemon/steward-repair.js.map +1 -0
  128. package/dist/daemon/steward.js +171 -0
  129. package/dist/daemon/steward.js.map +1 -0
  130. package/dist/daemon/tasks.js +4 -14
  131. package/dist/daemon/tasks.js.map +1 -1
  132. package/dist/daemon/tool-face.js +31 -0
  133. package/dist/daemon/tool-face.js.map +1 -0
  134. package/dist/daemon/turn-opening.js +30 -0
  135. package/dist/daemon/turn-opening.js.map +1 -0
  136. package/dist/daemon/wake-tail.js +55 -0
  137. package/dist/daemon/wake-tail.js.map +1 -0
  138. package/dist/daemon/weixin-cmd.js +10 -14
  139. package/dist/daemon/weixin-cmd.js.map +1 -1
  140. package/dist/daemon/wezard-session.js +6 -2
  141. package/dist/daemon/wezard-session.js.map +1 -1
  142. package/dist/daemon/wizard-memory.js +4 -10
  143. package/dist/daemon/wizard-memory.js.map +1 -1
  144. package/dist/daemon/wizard-names.js +0 -22
  145. package/dist/daemon/wizard-names.js.map +1 -1
  146. package/dist/daemon/wizard.js +683 -159
  147. package/dist/daemon/wizard.js.map +1 -1
  148. package/dist/daemon/ws.js +1 -1
  149. package/dist/daemon/ws.js.map +1 -1
  150. package/dist/mcp/output.js +30 -7
  151. package/dist/mcp/output.js.map +1 -1
  152. package/dist/mcp/relay.js +152 -0
  153. package/dist/mcp/relay.js.map +1 -0
  154. package/dist/mcp/tools.js +318 -265
  155. package/dist/mcp/tools.js.map +1 -1
  156. package/dist/shared/allow-rules.js +1 -7
  157. package/dist/shared/allow-rules.js.map +1 -1
  158. package/dist/shared/charter-rearm.js +179 -0
  159. package/dist/shared/charter-rearm.js.map +1 -0
  160. package/dist/shared/chat-http.js +412 -480
  161. package/dist/shared/chat-http.js.map +1 -1
  162. package/dist/shared/chat-record.js +55 -0
  163. package/dist/shared/chat-record.js.map +1 -0
  164. package/dist/shared/chat-render.js +7 -4
  165. package/dist/shared/chat-render.js.map +1 -1
  166. package/dist/shared/chat-view.js +2 -41
  167. package/dist/shared/chat-view.js.map +1 -1
  168. package/dist/shared/cli-backends.js +13 -5
  169. package/dist/shared/cli-backends.js.map +1 -1
  170. package/dist/shared/cli-local-status.js +28 -0
  171. package/dist/shared/cli-local-status.js.map +1 -0
  172. package/dist/shared/cli-socket.js +14 -0
  173. package/dist/shared/cli-socket.js.map +1 -0
  174. package/dist/shared/codex-hooks.js +5 -2
  175. package/dist/shared/codex-hooks.js.map +1 -1
  176. package/dist/shared/config.js +90 -66
  177. package/dist/shared/config.js.map +1 -1
  178. package/dist/shared/daemon-addr.js +23 -0
  179. package/dist/shared/daemon-addr.js.map +1 -0
  180. package/dist/shared/daemon-client.js +41 -0
  181. package/dist/shared/daemon-client.js.map +1 -0
  182. package/dist/shared/daemon-token.js +2 -2
  183. package/dist/shared/daemon-token.js.map +1 -1
  184. package/dist/shared/detail-render.js +98 -21
  185. package/dist/shared/detail-render.js.map +1 -1
  186. package/dist/shared/detail-store.js.map +1 -1
  187. package/dist/shared/external.js +402 -0
  188. package/dist/shared/external.js.map +1 -0
  189. package/dist/shared/group-members.js +35 -0
  190. package/dist/shared/group-members.js.map +1 -0
  191. package/dist/shared/inject-view.js +143 -0
  192. package/dist/shared/inject-view.js.map +1 -0
  193. package/dist/shared/instance-id.js +21 -0
  194. package/dist/shared/instance-id.js.map +1 -0
  195. package/dist/shared/legacy-routes.js +199 -0
  196. package/dist/shared/legacy-routes.js.map +1 -0
  197. package/dist/shared/mem-guard.js +32 -0
  198. package/dist/shared/mem-guard.js.map +1 -0
  199. package/dist/shared/message-footer.js +11 -3
  200. package/dist/shared/message-footer.js.map +1 -1
  201. package/dist/shared/model-tiers.js +39 -1
  202. package/dist/shared/model-tiers.js.map +1 -1
  203. package/dist/shared/ports.js +56 -0
  204. package/dist/shared/ports.js.map +1 -0
  205. package/dist/shared/reminder.js +30 -38
  206. package/dist/shared/reminder.js.map +1 -1
  207. package/dist/shared/role-render.js +210 -210
  208. package/dist/shared/role-render.js.map +1 -1
  209. package/dist/shared/role-view.js +65 -300
  210. package/dist/shared/role-view.js.map +1 -1
  211. package/dist/shared/room-label.js +13 -0
  212. package/dist/shared/room-label.js.map +1 -0
  213. package/dist/shared/room-migrate.js +404 -0
  214. package/dist/shared/room-migrate.js.map +1 -0
  215. package/dist/shared/room-overdue.js +153 -0
  216. package/dist/shared/room-overdue.js.map +1 -0
  217. package/dist/shared/room-search.js +102 -0
  218. package/dist/shared/room-search.js.map +1 -0
  219. package/dist/shared/room-view.js +275 -0
  220. package/dist/shared/room-view.js.map +1 -0
  221. package/dist/shared/room.js +827 -0
  222. package/dist/shared/room.js.map +1 -0
  223. package/dist/shared/session-hooks.js +20 -8
  224. package/dist/shared/session-hooks.js.map +1 -1
  225. package/dist/shared/session-label.js +82 -84
  226. package/dist/shared/session-label.js.map +1 -1
  227. package/dist/shared/session-mcp.js +36 -40
  228. package/dist/shared/session-mcp.js.map +1 -1
  229. package/dist/shared/session-skills.js +8 -0
  230. package/dist/shared/session-skills.js.map +1 -1
  231. package/dist/shared/skill-sync.js +229 -0
  232. package/dist/shared/skill-sync.js.map +1 -0
  233. package/dist/shared/smarts.js +24 -0
  234. package/dist/shared/smarts.js.map +1 -0
  235. package/dist/shared/stream-page.js +22 -0
  236. package/dist/shared/stream-page.js.map +1 -0
  237. package/dist/shared/task-file.js +0 -5
  238. package/dist/shared/task-file.js.map +1 -1
  239. package/dist/shared/task-template.js +1 -1
  240. package/dist/shared/task-template.js.map +1 -1
  241. package/dist/shared/tool-hints.js +20 -11
  242. package/dist/shared/tool-hints.js.map +1 -1
  243. package/dist/shared/workspace-trust.js +8 -0
  244. package/dist/shared/workspace-trust.js.map +1 -1
  245. package/dist/shared/world.js +101 -166
  246. package/dist/shared/world.js.map +1 -1
  247. package/dist/svr/facts-store.js +26 -0
  248. package/dist/svr/facts-store.js.map +1 -0
  249. package/dist/svr/index.js +114 -16
  250. package/dist/svr/index.js.map +1 -1
  251. package/hooks/pre-tool-use.sh +14 -10
  252. package/hooks/stop.sh +28 -0
  253. package/launchd/com.wezard.svr.plist.template +2 -0
  254. package/package.json +9 -2
  255. package/scripts/install.sh +23 -0
  256. package/skills/LICENSE.wecom-unified.txt +21 -0
  257. package/skills/wecom-unified/SKILL.md +151 -0
  258. package/skills/wecom-unified/assets/templates/broadside/DESIGN.preset.md +172 -0
  259. package/skills/wecom-unified/assets/templates/broadside/shell/content.jsx +31 -0
  260. package/skills/wecom-unified/assets/templates/broadside/slides/01_cover.slide +48 -0
  261. package/skills/wecom-unified/assets/templates/broadside/slides/02_section.slide +58 -0
  262. package/skills/wecom-unified/assets/templates/broadside/slides/03_cards.slide +53 -0
  263. package/skills/wecom-unified/assets/templates/broadside/slides/04_image.slide +64 -0
  264. package/skills/wecom-unified/assets/templates/cartesian/DESIGN.preset.md +139 -0
  265. package/skills/wecom-unified/assets/templates/cartesian/shell/content.jsx +28 -0
  266. package/skills/wecom-unified/assets/templates/cartesian/slides/01_cover.slide +44 -0
  267. package/skills/wecom-unified/assets/templates/cartesian/slides/02_compare.slide +79 -0
  268. package/skills/wecom-unified/assets/templates/cartesian/slides/03_table.slide +79 -0
  269. package/skills/wecom-unified/assets/templates/cobalt-grid/DESIGN.preset.md +118 -0
  270. package/skills/wecom-unified/assets/templates/cobalt-grid/shell/content.jsx +24 -0
  271. package/skills/wecom-unified/assets/templates/cobalt-grid/slides/01_cover.slide +61 -0
  272. package/skills/wecom-unified/assets/templates/cobalt-grid/slides/02_structure.slide +85 -0
  273. package/skills/wecom-unified/assets/templates/cobalt-grid/slides/03_data.slide +60 -0
  274. package/skills/wecom-unified/assets/templates/editorial-forest/DESIGN.preset.md +135 -0
  275. package/skills/wecom-unified/assets/templates/editorial-forest/shell/content.jsx +19 -0
  276. package/skills/wecom-unified/assets/templates/editorial-forest/slides/01_cover.slide +29 -0
  277. package/skills/wecom-unified/assets/templates/editorial-forest/slides/02_cards.slide +60 -0
  278. package/skills/wecom-unified/assets/templates/editorial-forest/slides/03_data.slide +49 -0
  279. package/skills/wecom-unified/assets/templates/editorial-forest/slides/04_image.slide +46 -0
  280. package/skills/wecom-unified/assets/templates/emerald-editorial/DESIGN.preset.md +119 -0
  281. package/skills/wecom-unified/assets/templates/emerald-editorial/shell/content.jsx +18 -0
  282. package/skills/wecom-unified/assets/templates/emerald-editorial/slides/01_cover.slide +36 -0
  283. package/skills/wecom-unified/assets/templates/emerald-editorial/slides/02_section.slide +39 -0
  284. package/skills/wecom-unified/assets/templates/emerald-editorial/slides/03_data.slide +79 -0
  285. package/skills/wecom-unified/assets/templates/emerald-editorial/slides/04_steps.slide +53 -0
  286. package/skills/wecom-unified/assets/templates/grove/DESIGN.preset.md +159 -0
  287. package/skills/wecom-unified/assets/templates/grove/shell/content.jsx +18 -0
  288. package/skills/wecom-unified/assets/templates/grove/shell/content_light.jsx +18 -0
  289. package/skills/wecom-unified/assets/templates/grove/slides/01_cover.slide +26 -0
  290. package/skills/wecom-unified/assets/templates/grove/slides/02_compare.slide +92 -0
  291. package/skills/wecom-unified/assets/templates/grove/slides/03_table.slide +68 -0
  292. package/skills/wecom-unified/assets/templates/index.json +280 -0
  293. package/skills/wecom-unified/assets/templates/long-table/DESIGN.preset.md +135 -0
  294. package/skills/wecom-unified/assets/templates/long-table/shell/content.jsx +36 -0
  295. package/skills/wecom-unified/assets/templates/long-table/slides/01_cover.slide +71 -0
  296. package/skills/wecom-unified/assets/templates/long-table/slides/02_cards.slide +72 -0
  297. package/skills/wecom-unified/assets/templates/long-table/slides/03_timeline.slide +81 -0
  298. package/skills/wecom-unified/assets/templates/long-table/slides/04_image.slide +60 -0
  299. package/skills/wecom-unified/assets/templates/sakura-chroma/DESIGN.preset.md +121 -0
  300. package/skills/wecom-unified/assets/templates/sakura-chroma/shell/content.jsx +13 -0
  301. package/skills/wecom-unified/assets/templates/sakura-chroma/slides/01_cover.slide +54 -0
  302. package/skills/wecom-unified/assets/templates/sakura-chroma/slides/02_products.slide +134 -0
  303. package/skills/wecom-unified/assets/templates/sakura-chroma/slides/03_section.slide +30 -0
  304. package/skills/wecom-unified/assets/templates/sakura-chroma/slides/04_schedule.slide +65 -0
  305. package/skills/wecom-unified/assets/templates/signal/DESIGN.preset.md +121 -0
  306. package/skills/wecom-unified/assets/templates/signal/shell/content.jsx +18 -0
  307. package/skills/wecom-unified/assets/templates/signal/shell/content_dark.jsx +23 -0
  308. package/skills/wecom-unified/assets/templates/signal/slides/01_cover.slide +48 -0
  309. package/skills/wecom-unified/assets/templates/signal/slides/02_cards.slide +67 -0
  310. package/skills/wecom-unified/assets/templates/signal/slides/03_data.slide +68 -0
  311. package/skills/wecom-unified/references/wecomcli-calendar-agenda.md +227 -0
  312. package/skills/wecom-unified/references/wecomcli-calendar-cancel.md +108 -0
  313. package/skills/wecom-unified/references/wecomcli-calendar-create.md +238 -0
  314. package/skills/wecom-unified/references/wecomcli-calendar-freebusy.md +207 -0
  315. package/skills/wecom-unified/references/wecomcli-calendar-meeting-room.md +170 -0
  316. package/skills/wecom-unified/references/wecomcli-calendar-search.md +209 -0
  317. package/skills/wecom-unified/references/wecomcli-calendar-update.md +272 -0
  318. package/skills/wecom-unified/references/wecomcli-calendar.md +296 -0
  319. package/skills/wecom-unified/references/wecomcli-contact.md +48 -0
  320. package/skills/wecom-unified/references/wecomcli-disk.md +380 -0
  321. package/skills/wecom-unified/references/wecomcli-doc-contents-append.md +20 -0
  322. package/skills/wecom-unified/references/wecomcli-doc-contents-overwrite.md +27 -0
  323. package/skills/wecom-unified/references/wecomcli-doc-create.md +162 -0
  324. package/skills/wecom-unified/references/wecomcli-doc-manage-doc-members-update.md +24 -0
  325. package/skills/wecom-unified/references/wecomcli-doc-manage-doc-names-update.md +20 -0
  326. package/skills/wecom-unified/references/wecomcli-doc-manage-doc-rules-update.md +22 -0
  327. package/skills/wecom-unified/references/wecomcli-doc-manage.md +127 -0
  328. package/skills/wecom-unified/references/wecomcli-doc.md +135 -0
  329. package/skills/wecom-unified/references/wecomcli-email-forward-mail.md +131 -0
  330. package/skills/wecom-unified/references/wecomcli-email-get-mail.md +187 -0
  331. package/skills/wecom-unified/references/wecomcli-email-reply-mail.md +138 -0
  332. package/skills/wecom-unified/references/wecomcli-email-search-mail.md +114 -0
  333. package/skills/wecom-unified/references/wecomcli-email-security.md +52 -0
  334. package/skills/wecom-unified/references/wecomcli-email-send-mail.md +186 -0
  335. package/skills/wecom-unified/references/wecomcli-email-send-schedule.md +83 -0
  336. package/skills/wecom-unified/references/wecomcli-email.md +206 -0
  337. package/skills/wecom-unified/references/wecomcli-media.md +89 -0
  338. package/skills/wecom-unified/references/wecomcli-meeting-cancel.md +113 -0
  339. package/skills/wecom-unified/references/wecomcli-meeting-create.md +167 -0
  340. package/skills/wecom-unified/references/wecomcli-meeting-list.md +228 -0
  341. package/skills/wecom-unified/references/wecomcli-meeting-original-get.md +101 -0
  342. package/skills/wecom-unified/references/wecomcli-meeting-search.md +176 -0
  343. package/skills/wecom-unified/references/wecomcli-meeting-update.md +217 -0
  344. package/skills/wecom-unified/references/wecomcli-meeting.md +366 -0
  345. package/skills/wecom-unified/references/wecomcli-message.md +190 -0
  346. package/skills/wecom-unified/references/wecomcli-pptx-component-animation.md +62 -0
  347. package/skills/wecom-unified/references/wecomcli-pptx-component-box.md +102 -0
  348. package/skills/wecom-unified/references/wecomcli-pptx-component-chart.md +261 -0
  349. package/skills/wecom-unified/references/wecomcli-pptx-component-codeblock.md +70 -0
  350. package/skills/wecom-unified/references/wecomcli-pptx-component-diagram.md +54 -0
  351. package/skills/wecom-unified/references/wecomcli-pptx-component-faicon.md +71 -0
  352. package/skills/wecom-unified/references/wecomcli-pptx-component-hyperlink.md +55 -0
  353. package/skills/wecom-unified/references/wecomcli-pptx-component-image.md +107 -0
  354. package/skills/wecom-unified/references/wecomcli-pptx-component-math.md +65 -0
  355. package/skills/wecom-unified/references/wecomcli-pptx-component-qrcode.md +22 -0
  356. package/skills/wecom-unified/references/wecomcli-pptx-component-slide.md +74 -0
  357. package/skills/wecom-unified/references/wecomcli-pptx-component-svg.md +95 -0
  358. package/skills/wecom-unified/references/wecomcli-pptx-component-table.md +72 -0
  359. package/skills/wecom-unified/references/wecomcli-pptx-component-text.md +96 -0
  360. package/skills/wecom-unified/references/wecomcli-pptx-content-contract.md +73 -0
  361. package/skills/wecom-unified/references/wecomcli-pptx-create-from-material.md +67 -0
  362. package/skills/wecom-unified/references/wecomcli-pptx-create-from-scratch.md +178 -0
  363. package/skills/wecom-unified/references/wecomcli-pptx-create-from-template.md +123 -0
  364. package/skills/wecom-unified/references/wecomcli-pptx-design-principle.md +65 -0
  365. package/skills/wecom-unified/references/wecomcli-pptx-government-contract.md +40 -0
  366. package/skills/wecom-unified/references/wecomcli-pptx-human-alignment.md +140 -0
  367. package/skills/wecom-unified/references/wecomcli-pptx-pptx-api.md +161 -0
  368. package/skills/wecom-unified/references/wecomcli-pptx-pptx-edit.md +37 -0
  369. package/skills/wecom-unified/references/wecomcli-pptx-story-principle.md +184 -0
  370. package/skills/wecom-unified/references/wecomcli-pptx-templates-README.md +165 -0
  371. package/skills/wecom-unified/references/wecomcli-pptx-templates-anti-ai-slop.md +52 -0
  372. package/skills/wecom-unified/references/wecomcli-pptx.md +158 -0
  373. package/skills/wecom-unified/references/wecomcli-sheet-conditional-formatting.md +203 -0
  374. package/skills/wecom-unified/references/wecomcli-sheet-filter.md +179 -0
  375. package/skills/wecom-unified/references/wecomcli-sheet-float-image.md +235 -0
  376. package/skills/wecom-unified/references/wecomcli-sheet-formulas.md +71 -0
  377. package/skills/wecom-unified/references/wecomcli-sheet-history.md +118 -0
  378. package/skills/wecom-unified/references/wecomcli-sheet-protection.md +170 -0
  379. package/skills/wecom-unified/references/wecomcli-sheet-range-operations.md +306 -0
  380. package/skills/wecom-unified/references/wecomcli-sheet-read-data.md +151 -0
  381. package/skills/wecom-unified/references/wecomcli-sheet-search-replace.md +121 -0
  382. package/skills/wecom-unified/references/wecomcli-sheet-structure-operations.md +394 -0
  383. package/skills/wecom-unified/references/wecomcli-sheet-style.md +246 -0
  384. package/skills/wecom-unified/references/wecomcli-sheet-table-style.md +199 -0
  385. package/skills/wecom-unified/references/wecomcli-sheet-validation.md +217 -0
  386. package/skills/wecom-unified/references/wecomcli-sheet-visual-standards.md +166 -0
  387. package/skills/wecom-unified/references/wecomcli-sheet-workbook.md +264 -0
  388. package/skills/wecom-unified/references/wecomcli-sheet-write-cells.md +320 -0
  389. package/skills/wecom-unified/references/wecomcli-sheet-xlsx-process.md +324 -0
  390. package/skills/wecom-unified/references/wecomcli-sheet.md +96 -0
  391. package/skills/wecom-unified/references/wecomcli-smartpage-data-driven-pages.md +50 -0
  392. package/skills/wecom-unified/references/wecomcli-smartpage-edit.md +526 -0
  393. package/skills/wecom-unified/references/wecomcli-smartpage-formula-arraylist.md +369 -0
  394. package/skills/wecom-unified/references/wecomcli-smartpage-formula-datetime.md +283 -0
  395. package/skills/wecom-unified/references/wecomcli-smartpage-formula-logic.md +247 -0
  396. package/skills/wecom-unified/references/wecomcli-smartpage-formula-math.md +362 -0
  397. package/skills/wecom-unified/references/wecomcli-smartpage-formula-operators.md +246 -0
  398. package/skills/wecom-unified/references/wecomcli-smartpage-formula-pageblock.md +76 -0
  399. package/skills/wecom-unified/references/wecomcli-smartpage-formula-reference.md +192 -0
  400. package/skills/wecom-unified/references/wecomcli-smartpage-formula-templates.md +410 -0
  401. package/skills/wecom-unified/references/wecomcli-smartpage-formula-text.md +377 -0
  402. package/skills/wecom-unified/references/wecomcli-smartpage-formula-user.md +22 -0
  403. package/skills/wecom-unified/references/wecomcli-smartpage-mdx-syntax.md +739 -0
  404. package/skills/wecom-unified/references/wecomcli-smartpage.md +179 -0
  405. package/skills/wecom-unified/references/wecomcli-smartsheet-chart-types.md +95 -0
  406. package/skills/wecom-unified/references/wecomcli-smartsheet-common.md +160 -0
  407. package/skills/wecom-unified/references/wecomcli-smartsheet-edit.md +609 -0
  408. package/skills/wecom-unified/references/wecomcli-smartsheet-field-types.md +438 -0
  409. package/skills/wecom-unified/references/wecomcli-smartsheet-formula.md +845 -0
  410. package/skills/wecom-unified/references/wecomcli-smartsheet-read.md +411 -0
  411. package/skills/wecom-unified/references/wecomcli-smartsheet-record-values.md +218 -0
  412. package/skills/wecom-unified/references/wecomcli-smartsheet-template-ai_efficiency.md +709 -0
  413. package/skills/wecom-unified/references/wecomcli-smartsheet-template-connect_to_app.md +380 -0
  414. package/skills/wecom-unified/references/wecomcli-smartsheet-template-financial_accounting.md +369 -0
  415. package/skills/wecom-unified/references/wecomcli-smartsheet-template-hr_and_administration.md +475 -0
  416. package/skills/wecom-unified/references/wecomcli-smartsheet-template-ledger_records.md +156 -0
  417. package/skills/wecom-unified/references/wecomcli-smartsheet-template-manufacturing.md +395 -0
  418. package/skills/wecom-unified/references/wecomcli-smartsheet-template-marketing.md +186 -0
  419. package/skills/wecom-unified/references/wecomcli-smartsheet-template-office_essentials.md +299 -0
  420. package/skills/wecom-unified/references/wecomcli-smartsheet-template-personal_efficiency.md +70 -0
  421. package/skills/wecom-unified/references/wecomcli-smartsheet-template-procurement_logistics.md +325 -0
  422. package/skills/wecom-unified/references/wecomcli-smartsheet-template-project_management.md +564 -0
  423. package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_customer.md +222 -0
  424. package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_ops.md +105 -0
  425. package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_project.md +109 -0
  426. package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_research.md +92 -0
  427. package/skills/wecom-unified/references/wecomcli-smartsheet-template-sales_and_operations.md +446 -0
  428. package/skills/wecom-unified/references/wecomcli-smartsheet-template-store_management.md +431 -0
  429. package/skills/wecom-unified/references/wecomcli-smartsheet-template-team_tasks.md +274 -0
  430. package/skills/wecom-unified/references/wecomcli-smartsheet-template-wechat_customer.md +384 -0
  431. package/skills/wecom-unified/references/wecomcli-smartsheet-template-work_report.md +100 -0
  432. package/skills/wecom-unified/references/wecomcli-smartsheet-templates.md +53 -0
  433. package/skills/wecom-unified/references/wecomcli-smartsheet-view-types.md +373 -0
  434. package/skills/wecom-unified/references/wecomcli-smartsheet-webhook-examples.md +176 -0
  435. package/skills/wecom-unified/references/wecomcli-smartsheet-webhook.md +186 -0
  436. package/skills/wecom-unified/references/wecomcli-smartsheet.md +147 -0
  437. package/skills/wecom-unified/references/wecomcli-todo-create.md +137 -0
  438. package/skills/wecom-unified/references/wecomcli-todo-delete.md +63 -0
  439. package/skills/wecom-unified/references/wecomcli-todo-finish.md +72 -0
  440. package/skills/wecom-unified/references/wecomcli-todo-get.md +69 -0
  441. package/skills/wecom-unified/references/wecomcli-todo-list.md +136 -0
  442. package/skills/wecom-unified/references/wecomcli-todo-update.md +112 -0
  443. package/skills/wecom-unified/references/wecomcli-todo.md +68 -0
  444. package/skills/wecom-unified/scripts/build_docx.py +1274 -0
  445. package/skills/wecom-unified/scripts/build_page.py +2449 -0
  446. package/skills/wecom-unified/scripts/collect.py +868 -0
  447. package/skills/wecom-unified/scripts/doc_image_extractor.py +498 -0
  448. package/skills/wecom-unified/scripts/pptx2image.py +268 -0
  449. package/skills/wecom-unified/scripts/recalc.py +403 -0
  450. package/systemd/wezard-svr.service.template +2 -0
  451. package/systemd/wezard.service.template +6 -0
  452. package/web/chat.css +70 -273
  453. package/web/chat.js +2269 -2190
  454. package/dist/daemon/bot-mux.js +0 -161
  455. package/dist/daemon/bot-mux.js.map +0 -1
  456. package/dist/daemon/chat-log.js +0 -130
  457. package/dist/daemon/chat-log.js.map +0 -1
  458. package/dist/daemon/dispatch.js +0 -6
  459. package/dist/daemon/dispatch.js.map +0 -1
  460. package/dist/daemon/idle-nudge.js +0 -90
  461. package/dist/daemon/idle-nudge.js.map +0 -1
  462. package/dist/daemon/message-events.js +0 -1155
  463. package/dist/daemon/message-events.js.map +0 -1
  464. package/dist/daemon/pending-items.js +0 -160
  465. package/dist/daemon/pending-items.js.map +0 -1
  466. package/dist/daemon/router.js +0 -742
  467. package/dist/daemon/router.js.map +0 -1
  468. package/dist/daemon/tips.js +0 -25
  469. package/dist/daemon/tips.js.map +0 -1
  470. package/dist/daemon/wedoc.js +0 -210
  471. package/dist/daemon/wedoc.js.map +0 -1
  472. package/dist/shared/role-search.js +0 -100
  473. package/dist/shared/role-search.js.map +0 -1
  474. package/dist/shared/startup-notice.js +0 -21
  475. package/dist/shared/startup-notice.js.map +0 -1
  476. package/dist/shared/turn-state.js +0 -27
  477. package/dist/shared/turn-state.js.map +0 -1
@@ -0,0 +1,190 @@
1
+ # 企业微信发送消息
2
+
3
+ 1. 可以向授权人发送消息。
4
+ 2. 可以向授权人以外的、机器人最近有消息往来的聊天会话(单聊和群聊)发送消息。
5
+
6
+ ## 适用范围
7
+
8
+ ### 适用
9
+
10
+ - 适用于给授权人发消息,使用 `wecom-cli identity whoami` 获取授权人ID,可作为 `chat_id` 使用,无需调用 `sessions list`。
11
+ - 适用于查询当前有权限发送消息的聊天会话范围并给这些范围中的成员或群聊发送 Markdown 消息、图片、文件、AMR 语音或视频
12
+
13
+ ### 不适用
14
+
15
+ - 发送对象不是授权人且不在本次 `sessions list` 返回结果中 → 告知用户当前只能向最近活跃的会话或授权人发送
16
+
17
+ ## 能力依赖
18
+
19
+ 调用依赖能力前,必须先完整读取对应 `SKILL.md`。
20
+
21
+ | 依赖 | 触发场景 | 数据流向 |
22
+ |---|---|---|
23
+ | `wecomcli-media.md` | 发送图片、文件、语音或视频时只有本地文件路径,没有可直接复用的 `media_id` | 包含媒体上传接口,如没有已有的 `media_id`,必须先阅读该技能获取 `media_id`,上传时传入的 `type` 应和发送时的`msg_type` 对齐|
24
+
25
+ ## 获取能发送消息的会话列表
26
+
27
+ ### 命令
28
+
29
+ ```bash
30
+ wecom-cli message aibot sessions list
31
+ ```
32
+
33
+ ### 返回
34
+
35
+ | 字段 | 类型 | 说明 |
36
+ |---|---|---|
37
+ | `sessions` | array | 会话列表,按最后一条消息时间从新到旧排序,具体数量以实际回包为准 |
38
+ | `sessions[].chat_id` | string | 会话 ID |
39
+ | `sessions[].chat_name` | string | 群名称或单聊名称 |
40
+ | `sessions[].chat_type` | string | `single` 单聊或 `group` 群聊 |
41
+ | `sessions[].last_msg_time` | string | 最后一条消息时间,格式 `YYYY-MM-DD HH:MM:SS` |
42
+ | `sessions_count` | integer | `sessions` 数组元素数量 |
43
+
44
+ ### `chat_id` 来源
45
+
46
+ 向授权人以外的用户发送消息,调用 `wecom-cli message aibot send` 前,需要先调用一次 `sessions list`,然后从本次返回的 `sessions[]` 中选定目标项,把该项的 `chat_id` 原样复制到 `send.chat_id`。
47
+
48
+ 以下值都不能直接作为 `send.chat_id`:
49
+
50
+ - 用户输入的 ID
51
+ - 之前轮次或历史上下文保存的 `chat_id`
52
+ - `wecomcli-contact.md` 返回的 `userid`
53
+ - 根据姓名、群名或其他字段自行构造的值
54
+
55
+ 这些值最多只能作为匹配线索;最终发送参数必须重新取自本次 `sessions list` 的匹配项。
56
+
57
+ ### 目标会话匹配
58
+
59
+ - **聊天名称**:在本次 `sessions[]` 中按非空 `chat_name` 精确匹配;不能精确匹配需要向用户反问确认发送目标,唯一命中时从匹配项复制 `chat_id`。
60
+ - **最近第一个/最近某个会话**:按 `sessions[]` 原始顺序选择用户明确指定的项。
61
+ - **用户提供 ID**:只能与本次 `sessions[].chat_id` 做完全相等校验;命中后仍从匹配项复制 `chat_id`,不能直接复用用户输入值。
62
+
63
+ 匹配结果处理:
64
+
65
+ - 唯一匹配时继续发送。
66
+ - 多个聊天会话候选时,按返回顺序展示聊天名和最后消息时间,让用户选择。
67
+ - 用户完成选择后,必须重新调用 `sessions list`,再用选定对象匹配当次返回值。
68
+ - 无匹配时停止发送,如实告知目标不在最近 10 个会话中;不要接受外部 `chat_id` 绕过限制。
69
+ - `sessions_count=0` 时停止发送,告知当前没有可发送的最近会话。
70
+ - 展示会话列表时保持接口原始顺序;展示名称和时间,不展示内部 `chat_id`。
71
+
72
+ ## 发送消息
73
+
74
+ ### 前置条件
75
+
76
+ 调用本接口前必须完成以下步骤:
77
+
78
+ 1. 根据发送对象选择调用 `wecom-cli message aibot sessions list`获取 `chat_id` 或 `wecom-cli identity whoami` 获取授权人ID。
79
+ 2. 在本次列表中唯一匹配目标。
80
+ 3. 如果发送授权人以外的对象,从列表中匹配项原样复制 `sessions[].chat_id`。
81
+ 4. 目标是媒体消息时,再准备对应的 `media_id`。
82
+
83
+ 在目标会话匹配成功前,不上传媒体,也不调用 `send`。
84
+
85
+ ### 命令
86
+
87
+ ```bash
88
+ wecom-cli message aibot send --json '<JSON 参数>'
89
+ ```
90
+
91
+ ### 公共参数
92
+
93
+ | 字段 | 类型 | 必填 | 说明 |
94
+ |---|---|:---:|---|
95
+ | `chat_id` | string | 是 | 必须取自 `wecom-cli identity whoami` 或当前发送流程中刚调用的 `sessions list` 返回的目标 `sessions[].chat_id` |
96
+ | `msg_type` | string | 是 | `markdown` / `image` / `file` / `voice` / `video` |
97
+ | `markdown` | object | 条件必填 | 仅 `msg_type="markdown"` 时传 |
98
+ | `image` | object | 条件必填 | 仅 `msg_type="image"` 时传 |
99
+ | `file` | object | 条件必填 | 仅 `msg_type="file"` 时传 |
100
+ | `voice` | object | 条件必填 | 仅 `msg_type="voice"` 时传 |
101
+ | `video` | object | 条件必填 | 仅 `msg_type="video"` 时传 |
102
+
103
+ 每次请求必须且只能携带一个与 `msg_type` 同名的内容对象。不要传空对象,也不要同时传多个消息对象。
104
+
105
+ ### Markdown 消息
106
+
107
+ `markdown.content` 必填,最长 20480 UTF-8 字节。普通文本也按 Markdown 发送。
108
+
109
+ ```bash
110
+ wecom-cli message aibot send --json '{
111
+ "chat_id": "<本次 sessions[].chat_id>",
112
+ "msg_type": "markdown",
113
+ "markdown": {
114
+ "content": "<markdown 消息内容>"
115
+ }
116
+ }'
117
+ ```
118
+
119
+ ### 图片消息
120
+
121
+ `image.media_id` 必填,必须由媒体上传接口以 `type=image` 上传获得。
122
+
123
+ ```bash
124
+ wecom-cli message aibot send --json '{
125
+ "chat_id": "<本次 sessions[].chat_id>",
126
+ "msg_type": "image",
127
+ "image": {
128
+ "media_id": "<media_id>"
129
+ }
130
+ }'
131
+ ```
132
+
133
+ ### 文件消息
134
+
135
+ `file.media_id` 必填,必须由媒体上传接口以 `type=file` 上传获得;文件名取上传时的原始文件名。
136
+
137
+ ```bash
138
+ wecom-cli message aibot send --json '{
139
+ "chat_id": "<本次 sessions[].chat_id>",
140
+ "msg_type": "file",
141
+ "file": {
142
+ "media_id": "<media_id>"
143
+ }
144
+ }'
145
+ ```
146
+
147
+ ### 语音消息
148
+
149
+ `voice.media_id` 必填,必须由媒体上传接口以 `type=voice` 上传获得;源文件仅支持 AMR 格式,不能只改扩展名冒充 AMR。
150
+
151
+ ```bash
152
+ wecom-cli message aibot send --json '{
153
+ "chat_id": "<本次 sessions[].chat_id>",
154
+ "msg_type": "voice",
155
+ "voice": {
156
+ "media_id": "<media_id>"
157
+ }
158
+ }'
159
+ ```
160
+
161
+ ### 视频消息
162
+
163
+ | 字段 | 必填 | 说明 |
164
+ |---|:---:|---|
165
+ | `video.media_id` | 是 | 由媒体上传接口以 `type=video` 上传获得 |
166
+ | `video.title` | 否 | 最长 128 UTF-8 字节;省略时使用上传时的原始文件名 |
167
+ | `video.description` | 否 | 最长 512 UTF-8 字节;省略时不展示描述 |
168
+
169
+ ```bash
170
+ wecom-cli message aibot send --json '{
171
+ "chat_id": "<本次 sessions[].chat_id>",
172
+ "msg_type": "video",
173
+ "video": {
174
+ "media_id": "<media_id>",
175
+ "title": "产品演示",
176
+ "description": "本周版本的核心功能演示"
177
+ }
178
+ }'
179
+ ```
180
+
181
+ 用户没有提供视频标题或描述时直接省略对应字段,不传空字符串,也不追问非必填字段。
182
+
183
+ ## 关键约束
184
+
185
+ - 用户明确要求发送且目标与内容完整时直接执行,不重复追问确认;缺少目标、内容或本地文件时只追问缺失项。
186
+ - 连续发送多条时,不用每次 `send` 前都重新调用 `sessions list` 或 `wecom-cli identity whoami`,但连续发送中途上下文发生压缩时重新调用确保 `chat_id` 正确。
187
+ - `chat_id`、`userid`、`media_id` 都是内部调用值,禁止面向用户展示。
188
+ - Markdown 正文、视频标题和描述限制按 UTF-8 字节数计算;超限时不静默截断,请用户缩短或明确同意拆分。
189
+ - 发送成功后只说明目标和消息类型,不编造消息 ID。
190
+ - 接口失败时如实转达错误,不使用 curl / Python 等方式绕过 `wecom-cli`。
@@ -0,0 +1,62 @@
1
+ # Animation 组件规范
2
+
3
+ `<Animation>` 包裹**单个子元素**为其添加动画,本身不占布局。导出时写入 OOXML `<p:timing>`,在 PowerPoint 放映模式下按顺序播放。
4
+
5
+ ## 基础用法
6
+
7
+ ```jsx
8
+ <Animation animType="fadeIn" duration={800}>
9
+ <Text>标题</Text>
10
+ </Animation>
11
+
12
+ <Animation animType="fadeIn" startType="afterPrevious">
13
+ <Text>第一句</Text>
14
+ </Animation>
15
+ <Animation animType="fadeIn" startType="afterPrevious">
16
+ <Text>第二句</Text>
17
+ </Animation>
18
+ ```
19
+
20
+ 一个 `<Animation>` 只能包**一个**子元素。若需要一组元素同步入场,用 Box 包起来再套 Animation。
21
+
22
+ ## 属性速查
23
+
24
+ | 属性 | 说明 |
25
+ | :--- | :--- |
26
+ | `animType` | **必填**。动画类型字符串,见下方白名单 |
27
+ | `startType` | `'click'`(默认,点击触发)/ `'withPrevious'`(与前一个同时)/ `'afterPrevious'`(前一个播完自动播) |
28
+ | `duration` | 时长毫秒,默认 500 |
29
+ | `delay` | 延迟毫秒,默认 0 |
30
+ | `direction` | 方向类动画(flyIn / peekIn 等)用,取值 `'top' / 'bottom' / 'left' / 'right' / 'topLeft' / 'topRight' / 'bottomLeft' / 'bottomRight' / 'center' / 'toCenter' / 'horizontal' / 'vertical' / 'clockwise' / 'counterClockwise'` 等 |
31
+
32
+ ## 常用 animType 白名单
33
+
34
+ **入场(entrance)**:`appear` / `fadeIn` / `flyIn` / `wipe` / `zoom` / `floatIn` / `floatDown` / `bounce` / `blinds` / `box` / `checkerboard` / `circle` / `diamond` / `dissolve` / `peekIn` / `plus` / `randomBars` / `stretch` / `barnDoor` / `peekFrom` / `strips` / `wedge` / `wheel` / `flip` / `credits` / `easeIn` / `lightSpeed` / `growShrink` / `curveUp` / `riseUp` / `spiralIn` / `compress` / `ascend` / `swivel` / `spinner` / `sling` / `centerRevolve` / `pinwheel` / `swish` / `split`
35
+
36
+ **退出(exit)**:`disappear` / `fadeOut` / `flyOut` / `floatOut` / `floatDownOut` / `exitWipe` / `exitBlinds` / `exitBox` / `exitZoom` / `exitCircle` / `exitDiamond` / `exitFlip` / …(`exit*` 变体一一对应上方入场)
37
+
38
+ **强调(emphasis)**:`pulse` / `spin` / `transparency` / `fillColor` / `fontColor` / `lineColor` / `boldFlash` / `wave`
39
+
40
+ ## 嵌套(一个元素叠多个动画)
41
+
42
+ ```jsx
43
+ <Animation animType="fadeIn" duration={600}>
44
+ <Animation animType="pulse" delay={800}>
45
+ <Text style={{ fontSize: 48 }}>核心数据</Text>
46
+ </Animation>
47
+ </Animation>
48
+ ```
49
+
50
+ ## 硬性限制
51
+
52
+ - 每个 `<Animation>` **只能有一个直接子元素**(多个会报错)
53
+ - `animType` 必填,且必须在上方白名单中
54
+ - 一期不支持:路径动画(`animMotion`)、trigger 触发器(点 A 触发 B)
55
+ - `startType` 默认 `'click'`。**不显式声明** = 需要观众手动点击才播;连续自动播必须显式写 `'afterPrevious'`
56
+
57
+ ## 使用建议
58
+
59
+ - **不是每页都要动画**。优先用于封面 / 章节过渡 / 关键数字揭示;正文页密集列表禁止逐条 fadeIn(放映节奏拖沓)
60
+ - 单页动画数量 ≤ 4,全篇风格统一(要么都 `fadeIn`,要么都 `flyIn`,避免混用)
61
+ - `duration` 建议 300–800 ms,`delay` ≤ 500 ms,超过会显得卡顿
62
+ - 装饰元素、页脚、页码**不加**动画
@@ -0,0 +1,102 @@
1
+ # Box 组件规范
2
+
3
+ Box 是本 DSL 中最基础的容器组件,承担所有**布局与分组**职责。支持 Flexbox 布局,可任意嵌套,是构建页面结构的基本单元。
4
+
5
+ ## 默认布局
6
+
7
+ ```jsx
8
+ <Box>...</Box>
9
+ // 等价于
10
+ <Box style={{ display: 'flex', flexDirection: 'column' }}>...</Box>
11
+ ```
12
+
13
+ - 默认 `display: 'flex'`,`flexDirection: 'column'`(纵向流)
14
+ - 未指定 `width` / `height` 时,尺寸由子组件与父容器共同决定
15
+
16
+ ## 盒模型
17
+
18
+ **遵循 `box-sizing: border-box`**:设置 `width` 时已包含 padding 和 border,内容可用空间 = `width - padding - border`。
19
+
20
+ 例如:`<Box style={{ width: 400, padding: 20, border: '2px solid #333' }}>` 内部子组件可用宽度 = 400 − 20×2 − 2×2 = **356px**。
21
+
22
+ ## 常用样式
23
+
24
+ | 类别 | 属性 |
25
+ | :--- | :--- |
26
+ | 布局 | `flexDirection` / `justifyContent` / `alignItems` / `gap` / `flex` / `flexWrap` |
27
+ | 尺寸 | `width` / `height` / `minWidth` / `minHeight` / `maxWidth` / `maxHeight` |
28
+ | 间距 | `padding` / `margin`(及其方向变体) |
29
+ | 视觉 | `background` / `border` / `borderRadius` / `boxShadow` / `opacity` |
30
+ | 定位 | `position: 'absolute' / 'relative'` / `top` / `left` / `right` / `bottom` / `zIndex` |
31
+
32
+ ## 硬性限制(必须遵守)
33
+
34
+ 1. **仅支持 `display: 'flex'`**。严禁 `display: 'grid'`、`display: 'table'` 以及任何 grid 相关属性(`gridTemplateColumns` 等)
35
+ 2. **不支持 CSS `calc()` 函数**。需要动态尺寸时改用 `flex: 1` / 百分比 / 精确计算的固定值
36
+ 3. **容器只用 `<Box>`,禁止 `<View>`**——`<View>` 是 React Native 组件,本 DSL 不存在;所有布局容器一律 `<Box>`
37
+ 4. 子组件类型可以是 `Text` / `FAIcon` / `Image` / `Chart` / `Table` / `Box`(嵌套)等任意本 DSL 组件
38
+
39
+ ## 使用示例
40
+
41
+ ### 横向排列(图标 + 文字组合)
42
+
43
+ ```jsx
44
+ <Box style={{
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ gap: 20,
48
+ padding: 20,
49
+ background: '#f0f4f8',
50
+ borderRadius: 8,
51
+ }}>
52
+ <FAIcon name='info-circle' style={{ fill: '#3b82f6', width: 24, height: 24 }} />
53
+ <Box>
54
+ <Text style={{ fontSize: 18, fontWeight: 'bold' }}>标题</Text>
55
+ <Text style={{ fontSize: 14, color: '#64748b' }}>描述文本</Text>
56
+ </Box>
57
+ </Box>
58
+ ```
59
+
60
+ ### Flex 纵向均分(内容卡片组)
61
+
62
+ ```jsx
63
+ <Box style={{
64
+ display: 'flex',
65
+ flexDirection: 'column',
66
+ gap: 24,
67
+ height: '100%',
68
+ justifyContent: 'space-between',
69
+ }}>
70
+ <Box style={{ flex: 1 }}>...卡片 1...</Box>
71
+ <Box style={{ flex: 1 }}>...卡片 2...</Box>
72
+ <Box style={{ flex: 1 }}>...卡片 3...</Box>
73
+ </Box>
74
+ ```
75
+
76
+ ### 绝对定位装饰元素
77
+
78
+ ```jsx
79
+ <Box style={{ position: 'relative', width: '100%', height: '100%' }}>
80
+ {/* 背景装饰 */}
81
+ <Box style={{
82
+ position: 'absolute',
83
+ top: 0, right: 0,
84
+ width: 200, height: 200,
85
+ background: 'linear-gradient(135deg, #3b82f6 0%, transparent 100%)',
86
+ opacity: 0.1,
87
+ }} />
88
+ {/* 主内容 */}
89
+ <Box style={{ position: 'relative', zIndex: 1 }}>...</Box>
90
+ </Box>
91
+ ```
92
+
93
+ ## 最佳实践
94
+
95
+ - 页面内**每个视觉区块**用独立的容器 Box 包裹,必要时加背景(纯色或半透明)增强分区感
96
+ - 卡片组用 **Flex + `flex: 1`** 均分空间,而非固定高度堆叠
97
+ - 布局、留白与信息密度规范见本次任务的 `DESIGN.md`(Step4 产出的设计契约)
98
+
99
+ ## 扩展能力
100
+
101
+ - 容器超链接(`<Box href="...">`,含跳页 action)→ [component-hyperlink.md](wecomcli-pptx-component-hyperlink.md)
102
+ - 入场 / 退出 / 强调动画(`<Animation>` 包裹)→ [component-animation.md](wecomcli-pptx-component-animation.md)
@@ -0,0 +1,261 @@
1
+ # Chart 组件规范
2
+
3
+ Chart 组件用于在 PPT 中嵌入数据图表,适合展示:趋势(折线/面积)、对比(柱/条)、占比(饼/圆环)。
4
+
5
+ > 继承关系:`Chart` 继承自 `Box`,完整兼容 `Box` 的 `style` 属性,可直接设置宽高、背景、边距、阴影等样式。
6
+
7
+ ## 1) 快速使用(推荐写法)
8
+
9
+ > 推荐:让 `Chart` 直接参与父级布局,宽度可依赖父容器(默认 `width: '100%'`),只需通过 `style.height` 或 `style.flex`(如 `flex: 1`, `minHeight`)保证垂直空间,否则无法撑满。
10
+
11
+ ```jsx
12
+ <Chart
13
+ // 只指定高度,宽度默认占满父容器
14
+ style={{ height: 450 }}
15
+ chartType='barChart'
16
+ title='季度销售对比'
17
+ data={[
18
+ ['季度', '2023', '2024'],
19
+ ['Q1', 120, 145],
20
+ ['Q2', 156, 178],
21
+ ['Q3', 198, 210],
22
+ ['Q4', 230, 256],
23
+ ]}
24
+ />
25
+ ```
26
+
27
+ ## 2) 支持的图表类型
28
+
29
+ - 柱状/条形:`barChart`, `bar3dChart`
30
+ - `barDirection: 'bar' | 'column'`(默认 `column`)
31
+ - **注意**: `'bar'` 表示横向条形图,`'column'` 表示纵向柱形图(不要使用 `'horizontal'` 或 `'vertical'`)
32
+ - 折线/面积:`lineChart`, `areaChart`
33
+ - 支持 `grouping='stacked'`(面积/柱状常用)
34
+ - 饼图/圆环:`pieChart`, `doughnutChart`
35
+ - **仅支持单系列数据**(两列:类别 + 数值)
36
+
37
+ ## 3) 数据格式(必须遵守)
38
+
39
+ - `data` 为二维数组
40
+ - 第 1 行:表头(第一列是分类名,其余列为系列名)
41
+ - 后续行:数据行(第一列为分类值,其余列为数值)
42
+ - **数值必须是 `number`,不要用字符串**(例如 `120` 而不是 `'120'`)
43
+
44
+ 基础格式:
45
+
46
+ ```jsx
47
+ [
48
+ ['类别名', '系列1', '系列2'],
49
+ ['分类1', 10, 20],
50
+ ['分类2', 15, 18],
51
+ ];
52
+ ```
53
+
54
+ 饼图/圆环(单系列)格式:
55
+
56
+ ```jsx
57
+ [
58
+ ['类别', '占比'],
59
+ ['产品A', 35],
60
+ ['产品B', 25],
61
+ ['产品C', 20],
62
+ ['产品D', 15],
63
+ ['其他', 5],
64
+ ];
65
+ ```
66
+
67
+ ## 4) 颜色与背景(纯色 / 渐变)
68
+
69
+ - `colors: string[]`:系列配色(可纯色、可渐变)
70
+ - `background: string`:图表背景(可纯色、可渐变)
71
+ - `titleColor / legendColor / axisColor / dataLabelColor`:**文本颜色只支持纯色**
72
+
73
+ 支持的渐变语法(CSS 字符串):
74
+
75
+ ```txt
76
+ linear-gradient(90deg, #起始颜色 0%, #结束颜色 100%)
77
+ radial-gradient(circle, #起始颜色 0%, #结束颜色 100%)
78
+ ```
79
+
80
+ 混合纯色与渐变示例:
81
+
82
+ ```jsx
83
+ <Chart
84
+ chartType='areaChart'
85
+ grouping='stacked'
86
+ title='用户增长趋势'
87
+ colors={['#4472C4', 'linear-gradient(90deg, #ea580c 0%, #fdba74 100%)']}
88
+ background='linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%)'
89
+ data={[
90
+ ['月份', '活跃用户', '新增用户'],
91
+ ['1月', 1200, 350],
92
+ ['2月', 1450, 420],
93
+ ['3月', 1780, 480],
94
+ ['4月', 2100, 520],
95
+ ]}
96
+ />
97
+ ```
98
+
99
+ ## 5) 属性说明
100
+
101
+ | 属性 | 类型 | 必需 | 说明 |
102
+ | ---------------- | ---------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------ |
103
+ | `chartType` | `string` | ✅ | 图表类型(小驼峰字符串,如 `barChart`) |
104
+ | `data` | `any[]` | ✅ | 二维数组数据(数值必须为 `number`) |
105
+ | `style` | `object` | ✅ | 必填。可继承 `Box` 的所有样式;宽度可依赖父容器(默认 `100%`),但必须提供高度(`height`)或 `flex`/`minHeight` 等设置来撑满垂直空间 |
106
+ | `title` | `string` | ❌ | 标题 |
107
+ | `colors` | `string[]` | ❌ | 系列配色(纯色或渐变) |
108
+ | `background` | `string` | ❌ | 背景(纯色或渐变) |
109
+ | `showLegend` | `boolean` | ❌ | 是否显示图例(默认 `true`) |
110
+ | `showDataLabels` | `boolean` | ❌ | 是否显示数据标签(默认 `false`) |
111
+ | `titleColor` | `string` | ❌ | 标题文本颜色(纯色) |
112
+ | `legendColor` | `string` | ❌ | 图例文本颜色(纯色) |
113
+ | `axisColor` | `string` | ❌ | 坐标轴文本颜色(纯色) |
114
+ | `dataLabelColor` | `string` | ❌ | 数据标签颜色(纯色) |
115
+ | `grouping` | `string` | ❌ | 分组方式:`clustered \| stacked \| percentStacked \| standard` |
116
+ | `barDirection` | `string` | ❌ | 柱状方向:`'bar'`(横向) \| `'column'`(纵向,默认)。**不要使用** `'horizontal'` 或 `'vertical'` |
117
+
118
+ `grouping` 取值说明:
119
+
120
+ ```js
121
+ 'clustered'; // 簇状图:多系列并排显示,柱子之间有间隙
122
+ 'stacked'; // 堆积图:多系列堆叠显示,显示绝对值总和
123
+ 'percentStacked'; // 百分比堆积图:多系列堆叠显示,显示百分比(总和100%)
124
+ 'standard'; // 标准图:用于折线图等
125
+ ```
126
+
127
+ **注意拼写**:是 `percentStacked` (有字母 r),不是 `precentStacked`
128
+
129
+ `barDirection` 取值示例:
130
+
131
+ ```js
132
+ 'bar'; // 横向条形图
133
+ 'column'; // 纵向柱形图(默认)
134
+ // ❌ 不要使用: 'horizontal', 'vertical'
135
+ ```
136
+
137
+ ## 6) 常见场景怎么选
138
+
139
+ | 场景 | 推荐图表 | 说明 |
140
+ | ------------- | ------------------------------------- | -------------------------------- |
141
+ | 数据对比 | 柱状/条形(`barChart`) | 适合多类别横向比较 |
142
+ | 趋势展示 | 折线(`lineChart`) | 时间序列/趋势最清晰 |
143
+ | 数量变化/构成 | 面积(`areaChart`) | 强调累积与变化幅度;可 `stacked` |
144
+ | 占比分析 | 饼/圆环(`pieChart`/`doughnutChart`) | 单系列、占比表达直观 |
145
+ | 精确数值清单 | Table(不建议用图表) | 静态明细更适合表格 |
146
+
147
+ ## 7) 代表性示例
148
+
149
+ ### A. 折线趋势
150
+
151
+ ```jsx
152
+ <Chart
153
+ style={{ width: 900, height: 450 }}
154
+ chartType='lineChart'
155
+ title='月度用户增长趋势'
156
+ titleColor='#11182A'
157
+ showLegend={true}
158
+ showDataLabels={false}
159
+ legendColor='#9ca3af'
160
+ axisColor='#9ca3af'
161
+ colors={['#4472C4', '#ED7D31']}
162
+ background='#FFFFFF'
163
+ data={[
164
+ ['月份', '活跃用户', '新增用户'],
165
+ ['1月', 1200, 350],
166
+ ['2月', 1450, 420],
167
+ ['3月', 1780, 480],
168
+ ['4月', 2100, 520],
169
+ ['5月', 2450, 580],
170
+ ['6月', 2800, 620],
171
+ ]}
172
+ />
173
+ ```
174
+
175
+ ### B. 堆积面积图(产品构成)
176
+
177
+ ```jsx
178
+ <Chart
179
+ style={{ width: 800, height: 400 }}
180
+ chartType='areaChart'
181
+ grouping='stacked'
182
+ title='产品线收入构成'
183
+ titleColor='#1e293b'
184
+ showLegend={true}
185
+ showDataLabels={false}
186
+ legendColor='#94a3b8'
187
+ axisColor='#94a3b8'
188
+ colors={[
189
+ 'linear-gradient(90deg, #5b21b6 0%, #a78bfa 100%)',
190
+ 'linear-gradient(90deg, #dc2626 0%, #fca5a5 100%)',
191
+ 'linear-gradient(90deg, #05966A 0%, #6ee7b7 100%)',
192
+ ]}
193
+ background='linear-gradient(180deg, #fefce8 0%, #fef3c7 100%)'
194
+ data={[
195
+ ['季度', '产品A', '产品B', '产品C'],
196
+ ['Q1', 50, 30, 20],
197
+ ['Q2', 65, 35, 25],
198
+ ['Q3', 80, 40, 30],
199
+ ['Q4', 95, 45, 35],
200
+ ]}
201
+ />
202
+ ```
203
+
204
+ ### C. 横向条形对比(`barDirection='bar'`)
205
+
206
+ ```jsx
207
+ <Chart
208
+ style={{ width: 700, height: 500 }}
209
+ chartType='barChart'
210
+ barDirection='bar'
211
+ grouping='clustered'
212
+ title='部门业绩对比'
213
+ titleColor='#0f172a'
214
+ showLegend={true}
215
+ showDataLabels={true}
216
+ legendColor='#64748b'
217
+ axisColor='#64748b'
218
+ dataLabelColor='#1e293b'
219
+ colors={['#10b981', '#f59e0b', '#ef4444']}
220
+ data={[
221
+ ['部门', '目标', '实际', '差距'],
222
+ ['销售部', 100, 115, 15],
223
+ ['市场部', 80, 72, -8],
224
+ ['研发部', 120, 125, 5],
225
+ ['运营部', 90, 88, -2],
226
+ ]}
227
+ />
228
+ ```
229
+
230
+ ### D. 饼图占比(单系列 + 渐变背景)
231
+
232
+ ```jsx
233
+ <Chart
234
+ style={{ width: 600, height: 400 }}
235
+ chartType='pieChart'
236
+ title='市场份额分布'
237
+ titleColor='#1f2937'
238
+ showLegend={true}
239
+ showDataLabels={true}
240
+ legendColor='#37414F'
241
+ dataLabelColor='#ffffff'
242
+ colors={['#3b82f6', '#8b5cf6', '#ec4899', '#f59e0b']}
243
+ background='linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%)'
244
+ data={[
245
+ ['产品', '市场份额'],
246
+ ['产品A', 35],
247
+ ['产品B', 28],
248
+ ['产品C', 22],
249
+ ['产品D', 15],
250
+ ]}
251
+ />
252
+ ```
253
+
254
+ ## 8) 最佳实践
255
+
256
+ 1. **尺寸**:`Chart` 默认横向拉伸,可省略宽度;务必提供 `style.height` 或 `style.flex`(如 `flex: 1` + `minHeight`),否则高度为 0。
257
+ 2. **数据类型**:所有数值必须为 `number`。
258
+ 3. **饼/圆环限制**:仅支持单系列(两列)。
259
+ 4. **颜色策略**:`colors/background` 可渐变;文本色(`titleColor/legendColor/axisColor/dataLabelColor`)仅纯色。
260
+ 5. **可读性**:`axisColor` 建议中性灰(如 `#9A9999` / `#9ca3af`),避免喧宾夺主;`dataLabelColor` 确保与背景对比足够。
261
+ 6. **选型**:趋势用折线,构成用堆积面积或堆积柱,对比用柱/条,占比用饼/圆环;静态明细优先 Table。
@@ -0,0 +1,70 @@
1
+ # CodeBlock 组件规范
2
+
3
+ CodeBlock 组件用于展示语法高亮的代码块,支持多种编程语言,macOS 风格设计。
4
+
5
+ ## 核心属性
6
+
7
+ - **code**: 代码字符串
8
+ - **language**: 编程语言,如 `"javascript"`, `"python"`, `"typescript"`
9
+ - **width**: 宽度(像素)
10
+ - **fontSize**: 字体大小(默认 12)
11
+ - **theme**: `"github-dark"` 或 `"github-light"`(默认 `"github-dark"`)
12
+ - **macHeader**: 是否显示 macOS 三色点(默认 true)
13
+
14
+ ## 示例代码
15
+
16
+ ### 1. 基础 JavaScript 代码
17
+
18
+ ```jsx
19
+ <CodeBlock
20
+ code={`function fibonacci(n) {
21
+ if (n <= 1) return n;
22
+ return fibonacci(n - 1) + fibonacci(n - 2);
23
+ }
24
+
25
+ console.log(fibonacci(10)); // 55`}
26
+ language='javascript'
27
+ width={700}
28
+ />
29
+ ```
30
+
31
+ ### 2. Python 代码
32
+
33
+ ```jsx
34
+ <CodeBlock
35
+ code={`def quick_sort(arr):
36
+ if len(arr) <= 1:
37
+ return arr
38
+ pivot = arr[len(arr) // 2]
39
+ left = [x for x in arr if x < pivot]
40
+ middle = [x for x in arr if x == pivot]
41
+ right = [x for x in arr if x > pivot]
42
+ return quick_sort(left) + middle + quick_sort(right)`}
43
+ language='python'
44
+ width={800}
45
+ fontSize={14}
46
+ />
47
+ ```
48
+
49
+ ### 3. TypeScript 代码(明亮主题)
50
+
51
+ ```jsx
52
+ <CodeBlock
53
+ code={`interface User {
54
+ id: string;
55
+ name: string;
56
+ }
57
+
58
+ class UserService {
59
+ private users: Map<string, User> = new Map();
60
+
61
+ addUser(user: User): void {
62
+ this.users.set(user.id, user);
63
+ }
64
+ }`}
65
+ language='typescript'
66
+ width={750}
67
+ theme='github-light'
68
+ background='#ffffff'
69
+ />
70
+ ```