openclacky 1.1.2 → 1.1.4

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/.clacky/skills/gem-release/SKILL.md +27 -31
  3. data/CHANGELOG.md +30 -0
  4. data/Dockerfile +28 -0
  5. data/README.md +4 -0
  6. data/README_CN.md +198 -0
  7. data/docs/engineering-article.md +343 -0
  8. data/lib/clacky/agent/llm_caller.rb +2 -5
  9. data/lib/clacky/agent/session_serializer.rb +4 -0
  10. data/lib/clacky/agent.rb +22 -1
  11. data/lib/clacky/brand_config.rb +87 -5
  12. data/lib/clacky/cli.rb +1 -1
  13. data/lib/clacky/client.rb +15 -11
  14. data/lib/clacky/message_format/anthropic.rb +30 -2
  15. data/lib/clacky/message_format/bedrock.rb +13 -1
  16. data/lib/clacky/message_format/open_ai.rb +5 -1
  17. data/lib/clacky/providers.rb +34 -0
  18. data/lib/clacky/server/channel/adapters/dingtalk/adapter.rb +142 -5
  19. data/lib/clacky/server/channel/adapters/dingtalk/api_client.rb +309 -0
  20. data/lib/clacky/server/http_server.rb +130 -15
  21. data/lib/clacky/server/session_registry.rb +9 -6
  22. data/lib/clacky/ui2/ui_controller.rb +14 -0
  23. data/lib/clacky/ui_interface.rb +14 -0
  24. data/lib/clacky/utils/model_pricing.rb +96 -25
  25. data/lib/clacky/version.rb +1 -1
  26. data/lib/clacky/web/app.css +1286 -1116
  27. data/lib/clacky/web/brand.js +20 -5
  28. data/lib/clacky/web/i18n.js +42 -0
  29. data/lib/clacky/web/index.html +26 -7
  30. data/lib/clacky/web/onboard.js +6 -0
  31. data/lib/clacky/web/sessions.js +194 -11
  32. data/lib/clacky/web/settings.js +51 -10
  33. data/lib/clacky/web/skills.js +53 -31
  34. data/lib/clacky/web/vendor/hljs/highlight.min.js +1244 -0
  35. data/lib/clacky/web/vendor/hljs/hljs-theme.css +95 -0
  36. data/scripts/build/lib/apt.sh +30 -10
  37. data/scripts/build/lib/network.sh +3 -2
  38. data/scripts/install.sh +30 -9
  39. data/scripts/install_browser.sh +2 -1
  40. data/scripts/install_full.sh +2 -1
  41. data/scripts/install_rails_deps.sh +30 -9
  42. data/scripts/install_system_deps.sh +30 -9
  43. metadata +7 -17
  44. data/docs/HOW-TO-USE-CN.md +0 -96
  45. data/docs/HOW-TO-USE.md +0 -94
  46. data/docs/browser-cdp-native-design.md +0 -195
  47. data/docs/c-end-user-positioning.md +0 -64
  48. data/docs/config.example.yml +0 -27
  49. data/docs/deploy-architecture.md +0 -619
  50. data/docs/deploy_subagent_design.md +0 -540
  51. data/docs/install-script-simplification.md +0 -89
  52. data/docs/memory-architecture.md +0 -343
  53. data/docs/openclacky_cloud_api_reference.md +0 -584
  54. data/docs/security-design.md +0 -109
  55. data/docs/session-management-redesign.md +0 -202
  56. data/docs/system-skill-authoring-guide.md +0 -47
  57. data/docs/why-developer.md +0 -371
  58. data/docs/why-openclacky.md +0 -266
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47f1d9f1ecb4338e0a19ce771dea37724ebfc70d9e0052dc7403e096a25c415d
4
- data.tar.gz: 6887db06529972b393c75c92e17b47da8294abae765ceff7280d71943a160c85
3
+ metadata.gz: 4107ac9d894f9af9647f19152855f13854d4cfebd8013d2d22057ca98de87274
4
+ data.tar.gz: 3c86e0b865cccc27f8c785f39c49384744ad4e6cce6cdf257ca0485f1d62c260
5
5
  SHA512:
