Skip to content

feat(migrate): import Grok Bot configuration like Hermes - #178769

Closed
Patrick-Erichsen wants to merge 4 commits into
migration-native-agents-cronfrom
grok-configuration-migration
Closed

Patrick-Erichsen wants to merge 4 commits into
migration-native-agents-cronfrom
grok-configuration-migration

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Add Grok Bot to the existing one-time migration workflow used by Hermes, accepting local/account sources, offline snapshots, recipes, and marketplace/share URLs.

source → preview + backup → native agents / workspace / supported config
                         → explicit skipped items and integration setup guidance

User Impact

Imports owned-agent identity/icons, instructions, skills, complete explicitly exported memory, timezone, supported disabled cron jobs, and compatible disabled MCP connection definitions. Supports fresh onboarding and standalone migration into existing state with conflicts and repeat-apply handling.

Credentials are not copied, even with --include-secrets. Private cloud memory is not requested, and partial memory is skipped, including recovery from an older saved plan. Grok sign-in is used only to read source definitions. Known plugin IDs receive curated setup guidance for AgentMail, X/xurl, Gmail/Sheets/gog, Slack, and manual Salesforce MCP. No automatic plugin installation or drop-in tool parity is claimed.

Why This Change Was Made

The requested product is configuration migration rather than individual Claw packages. Patrick further narrowed scope to verified transfers and explicit handling of unsupported content. This uses the existing detect/plan/apply owners rather than a parallel importer.

Depends on native migration capabilities #178768. Replaces the product direction of the earlier URL-to-Claw importer #174960. Scope and proof are tracked in CLAW-1180.

Evidence

  • Before: new boundary regressions fail because credentials are still planned, partial memory is still copied, and hosted private memory is requested. Default token-only discovery cannot reopen its source on apply. Imported skills cannot be selected by their names.
    After: 22 focused tests pass across source/provider/integration boundaries and the real migration/config/agent/cron owners (48.80s wrapper wall time). Credentials are omitted, complete memory and existing state are preserved, partial memory and old credential actions are rejected, source discovery round-trips, and the actual CLI selector accepts Research.

  • Plugin installation: the official clawhub:@agentmail/[email protected] package installed successfully in the stopped isolated OCM environment; required dependencies are present. Inspection confirms explicit enabled=false, activated=false, status=disabled. --no-enable preserves defaults rather than forcing disable, so the setup guide now includes plugins disable agentmail. No sign-in or mail operation was performed.

  • Real-owner integration verifies multi-agent creation, icons, instructions, memory, skills, timezone, disabled MCP/cron, conflicts, repeat apply, and saved-plan recovery. It does not execute external integrations or schedulers.

  • Earlier real built-CLI Stalk proof: 28 migrated, 9 manual/skipped, zero errors/conflicts, verified backup; all 9 exported memory entries and 19 skill bodies retained exactly. Stalk completed a real local Ollama turn and displayed its imported purple avatar. The current native-migration screenshot is attached to CLAW-1180; screenshots on the older PR show a different Claw-package flow and are not proof of these migration effects.

  • Extension production/test types and root integration types pass. Scoped lint and candidate build receipts are recorded with the final revision below. Broad pre-existing line-count, graph-budget, and agentsapi unused-export findings were not waived or modified.

  • Final combined head 12dcad3075c builds successfully in 4m22s (existing UI gzip warning retained). Native head: 73ca0a4d30b. The rebuilt CLI selects only stalk-setup by name, emits all six curated integration paths, and plans no secret actions. Real Stalk repeat apply completes with 25 migrated, 12 skipped, no errors/conflicts, and a verified backup; all 19 skill bodies, 9 exported memories, and instructions remain intact, with one memory import block.

Live owned-account qualification remains blocked by the MacBook's Grok Keychain item denying SSH access. The local cache contains metadata including rooms, not full bots. No account-wide completeness or integration execution claim is made; private memory is now deliberately outside hosted import scope. Source conversations were not read and no messages were sent.

Review repairs are owned by the local stack coordinator. ClawSweeper's current guidance says repair/merge execution lanes are retired; review is requested after coherent stack updates. Nothing is merged or activated in personal state.

Merge Danger

Door: Two-way

Code can be reverted; imported state uses the migration framework's verified backup for restoration. Source Grok data is unchanged.

Blast Radius: Migration

Hosted definitions depend on Grok's current private API and source sign-in. Schedules and connections remain disabled until their tool scope, authorization, and delivery are reviewed.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Adds a Grok Bot migration plugin for importing bot content and supported configuration through the existing migration workflow.

