Skip to main content

Module compat_import

Module compat_import 

Source
Expand description

One-time legacy compatibility import.

While the migration is enabled (OXICODE_FOUNDATION_MIGRATION=1), oxicode reads a single legacy profile from a host-provided compatibility shim, writes a structured migration marker, and resolves the profile through the same decision function (crate::foundation::profiles::resolve_profile) as a normal Foundation profile.

Defaults: disabled. The importer never reads from ~/.oxicode/auth.json on its own — the user explicitly acknowledges the import via oxicode memory migrate-brain / oxicode config migrate-foundation.

Functions§

migration_enabled
true when the migration flag is set.
read_compatibility_shim
Read the legacy compatibility shim. The shim is a small JSON file that lives under ~/.oxi/foundation/v1/compatibility.json and is produced by the host’s compatibility installer. oxicode never fabricates one.
write_migration_marker
Write a migration marker. The marker is a JSON file under the foundation root that records who/what was migrated. The marker is for human auditing, not for runtime decisions.