6
- metadata.gz: b49465d66eb2be634790d10813ac5988aca23f54a4d3c36c9690bd40bf0024ea5f7275b3bc1b89247aaa16cc30dbf1c1439733c51bdfc1f5750e02c7efbc8e80
7
- data.tar.gz: f0f4397dd4cca183f199545e7c5db6b4902382c66c237257e8b2a99847e49702881dd8bcf60a78201ee18526ae2b04bd4217bf6def502ccf3ce8a7fb6fb0bdd0
6
+ metadata.gz: e6d66fd62f6434c05420f5f639a412fb953e49634c3f0740f155a2d20b70d91acb12a9844a61330f0761d88ff2c284a1d071f0590b3e53553bd11d57a035669f
7
+ data.tar.gz: c64f138d54a5397ba0a49b6878b79576f12b6fc2dec05f7e4b24b5eaf3490060743a0e3a20da17b6cf47476a85eaa093742b616b5be9ab65859db6e8db035404
@@ -121,48 +121,44 @@ The script runs all steps sequentially and stops on any failure. Monitor the out
121
121
 
122
122
  ### 4. Present release summary
123
123
 
124
- After the script completes successfully, present this summary:
124
+ After the script completes successfully, present a concise summary. The output will often be read in WeChat, so keep it compact and avoid template-like formatting that triggers message folding.
125
125
 
126
- ```
127
- 🎉 v{version} released successfully!
128
-
129
- Highlight: [One sentence — the biggest user-visible change, verb + value phrasing]
126
+ Rules:
127
+ - No emojis
128
+ - No tables (use a compact list if you need to list items)
129
+ - No multi-line code blocks
130
+ - Write as a natural, flowing message — not a structured report
131
+ - Skip "More" / chore items unless they directly affect users
132
+ - Write from the user's perspective — what they can now do, or what problem is fixed
133
+ - Translate technical terms into plain language
134
+ - Keep each item one sentence, action-oriented
130
135
 
131
- 📦 What's new for users:
136
+ Format (flexible adapt as needed, but roughly):
132
137
 
133
- **New Features**
134
- - [translate each "Added" item into plain user-facing language]
138
+ ```
139
+ v{version} released.
135
140
 
136
- **Improvements**
137
- - [translate each "Improved" item into plain user-facing language]
141
+ [One sentence highlight — the biggest user-visible change.]
138
142
 
139
- **Bug Fixes**
140
- - [translate each "Fixed" item into plain user-facing language]
143
+ Added:
144
+ - [translate each "Added" item]
145
+ - ...
141
146
 
142
- 🧪 Testing suggestions:
143
- | Feature | How to verify |
144
- |---------|--------------|
145
- | [key new feature] | [concrete steps to test] |
147
+ Improved:
148
+ - [translate each "Improved" item]
149
+ - ...
146
150
 
147
- 🔗 Links:
148
- - RubyGems: https://rubygems.org/gems/openclacky/versions/{version}
149
- - GitHub Release: https://github.com/clacky-ai/openclacky/releases/tag/v{version}
151
+ Fixed:
152
+ - [translate each "Fixed" item]
153
+ - ...
150
154
 
151
- ⬆️ Upgrade:
152
- - In the Clacky UI, click "Upgrade" in the bottom-left detect new version → click upgrade → done
153
- - Manual upgrade (CLI): gem update openclacky
155
+ Upgrade: click "Upgrade" in Web UI bottom-left, or `gem update openclacky`
156
+ Fresh install: curl -sSL https://raw.githubusercontent.com/clacky-ai/openclacky/main/scripts/install.sh | bash
154
157
 
