Move external agent migration into its crate (#33456)

## What changed

- Move migration detection, import orchestration, models, and reporting from
  `codex-app-server` into `codex-external-agent-migration`.
- Keep app-server protocol conversion in a dedicated boundary module.
- Organize source-specific configuration, sessions, hooks, plugins, commands,
  subagents, and memory handling behind shared migration adapters.
- Relocate and split the migration tests alongside the extracted service.

GitOrigin-RevId: 3378ec2064806a28136d6ac98664ca1d75414a4e
This commit is contained in:
charlesgong-openai authored and copyberry committed 2026-07-16 00:34:36 +00:00
1 parent 2edad72de3
commit e7efc5b04b
57 files changed
+7713 -7471

No files matched your search

@@ -2,7 +2,6 @@ use super::RewriteProfile;
use super::external_agent_config_dir;
use super::invalid_data_error;
use super::json_u64;
use super::rewrite_external_agent_terms;
use super::rewrite_hook_command_for_source;
use super::write_hook_migration;
use codex_hooks::HOOK_EVENT_NAMES;
@@ -193,10 +192,7 @@ pub(super) fn append_convertible_hook_groups_cla(
{
command_payload.insert(
"statusMessage".to_string(),
JsonValue::String(rewrite_external_agent_terms(
status_message,
rewrite_profile,
)),
JsonValue::String(rewrite_profile.rewrite(status_message)),
);
}
hook_commands.push(JsonValue::Object(command_payload));