Skip to content

feat: set up OpenClaw MCP and hooks from the agent install command - #8088

Closed
mfbx9da4 wants to merge 15 commits into
cursor/agent-key-outranks-hooks-cache-da9ffrom
david/agent-install-openclaw
Closed

mfbx9da4 wants to merge 15 commits into
cursor/agent-key-outranks-hooks-cache-da9ffrom
david/agent-install-openclaw

Conversation

@mfbx9da4

@mfbx9da4 mfbx9da4 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

DNO-1419

Summary

The agent install command connects OpenClaw to the agent gateway, installs the observability plugin for agents with a live project, enables conversation hooks, and prints a hooks check result plus a restart reminder. This original draft now includes the same reviewed tree as its successor #8108. Prefer #8108 for review; do not merge both.

Run the command in a trusted shell. The separate OpenClaw follow-up prompt contains no redeemable code. Gateway and hooks URLs must use HTTPS. OpenClaw configuration uses an owner-only temporary batch file to avoid putting the key in process arguments; rejected updates preserve the previous gateway. Claude Code and Codex read the key from their launch environment.

Plugin ZIPs mark key files owner-only. Installation handles named profiles, supported CLI flags, missing unzip, projectless agents, failed client configuration, and clipboard failures. The docs distinguish the hooks self-check from runtime attribution and cover the Claude CLI routing limitation.

OpenClaw 2026.10.6 rejects structured MCP header SecretRefs; upstream support proposal #69417 was closed without merging. Its supported batch-file path writes valid config with mode 0600. The key remains in OpenClaw's config and the plugin's key file. This PR is stacked on #8109 and the agent plugin now sets HooksKeyIsAgent: true. Its smoke check clears API-key and org-key environment overrides (including aliases) and isolates cached sign-ins. Agent hooks still depend on #8015 / DNO-1412. Deployment also requires publishing the #8109 hooks binary and updating the server pin: the current 0.3.37 binary predates agent-key precedence. No release is performed by this PR.

Motivation

One installation should explain which parts succeeded and preserve working client configuration when an update fails. Short-lived install codes remain credentials until redeemed, so copying them into a model transcript is avoided.

Platform MCP is unchanged: minting an install code requires the plaintext key. Command K adds no page or named resource here. Demo seed changes are excluded because these are one-time credentials.

Gutternote review steps

  1. Identities → an agent → Credentials → Issue a key, then Generate install command.
  2. The command instructions say to run it in a trusted shell and keep it out of chat. The project requirement and Claude CLI coverage caveat appear alongside it.
  3. After installation, ask OpenClaw to check offers a separate message. Copy it and confirm it contains neither the command nor the key.
  4. Deny clipboard permission or use a browser without the Clipboard API. Each Copy action shows Copy failed and a manual-copy alert.

Fixes DNO-1419

Narrated dashboard recording

This 49-second recording was captured from #8108 head db38b23597d3c1bc61ef5350eace1b6c4c40f695, whose complete file tree is identical to this PR's current head f18e50fdee8ff67eae7a116bad6d006cf67ab5bb (tree 172521930ca707f75c52c40d76a16715a576330b). It therefore demonstrates the same implementation. Prefer #8108 for review; do not merge both PRs.

Using synthetic local data, it shows trusted-shell installation guidance, the separate credential-free OpenClaw follow-up prompt, and Copy failed feedback when clipboard access is denied. The generated install code and key remain outside the recording crop.

This is a dashboard walkthrough, not a demonstration of completed OpenClaw installation or runtime hooks attribution. The identical #8108 tree passed all 30 focused installer tests.

narrated.webm

@mfbx9da4 mfbx9da4 added the enhancement New feature or request label Oct 26, 2026
@changeset-bot

changeset-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f18e50f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
server Minor
dashboard Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 files

This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread server/internal/plugins/impl.go Resolved
Comment thread docs/runbooks/openclaw-install.md Resolved
Comment thread server/internal/mcp/agent_install.go Resolved
mfbx9da4 and others added 6 commits October 26, 2026 16:34
main reached 52 in #8085, so the manifest change needs its own bump to republish.

Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
It carries the hooks API key, and extraction honors the archive's Unix mode.

Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
- Make the installed speakeasy.json 0600 whatever mode the installer gives it.
- Unpack the archive with python3 when unzip is missing.
- Print a Gateway restart step instead of restarting from inside the turn.
- Say a deleted project, not only a missing one, leaves the agent without hooks.
- Correct the SecretRef note on the MCP header.
- Run the script tests on a stub-only PATH and name the block-reason test for what it checks.

Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
…tall panel

Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
…rom the OpenClaw install

Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
@linear-code

linear-code Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

DNO-1419

@mfbx9da4
mfbx9da4 changed the base branch from main to cursor/agent-key-outranks-hooks-cache-da9f October 26, 2026 22:37
@mfbx9da4

Copy link
Copy Markdown
Contributor Author

Folded into #8108, which now targets main as a single PR with all of this change.

@mfbx9da4 mfbx9da4 closed this Oct 28, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants