SIGN IN SIGN UP

refactor(core): extract application core into jcode-app-core crate (Phase A)

Move all non-presentation modules (113 modules / ~191K loc) out of the
monolithic root crate into a new physical crate, jcode-app-core, compiled
as a separate rustc unit. The root jcode crate becomes a thin facade
(pub use jcode_app_core::*) plus the presentation/entrypoint layer
(cli, tui, video_export, main).

Rationale: rustc type-checks a whole crate as one unit, so peak per-rustc
RSS is bounded by the largest crate. Splitting the 336K-loc root crate into
separate rustc processes is what actually lowers peak memory (the prior
SCC/DAG layering work was the prerequisite that made this a clean cut, since
no core module references crate::cli or crate::tui).

Measured: largest unit peak rustc VmHWM 3.18 GiB -> 2.643 GiB (app-core).
Further reductions come from sub-splitting app-core (Phase B) and extracting
jcode-tui (Phase C).

Mechanics:
- New crate crates/jcode-app-core (deps mirror root with paths rewritten;
  features default/jemalloc/jemalloc-prof/embeddings/pdf forwarded from root).
- git mv of 417 files preserving history; lib.rs aggregates pub mod decls
  and the moved CURRENT_SESSION_ID/get/set_current_session items.
- Promote cross-boundary items referenced by cli/tui from pub(crate) to pub
  (process_title, external_auth, provider selection/openrouter, server +
  session lifecycle re-exports, openai_request re-exports).
- Fix two escape-path includes now one dir deeper (macOS icns, openai test
  fixture) and import_tests ResumeTarget direct path.

Build: cargo check/build -p jcode --bin jcode exit 0.
J
jeremy committed
4dd91a9c6c61fbc17ca7125b9966d458605f9a7e
Parent: 648049a