Skip to content

feat: make OpenClaw installable and configurable, drop Cursor - #53

Merged
yujiezhang-ops merged 1 commit into
mainfrom
feat/openclaw-installable
Aug 6, 2026
Merged

feat: make OpenClaw installable and configurable, drop Cursor#53
yujiezhang-ops merged 1 commit into
mainfrom
feat/openclaw-installable

Conversation

@yujiezhang-ops

Copy link
Copy Markdown
Collaborator

Closes #44.

What changed

363550c deleted the cursor, openclaw and hermes entries from agents.lock.json as a side effect of a commit whose message was about provider sorting. Nothing failed, and README.md:111 went on telling users all three were available. This resolves that divergence in the direction the open-source review asked for.

OpenClaw returns as a fully managed Agent — npm install, and activation writes models.providers.oneagent plus agents.defaults.model.primary in ~/.openclaw/openclaw.json. Rank 6 puts it on the first screen rather than behind the disclosure.

Cursor is removed rather than restored. It authenticates through its own account, so there is no Provider configuration for OneAgent to write. Its icon asset and licence entry go with it.

Hermes is not included — see the note at the bottom.

The scope line, and why ADR-002 is untouched

OpenClaw is a gateway, so the interesting part of this change is what it does not do:

OneAgent OpenClaw's own commands
npm install starting/stopping the gateway
models.providers.oneagent launchd / systemd registration
agents.defaults.model.primary channel pairing
Control UI port and access control
plugin enablement

channels, tools, and the rest of agents.defaults come back out of a write untouched. Those are what a user decides through openclaw onboard, and rewriting them from a Provider record would overwrite decisions OneAgent has no input on.

Under that split, ADR-002 does not need amending: the boundary it draws is against OneAgent being a gateway (shared keys, a unified endpoint), not against configuring a model provider for someone else's. docs/internal/cc-switch-reference-notes.md:33 had recorded the opposite conclusion, but its reasoning was about the gateway form, which this change does not adopt. Flagging it explicitly since it reverses a written note — if you read the boundary more strictly, this needs an ADR and I'll write one.

The restart hint says openclaw gateway restart rather than "quit any running process, then start it again". A long-lived service does not re-read its config the way a foreground CLI does, so the generic hint would have been wrong advice.

Two gates that came out of a mistake

While writing this I added the writer and not the reader. Activation succeeded, and the overview then reported 没有可用的配置解析器 — a config written and unreadable, with nothing failing anywhere. The catalog declares an adapter name and nothing else connects it to either dispatch, so this was invisible.

TestEveryAutoAgentAdapterCanBeWrittenAndReadBack walks the real manifest and round-trips every auto Agent through both dispatches. Mutation-tested: deleting the OpenClaw reader case gives

openclaw wrote a config its own reader rejects: 没有可用的配置解析器

Aider is a listed exception with its reason — its file is a two-line .env with no field for a model or an ownership marker — so a new adapter cannot land silently on its precedent.

The count in TestEmbeddedManifestMatchesCurrentCatalogContract becomes a tripwire for the silent deletion this PR is cleaning up.

guideOnlyRejection is extracted from an inline check because no catalog Agent can reach it any more, and an unreachable guard with no test is one refactor away from being deleted as dead code.

Compliance

OpenClaw takes a generic Lucide mark, not artwork. The only SVG of its lobster logo in circulation was drawn by CC Switch, and a third party's redrawing conveys no redistribution right (docs/internal/cc-switch-reference-notes.md:79,85). lobe-icons has no OpenClaw mark either. The orphan MIT licence left behind in frontend/src/components/icons/licenses/openclaw/ — unreferenced by any manifest — is deleted.

NOTICE is corrected on three counts: it claimed Claude Code and Kilo CLI used generic symbols when both ship image assets, said "three" retained assets when there were four, and still listed Cursor and Hermes. generate_third_party_licenses.py --check caught the stale Cursor entry, and the inventory is regenerated.

