Commit Graph

133 Commits

Author SHA1 Message Date
程序员阿江(Relakkes) 570652b82c docs: refresh bilingual README covers 2026-09-07 22:14:13 +08:00
程序员阿江(Relakkes) b1b5a6d678 docs: switch community to WeCom and make Chinese README default
- Add 新功能支持 issue template, refine bug/question templates with a
  pointer to the user group
- Replace the Feishu user group QR with the WeChat Work group QR in both
  READMEs, include contact info for enterprise/Agent customization
- Make the Chinese README the default README.md, keep the English one as
  README.en.md, update language badges on both
- Update PR change policy, pr-triage docs set and site docs check for the
  renamed README files

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-06 15:57:41 +08:00
程序员阿江(Relakkes) c91f844712 docs: streamline agent guidance for GPT-6 Astra 2026-09-06 14:37:38 +08:00
程序员阿江(Relakkes) 814c02a786 feat(im): add scan-to-create Feishu bots plus WeCom, QQ and Slack adapters
Connecting Feishu meant creating a bot by hand on the open platform and
pasting an App ID and App Secret back. Feishu also exposes an RFC 8628
device-authorization flow, so the desktop can now render a QR code, and
confirming it in the app creates the bot and stores its credentials
directly. `adapters/feishu/registration.ts` implements that protocol
rather than importing `registerApp` from `@larksuiteoapi/node-sdk@1.73`:
the repository pins 1.60 for the chat client, and the SDK runs the whole
poll inside one un-cancellable promise where the desktop needs the
stateless begin/poll pair the DingTalk registration already uses. The
scan is create-only, so it can never rewrite the configuration of a bot
the user already runs, and it pre-fills exactly the scopes, events and
callbacks this adapter calls. International tenants finish on Lark's
domain, which is now persisted and honoured by the client.

WeCom, QQ and Slack join the same session model. WeCom and QQ bind by
scanning; Slack has no scan flow, so it uses an app manifest that
pre-fills the scopes and Socket Mode. All three run over long
connections, so no public callback URL is needed, and all three accept
private chats only — pairing authorizes one person, and answering in a
group would extend that authorization to everyone else in the room.

They are built on a new `adapters/common/chat-runtime.ts` instead of a
fourth copy of the loop the five existing adapters each carry. A platform
supplies a `ChatPort` — how to say something, how to open a streaming
reply, optionally how to send an image — and the runtime owns pairing,
command routing, session restore, permission bookkeeping and the
translation of the server's stream. The existing five are deliberately
left on their own copies; migrating them is a separate change with its
own regression surface.

Attachments are downloaded through a deferred loader that runs after the
pairing gate and inside the per-chat queue. Resolving them eagerly would
let an unpaired stranger make the adapter fetch bytes and write them
under ~/.claude/im-downloads — on Slack with the bot token attached —
and would let a slow attachment overtake a text message sent after it.

The sidecar launcher's per-adapter branches become one table. It is
declared above the mode dispatch on purpose: `runAdapters` is hoisted and
runs at module top level, so a table declared below it is still in its
temporal dead zone when the adapters mode reads it — which type checks,
lints and unit tests all miss, and only the compiled binary reveals.

Verified with the checks `check:impact` selects: adapters, server,
desktop, electron, policy, chat-contract, agent-flow, docs, native
(sidecar compile, packaging and an adapters-mode smoke against the real
binary) and coverage. The scan flows themselves are not verified against
live platforms — that needs real WeCom, QQ and Slack accounts and would
create real bots.

