Repository navigation
feat: set up OpenClaw MCP and hooks from the agent install command - #8108
Conversation
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>
🦋 Changeset detectedLatest commit: 2bec0c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
A plugin's speakeasy.json can now mark its hooks_api_key as an agent's own key (agent_key). The hooks relay and the spool drain then use that key ahead of a cached speakeasy-hooks login, so an agent installed on a machine where a person signed in keeps its events under the agent. SPEAKEASY_AI_HOOKS_API_KEY still wins, and an org key from SPEAKEASY_AI_HOOKS_ORG_KEY is never treated as an agent's. The generator gains GenerateConfig.HooksKeyIsAgent to write the flag; published plugin output is unchanged. Co-authored-by: Forge Bot <speakeasyforgebot@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 13 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 16 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…openclaw-review-5c3c
|
All contributors have signed the CLA ✍️ ✅ |
|
|
||||||||||||||||
|
|
||||||||||||||||
|
Found 1 test failure on Blacksmith runners: Failure
|
There was a problem hiding this comment.
1 issue found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/runbooks/hooks-environment-overrides.md">
<violation number="1" location="docs/runbooks/hooks-environment-overrides.md:72">
P2: This overstates the override for replay: `SPEAKEASY_AI_HOOKS_ORG_KEY` only replaces the baked key and clears `agent_key` on drain when the spooled deployment matches. Scope the sentence to match the code.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 28 files
Requires human review: Auto-approval blocked because this review re-detected 5 unresolved issues already reported by Cubic.
View guided diff | Turn on auto-fix | Re-trigger cubic
Apply SPEAKEASY_AI_HOOKS_ORG_KEY on replay only when the environment names the entry's server, skip the Claude sign-in nudge for agent plugins, let an explicit login see an existing cached sign-in, and let WritePlugin mark an agent key. Tests clear the org key and deployment env vars.
Write the gateway entry through a private batch file and openclaw config set --batch-file, as the one-line setup does, then make the saved config owner-only.
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes DNO-1419
Why
Connecting an agent to OpenClaw took manual steps. The Plugins page plugin carries an org hooks key, and a cached sign-in could outrank any key, so sessions were not recorded under the agent.
What changed
Before: the agent install command configured other MCP clients only. OpenClaw needed the gateway added by hand and the plugin downloaded separately.
After: on a machine with
openclaw, the samecurl … | sh:speakeasyMCP server, keeping the key out of process arguments;agent_key: true, mode 600), using--forceand--accept-capabilitieswhen the CLI lists them;allowConversationAccess, sends one test hook, prints PASS or FAIL, and says to restart the Gateway.The Manual tab gains an OpenClaw command. The hooks binary now prefers a key marked as an agent's to a cached personal sign-in. An agent with no project gets the gateway only. Hooks from a dashboard-issued key also need #8015, which grants
org:hooks_ingest.Gutternote review steps
/<org>/projects/<project>/identities/agents/new). Pick a server, then Create agent.openclaw mcp add speakeasywith the key from$SPEAKEASY_AGENT_KEY.Recording
Local stack, OpenClaw 2026.10.6 in Docker: install, chat through the gateway, read the session.
agent-install-openclaw-e2e.mp4
🚀 Preview Environment (PR #8108)
Preview URL: https://pr-8108.dev.getgram.ai
Gram Preview Bot