feat: offer OpenClaw migration during setup#846
Closed
kshitijk4poor wants to merge 6 commits intoNousResearch:mainfrom
Closed
feat: offer OpenClaw migration during setup#846kshitijk4poor wants to merge 6 commits intoNousResearch:mainfrom
kshitijk4poor wants to merge 6 commits intoNousResearch:mainfrom
Conversation
0e0b996 to
abff438
Compare
- Use get_hermes_home() instead of hardcoded Path.home() / ".hermes" so HERMES_HOME env var is respected - Rename setup.py's run_openclaw_migration to perform_openclaw_migration to avoid confusing shadowing with openclaw_migration.run_openclaw_migration - Remove unused keyword params from run_openclaw_migration (YAGNI) - Normalize Optional[Path] to Path | None (already uses __future__ annotations) - Eliminate double load_config() call on migration path
Contributor
|
Thanks for the work on this! We're going in a slightly different direction — we want the OpenClaw migration integrated directly into the interactive setup wizard flow (after install, before API/tool configuration starts), rather than via CLI flags and installer script changes. We'll be opening a new PR that takes the simpler approach: detect ~/.openclaw/ during the setup wizard, ask the user if they're migrating, and run the existing migration script inline. Appreciate the thorough test coverage and clean code though! |
Contributor
Author
|
Replacement PR is up at #981 with the requested wizard-only OpenClaw migration flow. This new PR carries the verified rebuild on a fresh branch instead. |
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.
Problem
OpenClaw migration currently lives behind an optional migration skill, which means users need Hermes running before they can import the API keys and config needed to run Hermes in the first place.
Issue #829 asks for that migration to happen naturally during install/setup instead of after first boot.
Closes #829
Supersedes the earlier
hermes migratedirection in #826What This PR Changes
hermes_cli/openclaw_migration.pyso setup can call the existing migration script directly.hermes setup --migrate-from openclawinhermes_cli/main.py.hermes setupwhen explicitly requested, or offers it automatically on first-run when~/.openclaw/is detected.scripts/install.shandscripts/install.ps1) to hand off into setup with the right migration flags.--skip-migration-promptwhen the installer prompt is declined so setup does not immediately ask again.nooryesdo not leak characters into the next setup prompt.Behavior Covered
~/.openclaw/present: setup offers migration before provider prompts.--migrate-from openclawand imports immediately.--skip-migration-promptand does not re-prompt.hermes setup --migrate-from openclawstill runs the migration.config.yamlbefore importing command allowlists and related config.nois fully consumed and does not corrupt the next prompt.Review Guide
hermes_cli/setup.pyMain setup-flow integration: detection, explicit migration, skip flag behavior, and summary path.
hermes_cli/openclaw_migration.pyThin wrapper around the existing migration script.
hermes_cli/main.pyNew setup CLI flags.
scripts/install.shandscripts/install.ps1Installer handoff into setup.
tests/hermes_cli/test_main.py,tests/hermes_cli/test_setup_migration.py,tests/hermes_cli/test_install_sh.pyRegression coverage for the new flows.
Notes For Reviewers
tests/tools/test_vision_tools.pyis a test-only stabilization change to keep the suite green; it does not change production behavior for this feature.optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.pyrather than duplicating logic in setup.Verification
Ran locally after the follow-up installer fix:
python -m pytest tests/hermes_cli/test_install_sh.py -q->1 passedpython -m pytest tests/hermes_cli/test_main.py tests/hermes_cli/test_setup_migration.py -q->7 passedpython -m pytest tests/tools/test_vision_tools.py -q->42 passedpython -m hermes_cli.main setup --help-> passedbash -n scripts/install.sh-> passedpython -m pytest tests/ -q->2868 passed, 5 skipped, 23 deselected, 3 warningsBranch Status
fix: consume full installer prompt input(62b5a7d)