Claude-Session: https://claude.ai/code/session_01CCGoP316AK7wdQG3Ms6Uwq
2026-09-05 23:46:50 +08:00
程序员阿江(Relakkes) aa237f2c22 feat(desktop): expose conversation-only rewind (#1273) 2026-09-01 21:33:55 +08:00
程序员阿江(Relakkes) 8a37865536 fix(computer-use): harden native macOS automation runtime 2026-09-01 20:06:25 +08:00
程序员阿江(Relakkes) dd4edc0efe merge: bring main into the computer-use worktree
main is 87 commits ahead and carries a large amount of fixed behaviour this
branch should not be re-deciding. The rule applied throughout: this worktree
owns Computer Use, main owns everything else.

Only 12 files were touched on both sides, and Git merged all of them without
reporting a conflict — but two of those silent merges were wrong, and neither
was visible until the checks ran.

`desktop/src/api/client.ts` ended up with two `apiGetBlob` implementations.
Both sides had independently hit the same problem (an `<img src>` pointed at an
API endpoint is a cross-origin subresource, so it carries no Authorization
header and the server's fetch-metadata policy refuses it) and both had written
the same fix. Git saw two additions in different places and kept both, which
does not even compile. main's version survives: it builds its headers through
the shared `buildHeaders()` rather than assembling them inline, so it inherits
whatever main adds there later.

`src/server/api/computer-use.ts` still imported `runtime/mac_helper.py` and
`runtime/requirements.txt` as compile-time text, both deleted on this branch.
Nothing at runtime referenced them, which is why the deletion looked clean; the
bundler resolves those imports when the server module is loaded, so the failure
surfaced only when the tests actually imported it. That path is now Windows-only
in the same sense the rest of the Python bridge is, and it also ships
`win_cursor_badge.py`, which the badge needs because it runs as its own process.

`computer-use-requirements.test.ts` drops its darwin half for the same reason —
the pins it guards still matter, but only one requirements file is left.

Verified: server 3869 tests / 331 files, desktop 4612 tests / 319 files
(lint + tsc + build), Swift 272 XCTest + 14 Swift Testing, Python 25.

Claude-Session: https://claude.ai/code/session_015j1yxxaoonyAS2iZ7qGnTS
2026-08-23 18:39:47 +08:00
程序员阿江(Relakkes) 9f5c1951a2 fix(desktop): reuse model picker for agent settings 2026-08-14 16:43:44 +08:00
程序员阿江(Relakkes) 8673f2092a chore(sponsor): remove TeamoRouter sponsor and provider preset 2026-08-13 08:36:50 +08:00
程序员阿江(Relakkes) 3cb9e24faa docs: add Atlas Cloud sponsor to READMEs
Add Atlas Cloud to the sponsor tables in both README.md and
README.zh-CN.md, using a cc-haha-specific campaign link. Ship
light/dark logo variants so the wordmark stays visible in both
GitHub themes.
2026-08-11 07:58:53 +08:00
程序员阿江(Relakkes) ffa2b59105 docs(agents): reserve agent-browser for its committed lanes
The instruction files told every coding agent to reach for agent-browser
whenever a change needed browser-level evidence: copilot-instructions
listed "E2E or agent-browser smoke" as the remedy for cross-boundary
flows, and both contributing guides repeated it. That wording outlived
the tool. With the agent-browser skill uninstalled, agents still parsed
those lines as a recommendation and went looking for the binary instead
of using the browser skill that is actually installed.

Deleting the references would have made the docs wrong. agent-browser is
still a real dependency: check:desktop-ui-smoke spawns it on Linux CI,
and seven maintainer-run e2e scripts under desktop/scripts drive it
directly. It cannot be swapped for ego-browser either — ego lite is a
macOS-only GUI app with no headless mode and a one-time interactive
onboarding, so it cannot run on ubuntu-latest at all.

So the lanes keep the binary and the prose loses the recommendation.
agent-browser is now described as an implementation detail of those two
call sites, and ad-hoc browser work — manual verification, screenshots,
exploratory UI checks — is pointed at the ego-browser skill.

The quality contract asserted the old string, so it would have failed
closed on the reworded line. It now pins the replacement plus the new
routing rule; flipping either sentence turns the test red.
2026-08-09 19:03:50 +08:00
程序员阿江(Relakkes) dce696fbae feat(agents): override built-in agent model and effort
Built-in agents pin their own models — Explore and claude-code-guide run
on Haiku, statusline-setup on Sonnet — and there was no way to change
that. The only override mechanism was a same-named user agent, which
replaces the definition wholesale: AGENT_SLUG_PATTERN is lowercase-only
so `Explore` and `Plan` cannot even be created, and a replacement loses
the runtime getSystemPrompt and the built-in tool privileges keyed off
`source`. CLAUDE_CODE_SUBAGENT_MODEL is the only other lever and forces
every subagent onto one model.

Add `builtInAgentOverrides` to settings.json, carrying model and effort
per agentType. It is applied in getBuiltInAgents(), the single choke
point every consumer goes through, so the effective value reaches
spawning, `/agents` and the desktop list without any of them knowing an
override exists — and `source` stays `built-in`, preserving the prompt
and tool privileges.

Three constraints are load-bearing rather than stylistic:

- `model: "inherit"` is a real value, not a reset. Built-in defaults
  differ per agent and per build, so clearing means deleting the field;
  the entry and then the key are removed once empty.
- getSystemPrompt is never wrapped. serializeActiveAgent branches on
  `.length === 0`, and claude-code-guide declares one parameter while
  the others declare none, so a wrapper makes it destructure undefined.
- The settings write is a read-modify-write inside the file lock.
  updateUserSettings is a top-level shallow merge and would replace the
  whole record, losing an update when two agents are changed in quick
  succession.

strictPluginOnlyCustomization is enforced when resolving, not only when
writing, since settings.json is user-editable by definition.

Also surface edit and delete on the agent list rows. Both already
existed but were reachable only after opening an agent's detail page.
Rows become a div with the primary button and the actions as siblings
rather than nested buttons, keep focus-within so the controls are not
tabbable while invisible, and stay visible on touch where hover never
fires. Built-in rows get the override entry point and no delete.

The store's create/update/override paths now share runAgentMutation
instead of a third hand-copy of the out-of-order guards; the existing
store tests pass unchanged.
2026-08-07 23:47:15 +08:00
程序员阿江(Relakkes) a54760552b refactor(computer-use): drop the capture glow, keep the virtual cursor
The glowing border framed the app being driven. It was purely decorative and
the user asked for it to go — the animated cursor already shows what Claude is
acting on.

It was not, as suspected, interfering with clicks: the overlay is
`ignoresMouseEvents`, sits at `CGShieldingWindowLevel()`, and every window
enumeration in `WindowGeometry` filters to `layer == 0`, so it could not enter
any hit-test or occlusion decision. It went because it earns nothing, not
because it broke anything.

`WindowFrameTracker` goes with it: its own header says it exists to keep the
glow glued to a moving window, and nothing else referenced it. That also
resolves the "30Hz CGWindowList polling" entry on the redesign doc's cut list —
the polling was the tracker's fallback path, so it is gone rather than reduced.

`NonAnimatedGradientLayer` moved into `VirtualCursor.swift`. It lived in the
glow file but the cursor's orb needs it too (without it Core Animation's
implicit 0.25s actions smear every frame change), and the compiler caught the
dangling reference.

`overlay_show` now only reveals the cursor, so `playSound` and
`stopOverlaySession(animated:)` lost their only consumers. The TypeScript side
had eleven comments describing a border that no longer exists; they now describe
what the code does.
2026-08-06 04:51:14 +08:00
程序员阿江(Relakkes) 38e2f11253 fix(rewind): stop blocking undo on unrecognized tools (#1192)
restoreAvailable conflated two questions: whether the files this checkpoint
reports can be put back, and whether the checkpoint saw every file the turn
touched. Any tool outside an 18-name allowlist — Bash, PowerShell, TaskCreate,
every MCP tool — forced the second to false, and one such call anywhere from
the target turn onward disabled undo for the whole range. In practice that is
every real turn, so v0.5.3 shipped with undo effectively dead.

Split the two. restoreAvailable now answers only the first question.
The second becomes unverifiedChangeSources: tool names whose file effects the
checkpoint could not capture. Undo stays available and restores exactly the
files it lists, and the card, the confirmation, and the completion toast each
name what it is leaving behind. An unrecognized tool now costs a warning
instead of the feature. A transcript that cannot be read still blocks, because
then even the reported file list may be wrong.

Bash calls are classified against the existing read-only allowlist via a new
recordedCommandIsReadOnly, which drops the sandbox/cwd checks that describe the
live process rather than the replayed session. `git status` no longer warns at
all, so the warning means something when it appears.

Rewind also takes a mode. `conversation` skips the file restore entirely, so a
turn whose files cannot be restored no longer costs the user the ability to
back out of the prompt — matching how upstream keeps Restore conversation
independent of Restore code.

Files written by shell commands were never recoverable here; the checkpoint
only ever covered the structured file tools. Reporting that is honest, and
docs now say so.
2026-08-06 00:27:51 +08:00
程序员阿江(Relakkes) 94168b3b57 fix(adapters): restore IM /projects beyond the default project (#1191)
Since v0.5.1 every IM channel listed only the default project. All five
adapters passed the default work dir to AdapterHttpClient as the sole
allowed project root, so listRecentProjects filtered out everything else;
matchProject, listSessions, sessionExists, createSession and listSkills
were clamped the same way. Feishu is where it was reported, but telegram,
wechat, dingtalk and whatsapp were identical.

defaultWorkDir is documented as where a new IM session starts, not as an
access boundary. Using it as the boundary failed both ways: configured, it
hid every other project; blank, it falls back to PWD/cwd(), which is "/"
for a GUI-launched sidecar, so the boundary allowed the whole filesystem.

Split the two concepts. allowedProjectRoots is now its own setting (global,
per-platform, or ADAPTER_ALLOWED_PROJECT_ROOTS), resolved together with the
work dir by resolveAdapterWorkspace so the default project is always inside
the boundary and /new cannot fail on inconsistent config. The default is the
home directory; it refuses to inherit "/" or any ancestor of home. Pairing
remains the primary authorization control, so unusable roots warn and fall
back rather than locking the bot out.

All five entrypoints now build their client through createAdapterClient
instead of repeating the wiring, which is what let one defect appear in five
places at once.

Known gap, left for a follow-up: a project outside the boundary is still
reported as "not found" rather than "outside the allowed directories".
2026-08-06 00:27:51 +08:00
Relakkes Yang 69f73601c5 docs: add signing and privacy policies 2026-08-05 23:35:41 +08:00
程序员阿江(Relakkes) b8a90626ce feat(computer-use): native macOS engine, on top of main and nothing else
Rebuilt against main so the branch carries the Computer Use work and no other
divergence. Three unrelated efforts had been sitting uncommitted in this
worktree and were swept into an earlier commit; they are preserved on
cu-worktree-full-backup and belong on their own branches — adapter control
credentials, Electron asar sealing, and the sidecar code-loading audit. Every
file outside Computer Use now matches main exactly.

The engine
  A Swift helper drives apps through the accessibility tree, with coordinate
  actuation for the Chromium and Electron apps whose tree is a bare window
  frame. Ten primitives matching the shape Codex uses, so an app's guidance and
  the model's habits transfer.

  Coordinate actions resolve their target window once and refuse when none can
  be named. The unbound event they used to fall back to is discarded by custom
  renderers, so a minimized target produced a whole session of "Action
  completed" with nothing behind it.

  Input acceptance is established for typing and key presses as well as clicks:
  each MCP call is seconds apart, so the keyboard cannot inherit the focus a
  click established. The synthetic focus notification is gated on the target
  not already being active — sent unconditionally it names window 0 at an app
  that already owns a key window, and nine window-bound clicks were discarded
  with the traffic lights fully lit.

State the model can trust
  An off-screen target says so, and says which tools still reach it: element
  actions need no on-screen geometry, so an app with a real tree can still be
  driven from the Dock. A fully covered window is recovered once, then left
  alone — burying it again is the user wanting their screen back. A repeated
  capture is reported with the cause that actually applies rather than both,
  because coverage is something we compute.

Signing
  The helper is signed under a stable identity before electron-builder sees it,
  and excluded from re-signing: macOS ties Accessibility and Screen Recording
  grants to the signing identity, so rotating it drops both on every update.

Discoverability
  The desktop slash menu falls back to a directory scan while a session's CLI
  has not started, which is when the menu is first opened. Built-ins and
  bundled skills live in the binary, so /computer-use was absent until after
  the first message.
2026-08-05 22:06:23 +08:00
程序员阿江(Relakkes) f121269c0e Merge main into worktree-20260803001-qa-reactor (provider presets, base URL help)
One conflict, same structural cause as the last merge: git offers the pre-split
Settings.tsx against the 183-line shell. All four of main's hunks belong to
ProviderFormModal, which now lives in settings/ProviderSettings.tsx — the useId
import, the addToast on a successful model fetch, and the base-URL field growing
an explicit label plus a help tooltip. Ported there; tsc caught the one import
(useUIStore) the move needed.

Everything else auto-merged, including the two files both sides changed:
chatStore.ts keeps main's pushAssistantHistoryThinking alongside the removal of
the content-equality replay guard — different functions, history mapping versus
the live path — and the five locales land at 2521 keys each.

Note: six generalSettings tests fail after this merge and they fail identically
on main. 62f648cb2 added an IconButton labelled 'Base URL help' next to the base
URL input without updating generalSettings.test.tsx, so getByLabelText(/Base
URL/i) now matches both. Confirmed against a temporary worktree at main: 6
failed / 104 passed there too. Not introduced here, and fixed separately.
2026-08-04 19:13:03 +08:00
程序员阿江(Relakkes) 20b6e6dc9e ci: make the full quality sweep manual instead of nightly
4f9fec876 added this workflow with `cron: '0 18 * * *'`. That was the wrong call
to make unilaterally: the repository had no scheduled workflow at all before it,
so this was not one more cron among several but the introduction of recurring CI
spend — about ninety minutes per run — on a schedule nobody asked for.

The reasoning for the sweep still holds: a per-PR gate only covers what the diff
reaches, so it is blind to checks no recent PR selected and to failures that only
appear when the whole suite runs together. Keeping the workflow on
`workflow_dispatch` keeps that one click away without deciding for the maintainer
when to spend the time.

pr-quality-workflow.test.ts now asserts the absence of `schedule:` and `cron:`
rather than their presence, so a schedule cannot drift back in unnoticed —
verified by adding the cron back and watching the test go red. The docs' four-tier
table renames the tier accordingly; calling it "Nightly" when nothing runs nightly
is exactly the kind of comment that outlives its code.
2026-08-04 16:56:09 +08:00
程序员阿江(Relakkes) 0a9789a73c feat: add FennoAI and Qiniu Cloud AI provider presets
- Add both gateways as featured presets pointing at their Anthropic-compatible
  roots (https://api.fenno.ai, https://api.qnaigc.com) with auth_token strategy
- Ship no default model ids: the available catalog depends on the plan the user
  bought, so they fetch the live list and pick one instead
- Keep modelContextWindows, which stays useful per picked model id and covers
  ids the built-in table cannot resolve (claude-opus-5, namespaced 七牛云 ids)
- Add both as sponsors in the English and Chinese READMEs, and list them in the
  preset docs
2026-08-04 16:46:44 +08:00
程序员阿江(Relakkes) 4f9fec8760 ci(quality-gate): route checks by import graph and add offline agent QA 2026-08-03 21:46:54 +08:00
程序员阿江(Relakkes) c7b6522d79 feat(provider): 新增玄枢API 供应商并加入 README 赞助商
- provider presets 新增 xuanshuapi(Anthropic 兼容,auth_token 鉴权)
- 默认模型 claude-opus-5 / claude-sonnet-5 / claude-haiku-4-5
- README 中英文赞助商表格新增玄枢API 行及 logo,专属链接注册赠 5 美元
- docs/start/models.md 双语预设清单同步
2026-08-02 16:48:30 +08:00
OpenClawBot eb6558a086 docs: share English browser preview across locales 2026-07-31 19:17:41 +08:00
OpenClawBot 7e31914564 docs: restore original browser previews 2026-07-31 18:53:44 +08:00
OpenClawBot 107bfc86bc docs: refresh bilingual product screenshots 2026-07-31 18:14:54 +08:00
程序员阿江(Relakkes) 3df7f23b25 docs: add bilingual desktop screenshots 2026-07-31 07:32:07 +08:00
程序员阿江(Relakkes) 224a076ba7 chore(sponsor): 下线胜算云赞助,退役预设改为 deprecated 墓碑
胜算云不再赞助,从 README 与「添加服务商」入口下架。与 558124914 下线接口AI
的做法不同,这次不删预设条目——纯删会静默降级已配置该预设的 provider:

- defaultEnv 从不随 provider 持久化,每次运行都从预设重算(胜算云的
  API_TIMEOUT_MS、CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC 与
  ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES=none)
- getManagedEnvKeys() 用所有预设的 defaultEnv 键构建 settings.json 擦除清单,
  而 API_TIMEOUT_MS 与 CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC 仅由胜算云声明,
  删掉后这两个键永久脱离清单,陈旧值会泄漏进此后激活的每个 provider
- provider 卡片 Badge 渲染预设名,预设消失则已配置的卡片标签消失
- 较早的存档可能连 authStrategy / modelContextWindows 都未持久化,同样回退到预设

改动:

- providerPresets.json:胜算云标 deprecated,摘掉 featured / promoText / apiKeyUrl;
  一并补回 jiekouai 墓碑条目,修掉 558124914 留下的同类回归(该提交未进任何 tag,
  回归尚未发布)
- 过滤只加在新增路径:桌面端预设 chips 源,以及粘贴 settings JSON 后按
  ANTHROPIC_BASE_URL 自动切预设那处;按 presetId 反查的路径一律保持全量
- GET /api/providers/presets 仍返回全量并携带 deprecated 标记,由消费方自行过滤
- ccSwitchImport 的 matchPresetId 有意继续匹配退役预设:导入映射的是用户既有配置,
  继承该预设的 env 比落到 custom 更正确
- README 中英文移除胜算云赞助整行与推广链接,删除 shengsuanyun-logo.svg,
  中英文 docs 模型页的中转服务商清单去掉胜算云

测试:settings.json 擦除清单不变量、退役预设仍解析出完整运行时 env、退役预设不得
残留推广字段、接口AI 的第三方 Sonnet 护栏(capabilities=none 与 1M 上下文窗口)、
桌面端 selectableProviderPresets 过滤。
2026-07-30 21:11:47 +08:00
程序员阿江(Relakkes) d141543794 fix(telegram): complete secure agent control loop #1130 2026-07-28 21:38:18 +08:00
程序员阿江(Relakkes) 977de9f9eb docs: README 增加飞书用户群入口 2026-07-28 19:35:47 +08:00
程序员阿江(Relakkes) 5e156ec03e chore(site): 文档站自定义域名切换到 cchaha.ai
把 9 个文件里的 11 处 claudecode-haha.relakkesyang.org 换成 cchaha.ai。
apex 走 Cloudflare CNAME flattening,www 由 GitHub 自动 301 到裸域名。

- docs/public/CNAME 与 prepare-static-output.mjs 的 expectedCustomDomain
  必须同步:后者是硬校验,不一致会让 postbuild 直接 throw、Pages 发不出去。
  它同时驱动 canonical / hreflang / og:url / sitemap.xml / robots.txt。
- meta.js 的 SITE_ORIGIN 管前端运行时那一份同名标签。
- AGENTS.md 里的契约描述一并更新,否则后续改动会照旧域名回退。
- 桌面端 IM 文档跳转链接及其测试断言。

验证:site build 通过(78 路由 + 74 重定向)、check:docs 通过(78 页 323 链接)、
sitemap 80 条 loc 全为新域名、AdapterSettings 6 tests passed。
2026-07-28 13:15:56 +08:00
程序员阿江(Relakkes) 5581249147 chore(sponsor): 下线接口AI 赞助与 Provider 预设
- provider presets 移除 jiekouai 预设(预设数 11 → 10)
- README.md / README.en.md 赞助商表格移除接口AI 整行及推广链接
- 删除 docs/images/sponsors/jiekou-logo.svg
- docs 中英文模型页的中转服务商清单去掉接口AI
- provider-presets 测试同步移除 jiekouai 断言;依赖该预设 defaultEnv /
  authStrategy 的 conversation-service、conversations 测试 fixture 改用
  shengsuanyun 预设
2026-07-28 11:30:57 +08:00
程序员阿江(Relakkes) af68a003d0 docs: crop the preview screenshot to the shared frame
At 2000x1255 it was the odd one out in the README grid: that cell's caption
sat higher than the two beside it, which is the whole reason the shot was
swapped in. Cutting the sidebar column away at the panel divider (x=480) and
shaving the empty 31px off the top and bottom margins lands exactly on the
2000x1436 frame the other five use, so the grid lines up and the tour stage
fills edge to edge.

Nothing in the UI was cut — the tab bar, the project chip and the zoom control
all sit inside the kept region, and the crop leaves the conversation next to
the browser preview, which is what this shot is about. The `--wide` special
case added for the taller frame goes away with it.
2026-07-27 23:20:02 +08:00
程序员阿江(Relakkes) a7210e1fee docs: swap in a sharper preview screenshot
The old workspace-preview shot was cramped at the size the home page and the
README render it. The new one is a full-window capture with the element picker
open — exactly what the copy next to it promises.

It is wider than the other seven shots (2000x1255 against 2000x1436), and the
tour stage pins `aspect-ratio` on the image itself, so dropping it in would
have stretched it. Each tab now carries its own shot shape — `wide` here,
`tall` for the phone screenshot that used to be matched by id — while the
stage keeps its 2000/1436 height, so the panel still doesn't jump between
tabs.
2026-07-27 23:09:46 +08:00
程序员阿江(Relakkes) c2cd615824 docs: rebuild the documentation site around two readers
The site had drifted from the product. Every screenshot predated the
v0.5.0 UI redesign, the reading experience shipped no search and no
syntax highlighting, and a third of the pages were internal process
artefacts — migration task lists addressed to agentic workers, a
release runbook, a proposal marked "historical".

Reorganise around the only two people who read this: someone getting
the desktop app running for the first time, and someone reading the
source. Five sections replace nine — start / desktop / im / cli /
internals — and the pages that served neither reader are gone.

Site rewrite:

- Palette lifted from the desktop app's 「纸·墨·印」 themes, so the
  site and the product read as one thing. Light mirrors 纯白, dark
  mirrors 墨夜, and dark mode exists at all now.
- Fonts are self-hosted. The old @import from Google Fonts is
  unreachable from mainland China, which left every heading in a
  fallback serif; it also only requested weight 600 while the CSS
  asked for 900, so Latin and CJK in the same heading disagreed.
- Docs were shipped as one 968KB manifest downloaded on every page
  view. Split into a 32KB index plus one lazily imported chunk per
  page; the entry bundle is now 101KB gzipped.
- Add search, syntax highlighting, per-route meta with canonical and
  hreflang, a sitemap, and an error boundary. Replace the 44vh
  mobile sidebar with a drawer.
- Image dimensions are read at build time and written into the tag,
  so lazy images reserve their space instead of collapsing.

Screenshots are recaptured from a real v0.5.0 build against a clean
demo project, with tokens, QR codes and paired accounts redacted.
The previous set is deleted rather than kept alongside.

Routes follow file paths, so the restructure would have broken every
inbound link; 37 old paths redirect, in both languages. The PR policy
gate and CODEOWNERS also hardcoded docs/guide/contributing.md.

Verified: check:docs 78 pages / 323 links / 0 problems, check:policy
127 pass. Walked every route at 1440 and 390 in both themes for
overflow, contrast, keyboard reachability and focus management.
2026-07-27 17:32:41 +08:00
程序员阿江(Relakkes) fc9f5d554e feat(desktop): let a nine-row action sheet become a pet instead of demanding an exact atlas
Importing an animated pet required a file that was exactly 1536x2288, laid
out as 88 seamless cells, with the last two rows holding sixteen distinct
gaze angles. No image model emits that. Whatever a user got back from Jimeng
or ChatGPT was some fixed size like 1024x1536, so the path ended at "the
animation atlas must be exactly 1536x2288 pixels" every time. The third card
was worse: "AI-generate full animation" was hardcoded `disabled`, so the one
entry point named after what people actually wanted to do was dead.

The fix was already in the tree. `scripts/assemble-generated-pet-atlas.py`
landed in the same commit as the four built-in pets, which is to say the
built-ins were produced this way — it takes an action sheet at any size,
slices it on an 8x9 grid, fits each cell to 192x208, mirrors the run row to
make run-left, and reuses rows to reach eleven. That capability was never
wired to anything a user could reach.

`petAtlasNormalize.ts` reimplements it on a canvas in the renderer, so an
author draws nine rows and the app derives the rest. Verified against the
reference assembler by reversing dada-code's atlas into a nine-row sheet and
re-normalizing it: every difference lands on semi-transparent antialiased
edges (2314 pixels, max channel delta 14/255) and opaque regions are
identical. That residue is canvas premultiplied-alpha round-tripping, not a
slicing bug.

Three contract details worth stating. Row frame counts are now derived from
`PET_ANIMATION_DEFINITIONS` rather than typed out a fourth time; they come
out equal to the assembler's `(6,8,8,4,5,8,6,6,6,8,8)`. A sheet already at
1536x2288 passes through byte-for-byte instead of being resliced, because
resampling finished artwork buys nothing. And since the validator never
inspects the alpha channel, a flattened white background used to import
happily and render as a rectangle on the desktop — the renderer now rejects
sheets whose atlas is under 5% transparent (the built-ins sit near 78%) with
a message that names the actual problem.

The copy stops describing the implementation. "Animate one image" and
"Import professional animation atlas / exact 1536x2288 v2 PNG" become "use a
picture you already have" and "I already have an action sheet"; the dead AI
card becomes a three-step walkthrough carrying a copyable prompt, a labelled
8x9 reference grid that can be saved locally, and the checks that catch the
common failures. Reference images are generated by a script rather than hand-
placed, in both languages. All five locales move together.

Caught while reviewing the real dialog in Electron: after finishing the
walkthrough the form heading fell through to the atlas branch and announced
"I already have an action sheet" to someone who had just been walked through
drawing one. Covered by a test now.

Not done: docs/images/desktop_ui/15_pet_create_methods.png still shows the
old dialog and needs a fresh capture from a running app to match the styling
of the shots around it.
2026-07-27 07:20:09 +08:00
程序员阿江(Relakkes) 49f1974007 fix(brand): close three icon gaps the first pass missed
Two reviews of the icon swap, run independently from opposite directions,
turned up three places the new mark never reached.

The og:image was the worst. `site/index.html:20` points at
`/images/banner.png`, and that file does not come from `docs/images/banner.png`
— the one this rebrand replaced. `site/scripts/prepare-static-output.mjs:129`
copies `docs/public/` wholesale into the site root before the two selective
image passes run, and neither of those matches an absolute https:// URL, so
`docs/public/images/banner.png` is what shipped. It was a 1200x630 screenshot
of the old site: blue panels, old circular CC badge. Every link shared to
WeChat or Slack would have previewed the pre-rebrand brand while the site
itself rendered the new one. Replaced with a card built from the new lockup;
`site/dist/images/banner.png` now hashes to it.

`desktop/src-tauri/app-icon.png` is the canonical 1024 RGBA source the platform
icon set gets regenerated from. That rule lived only in the body of 3f2ce2a6c,
and nothing references the file in code, so the rebrand skipped it — breaking
an invariant that had held since the file was introduced, where it and
`desktop/public/app-icon.png` were the same git blob. Left as it was, whoever
regenerated icons next would have restored the entire old set.

Linux had no icon above 310px. electron-builder points `linux.icon` at the
whole icons directory and keeps only files named NxN, so `icon.png` (512, no
dimensions in the name) and `128x128@2x.png` (256, collides with
`128x128.png`) were both dropped, leaving a Windows Store asset as the largest
entry. Adding 256x256.png and 512x512.png takes the resolved set from 12
entries topping out at 310 to 14 topping out at 512, confirmed by running
app-builder's icon resolver against the directory.

index.html also had no favicon, and that document is what the H5 remote client
loads in a phone browser.

CI could not have caught any of this — `scripts/quality-gate/package-smoke/`
asserts nothing about icons. `desktop/icon-assets.test.ts` now pins the source
invariant, the Linux sizes, the three packaged icons and the favicon; each
assertion was checked to fail when its subject is reverted.
2026-07-27 04:27:41 +08:00
程序员阿江(Relakkes) 19357fcd87 feat(brand): rebuild the app mark as a vector and recolor it to the themes
`app-icon.png` is a 120KB bitmap, and the seven `.svg` files beside it under
docs/images are 193 bytes each — an `<image>` tag wrapping that bitmap. So the
mark carried its own blue/cyan/orange through all six palettes while everything
around it moved, and there was nothing to recolor.

Measured the bitmap back into geometry rather than redrawing it: connected
components to separate the elements, algebraic circle fits for the arcs, angular
histograms for the openings and stroke widths. Big C is center (415,566) r=131
stroke=60, opening 160°; the second C is center (615,576) r=117 cut into two 68°
arcs; the cursor is a four-point polygon with one notch. The slight ellipticity
and unequal stroke ends were raster artifacts, so they were rounded out. The
shape is otherwise unchanged — differencing a render against the original leaves
only antialiasing.

Color maps the original's three layers onto the palette's own three: the C's take
墨 `--cc-t1`, the bar and cursor and sparkles take 朱 `--cc-ac`.

Six themes do not need six icons. Their accent resolves to two values — #96442B
across the four light palettes, #D07B52 across the two dark ones, which is the
same ochre lightened. Only the ink varies, and ink should follow body text
anyway.

The app icon stays one fixed artwork. Dock and taskbar are drawn by the OS, which
knows nothing about the in-app theme, so paper ground with ink C's ships to every
platform. Inside the app the mark is a vector on tokens and repaints per theme.

Four ideas — two C's, the bar, the cursor, two sparkles — collapse below 24px, so
every consumer sheds parts as it shrinks: sparkles above 40px, cursor above 24px,
C's and bar always. That applies inside icon.icns and icon.ico as much as in
BrandSeal.

BrandSeal was the 「哈」 glyph in a terracotta square; it is now the CC mark drawn
inline on `--color-text-primary` and `--color-brand`. Its five call sites — the
sidebar, both empty states, the H5 connect view, the gallery — follow, and the
about pane drops its `<img>` for the same component.

README leads with the horizontal lockup inside a `<picture>` so GitHub serves the
dark cut in dark mode.
2026-07-27 04:27:41 +08:00
程序员阿江(Relakkes) 9ef170bb42 feat(skills): discover the cross-client .agents/skills convention #1093
Skills installed by Codex, Cursor, Gemini CLI, or opencode live under
`.agents/skills/` -- the convention documented at agentskills.io -- so users
had to keep a duplicate copy in `.claude/skills/` before cc-haha could see
them. The spec only constrains SKILL.md itself, which we already parse, so
this is purely a directory-discovery gap.

Scan both conventions at every scope: user (`~/.agents/skills`), project
(every level up to the repo root), `--add-dir` roots, on-demand monorepo
discovery, and the hot-reload watcher. skillRoots.ts is the single source of
truth for those paths; the REST API now reports which convention a skill came
from and the desktop list badges the `.agents` ones.

`.claude` is always ordered first, so first-wins dedup keeps a user's own
skills authoritative rather than letting an externally installed same-named
skill shadow them. Name collisions are collapsed per scope, which covers
copy-based sync -- symlink-based sync was already handled by the existing
realpath dedup. Collisions across different scopes, such as a user skill and
a project skill sharing a name, keep their existing behavior, and the shadowed
file's identity is recorded so overlapping roots (CLAUDE_CONFIG_DIR pointing
inside the project) cannot reintroduce it under the other scope.

getProjectDirsUpToHome is untouched -- it is shared by commands, agents,
output-styles, and workflows. Only its directory walk is extracted so the
skill resolver reuses the same submodule/worktree stop boundary. Writes stay
where they were: market installs and /skillify still target
`~/.claude/skills`.

`.agents` is anchored at $HOME rather than CLAUDE_CONFIG_DIR, since it is a
space shared with other tools that read $HOME. Note that Bun snapshots
os.homedir() at startup while Node re-reads $HOME per call, so the resolver
reads the env var explicitly.

Opt out with `disableAgentSkillsDirectory` in settings.json or
CLAUDE_CODE_DISABLE_AGENT_SKILLS_DIR=1; no `.agents` root is produced at all
then, so there is not even a failed stat.

(cherry picked from commit ba9338f85d6beaba237753e42e823c87b59633d4)
2026-07-25 02:50:21 +08:00
程序员阿江(Relakkes) c2fd674662 docs: rebuild documentation site with React 2026-07-23 20:46:33 +08:00
程序员阿江(Relakkes) f70fa017ef release: prepare v0.4.11 2026-07-23 03:30:42 +08:00
程序员阿江(Relakkes) 7f6fdadaa3 feat(agents): add per-agent model and effort controls #1062 2026-07-21 00:16:11 +08:00
程序员阿江(Relakkes) 34a3fcb22e release: prepare v0.4.10 2026-07-18 19:12:26 +08:00
程序员阿江(Relakkes) 503ad31ae0 docs(desktop): include the headless Web UI build (#1027) 2026-07-17 22:57:13 +08:00
程序员阿江(Relakkes) e2e164da69 docs(desktop): document headless H5 access (#1027) 2026-07-17 22:47:31 +08:00
程序员阿江(Relakkes) 2d58d11fb1 release: prepare v0.4.9 2026-07-16 18:50:35 +08:00
程序员阿江(Relakkes) c93bbcb324 release: prepare v0.4.8 2026-07-14 03:58:41 +08:00
toBerlinWay 703e8d066c feat: harden local server access policy and isolate remote preview permissions 2026-07-13 16:55:54 +08:00
程序员阿江(Relakkes) d1e684c419 release: prepare v0.4.7 2026-07-11 05:32:11 +08:00
程序员阿江(Relakkes) 435e4ccc9f ci: harden deterministic PR quality gates
Route required checks by changed surface, add offline provider and chat contracts, and keep fork PRs independent of live credentials. Layer agent guidance by subtree and enforce a compact instruction budget.

Tested: bun run check:policy
Confidence: high
Scope-risk: broad
2026-07-10 20:29:01 +08:00
程序员阿江(Relakkes) b28867d551 release: prepare v0.4.6
Prepare the v0.4.6 desktop release note, bump the desktop package version, and refresh README/docs guidance for signed releases and updater validation.

Tested: bun run scripts/release.ts 0.4.6 --dry
Tested: bun test scripts/pr/release-workflow.test.ts scripts/release-update-metadata.test.ts scripts/quality-gate/package-smoke/index.test.ts
Tested: bun run check:policy
Tested: bun run check:docs
Not-tested: bun run verify; release prep was validated with docs and release-focused gates only.
Confidence: high
Scope-risk: narrow
2026-07-09 17:56:51 +08:00