Verification

  • go vet ./... and go test -race ./... clean across all packages
  • 24 frontend test files / 162 tests, tsc --noEmit clean
  • python3 scripts/check-docs.py — 49 files, links resolve, language split holds
  • generate_third_party_licenses.py --check clean after regeneration
  • Golden file internal/config/testdata/parity/openclaw.golden fixes the output shape against an existing config carrying a paired channel, a tools profile, another provider and user fallbacks

End to end through the headless CLI against the real endpoint:

  • an unknown model is refused by the Chat Completions probe, listing what the endpoint actually serves
  • a bad key returns 401 and no config file is written — no partial state
  • npm resolves openclaw 2026.6.5, confirming the package name
  • grepping every file written after activation finds the API key only in ~/.oneagent/providers.json (private storage, by design) and in no log

Hermes

Not in this PR. Hermes installs only through curl | bash — which is what CC Switch does (src-tauri/src/commands/misc.rs:456) — and internal/install/install.go:193-236 allowlists npm and uv, refusing everything else in its default branch. Adding Hermes therefore means either a new install channel that downloads and executes a remote script outside version-locking and hash verification, or leaving it guide-only. That is a separate decision and I did not want to smuggle it in here.

🤖 Generated with Claude Code

363550c deleted the cursor, openclaw and hermes entries from
agents.lock.json as a side effect of a commit whose message was about
provider sorting. Nothing failed, and the README went on telling users all
three were available as guide-only Agents. This resolves that divergence in
the direction the open-source review asked for.

OpenClaw returns as a fully managed Agent. It installs from npm, and
activation writes models.providers.oneagent plus
agents.defaults.model.primary in ~/.openclaw/openclaw.json.

Scope stops there, and that is the point. OpenClaw is a gateway, so
channels, tools, the daemon and the Control UI stay with its own commands;
those are what a user decides through `openclaw onboard`, and rewriting
them from a Provider record would overwrite decisions OneAgent has no input
on. Under that split ADR-002 is not touched: the boundary it draws is
against OneAgent *being* a gateway, not against configuring a model
provider for someone else's. The restart hint says `openclaw gateway
restart` rather than "quit and start again", because a long-lived service
does not re-read config the way a foreground CLI does.

Cursor is removed instead of restored. It authenticates through its own
account, so there is no Provider configuration for OneAgent to write, and
its icon asset and licence entry go with it.

Hermes is not included. It installs only through `curl | bash`, which
install.go's allowlist refuses by design, so adding it means either a new
install channel or a new ADR. That is a separate decision.

OpenClaw takes a generic Lucide mark, not artwork. The only SVG of its
lobster logo in circulation was drawn by CC Switch, and a third party's
redrawing conveys no redistribution right (see
docs/internal/cc-switch-reference-notes.md). The orphan MIT licence left in
frontend/src/components/icons/licenses/openclaw/ is deleted, and NOTICE is
corrected: it claimed Claude Code and Kilo CLI used generic symbols when
both ship assets, said "three" assets when there were four, and still
listed Cursor and Hermes.

Two gates come out of a mistake made while writing this. The writer landed
before the reader, so activation succeeded and the overview then reported
"没有可用的配置解析器" -- a config written and unreadable, with nothing
failing. TestEveryAutoAgentAdapterCanBeWrittenAndReadBack now walks the real
manifest and round-trips every auto Agent through both dispatches; removing
the OpenClaw reader fails it. The count in
TestEmbeddedManifestMatchesCurrentCatalogContract is a tripwire for exactly
the silent deletion above.

guideOnlyRejection is extracted because no catalog Agent can reach it any
more, and an unreachable guard with no test is one refactor away from being
deleted as dead code.

Verified: go vet, go test -race across all packages, 24 frontend test files
/ 162 tests, tsc --noEmit, check-docs.py, and
generate_third_party_licenses.py --check. End to end through the headless
CLI: the protocol probe rejects an unknown model and a bad key without
writing a partial config, npm resolves openclaw 2026.6.5, and the API key
appears in no log or config outside private storage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

363550c 静默删掉了 cursor / openclaw / hermes 三个 guide-only 条目,README 仍在描述它们

1 participant