Skip to content

feat: add Qoder CN adapter - #143

Merged
RealZST merged 6 commits into
RealZST:mainfrom
lishuaibinpublic:feat/qoder-cn-adapter
Sep 25, 2026
Merged

RealZST merged 6 commits into
RealZST:mainfrom
lishuaibinpublic:feat/qoder-cn-adapter

Conversation

@lishuaibinpublic

Copy link
Copy Markdown
Contributor

Refs #142 — the first PR for the agreed qoder-cn adapter.

What

Adds a Qoder CN adapter (crates/hk-core/src/adapter/qoder_cn.rs): the CN build of Qoder (Alibaba's agentic coding IDE, bundle com.qodercn.app, data root ~/.qoder-cn). Tested against Qoder CN 0.3.4 desktop on a real macOS install.

Covered in this PR (per the scope agreed in #142):

  • Skills: ~/.qoder-cn/skills (product-native, standard SKILL.md layout) + ~/.agents/skills (Universal Agent Skills alias Qoder CN also loads — confirmed in the app bundle's skill-source tagging and by a live install). Project scope: .agents/skills.
  • MCP: ~/.qoder-cn/settings.json → mcpServers (Claude-style entry schema, RemoteMcpSchema::TypeAndUrl). The bare root mcp.json is an empty placeholder the desktop app creates at startup (birth == mtime, never written; absent from the official docs) — deliberately not a config surface.
  • Plugins: plugins/installed_plugins_v2.json manifest — per-entry enabled, installPath, and precise installedAt/lastUpdated timestamps.
  • Memory: global_memory_files() → ~/.qoder-cn/memory/*.md; external_project_memory() → projects/<encoded-cwd>/memory/*.md with the owner cwd read from session transcripts (Claude's pattern).
  • Rules: AGENTS.md (global) and .qoder/rules/**/*.md (project).

Deferred, agreed in #142: hooks (no hook system found on disk — HookFormat::None), knowledge packs (qoder-knowledge/, to be revisited as a config-file category), and the project-level three-file MCP merge (.qoder/settings.json / .mcp.json / .qoder/settings.local.json) — I'll verify the override order empirically and follow up in a second PR.

Verification (real install)

cargo test --workspace and npm test (312 frontend tests) pass locally.

hk status / hk list --agent qoder-cn against the live machine:

Agents  14 enabled (… · grok · qoder-cn)
qoder-cn: 86 skills · 7 MCP servers · 11 plugins   ← matches ground truth

(85 skills in ~/.qoder-cn/skills + 1 shared from ~/.agents/skills; 11 plugins == enabledPlugins count; the 7 MCP servers are exactly the settings.json entries.)

Web UI:

overview
agents

The Agents page shows Qoder CN with its settings file, AGENTS.md rules, and the memory tree grouped under the real install paths.

Notes for review

  • all_adapters() order: appended qoder-cn last; pinned tests and AGENT_ORDER updated to 14.
  • mcp_remote_capability_derivation: TypeAndUrl → both transports, no special case.
  • No icon/mascot yet — the UI fallback renders; happy to take design guidance.

lishuaibinpublic and others added 6 commits September 22, 2026 11:29
Verified against a live ~/.qoder-cn install (2026-09):
- skills: ~/.qoder-cn/skills + Universal ~/.agents/skills alias
- MCP: settings.json mcpServers (Claude-style); root mcp.json is an
  empty app-created placeholder, not a config surface
- plugins: installed_plugins_v2.json manifest (enabled + timestamps)
- memory: global memory/*.md + external projects/<enc-cwd>/memory keyed
  by session-transcript cwd (Claude pattern)
- rules: AGENTS.md; project: .agents/skills, .qoder/rules
Hooks/knowledge-base deferred (issue RealZST#142).
…, not absent

Qoder CN does have a hooks system (settings.json `hooks` key, Claude-shaped,
per docs.qoder.cn/cli/hooks-reference). Reading it is left for a follow-up PR,
so hook_format() stays None; the placeholder path and the 'no hook system'
wording go away so the next PR only has to flip the format.
The user-level rules directory is documented alongside the project one
(docs.qoder.cn/cli/memory); only AGENTS.md was listed before.
Global AGENTS.md was already a rules file; the project-level one was
declared as memory, which split the same file across two categories.
Both now land under Rules (matching Codex), and AGENTS.local.md joins it.
Uses LobeHub's qoder mark. Hover swings it from its top point like a
hanging tag (±11deg, 1.8s per cycle). Click eases the swing to rest, fades
the fill, traces both outlines back in over 2.8s, then restores the fill.
The swing angle is a registered custom property so it can transition. The
back face uses --mascot-icon-color so it survives dark cards.
@RealZST
RealZST merged commit 2265c59 into RealZST:main Sep 25, 2026
3 checks passed
@RealZST

RealZST commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Thanks for adding Qoder CN! I also tested it on Qoder CLI CN 1.1.63 and pushed five commits on top of yours:

  • 057d228: The code comment said Qoder CN has no hook system, but it does. Hooks live in the hooks key of settings.json (docs). I changed the comment from "not supported" to "deferred" and pointed the hook path at settings.json.
  • c8c8aed: Add user-level rules from ~/.qoder-cn/rules/ (docs).
  • da6ee39: Move the project AGENTS.md from Memory to Rules, to match the global one.
  • 6d33486: Add an agent color for the filter chip.
  • bab3b7f: Add a mascot.

Thanks again! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants