feat: 跨实例同步移植第5轮(orchestration 及循环依赖解耦)
Sync source to CNB / Sync Git ref (push) Has been cancelled

- orchestration.rs:同步子系统编排核心(能力判定/全局与实例开关/重协调)

- command_history.rs + hotbars.rs:命令历史与创造模式快捷栏同步

- synced_packs_axolotl.rs:资源包/数据包共享投影(单文件实现)

- resource_pack_options.rs:resourcesPacks 列表读写与合并(synced_packs 依赖)

- 解决循环依赖:synced_options_path 归入 files.rs;SyncedOptionJoinResolution 归入 pending.rs

- instance_rows 补 set_instance_sync_preference;api/instance/mod.rs 补 synced_packs 内联模块与三块 pub use

- 6 处 sqlx::query! 宏改写为非宏

已知:未编译验证;local_settings_editor 尚未搬入。
This commit is contained in:
AxTps committed 2026-10-04 07:38:10 +08:00
1 parent ed61a5942c
commit 6e9485c2f5
9 files changed
+3739 -1

No files matched your search

@@ -1,14 +1,32 @@
mod command_history;
mod files;
mod game_options;
pub(crate) mod game_options;
mod hotbars;
mod orchestration;
pub(in crate::api::instance) mod pending;
const COMMAND_HISTORY_FILE: &str = "command_history.txt";
const HOTBAR_FILE: &str = "hotbar.nbt";
pub use self::command_history::{get_command_history, set_command_history};
pub(super) use self::files::{
CheckpointStatus, begin_checkpoint, checkpoint, detach_link, ensure_link,
finish_checkpoint, finish_plain_checkpoint, instance_game_dir,
instance_is_running, instance_option_enabled, nbt_from_bytes, nbt_to_bytes,
option_can_apply_while_running, read_nbt_file, safe_instance_id,
sha1_bytes, sha1_file, sync_files_are_protected, synced_options_path,
};
pub(super) use self::orchestration::instance_option_supported;
pub use self::orchestration::{
GlobalSyncedOptions, SyncedOptionCapability, SyncedOptionJoinAction,
SyncedOptionJoinPreview, SyncedOptionJoinResolution, SyncedOptionsOverview,
get_capabilities, get_global_options, get_initialized_options,
get_instance_option_join_preview, get_overview, get_synced_options_folder,
reconcile_all, reconcile_changed_file, reconcile_instance,
set_global_option, set_instance_option,
};
pub(crate) use self::orchestration::{
monitor_persisted_processes, prepare_instance_update,
reconcile_instance_after_pack_update_with_state,
remove_generated_instance_files,
};