155
- 🆕 Fresh install:
156
- /bin/bash -c "$(curl -sSL https://raw.githubusercontent.com/clacky-ai/openclacky/main/scripts/install.sh)"
158
+ RubyGems: https://rubygems.org/gems/openclacky/versions/{version}
159
+ GitHub: https://github.com/clacky-ai/openclacky/releases/tag/v{version}
157
160
  ```
158
161
 
159
- Summary writing rules:
160
- - Write from the user's perspective — what they can now do, or what problem is fixed
161
- - Avoid technical jargon; explain what things mean
162
- - Skip "More" / chore items unless they directly affect users
163
- - Keep each bullet to one sentence, action-oriented
164
- - Testing suggestions: 3–8 items with concrete, actionable verification steps
165
-
166
162
  ## Pre-Release Caveats
167
163
 
168
164
  When releasing a pre-release version, inform the user of these behaviors:
data/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.4] - 2026-05-22
9
+
10
+ ### Added
11
+ - Thinking level control for AI models, configurable per provider
12
+ - Free brand customization support
13
+ - Syntax highlighting and per-block copy button for code blocks in Web UI (#152)
14
+ - Font size setting (small/medium/large) with proportional UI scaling in Web UI (#147)
15
+ - Chinese README documentation (#148)
16
+
17
+ ### Improved
18
+ - Unify POST /api/file-action with download support for remote deployments (#153)
19
+ - Hover interaction polish across Web UI
20
+
21
+ ### Fixed
22
+ - Upgrade hot reload no longer leaves stale process (#143)
23
+
24
+ ## [1.1.3] - 2026-05-20
25
+
26
+ ### Added
27
+ - Qwen3.6 (qwen3.6) model provider
28
+ - Provider dropdown auto-focuses when opening model config in onboarding and settings
29
+ - Dockerfile for containerized deployment
30
+ - Debian apt mirror support for CN users, with refactored mirror configuration
31
+
32
+ ### Fixed
33
+ - History file parsing incorrectly handles certain message formats
34
+ - DeepSeek model pricing and token counting
35
+ - Compression progress bar display during message compression
36
+ - DingTalk: markdown message rendering, file/image delivery failures, and inbound file message type handling
37
+
8
38
  ## [1.1.2] - 2026-05-20
9
39
 
10
40
  ### Added
data/Dockerfile ADDED
@@ -0,0 +1,28 @@
1
+ FROM ruby:3.4.4-slim AS builder
2
+
3
+ RUN apt-get update && apt-get install -y \
4
+ build-essential \
5
+ curl \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ RUN gem install openclacky --no-document
9
+
10
+ FROM ruby:3.4.4-slim
11
+
12
+ RUN apt-get update && apt-get install -y \
13
+ git \
14
+ curl \
15
+ python3 \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ COPY --from=builder /usr/local/bundle /usr/local/bundle
19
+
20
+ RUN curl https://mise.run | sh
21
+ ENV PATH="/root/.local/bin:$PATH"
22
+
23
+ VOLUME ["/root/.clacky"]
24
+
25
+ EXPOSE 7070
26
+
27
+ ENTRYPOINT ["openclacky"]
28
+ CMD ["server", "--host", "0.0.0.0"]
data/README.md CHANGED
@@ -6,6 +6,10 @@
6
6
  [![Downloads](https://img.shields.io/gem/dt/openclacky?label=downloads&style=flat-square&color=brightgreen)](https://rubygems.org/gems/openclacky)
7
7
  [![License](https://img.shields.io/badge/license-MIT-lightgrey?style=flat-square)](LICENSE.txt)
8
8
 
9
+ <p align="center">
10
+ <a href="README.md">English</a> · <a href="README_CN.md">简体中文</a>
11
+ </p>
12
+
9
13
  **The most Token-efficient open-source AI Agent.**
10
14
 
11
15
  OpenClacky matches Claude Code on capability at comparable cost, and saves significantly against other open-source agents (~50% vs OpenClaw, ~3× cheaper than Hermes). 100% open source (MIT), BYOK with any OpenAI-compatible model, built on two years of Agentic R&D and harness engineering.
data/README_CN.md ADDED
@@ -0,0 +1,198 @@
1
+ # OpenClacky
2
+
3
+ [![Build](https://img.shields.io/github/actions/workflow/status/clacky-ai/openclacky/main.yml?label=build&style=flat-square)](https://github.com/clacky-ai/openclacky/actions)
4
+ [![Release](https://img.shields.io/gem/v/openclacky?label=release&style=flat-square&color=blue)](https://rubygems.org/gems/openclacky)
5
+ [![Ruby](https://img.shields.io/badge/ruby-%3E%3D%203.1.0-red?style=flat-square)](https://www.ruby-lang.org)
6
+ [![Downloads](https://img.shields.io/gem/dt/openclacky?label=downloads&style=flat-square&color=brightgreen)](https://rubygems.org/gems/openclacky)
7
+ [![License](https://img.shields.io/badge/license-MIT-lightgrey?style=flat-square)](LICENSE.txt)
8
+
9
+ **最省 Token 的开源 AI Agent。**
10
+
11
+ OpenClacky 在任务能力上对齐 Claude Code,成本相当,同时相比其他开源 Agent 有显著优势(约节省 50% vs OpenClaw,约便宜 3× vs Hermes)。100% 开源(MIT),支持 BYOK 接入任意 OpenAI 兼容模型,背后是两年 Agentic 研发与 Harness 工程积累。
12
+
13
+ > 官网:https://www.openclacky.com/ · 投资方:**奇绩创坛 · 真格基金 · 红杉中国 · 高瓴资本**
14
+
15
+ ## 为什么选 OpenClacky?
16
+
17
+ 同一个任务,你要花多少钱?在可比的 Agent 工作负载下,OpenClacky 相比主流方案节省了大量 Token 费用。
18
+
19
+ | Agent | 相对成本 | 备注 |
20
+ |---|---|---|
21
+ | **OpenClacky** | **~0.8×** | 16 个工具 · 近 100% 缓存命中 · 子 Agent 路由 |
22
+ | Claude Code | 1.0×(基准) | 世界级 Harness,闭源订阅制 |
23
+ | OpenClaw | ~1.5× | 能力对标的 Harness Agent |
24
+ | Hermes | ~3× | 52 个内置工具,Schema 体积膨胀 ~3–4× |
25
+
26
+ *数据为内部常见 Agent 任务均值,以 Claude Code 为基准。完整基准测试报告将在 GitHub 发布。*
27
+
28
+ ## 功能对比
29
+
30
+ 核心 Agent 能力各家大致对齐,真正的差异在于**成本、开放性、Skill 进化能力和集成支持**。
31
+
32
+ | 功能 | Claude Code | OpenClaw | Hermes | **OpenClacky** |
33
+ |---|:---:|:---:|:---:|:---:|
34
+ | Token 成本 | 1.0× | ~1.5× | ~3× | **~0.8×** |
35
+ | 开源 | ❌ 闭源 | ✅ 开源 | ✅ 开源 | ✅ MIT |
36
+ | BYOK / 自由选模型 | ❌ 仅限 Anthropic | ✅ | ✅ | ✅ |
37
+ | Skill 自我进化 | ❌ | ❌ | ✅ | ✅ |
38
+ | IM 集成(飞书/企微/微信/Discord/Telegram) | ❌ | ✅ | ✅ | ✅ |
39
+
40
+ ## 成本是怎么降下来的
41
+
42
+ 不是靠裁剪功能——而是在每一层都做了正确的取舍,效果叠加。
43
+
44
+ ### 1. 极高缓存命中率
45
+ Session 不重启、双缓存标记、**先插入再压缩**——System Prompt 从不被修改,压缩后仍能复用缓存。**实测缓存命中率:接近 100%。**
46
+
47
+ ### 2. 极简工具集
48
+ 仅 **16 个核心工具**。扩展能力通过一个 `invoke_skill` 元工具交给 Skill 生态承载。工具数量不是指标——任务完成率才是。
49
+
50
+ | OpenClacky | Claude Code | OpenClaw | Hermes |
51
+ |:--:|:--:|:--:|:--:|
52
+ | **16** | 40+ | 23 | 52 |
53
+
54
+ ### 3. 空闲时自动压缩
55
+ 去开个会、倒杯咖啡——Agent 在后台压缩长上下文并预热缓存。你回来发第一条消息就能直接命中缓存。**冷启动首 Token 成本降低 50%+。**
56
+
57
+ ### 4. BYOK——你选模型,你定成本
58
+ 任意 OpenAI 兼容 API,即插即用。官方直连、聚合路由、兼容中转——100% 由你决定。代码用 Claude,子任务自动路由到 DeepSeek,再省一截。
59
+
60
+ 背后是 **2 年 · 3 代 Agentic 架构 · 6 个核心 Harness 工程决策**的积累。
61
+
62
+ ## Skills——Agent 的灵魂
63
+
64
+ - **`/` 唤起** — 即时浏览、模糊搜索、直接调用。数百个 Skill 触手可及。
65
+ - **用自然语言创建 Skill** — 描述你想要的,Agent 自动起草 `SKILL.md`、拆解步骤、跑验证。无需写代码。
66
+ - **自我进化** — 每次运行后,Agent 根据执行上下文和结果更新 Skill。下次调用更稳定、更精准。
67
+ - **开放兼容** — 支持 Claude Skills / Markdown Pack / 自定义格式。
68
+ - **可变现** — 打磨好的 Skill 可打包出售,支持加密分发、License 管理、创作者自定价。
69
+
70
+ ## 安装
71
+
72
+ ### 桌面安装器(推荐)
73
+
74
+ 双击安装,环境、依赖、Skill 全部自动配置好。
75
+
76
+ - **macOS** — [下载 `.dmg`](https://oss.1024code.com/openclacky-installer/official/openclacky-installer.dmg)(Apple Silicon / Intel)
77
+ - **Windows** — [下载 `.exe`](https://oss.1024code.com/openclacky-installer/official/openclacky-installer.exe)(Windows 10 2004+ / Windows 11)
78
+
79
+ 更多选项:https://www.openclacky.com/
80
+
81
+ ### 命令行安装
82
+
83
+ 一键安装(Mac/Ubuntu):
84
+
85
+ ```bash
86
+ /bin/bash -c "$(curl -sSL https://raw.githubusercontent.com/clacky-ai/openclacky/main/scripts/install.sh)"
87
+ ```
88
+
89
+ Windows:
90
+
91
+ ```bash
92
+ powershell -c "& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/clacky-ai/openclacky/main/scripts/install.ps1')))"
93
+ ```
94
+
95
+ 或使用 Ruby(3.x/4.x):
96
+
97
+ **环境要求:** Ruby >= 3.1.0
98
+
99
+ ```bash
100
+ gem install openclacky
101
+ ```
102
+
103
+ 详见:https://www.openclacky.com/docs/installation
104
+
105
+ ## 快速开始
106
+
107
+ ### 终端(CLI)
108
+
109
+ ```bash
110
+ openclacky # 在当前目录启动交互式 Agent
111
+ ```
112
+
113
+ ### Web UI
114
+
115
+ ```bash
116
+ openclacky server # 默认地址:http://localhost:7070
117
+ ```
118
+
119
+ 打开 **http://localhost:7070**,享受完整的聊天界面,支持多 Session 并行——同时跑编码、文案、研究等多个任务。
120
+
121
+ 选项:
122
+
123
+ ```bash
124
+ openclacky server --port 8080 # 自定义端口
125
+ openclacky server --host 0.0.0.0 # 监听所有接口(支持远程访问)
126
+ ```
127
+
128
+ ## 配置
129
+
130
+ ```bash
131
+ $ openclacky
132
+ > /config
133
+ ```
134
+
135
+ 设置你的 **API Key**、**模型**和 **Base URL**(任意 OpenAI 兼容提供商)。
136
+
137
+ 开箱即支持:**Claude (Anthropic) · GPT (OpenAI) · DeepSeek · Kimi (Moonshot) · MiniMax · OpenRouter**,或任意自定义端点。
138
+
139
+ ## 代码开发场景
140
+
141
+ OpenClacky 是一款通用 AI 编程助手——搭建全栈应用脚手架、添加功能,或快速探索陌生代码库:
142
+
143
+ ```bash
144
+ $ openclacky
145
+ > /new my-app # 创建新项目脚手架
146
+ > 添加邮箱密码登录功能
147
+ > 支付模块是怎么实现的?
148
+ ```
149
+
150
+ ## Star 历史
151
+
152
+ <a href="https://www.star-history.com/?repos=clacky-ai%2Fopenclacky&type=date&legend=top-left">
153
+ <picture>
154
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=clacky-ai/openclacky&type=date&theme=dark&legend=top-left" />
155
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=clacky-ai/openclacky&type=date&legend=top-left" />
156
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=clacky-ai/openclacky&type=date&legend=top-left" />
157
+ </picture>
158
+ </a>
159
+
160
+ ## 进阶——创作者计划
161
+
162
+ 已有深度用户将自己的工作流打磨成垂直 AI 专家在 OpenClacky 上发布——支持加密分发、License 管理、自定义定价。法律、医疗、财务规划等领域均有落地。
163
+
164
+ 了解更多:https://www.openclacky.com/ → Creators
165
+
166
+ ## 从源码安装
167
+
168
+ ```bash
169
+ git clone https://github.com/clacky-ai/openclacky.git
170
+ cd openclacky
171
+ bundle install
172
+ bin/clacky
173
+ ```
174
+
175
+ ## 信任与背书
176
+
177
+ - **100% 开源** — MIT 协议,所有代码公开,所有决策可溯源
178
+ - **2 年 Agentic 研发** — 经历 3 代架构演进
179
+ - **16 个核心工具** — 极简设计
180
+ - **投资方** — 奇绩创坛 · 真格基金 · 红杉中国 · 高瓴资本
181
+
182
+ ## 关注作者公众号
183
+
184
+ 本项目由 **李亚飞** 创立并主导开发。如果你对 AI Agent 工程、Harness 设计、创业经历感兴趣,欢迎关注微信公众号: **技术达人李亚飞**
185
+
186
+ 近期文章:
187
+
188
+ - [从 ShowMeBug 到 OpenClacky:我对 AI 时代的 4 次下注](https://mp.weixin.qq.com/s/wTW-IU5Czu-OpJTFh_mwgA)
189
+ - [我把 AI 账单从 30 美金打到 5 美金](https://mp.weixin.qq.com/s/BDhE0y8xbX0ea3vLlV37Ig)
190
+ - [100% Cache 命中的 Harness 怎么设计:一个开源 AI Agent 的 7 个工程决策](https://mp.weixin.qq.com/s/Rc1xk0Qw168D4Y07kkBiGQ)
191
+
192
+ ## 参与贡献
193
+
194
+ 欢迎在 GitHub 提交 Bug 报告和 Pull Request:https://github.com/clacky-ai/openclacky 。参与贡献者须遵守[行为准则](https://github.com/clacky-ai/openclacky/blob/main/CODE_OF_CONDUCT.md)。
195
+
196
+ ## 许可证
197
+
198
+ 基于 [MIT 协议](https://opensource.org/licenses/MIT) 开源发布。