Repository navigation
Align OpenClaw integration with verified 2026.7.1 upstream behavior - #83
Merged
Merged
Conversation
Every change here was verified against the shipped openclaw@2026.7.1 npm package (not the online docs, which describe a newer release) and exercised end-to-end on a freshly provisioned DigitalOcean server. Auth (runtime reads SQLite only — auth-profiles.json is dead upstream): - Replace every auth-profiles.json write with per-agent `openclaw models --agent X auth paste-api-key` injection (env job, install script, update script); the legacy files were never read on 2026.7.x and corrupted auth-presence heuristics - ChatGPT OAuth polling/disconnect moved from jq-on-file to `models auth list/logout --json` (pairing detection was broken) - Subscription guards: never inject an api_key profile over a ChatGPT (openai) or Claude (anthropic) subscription agent's slot Claude subscription (BYO) support: - ClaudeAuthService (setup-token over piped stdin, order pinning, sanitized errors), controller + routes, migration, connect UI, tier wiring, disconnect hooks on model change / switch-to-pay-per-use Model routing: - BYO Anthropic/OpenAI keys now route direct (anthropic/, openai/) instead of dead-ending at OpenRouter without a credential; memoized per-team key lookups; prompt-caching keys fixed for both route forms Config management: - ConfigPatchService agent add/update + Slack ops now go through the gateway config RPC (config.get hash -> config.patch with baseHash, 3 attempts, file-edit fallback) — closes the clobber race and a Slack-token shell-injection hole; removal reordered RPC-before-file Fleet updates: - UpdateOpenClawVersionJob + hourly reconciliation via `openclaw update --tag --yes` (no fleet mechanism existed); fixed version parses that reinstalled OpenClaw on every agent update (output is "OpenClaw 2026.7.1 (hash)" — positional parses broke) Retirements (verified safe on 2026.7.1): - OperatorPairingPatch: loopback CLI + gateway token bypasses device pairing entirely since #95997 — our only access path - GatewayClient's OpenClaw arm (both call sites are Hermes-gated); dead AgentBrowserProvider contract; _legacyUpdateAgent Browser: - Profiles switched from driver=existing-session to raw CDP attach-only (no npx chrome-devtools-mcp subprocess; regains per-tab WS, element screenshots, downloads; attachOnly is honored on this path) Provisioning hardening: - Installer runs with OPENCLAW_NO_PROMPT/NO_ONBOARD and fails loudly - ProvisionDigitalOceanServerJob is retry-safe (reuses a surviving volume by name instead of 409ing — found live during a DO outage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the full recommendation set from the OpenClaw gap review. Every claim was verified against the shipped
openclaw@2026.7.1npm package (the online docs describe a newer release and disagree in several load-bearing places), then exercised end-to-end on a freshly provisioned DigitalOcean server: clean provision → agent install → key injection → live chat reply through the gateway RPC → skill deploy → fleet version reconciliation.What changed
Auth — the 2026.7.x runtime reads credentials only from per-agent SQLite;
auth-profiles.jsonis never read (and its presence corrupts auth heuristics). All writes replaced withopenclaw models --agent X auth paste-api-keystdin injection; ChatGPT OAuth polling/disconnect moved tomodels auth list/logout --json(file-based detection was silently broken); subscription agents' provider slots are never overwritten.Claude subscription (BYO) — new end-to-end flow: paste a
claude setup-token, stored viapaste-token, auth-order pinned, directanthropic/routing, heartbeats billed to the subscription, disconnect hooks on model change / pay-per-use switch. UI mirrors the ChatGPT flow with the upstream ToS caveats surfaced.Routing — BYO Anthropic/OpenAI keys now route direct instead of dead-ending at OpenRouter with no credential; prompt-caching keys fixed for both route forms.
Config — agent add/update + Slack channel ops go through the gateway config RPC with
baseHashoptimistic locking (3 attempts, file-edit fallback for gateway-down); closes the three-writer clobber race and a Slack-token shell-injection hole. Removal reordered RPC-before-file-edit.Fleet updates — new
UpdateOpenClawVersionJob+ hourly reconciliation viaopenclaw update --tag --yes; fixed version parsing that reinstalled OpenClaw on every agent update (live output isOpenClaw 2026.7.1 (hash); positional parses broke).Retirements (verified) —
OperatorPairingPatch(loopback CLI + gateway token bypasses pairing since upstream #95997; validated live: fresh server healthy withdevices/paired.jsonabsent), GatewayClient's OpenClaw arm, deadAgentBrowserProvidercontract,_legacyUpdateAgent.Browser — profiles switched to raw CDP attach-only (drops the
npx chrome-devtools-mcp@latestruntime dependency ofdriver: existing-session; regains per-tab WS, element screenshots, downloads).Provisioning — installer hardened (
OPENCLAW_NO_PROMPT/NO_ONBOARD, loud failure); DO provisioning is retry-safe on volume-name collisions (found live during the Aug 24 DO API outage).Verification
provision-…(nyc1): all cloud-init steps, gateway healthy without pairing patch, SQLite auth store populated by injection,chat.sendround-trip returned the expected reply, skill deploy with frontmatter normalization + snapshot bump, fleet job converged and recorded the versionfeature/openclaw-upstream-alignment(skill deploy hardening), provision-openclaw-webfeature/complete-channel-adapters(channel adapters)Not included
composer.json/composer.locklocal path-repo wiring for module-skills (dev-only, per deploy conventions)