Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
adebe4e
rebuild
bigbrother666sh Jul 4, 2026
72de7ac
docs(devplan): withdraw video relay, defer Phase 7 follow-up, log dev…
Jul 4, 2026
957a546
docs(phase-4.5): camoufox-cli 集成设计骨架
Jul 4, 2026
0383e87
refactor(login-manager): 用 camoufox-cli 路径替换 CDP WebSocket 抽 cookie
Jul 4, 2026
872df53
feat(dockerfile): bake camoufox fingerprint template at build time
Jul 4, 2026
8dfb56c
feat(browser-guide): 引入 camoufox-cli 主推章节,保留 browser tool fallback
Jul 4, 2026
9d2f1fa
refactor(skills): 浏览器类 skill 改用 camoufox-cli 主推路径
Jul 4, 2026
00b3080
docs(phase-4.6): 微信公众号 engagement 接入设计 + 登记
Jul 4, 2026
88ca05e
feat(wx-mp-engagement): skill 骨架 + 集成点(spike 待真机验证)
Jul 4, 2026
37c670f
docs(devplan): revise deploy strategy — source deploy before Dockerfile
Jul 4, 2026
0e6bd7d
feat(siliconflow-img-gen): 改调火山方舟 Seedream 4.0(Phase 5, D13)
Jul 4, 2026
672e9f0
feat(it-engineer): Phase 8.1 记忆注入 + D20③ 依赖安装规范
Jul 4, 2026
94c8334
docs: 收尾三件套 — workspace-bootstrap / CHANGELOG / plan §十一
Jul 4, 2026
520e116
docs(devplan): Phase 4 awada 取消(不动),Phase 4.5 标完成
Jul 4, 2026
45bd970
refactor(bilibili-publish): 改 relay 代理(D1 全 proxy,Phase 3.1)
Jul 4, 2026
0fff2d8
feat(douyin-publish): 浏览器模拟方案(Phase 3.2)
Jul 4, 2026
43762d0
feat(main): Phase 7.1 身份合体 '小贝' 定位
Jul 4, 2026
7d93b48
feat(ir): Phase 7.2 IR 三模式抽三 skill + 7 天过期提醒
Jul 4, 2026
5e7be4a
feat(main): Phase 7.3 BD 三能力合入 AGENTS + HEARTBEAT
Jul 4, 2026
78e0f09
refactor(it-engineer): Phase 7.4 瘦身 + 强化运维
Jul 4, 2026
308a00a
docs: Phase 7.5 sales-cs 启用指南(验证状态 + 流程文档化)
Jul 4, 2026
e9f8ed5
refactor(scripts): apply-addons.sh 删 addons 扫描死代码(Phase 7.6)
Jul 4, 2026
9328bc9
docs: D21 全局技能软链化 + Wrapper 覆盖审计(Phase 7.7 设计)
Jul 4, 2026
f505790
docs: 上游 catchup 评估报告(2026-07-04,6 个上游)
Jul 4, 2026
7385495
docs: AiToEarn + OpenCLI 借鉴分析(Twitter & smart-search)
Jul 4, 2026
92b54e4
chore(sync): update openclaw to v2026.6.11
Jul 5, 2026
b8cec36
feat(twitter-post): 借鉴 AiToEarn v2.4/v2.5 增强 typed publish + richer r…
Jul 5, 2026
220fc0a
feat(twitter-interact): 新建互动操作 skill(借鉴 AiToEarn v2.4)
Jul 5, 2026
752e16a
feat(smart-search): 借鉴 OpenCLI v1.8.2 per-category source guides
Jul 5, 2026
7c35ed1
chore(patchright): 升级 1.60.2 → 1.61.1
Jul 5, 2026
d233424
docs: OpenCLI v1.8.6 借鉴分析(命令可靠性 + 超时模式)
Jul 5, 2026
32a9457
docs(devplan): 更新 checkbox 状态(2026-07-05)
Jul 5, 2026
6eeb165
fix: excutive wrong
bigbrother666sh Jul 5, 2026
135b250
refactor(skills): browser-guide 大改 + SOUL.md 系统红线
Jul 5, 2026
8237fe6
refactor(xhs): 严格 client-only — 删 xhsProxy + 加 xhsFetch helper
Jul 5, 2026
5111f1e
refactor(config): 删 main openclaw_setting_sample.json + 更新 config-tem…
Jul 5, 2026
a4e12a6
feat(wx-mp-hunter): 借鉴 wechat-article-exporter 设计 + 图片下载模块
Jul 5, 2026
7a69a28
fix(xhs): 签名统一走 relay + sign_format 透传
Jul 5, 2026
5480208
feat(patches): 007 browser 工具摘要注入 camoufox-cli 优先引导
Jul 5, 2026
a3e13f8
refactor(crews/skills): P4-P9 文档清理 + 品牌名 wiseflow→xiaobei
Jul 5, 2026
8ab4b23
adjust it engineer
bigbrother666sh Jul 5, 2026
6d37be0
feat(awada): 预装 ioredis 依赖(Docker 镜像 + 源码部署自动)
Jul 6, 2026
b57958c
feat(it-engineer): Docker 环境自感知(OFB_ENV.md / 重启指令 / 心跳巡检)
Jul 6, 2026
9f7973d
correct main agen and sales-cs
bigbrother666sh Jul 6, 2026
d14d4af
feat(main): 工作条块定义 + sales-cs 治理技能 + wx-mp-engagement 可试跑
Jul 6, 2026
c5f5a6e
refactor(sales-cs): 去 hrbp 化 + openclaw_setting_sample 固定配置
Jul 6, 2026
05c2725
feat(wx-skills): 三个 wx 技能改 relay 无状态多租户透传
Jul 6, 2026
5c19fc3
人工勘定
bigbrother666sh Jul 6, 2026
b610a34
feat(main): business_knowledge.md 单文件化 + wxwork-drive file_share 概要补全
Jul 6, 2026
1662601
feat(awada): 改走 relay 网关 HTTP/WS 传输,去直连 Redis
Jul 7, 2026
c95a026
refactor(awada): 移除 ioredis 预装,proactive-send 迁 HTTP 网关
Jul 7, 2026
23e11d9
chore: 发布仓改址 TeamWiseFlow/xiaobei + DEVPLAN 移出根目录
Jul 7, 2026
e3d6f38
fix(install): 修 install.sh 执行问题 + 去 hrbp 化清理
Jul 7, 2026
c441220
fix(install): 停收 SILICONFLOW + 全 crew workspace 预建 + key 清洗
Jul 7, 2026
da9bbcd
feat(models): 迁移主力/视觉模型到 AWK + img-gen fallback + 开通指引
Jul 7, 2026
cbd4424
refactor(config): Docker openclaw.json 单源化,从 config-templates/ 派生
Jul 7, 2026
bdf60f8
fix(pitch-deck): goto 用有界 load 替代 networkidle,避免 CDN 字体墙时挂死
Jul 7, 2026
8594d88
fix(config): awk 模型列表对齐火山官方,删 minimax-m3
Jul 7, 2026
dd3e531
fix(config): main agent 不显式设 thinkingDefault,继承全局 medium
Jul 7, 2026
4726d99
fix(it-engineer): DENIED_SKILLS 改正——保留核心 IT 技能,禁内容/视觉链路
Jul 7, 2026
a0904ce
feat(work-channel-binding): add feishu openclaw.json sample
Jul 7, 2026
a0be54b
fix(scripts): macOS/BSD portability + setup-crew dedup
Jul 7, 2026
82dccda
adjust crew info
bigbrother666sh Jul 7, 2026
eb01d81
Merge branch 'master' of github.com:bigbrother666sh/wiseflow
Jul 7, 2026
3683b85
fix(crew-it-engineer): 重定位为幕后支撑 + OFB_KEY/OFB_ENV 归口 + 去 T0-T3 措辞
Jul 7, 2026
46f7974
refactor(permissions): 删 command-tier 四档抽象,权限改由 crew-type + ALLOWED_C…
Jul 7, 2026
a8fac9a
微调Itngr和may的文件。
bigbrother666sh Jul 8, 2026
ef8d614
refactor(scripts): Python 调用规范只注入对外 allowlist crew
Jul 8, 2026
c1734a2
feat(config): 默认关闭 dream + memorySearch 走 fts-only(无需向量模型)
Jul 8, 2026
d4d6614
refactor(scripts): 删 inject_env_file_guide,env 写入规范归 OFB_ENV.md
Jul 8, 2026
b16ff2e
docs: README/CHANGELOG 更新至 v5.5.3
Jul 8, 2026
5982998
fix(skills): relay sign fallback 改为官方中转,避免心跳误起本地 relay
Jul 9, 2026
4784d4c
更新sales CS。Main agent增加起号文档。优化sales CS启用流程。
bigbrother666sh Jul 9, 2026
1a6ebcd
docs(README): v5.6.0 main agent 三角色融合 + 补全上游致谢
Jul 9, 2026
abc70ea
docs(twitter-post): 方案导向改 camoufox-cli 主推,避免 agent 误用内置 browser tool
Jul 9, 2026
dc4983a
docs(wx-mp-hunter): 专题页抓取流程 browser 改 camoufox-cli
Jul 9, 2026
d067c98
fix(published-track): fetch-and-update-metrics 调 login-manager 路径修正
Jul 10, 2026
1572c40
fix(xhs-content-ops): fetch_note_content.ts 补 XHS_BROWSE_BASE 常量声明
Jul 10, 2026
cab3fb3
fix(wx-mp-engagement): 同步真机验证版 fetch_engagement + 清理开发备注
Jul 10, 2026
9755c82
fix(HEARTBEAT): isolated cron session 禁止 sessions_yield / 不 spawn sub…
Jul 10, 2026
16ffc8d
update readme
bigbrother666sh Jul 10, 2026
236b26c
docs: 落盘浏览器栈整体替换 spec(v5.6.0 重磅)
Jul 11, 2026
fed0302
docs(browser-pivot): 落盘双线转向计划 + patch 收缩 + 历史文档清理
Jul 11, 2026
24c1bf1
feat(browser-pivot): 落地阶段一 step 1-6 — camoufox-cli 双线浏览器栈转向
Jul 11, 2026
c3fb7f9
refactor(patches): 拆 001 monolith 为 35 个单文件 patch + 确认 007 必要性
Jul 11, 2026
b0fe815
feat(browser-pivot): default target 改成 camoufox + 闭合 upload 路径校验缺口
Jul 11, 2026
ae0ba8b
update work plan
bigbrother666sh Jul 11, 2026
9e4e180
Merge branch 'master' of github.com:bigbrother666sh/wiseflow
bigbrother666sh Jul 11, 2026
ce28c38
feat(setup-crew): sync crew 专属 skill 到已部署 workspace (spec §2.3)
Jul 11, 2026
0c2e962
feat(twitter-interact): 单一持久化 session + fail-first 队列 + 有头登录 (spec §7)
Jul 11, 2026
e49bb22
docs(browser-pivot): §8 profile 丢失处理 canonical doc + §9 README/CHANGE…
Jul 12, 2026
8a2a9e9
feat(browser-pivot): 落地 spec §3-§6 — 全局/平台 skill camoufox-cli 化 + log…
bigbrother666sh Jul 12, 2026
1c64ef0
revert(wx-mp-hunter): 撤销 SKILL.md 改动,wx-mp-hunter 维持现状(用户拍板 §6 不做收编)
bigbrother666sh Jul 12, 2026
afea7eb
Merge branch 'master' of github.com:bigbrother666sh/wiseflow
bigbrother666sh Jul 12, 2026
8d75a4c
feat(deploy): skill 软链部署 + per-skill node 依赖 + browser config 精简
Jul 12, 2026
0845077
chore(skill): 清掉 SKILL.md 里的开发仓路径引用 + spike 验证开发期注释
bigbrother666sh Jul 12, 2026
e8d88ca
chore: 暂存本地未提交改动(rebase 前快照)
bigbrother666sh Jul 12, 2026
b5f3a7d
feat: Update README and skills documentation for wx-mp-publisher and …
bigbrother666sh Jul 12, 2026
2956b96
D21 skill scrip wrapper exed
bigbrother666sh Jul 12, 2026
d1cae6c
fix(browser-pivot): camoufox-cli daemon waitForSocket 超时 5s→15s
Jul 13, 2026
5a9e98e
feat(deploy): sync_crew_skills 软链 _ 前缀共享库(_shared)
Jul 13, 2026
e3e8feb
Refactor skills documentation and structure
bigbrother666sh Jul 13, 2026
90738c6
fix(camoufox-cli): hash long session names to avoid 108-char socket p…
Jul 13, 2026
111ff59
feat(douyin): 更新 SKILL.md 和 publish_douyin.py,优化描述和流程,移除不必要的登录检查
bigbrother666sh Jul 14, 2026
81762c5
solve comfumox session close wrong instruct
bigbrother666sh Jul 14, 2026
e85f608
feat(twitter-interact): 吸收 OpenCLI 三模式 + 解耦 login-manager + 统一 prelude
Jul 14, 2026
881d2ee
feat(xianyu-ops,login-manager): 吸收 OpenCLI mtop 搜索 + 大小写不敏感登录墙检测
Jul 14, 2026
d28b491
docs(catchup): 补 2026-07-14 OpenCLI 83-commit catchup 决策 + twitter-in…
Jul 14, 2026
21d7ac6
twitter platform persite session
bigbrother666sh Jul 14, 2026
ac9265e
Merge origin/master: twitter persite-session (21d7ac6) + 本地 OpenCLI 交…
Jul 14, 2026
766eb3a
feat(camoufox-pivot §3): browser tool session 字段 + adapter 平台 session 命名
Jul 14, 2026
b047525
feat(docker): 持久化卷模型 + camoufox-cli VOLUME
Jul 14, 2026
74b1db3
docs(heartbeat): Step 2 取数流程按平台分脚本/技能/Agent 三种情况
Jul 14, 2026
d5feedb
feat(viral-chaser): ASR 切换为火山豆包语音极速版,原生返回时间戳
Jul 14, 2026
97bd50e
fix:wrapper
bigbrother666sh Jul 14, 2026
765dadb
fix(camoufox-cli): 移除已废弃的 --headless flag,统一为默认 headless
Jul 14, 2026
3cb042d
fix(wx-mp/xhs): 修正 camoufox-cli eval 信封解包,token/xsec_token 提取失败
Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 避免本地 node_modules / 构建产物打进镜像(镜像内统一重新 install)
**/node_modules
**/dist
**/.git
awada/node_modules
openclaw/node_modules
*.log
18 changes: 10 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ patchright-v*/
openclaw/