Example: Import a snapshot containing a Researcher bot, complete exported memory, and a Research skill.

  • Before: OpenClaw has no Grok Bot migration provider.
  • After: The migration previews native agent and workspace changes, preserves existing memory, and leaves imported connections and schedules disabled.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation follows existing owners and fixes the prior defects, but hosted authority qualification and a latest-stable upgrade preserving settings and data remain outstanding.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users moving from Grok Bot otherwise have to recreate bot instructions, skills, exported memory, and supported configuration manually.
Reason: The supplied maintainer-authored direction approves a one-time migration through existing owners, with unsupported integrations and credentials explicitly left for setup.

Merge readiness

⛔ Blocked before merge - 5 items remain

Keep this PR open: it provides a useful maintainer-directed migration capability, and both prior findings are fixed; one documentation defect remains.

Priority: P2
Reviewed head: 12dcad3075cdb52326195b19161474f77dbbcb15

Before merge

  • Add real behavior proof - Authority-chain proof required: show this provider importing an owned bot while excluding a shared or nonowner bot before per-agent I/O, and rejecting withdrawn source access before subsequent requests. Credential-persistence consent proof from the previous review no longer applies because copying was removed. The body reports a successful built-CLI recipe import and repeat apply; the inspected screenshots show the earlier package flow, and hosted transport tests are mocked. Supply redacted terminal output or logs, removing tokens, IPs, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • [P3] Remove the remaining credential-copy promises (P3) - A user following this guide is told reusable API keys transfer with consent, but planGrokIntegrations only emits manual reminders and applyGrokIntegrationItem skips credential actions even with --include-secrets. The same obsolete promise appears in the migration hub and generated plugin descriptions. Update the handwritten coverage text and regenerate the plugin inventory/reference pages from the current manifest so users know they must sign in through destination setup.
  • Resolve security review attention item - No concrete authorization bypass was established, but hosted account isolation still needs production-boundary qualification.
  • Resolve merge risk - The hosted import relies on Grok's private roster ownership semantics to exclude other principals before authenticated per-agent reads; that boundary remains unqualified.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P3] [P3] Remove the remaining credential-copy promises — docs/cli/migrate.md:240-242

Tests

  • Missing end-to-end proof: Hosted owned-account and nearest-forbidden-principal qualification remain absent; the claimed red/green receipts and current migration screenshot are referenced outside the inspected GitHub artifacts.
Agent review details

How this fits together

The plugin translates local files or authenticated Grok definitions into migration plans; existing OpenClaw migration, config, agent, and scheduler owners apply the selected changes.

flowchart TD
A[Grok files or hosted account] --> B[Grok source adapter]
B --> C[Migration preview]
C --> D[Backup and offline admission]
D --> E[Native configuration and agent owners]
E --> F[Workspace content and disabled schedules]
E --> G[Migration report]
Loading

Technical review

Best possible solution:

Retain the plugin adapter over native migration owners, align its public coverage claims, and qualify its hosted boundary before landing the dependent stack.

Do we have a high-confidence way to reproduce the issue?

This is a new capability; source inspection confirms both prior fixes and the remaining documentation mismatch, without executing target code.

Is this the best way to solve the issue?

The existing provider contract and native effect owners are the appropriate implementation boundary; the source adapters serve distinct supported inputs without introducing a competing migration engine.

Full review comments:

  • [P3] [P3] Remove the remaining credential-copy promises — docs/cli/migrate.md:240-242
    A user following this guide is told reusable API keys transfer with consent, but planGrokIntegrations only emits manual reminders and applyGrokIntegrationItem skips credential actions even with --include-secrets. The same obsolete promise appears in the migration hub and generated plugin descriptions. Update the handwritten coverage text and regenerate the plugin inventory/reference pages from the current manifest so users know they must sign in through destination setup.
    Confidence: 1

Overall correctness: patch is correct
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4213136ceea7.

Merge-risk options

Maintainer options:

  1. Qualify hosted account isolation (recommended)
    Provide production-path evidence of an owned bot importing successfully and a shared or nonowner bot being excluded before per-agent network reads, including access withdrawal before subsequent requests.
  2. Defer hosted account import
    Separate the authenticated hosted adapter from the offline recipe and snapshot capability until its account boundary is qualified.

