Skip to content

fix(import): adapt OpenClaw import for relocated auth profiles and auth config field#432

Merged
alexey-pelykh merged 1 commit intomainfrom
fix/import-auth-profiles-427
Mar 8, 2026
Merged

fix(import): adapt OpenClaw import for relocated auth profiles and auth config field#432
alexey-pelykh merged 1 commit intomainfrom
fix/import-auth-profiles-427

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Add discoverSourceAuthProfileIds() to walk the source directory and extract auth profile IDs from auth-profiles.json (v1) and legacy auth.json files
  • Add materializeAuthDefaults() to set agents.defaults.auth when a discovered profile matches the configured runtime (claude→anthropic, gemini→google, codex→openai, opencode→varies)
  • Wire both into the import pipeline so auth profiles imported from OpenClaw are not silently unused

Closes #427

Test plan

  • Unit tests for discoverSourceAuthProfileIds: modern store, legacy store, empty, malformed, dedup, legacy-with-profiles-key
  • Unit tests for materializeAuthDefaults: all four runtimes, first-match selection, no-runtime, auth-already-set, auth-false, no-match, empty profiles, non-JSON, no-agents, claude-prefix
  • Integration tests for importCommand: auth profiles + runtime → auth set, no profiles → no auth, no runtime → no auth
  • Existing tests pass (62/62)
  • Format, typecheck, lint clean

🤖 Generated with Claude Code

…th config field (#427)

Discover auth profile IDs from source directory during import and
materialize agents.defaults.auth when a runtime-matching profile exists.
OpenClaw configs lack the auth field — imported auth profiles would be
silently unused without this step.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) March 8, 2026 08:41
@alexey-pelykh alexey-pelykh merged commit 009f04e into main Mar 8, 2026
5 checks passed
@alexey-pelykh alexey-pelykh deleted the fix/import-auth-profiles-427 branch March 8, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(import): adapt OpenClaw import for relocated auth profiles and auth config field

1 participant