# addon crews copied into crews/ at install time — not tracked
crews/business-developer/
crews/designer/
crews/pro-selfmedia-operator/
crews/sales-cs/
crews/selfmedia-operator/
crews/video-producer/
scripts/upgrade.sh
scripts/upgrade_without_git.sh
.pnpm-store/

# 本地凭据(relay 无状态多租户改造后,client 自管凭据)
crews/main/skills/wx-mp-publisher/accounts.json
skills/wxwork-drive/spaces.json

# Claude Code 会话目录
.claude/

# 运行时缓存
crews/main/skills/published-track/xhs-user-id.cache
127 changes: 120 additions & 7 deletions CHANGELOG.md

Large diffs are not rendered by default.

49 changes: 33 additions & 16 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,14 @@

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

### 版本管理

版本号存储在 `version` 文件中,格式为 `vMAJOR.MINOR.PATCH`。当 PR 合并到 upstream 的 master 时,GitHub Action 自动递增版本号并创建 Release。通过 PR 标签控制递增类型:
- `major` 标签 → 大版本升级
- `minor` 标签 → 功能版本升级
- 无标签或 `patch` 标签 → 补丁版本升级(默认)

**不要手动修改 `version` 文件**,由 CI 自动维护。

Claude Code 被授权在本仓库中执行任何 git 命令(包括 push、branch、tag 等),无需逐次确认。