Provenance checked

  • Plugin-owned migration workflow keeps the original intent (1fc5b2b: Introduced plugin-owned migration providers, onboarding integration, preview, redaction, and runtime-backed imports; this PR adds a provider within that design.)
  • Offline migration admission keeps the original intent (7d0f600: Refused migration while the Gateway owns local state; this provider continues through that shared admission path.)
  • Migration documentation and generated inventories keeps the original intent (1185558: Existing CLI documentation describes bundled migration providers; the changes extend that inventory rather than alter another provider's behavior.)

Testing

Proof path: shipped entry point.

Security

Needs attention: No concrete authorization bypass was established, but hosted account isolation still needs production-boundary qualification.

Evidence

What I checked:

  • Introduced change and current main: The pinned introduced range adds the Grok provider; fetched main has no extensions/migrate-grok tree. The current PR head and base still match the supplied introduction evidence. (extensions/migrate-grok/provider.ts:10, 4213136ceea7)
  • Prior findings addressed: Default token-only discovery now records the reopenable live source, and planned skill items include skillName; the source and native integration tests cover those paths. (extensions/migrate-grok/plan.ts:106, 12dcad3075cd)
  • Credential scope: The provider generates manual credential reminders, skips saved import-api-key actions, and rejects credential-bearing saved MCP actions. (extensions/migrate-grok/integrations.ts:249, 12dcad3075cd)
  • Public documentation contradicts implementation: The CLI guide promises reusable API-key copying with consent; the migration hub and generated plugin descriptions retain similar claims despite the narrowed implementation. Public docs: docs/cli/migrate.md. (docs/cli/migrate.md:241, 12dcad3075cd)
  • Hosted account boundary: Hosted roster rows are filtered by agent kind, owner visibility, and viewerIsOwner before per-agent requests; source tests replace the transport and therefore do not qualify the live ownership contract. (extensions/migrate-grok/source/hosted.ts:166, 12dcad3075cd)
  • Discussion and supplied proof: The author reports successful built-CLI recipe import and repeat apply, explicitly leaves hosted account qualification and published-driver upgrade unproven, and identifies the inspected screenshots as the earlier package flow. The downloaded images confirm that limited scope. (12dcad3075cd)

PR surface

Source +3216, Tests +1291, Docs +239, Config +14, Generated 0, Other +9. Total +4769 across 44 files. Added test files: 6.

View PR surface stats
Area Files Added Removed Net
Source 25 3216 0 +3216
Tests 7 1291 0 +1291
Docs 8 242 3 +239
Config 1 14 0 +14
Generated 2 3 3 0
Other 1 9 0 +9
Total 44 4775 6 +4769

Review metrics

Metric Value Why it matters
New environment option 1: GROK_BOT_ACCESS_TOKEN Adds explicit source authentication for hosted migration, including platforms without native Keychain access.

Root-cause cluster

Relationship: canonical
Canonical: #178769
Summary: This PR owns the revised configuration-migration direction and depends on a separate native-effects capability.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is an optional migration capability with limited blast radius and no demonstrated urgent runtime regression.
  • merge-risk: 🚨 security-boundary: The plugin reads authenticated account content and uses roster ownership fields to select principals eligible for per-agent requests.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect proof for an owned bot and the nearest unauthorized bot, including rejection of withdrawn source access before further I/O.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-20T21:10:19.499Z sha 6eb63b62a3c6cfe54380967921b452055e1ef7dd :: needs real behavior proof before merge. :: [P2] [P2] Preserve token-only discovery through apply | [P2] [P2] Include skill names in migration item metadata

Reviewed October 20, 2026, 7:51 PM ET / 23:51 UTC (Revision 2).

@Patrick-Erichsen
Patrick-Erichsen force-pushed the grok-configuration-migration branch from 6eb63b6 to 12dcad3 Compare October 20, 2026 23:45
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

The current revision narrows the product to confirmed transfers: credential migration is removed, private cloud memory is not requested, and partial exported memory is skipped even on saved-plan recovery. Source login remains authentication for reading definitions only.

Both concrete provider findings are fixed: default discovery now records a reopenable source, and skill rows carry their source name for the actual CLI selector. Before-fix regression receipts and 22 passing source/provider/native integration tests are recorded in CLAW-1180. Denied owned-bot access remains unavailable, and forbidden/shared roster rows are filtered before per-agent requests.

Known integration IDs now have specific setup guidance rather than generic name matching. The official AgentMail 0.2.1 plugin was installed in an isolated stopped OCM environment, dependencies verified, then explicitly disabled. No service credentials, mail calls, or Gateway start were performed. This proves installability, not drop-in Grok tool parity.

The current native-migration screenshot is attached to CLAW-1180; the older URL-to-Claw PR screenshots are not evidence of this flow. Live owned-account qualification is still blocked by MacBook Keychain access. A published-driver upgrade is not newly claimed. Repairs remain owned by the local stack coordinator; the current bot contract reports repair lanes retired.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: migrate-claude plugin: migrate-hermes rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant