feat(import): add OpenClaw import crate, CLI, gateway RPC, and UI#209
Open
feat(import): add OpenClaw import crate, CLI, gateway RPC, and UI#209
Conversation
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Add `moltis-openclaw-import` crate that detects OpenClaw installations and imports identity, provider keys, model preferences, skills, memory, sessions, Telegram channels, and MCP servers into Moltis. Backend (crates/openclaw-import): - Detection via `~/.openclaw/` and OPENCLAW_HOME env var - Per-category scanning and selective import with idempotency - ImportReport with per-category status, warnings, and TODOs - 59 unit tests covering all import categories CLI (moltis import): - `detect` — show detected installation and available data - `all` — import everything (with --dry-run) - `select -c identity,providers,...` — import specific categories - `--json` flag on all subcommands for structured output Gateway: - RPC methods: openclaw.detect, openclaw.scan, openclaw.import - openclaw_detected field in GonData for frontend conditional UI - Startup logging with detailed detection diagnostics - Feature-gated behind `openclaw-import` (default on) with cfg-gated fallbacks when the feature is disabled UI: - Onboarding wizard: conditional "Import" step between LLM and Voice steps, shown only when OpenClaw is detected - Settings page: "OpenClaw Import" section under Integrations with scan results, category checkboxes, and import progress
83bc77e to
7219fb6
Compare
Identity (agent name, timezone) and Telegram channel config were extracted during import but silently discarded. Now they are written to moltis.toml so subsequent onboarding steps and the gateway pick them up. - Persist imported identity (name → identity.name, timezone → user.timezone) - Persist imported Telegram channels to [channels.telegram] section - Add refreshGon() after import in onboarding wizard so later steps see the freshly persisted data - Return imported_identity and imported_channels in ImportReport for the UI - Add 4 new persistence tests (63 total, all passing)
The selector `.filter({ hasText: "OpenAI" })` matched "OpenAI Codex"
(OAuth) before plain "OpenAI" (API key), causing the test to click the
wrong provider and fail looking for API key form elements. Use an exact
regex match on the `.provider-item-name` element 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.
Summary
moltis-openclaw-importcrate that detects OpenClaw installations and imports identity, provider keys, model preferences, skills, memory, sessions, Telegram channels, and MCP servers — with per-category reporting, idempotent imports, and 59 unit testsopenclaw-importfeature flag (default on) in gateway and CLI for compile-time opt-outmoltis importcommand (detect,all,select) with--dry-runand--jsonflagsopenclaw.detect,openclaw.scan,openclaw.import) with conditional onboarding wizard step and Settings page sectionValidation
Completed
cargo +nightly-2025-11-30 fmt --all -- --checkcargo clippy -p moltis-openclaw-import -p moltis-gateway -p moltis --all-targets -- -D warningscargo test -p moltis-openclaw-import(59 tests pass)cargo check --workspaceopenclaw-importfeature (cargo check -p moltis-gateway --features "file-watcher,graphql,local-llm,metrics,prometheus,push-notifications,qmd,tailscale,tls,voice,web-ui")biome checkon modified JS filesRemaining
./scripts/local-validate.shManual QA
cargo run -- import detect/cargo run -- import detect --jsoncargo run -- import all --dry-run/cargo run -- import all --json~/.openclaw/exists🤖 Generated with Claude Code