## Crew Template 开发规范

创建或修改 crew template(`crews/` 或 `addons/officials/crew/` 下的任何 crew)时,必须遵循 `docs/workspace-bootstrap-files.md` 中定义的文件职责划分:
创建或修改 crew template(`crews/` 下的任何 crew)时,必须遵循 `docs/workspace-bootstrap-files.md` 中定义的文件职责划分:

- **AGENTS.md**:工作流程、决策树、操作步骤
- **SOUL.md**:角色定义、价值观、自主权等级(L1/L2/L3)、行为边界
- **SOUL.md**:角色定义、价值观、行为边界
- **IDENTITY.md**:名字、形象类型、性格基调、emoji、头像——仅此四项,不写工作职责或能力清单
- **TOOLS.md**:本机环境备忘(脚本路径、环境变量、工具别名)——不写工作流程,不重复 SKILL.md 内容
- **MEMORY.md**:跨会话需保留的背景知识(产品手册、用户偏好、历史记录)——不写工具使用规范
Expand All @@ -30,7 +21,13 @@ Claude Code 被授权在本仓库中执行任何 git 命令(包括 push、bran
- 1、多步骤操作且涉及中间态保存的(下一步操作的某一输入为上一步返回结果),哪怕每一步都只是一条命令,也必须做脚本!
- 2、涉及多分支选择,且分支选择依靠明确变量的(如环境变量中是否有某个值,或者按某个入参的值判断分支)应该优先用脚本。
- 3、涉及 python 的,必须制作脚本,最终以 “python /path/to/script.py” 的模式调用。
- 4、skill 需要的常量(如各种 ID、KEY 等),搭配脚本时优先使用环境变量,搭配 SKILL.md 时优先使用同级目录下的 json 配置。
- 4、**crew 专属 skill**(`crews/<crew-id>/skills/` 下的 skill)如果包含脚本,SKILL.md 中对脚本调用的路径必须使用**绝对路径**写法,即 `python3 /<workspace 绝对路径>/skills/<skill-name>/scripts/<file>` 或 `/<workspace 绝对路径>/skills/<skill-name>/scripts/<file>`。**禁止** `cd <path> && python3 ...` 复合调用、**禁止** `bash <script>` 前缀、**禁止**工作区相对路径 `./skills/...`(实测相对路径 agent 容易误拼 CWD 或误加 `cd`/`bash` 前缀导致 allowlist miss,绝对路径最稳)。

原因:openclaw exec allowlist 按命令前缀匹配,`cd` / `bash` 不在 allowlist 中;agent 的 exec 虽从 workspace CWD 执行,但实测相对路径 `./skills/...` 经常被 agent 误拼或误加前缀,直接用绝对路径最稳。注入到 TOOLS.md 的「exec 命令规范」由 `scripts/lib/agent-skills.sh` 在 setup-crew 时用真实 workspace 绝对路径渲染。

**全局 skill**(`skills/` 目录下,部署到 `~/.openclaw/skills/`)同样优先用绝对路径。openclaw 加载 skill 时会注入 `References are relative to <skill绝对路径>` 提示,agent 据此将 `./scripts/xxx.sh` 解析为绝对路径,该机制可用但仍推荐直接写绝对路径。**不得**使用 `{baseDir}`——这是旧写法,模型经常无法正确推断 `{baseDir}` 的值而误用工作区相对路径。

- 5、skill 需要的常量(如各种 ID、KEY 等),搭配脚本时优先使用环境变量,搭配 SKILL.md 时优先使用同级目录下的 json 配置。

本代码仓的 skill 是给 openclaw 使用的,以上原则是为了适配 openclaw 的规则。

Expand Down Expand Up @@ -61,10 +58,30 @@ metadata:
- `always: true` 的真实语义是"跳过 `requires` 二进制/env 检查直接判定 eligible"(见 `config-eval.ts:124`),**不是**"强制注入整个 SKILL.md"。如果 skill 没声明 `requires`,加 `always: true` 等于无意义,应删除。
- 加载阶段 openclaw 只把 `name` + `description` + SKILL.md 绝对路径塞进 system prompt 的 `<available_skills>` 块;agent 用到时才主动 read 全文。所以 frontmatter 写得再多也不会污染 system prompt,但反过来也意味着——除上述识别字段外,多余字段不会带来任何运行时收益。

## addon 开发规则
## skill 依赖打包规则

产品拆分后(D8)addons/ 结构已销毁,skill 只有两层:

- **公共 skill**:`skills/<name>/`(≥2 crew 共用,部署到 `~/.openclaw/skills/`)
- **crew 专属 skill**:`crews/<crew-id>/skills/<name>/`

涉及依赖包(python/node/go)的 skill,依赖统一在仓根 `requirements.txt` / `package.json` 声明,由 `scripts/install.sh` 一次性安装。不允许单独把某个 skill 配置成独立包。这样部署时自动完成初始化,降低部署工作和风险。务必遵守!

### Python 依赖

在仓根 `requirements.txt` 声明。`scripts/apply-addons.sh` 扫描 `skills/`、`crews/*/skills/`、仓根下所有 `requirements.txt`,合并去重后 `pip install --user`。内容哈希守卫,依赖集变化才重装。

### Node 依赖

每个用到外部 npm 包的 skill,**在自己目录下放一个 `package.json`** 声明 `dependencies`(`type: "module"` 若脚本用 ESM)。`scripts/apply-addons.sh` 扫描所有含 `SKILL.md + package.json` 的 skill 目录,per-skill `npm install --omit=dev`,`node_modules` 落在仓内 skill 目录(`.gitignore` 已覆盖)。内容哈希守卫,`package.json` 变了才重装。

**不要**把 skill 的 Node 依赖写进仓根 `package.json`——`apply-addons.sh` 的 per-skill 扫描不读仓根 `package.json` 的 deps,写进去也不会被装。仓根 `package.json` 只管 `packageManager` 字段。

wiseflow 通过 addon 提供增强能力,包括全局 skill 以及 crew 模板。
**判断 skill 是否需要 `package.json`**:扫 skill 下所有 `.ts`/`.js`/`.mjs` 的 `import ... from "X"`,过滤掉 `node:` 内置和相对路径,若还有残留(如 `cheerio`、`rss-parser`),就需要。现状(2026-07-12 扫描):

务必注意一点:同一个 addon 中所有技能(不管是全局技能还是addon包含的 crew 的专属技能),如果涉及到依赖包(python、node、go)必须整合写到 addon 根目录下。也就是必须把 addon 整体作为一个 python 包或者 node 包,不允许单独把某个 skill 配置成一个包。
| skill | 外部 npm 依赖 | 有 package.json |
|-------|--------------|----------------|
| `crews/main/skills/wx-mp-hunter` | `cheerio` | ✅ |
| `crews/main/skills/rss-reader` | `rss-parser` | ✅ |

这是为了应用 addon 时可以自动完成初始化,降低部署工作和风险。务必遵守!
其余 skill 的脚本只用 Node 内置模块或相对 import,不需要 `package.json`。
116 changes: 116 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# syntax=docker/dockerfile:1
# wiseflow-client Dockerfile(多阶段,bake 出 ~/.openclaw 运行态)
#
# Phase 0 骨架:阶段 1-2 基本可构建;阶段 3-4 含 TODO,待 Phase 6-7
# crew/skill 扁平化 + img-gen 改火山 + camoufox 指纹模板落地后填实。
# 详见 docs/client-buildout.md 与 plan §六。

# ── 阶段 1: workspace-deps ────────────────────────────────────────────────────
# Node24 + pnpm + python3 + camoufox Firefox 二进制 + camoufox-cli(npm 全局)
# 不 bake chromium(fallback attach 的是用户本机 Chrome;patchright-core 仅作
# npm 依赖留给 connectOverCDP 驱动)。
FROM node:24-bookworm AS workspace-deps
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv \
ca-certificates curl git bash \
&& rm -rf /var/lib/apt/lists/*
RUN corepack enable && corepack prepare pnpm@latest --activate
# camoufox-cli 全局 + 下载 Camoufox Firefox 二进制
RUN npm install -g camoufox-cli@0.6.2 && camoufox-cli install --with-deps
# patchright-core 留作 fallback connectOverCDP 驱动(不 bake chromium)
# 在阶段 2 的 pnpm install 里通过 patches/overrides.sh 注入

# ── 阶段 2: build ─────────────────────────────────────────────────────────────
# COPY openclaw + apply patches(patchright override + 005/006)+ pnpm install + build + ui:build
FROM workspace-deps AS build
WORKDIR /opt/openclaw
# openclaw/ 是 clone 的引擎源码(.gitignore 排除,build 期由 build-image.sh 检出注入)
COPY openclaw/ ./openclaw/
COPY patches/ ./patches/
COPY openclaw.version openclaw-weixin.version.json ./
# TODO(Phase 6): apply patches/overrides.sh(patchright override)+ 005/006
# RUN bash patches/overrides.sh apply
WORKDIR /opt/openclaw/openclaw
RUN pnpm install --frozen-lockfile
RUN pnpm build
# TODO(Phase 6): ui:build(若 openclaw 含 UI 子包)
# RUN pnpm --filter ui build

# ── 阶段 3: wiseflow-layer ────────────────────────────────────────────────────
# COPY skills/crews/config → 组织成 /root/.openclaw/ 运行态;统一 npm/pip install;
# 编译改火山的 img-gen gen.py;生成 camoufox 冻结指纹模板。
FROM build AS wiseflow-layer
RUN mkdir -p /root/.openclaw
# TODO(Phase 7): crews 扁平化后 COPY crews/ → /root/.openclaw/workspace-*/
# 注意:Docker 不跑 setup-crew.sh,故不生成 OFB_ENV.md。AGENTS.md 已改为环境
# 自感知(检测 /.dockerenv → 用固定路径 /opt/openclaw + /root/.openclaw),
# 无需 OFB_ENV.md。源码部署仍由 setup-crew.sh 生成 OFB_ENV.md(路径可变)。
# TODO(Phase 7): skills 公共/私有拆分后 COPY skills/ → /root/.openclaw/skills
# Docker 与源码部署同源:均从 config-templates/openclaw.json 派生(单源)。
# 源码部署由 setup-crew.sh §4 在此基础上合并 skills 过滤 / 路径规范化;
# Docker 不跑 setup-crew.sh,直接用模板(content-producer 已在模板 agents.list 预注册)。
COPY config-templates/openclaw.json /root/.openclaw/openclaw.json
# 全仓 Python 依赖(Docker 不跑 apply-addons.sh,需在此 bake)
# 与 scripts/apply-addons.sh 同源(仓根 requirements.txt),使用 aliyun 镜像保持一致
COPY requirements.txt /tmp/wiseflow-requirements.txt
RUN pip3 install --break-system-packages --quiet --no-warn-script-location \
-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com \
-r /tmp/wiseflow-requirements.txt \
&& rm -f /tmp/wiseflow-requirements.txt
# awada channel 插件:COPY 源码 + 预装 ws/zod 运行时依赖(awada 走 relay 网关 HTTP/WS 传输)。
# awada 自己的 node_modules 解析这些依赖,不走 ~/.openclaw/node_modules,故必须装在 awada/ 局部。
COPY awada/ /opt/openclaw/awada/
RUN cd /opt/openclaw/awada && npm install --omit=dev --no-audit --no-fund --loglevel=warn
# 把 awada 插件路径注入 openclaw.json(Docker 不跑 apply-addons.sh,需在此 bake)
RUN node -e "\
const fs=require('fs');const p='/root/.openclaw/openclaw.json';\
const c=JSON.parse(fs.readFileSync(p,'utf8'));\
c.plugins=c.plugins||{};c.plugins.load=c.plugins.load||{};\
c.plugins.load.paths=Array.isArray(c.plugins.load.paths)?c.plugins.load.paths:[];\
c.plugins.load.paths=c.plugins.load.paths.filter(x=>!x.endsWith('/awada'));\
c.plugins.load.paths.push('/opt/openclaw/awada');\
c.plugins.entries=c.plugins.entries||{};\
if(!c.plugins.entries.awada)c.plugins.entries.awada={enabled:false};\
fs.writeFileSync(p,JSON.stringify(c,null,2)+'\n');"
# TODO(Phase 6): 各 skill 的 npm/pip install 统一在此跑
# TODO(Phase 5): img-gen gen.py 改火山生图编译
# Phase 4.5.5: 冻结 camoufox 指纹模板(spike 报告 §"Spike ② D18 落地方式")
# 一次性 bootstrap:清空 profile dir → 跑一次 about:blank 生成 camoufox-cli.json
# → close。运行时各 agent session cp 此模板到独立 profile dir 用
# (D18:不 fork camoufox-cli;不 bake chromium;每 agent 一 session)。
# camoufox-cli 默认 headless,无需额外 flag,避免依赖 Xvfb 虚拟显示(容器内 build 更稳)。
# close --all 兜底清掉任何残留 daemon/进程,避免 build 上下文污染。
#
# 持久化模型(重要):模板的指纹身份 camoufox-cli.json 落在
# /root/.openclaw/logins/_template/ 下——这个路径在阶段 4 被 VOLUME 挂载。
# Docker 首次启动一个空卷时会把镜像里该路径的内容拷进卷,所以模板在首次
# 运行时可见;之后卷里的状态(含各 session cp 出来的指纹)跨容器重建保留。
# 运行时各 session 的 profile dir 应指到 /root/.openclaw/logins/<session>/profile/
# (已挂卷的子路径),别指到 /root/.camoufox-cli/profiles/ 那个默认位置——
# 详见阶段 4 VOLUME 注释。
RUN mkdir -p /root/.openclaw/logins/_template && \
rm -rf /root/.camoufox-cli/profiles/_template && \
camoufox-cli --session _template --persistent --json open about:blank && \
camoufox-cli --session _template close; \
camoufox-cli close --all 2>/dev/null || true; \
cp /root/.camoufox-cli/profiles/_template/camoufox-cli.json \
/root/.openclaw/logins/_template/camoufox-cli.json && \
echo "[wiseflow-layer] camoufox fingerprint template baked to /root/.openclaw/logins/_template"

# ── 阶段 4: runtime ───────────────────────────────────────────────────────────
# 复制产物 + 装 openclaw-weixin 插件(tgz) + ENTRYPOINT
FROM wiseflow-layer AS runtime
# TODO(Phase 6): 装 openclaw-weixin 插件 tgz(按 openclaw-weixin.version.json)
# COPY openclaw-weixin-*.tgz /tmp/ && npm install -g /tmp/openclaw-weixin-*.tgz
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# 持久化卷声明(compose 里用 named volume 挂,好备份好迁移):
# /root/.openclaw 登录态/cookie 中央仓 + 各 session 指纹 profile(首选位置)
# /root/.camoufox-cli camoufox-cli 配置 + 默认 profile dir + geoip/db 运行时缓存
# 两块都挂卷,避免容器重建丢登录态/指纹/缓存。运行时 profile dir 推荐指到
# /root/.openclaw/logins/<session>/profile/(上一卷的子路径,单卷管登录+指纹);
# /root/.camoufox-cli 这块兜底:非持久 session 的默认 profile、geoip db 等也留得住。
VOLUME /root/.openclaw
VOLUME /root/.camoufox-cli
EXPOSE 18789
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
18 changes: 9 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Open Source License

wiseflow is licensed under a modified version of MIT, with the following additional conditions:
xiaobei is licensed under a modified version of MIT, with the following additional conditions:

1. Wiseflow may be utilized commercially. Should the conditions below be met, a commercial license must be obtained from the producer:
1. xiaobei may be utilized commercially. Should the conditions below be met, a commercial license must be obtained from the producer:

a. Multi-tenant service: Unless explicitly authorized by Wiseflow in writing, you may not use the Wiseflow source code to operate a multi-tenant environment.
- Tenant Definition: Within the context of Wiseflow, one tenant corresponds to one workspace.
a. Multi-tenant service: Unless explicitly authorized by xiaobei in writing, you may not use the xiaobei source code to operate a multi-tenant environment.
- Tenant Definition: Within the context of xiaobei, one tenant corresponds to one workspace.
The workspace provides a separated area for each tenant's data and configurations.

b. LOGO and copyright information: In the process of using Wiseflow's frontend, you may not remove or modify the LOGO or copyright information in the Wiseflow console or applications. This restriction is inapplicable to uses of Wiseflow that do not involve its frontend.
b. LOGO and copyright information: In the process of using xiaobei's frontend, you may not remove or modify the LOGO or copyright information in the xiaobei console or applications. This restriction is inapplicable to uses of xiaobei that do not involve its frontend.

- Frontend Definition: For the purposes of this license, the "frontend" of Wiseflow includes all components located in the `web/` directory when running Wiseflow from the raw source code, or the "web" image when running Wiseflow with Docker.
- Frontend Definition: For the purposes of this license, the "frontend" of xiaobei includes all components located in the `web/` directory when running xiaobei from the raw source code, or the "web" image when running xiaobei with Docker.

c. Prohibited usage: Using Wiseflow for commercial web crawling or data harvesting operations.
c. Prohibited usage: Using xiaobei for commercial web crawling or data harvesting operations.

d. Prohibited usage: Using Wiseflow for any unlawful or unauthorized scraping, including activities that violate applicable laws, website terms of service, or robots exclusion directives.
d. Prohibited usage: Using xiaobei for any unlawful or unauthorized scraping, including activities that violate applicable laws, website terms of service, or robots exclusion directives.

e. Prohibited usage: Using Wiseflow to obtain, copy, or distribute content from media platforms and trading platforms or other materials protected by third-party intellectual property rights, unless you have obtained prior explicit authorization from the rights holder.
e. Prohibited usage: Using xiaobei to obtain, copy, or distribute content from media platforms and trading platforms or other materials protected by third-party intellectual property rights, unless you have obtained prior explicit authorization from the rights holder.

2. As a contributor, you should agree that:

Expand Down
Loading
Loading