diff --git a/README.md b/README.md index 524afd5c..09e12138 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,9 @@ You hire coworkers, not chat boxes. Each one has a **Role**, a **Goal**, a **Bac ### Multimodal creation Text-to-speech · Speech-to-text · Image · Music · Video · 3D. First-class, not add-ons. **Sidecar routing** (1.3.0+) means a text-only main model + an image attachment no longer dead-ends — a configured vision model describes the image, and the main model answers. **Image edit** lands too: refer to an earlier conversation attachment by `msg::` and ask the model to recolor or restyle it. Four **document-generation tools** (`DocxRenderTool` / `XlsxRenderTool` / `PptxRenderTool` / `PdfRenderTool`) render Markdown straight to Office files inside the JVM — no subprocess, no Office install. +### Content Studio (1.8.0+) +A flagship *scene*, not a tool — a seeded "Content Studio" employee turns one sentence into a publishable post: pick-topic → research → draft → illustrate → **de-AI** → lay out → deliver. **WeChat Official Account (公众号)** articles land in your draft box as inline-style HTML with body images uploaded into WeChat; **Xiaohongshu (小红书)** notes package as ≥3 vertical 3:4 cards with an online preview. De-AI-ification runs against a **measurable AI-trace score**; every delivery is compliance-scanned and logged to a **content calendar** that dedups by topic fingerprint. + ### Enterprise-ready RBAC + JWT. **Personal Access Tokens** for headless scripts and CI. **HMAC-SHA-256 outbound webhook signing**. **Distributed Cron lock** so multi-instance deployments don't double-fire. Full audit trail. Flyway-managed schema that auto-heals on upgrade. One JAR to ship. MySQL in production, H2 for dev — nothing to change in your code. @@ -217,6 +220,19 @@ Full docs at **[claw.mate.vip/docs](https://claw.mate.vip/docs)** — setup, arc ## Roadmap +**v1.8.0 (shipped 2026-07-12)** — the employee turns *outward and does a whole job*: **Content Studio**, the first flagship scene built end-to-end on MateClaw's own primitives: + +- **Content Studio — one sentence to a publishable post** — a seeded "Content Studio" employee runs pick-topic → research → draft → illustrate → de-AI → layout → deliver. **WeChat Official Account (公众号)** image-text articles (inline-style HTML → draft box) and **Xiaohongshu (小红书)** image-first notes (≥3 vertical 3:4 cards + online preview) ship first-class +- **De-AI-ification you can measure** — a heuristic AI-trace score (no LLM, deterministic) drives a detect → rewrite → re-check loop, capped at 3 rounds +- **A publish chain hardened for real operation** — body images uploaded into WeChat (no broken external links), AES-GCM-encrypted secrets, reused service + persisted token, retry + Chinese error hints, a guaranteed fallback cover; draft-box-first, publish approval-gated +- **A content calendar that dedups and remembers** — every delivery is compliance-scanned and auto-recorded, a topic fingerprint stops repeat picks, and a read-only Content Calendar page shows drafted/packaged/published/failed +- **The browser agent sees by reference** — an accessibility-tree ref snapshot + interact-by-ref (click the element, not a pixel), real-browser privacy guardrails, and a controlled CDP escape hatch +- **Sharper attention, tighter loops** — attention anchoring & environment awareness (MCP tool provenance + pinned skill constraints + event notifications), a tool-call loop guard, and a post-mutation verify reminder + +Plus: a fast-load pass (initial load down ~78%), a chat context-occupancy panel, cross-KB wikilinks, MCP progress notifications, a Volcano Engine provider, and the public Docker stack on PostgreSQL 16. + +Full story in the [v1.8.0 release notes](https://claw.mate.vip/docs/en/releases/1.8.0). + **v1.7.0 (shipped 2026-07-04)** — a *productionization pass*: once it's in real collaboration, close every loop you can't see, gather, reach, fit, or connect: - **All three approval paths close the loop** — workflow `await_approval` actually pushes to channels and resolves → resumes, the WebChat (API-key) channel can approve/deny and replay, and Feishu/WeCom card clicks resolve workflow approvals directly diff --git a/README_zh.md b/README_zh.md index a23506d5..69aefcaa 100644 --- a/README_zh.md +++ b/README_zh.md @@ -103,6 +103,9 @@ MateClaw 的 **LLM Wiki** 把它消化成结构化页面,页面之间自己长 ### 多模态创作 语音合成 · 语音识别 · 图片 · 音乐 · 视频 · 3D。一等公民,不是附加插件。**多模态旁路**(1.3.0+)让纯文本主模型遇到图片附件时自动调用配置好的视觉模型转描述,主对话保持便宜。**图像编辑**也到位:用 `msg::` 引用会话里更早的某张图,让模型改色、改风格。**4 个文档生成工具**(`DocxRenderTool` / `XlsxRenderTool` / `PptxRenderTool` / `PdfRenderTool`)在 JVM 内把 Markdown 直接渲染成 Office 文件——不 fork 子进程、不依赖 npm、不需要装 Office。 +### 内容工作室(1.8.0+) +一个招牌*场景*,不是工具——预置的「内容工作室」员工把一句话变成可发布成品:选题 → 搜集 → 成文 → 配图 → **去 AI 化** → 排版 → 交付。**微信公众号(公众号)** 文章以内联样式 HTML 躺进你的草稿箱,正文图自动上传进微信;**小红书** 笔记打包成 ≥3 张竖版 3:4 卡片并在线预览。去 AI 化对着一个**可度量的 AI 痕迹评分**跑;每次交付都被合规扫描并记进一个按选题指纹去重的**内容日历**。 + ### 企业就绪 RBAC + JWT。**Personal Access Token** 给无人值守脚本和 CI 用。**Webhook 出站 HMAC-SHA-256 签名**。**Cron 分布式锁**多实例不双发。完整审计事件流。Flyway 管理数据库 schema,升级时自愈。一个 JAR 交付。生产用 MySQL,开发用 H2,代码零改动。 @@ -217,6 +220,19 @@ mateclaw/ ## 路线图 +**v1.8.0(2026-07-12 发布)** — 员工*转向对外、干完一整件活*:**内容工作室**——第一个完全用 MateClaw 自身原子能力端到端搭起来的招牌场景: + +- **内容工作室——一句话到可发布成品** — 预置「内容工作室」员工跑通 选题 → 搜集 → 成文 → 配图 → 去 AI 化 → 排版 → 交付。**微信公众号(公众号)** 图文文章(内联样式 HTML → 草稿箱)与 **小红书** 以图为主图文笔记(≥3 张竖版 3:4 卡片 + 在线预览)首批一等公民 +- **可度量的去 AI 化** — 启发式 AI 痕迹评分(无 LLM、确定性)驱动 检测 → 改写 → 复检 闭环,硬上限 3 轮 +- **为长期投产而加固的发布链** — 正文图上传进微信(不再外链发布即裂)、AES-GCM 加密密钥、服务复用 + token 持久化、重试 + 中文错误提示、兜底封面;草稿箱优先,发表走审批 +- **会去重、会记账的内容日历** — 每次交付都合规扫描 + 自动落台账、选题指纹防重复选题、只读内容日历页展示草稿/已打包/已发布/失败 +- **浏览器 Agent 按引用去看** — 无障碍树 ref 快照 + 按 ref 交互(点元素而非像素)、真实浏览器隐私护栏、受控 CDP 逃生舱 +- **注意力更聚焦、循环更收得住** — 注意力锚定与环境感知(MCP 工具溯源 + skill 约束固定 + 事件通知)、工具调用循环护栏、改动后校验提醒 + +外加:一次快加载优化(初始加载 ↓约 78%)、聊天上下文占用面板、跨知识库 wikilink、MCP 进度通知、火山方舟供应商,以及公开 Docker 栈切到 PostgreSQL 16。 + +完整故事见 [v1.8.0 release notes](https://claw.mate.vip/docs/zh/releases/1.8.0)。 + **v1.7.0(2026-07-04 发布)** — 一次*生产化加固*:把它放进真正的协作里之后,那些看不见、收不拢、够不着、装不下、连不通的地方全补上: - **审批三条链路彻底闭环** — 工作流 `await_approval` 真的推到渠道并 resolve→恢复执行、WebChat(API-Key)渠道能批准/拒绝并重放、飞书/企微点卡片直接 resolve 工作流审批 diff --git a/mateclaw-desktop/package.json b/mateclaw-desktop/package.json index 92d611b4..f7fbdef7 100644 --- a/mateclaw-desktop/package.json +++ b/mateclaw-desktop/package.json @@ -1,6 +1,6 @@ { "name": "mateclaw-desktop", - "version": "1.8.0-SNAPSHOT", + "version": "1.8.0", "description": "MateClaw Desktop - AI Assistant powered by Spring AI Alibaba", "author": "MateClaw Team", "license": "Apache-2.0", diff --git a/mateclaw-server/src/main/resources/docs/en/channels.md b/mateclaw-server/src/main/resources/docs/en/channels.md index 438372a6..45287417 100644 --- a/mateclaw-server/src/main/resources/docs/en/channels.md +++ b/mateclaw-server/src/main/resources/docs/en/channels.md @@ -604,6 +604,16 @@ curl -X POST http://localhost:18088/api/v1/channels \ --- +## WeChat Official Account (publish target, 1.8.0+) + +Unlike the nine conversational channels above, the **WeChat Official Account (公众号)** integration is a **one-way publish transport**, not an inbound message channel. It's used by [Content Studio](./content-studio) to push image-text articles into your Official Account **draft box**. + +- Configure the Official Account `app_id` / `app_secret` in **Settings** — the secret is **AES-GCM encrypted at rest** (set `MATECLAW_SETTING_KEY` and back it up). +- The WeChat service instance is cached per appId with a **persisted access token** (WeChat allows one valid token per appId), and the publish chain **retries** transient errors and translates known error codes into actionable hints (e.g. *add the server IP to the Official Account whitelist*). +- Publishing is **draft-box-first**; the optional `publish` action is approval-gated. See [Content Studio](./content-studio). + +--- + ## Channel management API ```bash diff --git a/mateclaw-server/src/main/resources/docs/en/content-studio.md b/mateclaw-server/src/main/resources/docs/en/content-studio.md new file mode 100644 index 00000000..7bf5428b --- /dev/null +++ b/mateclaw-server/src/main/resources/docs/en/content-studio.md @@ -0,0 +1,180 @@ +# Content Studio + +**One sentence in. A publishable post out.** + +Content Studio (内容工作室) is MateClaw's first flagship *scene* — not a single tool, but an orchestrated pipeline that turns *"write me something about X"* into a finished, on-platform artifact: a **WeChat Official Account (公众号)** image-text article sitting in your draft box, or a **Xiaohongshu (小红书 / RED)** note packaged as ready-to-post vertical cards. + +It's built entirely from MateClaw's own primitives — web search, page fetch, image generation, HTML-to-image rendering, structured memory, cron, and the skill runtime — stitched into a repeatable SOP. Everything below ships in **v1.8.0+**. + +--- + +## The seeded employee + +Content Studio ships as a **pre-seeded digital employee** named *Content Studio* / *内容工作室*. It comes bound to the right skills and tools, with a system prompt that fixes the seven-stage workflow and the "confirm before the outward, irreversible step" discipline. You don't assemble it — you talk to it: + +> *"Write a 公众号 article about local LLM deployment, referencing these two: `` ``"* +> +> *"Give me a 小红书 note about a weekend coffee-shop crawl."* + +From the second post on, it already knows your voice — persona, style, topic direction, banned words — because those live in **structured memory**, not in your prompt. + +--- + +## The pipeline + +``` +① Topic → ② Research → ③ Draft → ④ Illustrate → ⑤ De-AI → ⑥ Layout → ⑦ Deliver +``` + +| Stage | What happens | Powered by | +|---|---|---| +| **① Topic** | Reads your long-term interests from memory + fresh web search; or comes from a daily "topic radar" cron | `recall_structured`, `web_search`, cron | +| **② Research** | Fetches reference articles, summarizes the angles so you differentiate rather than rehash | `wechat_article_extract`, `browser_use` | +| **③ Draft** | Writes to platform-native structure, honoring your persona & style memory | LLM + memory | +| **④ Illustrate** | Generates a cover and section images | `image_generate` | +| **⑤ De-AI** | Runs a measurable detect → rewrite → re-check loop (see below) | `deai_humanize` skill | +| **⑥ Layout** | Produces the platform artifact (inline-style HTML / vertical cards) | `render_html_image`, HTML templates | +| **⑦ Deliver** | Stops at the outward, irreversible step for your confirmation | `gzh_publish` (draft) / `xhs_package` | + +**Templates are conversational.** Because layout is just HTML, the employee can create and refine templates by chatting — render a preview, look at the PNG, refine — and persist reusable custom templates into your own editable skill. Built-in skills stay immutable; your customizations live in a `custom` skill (see [Skills](./skills)). + +--- + +## Two platforms, first-class + +### WeChat Official Account (公众号) — `gzh_article` + +- **Inline-styled HTML.** The WeChat editor ignores `