feat(okww): migrate upstream parity into plugin adapter - #343
Open
1w1w11w1 wants to merge 3 commits into
Open
Conversation
Reviewer's Guide将 OK-WW 启动器/配置处理和游戏客户端解析迁移到插件适配器中,用基于模式的 ScriptConfig 会话替换定制的 JSON 配置编辑器,并通过新增测试收紧与用户配置存储、游戏进程管理以及成功检测相关的运行时行为。 OK-WW ScriptConfig 模式会话的时序图sequenceDiagram
actor User
participant Frontend
participant Backend
participant OkwwAdapterHooks
participant ScriptConfigTask
participant ProcessManager
participant OKWW
User->>Frontend: Click Configure action
Frontend->>Backend: POST /api/dispatch/start (mode ScriptConfig)
Backend->>OkwwAdapterHooks: prepare(runtime)
OkwwAdapterHooks->>OkwwAdapterHooks: check(runtime)
OkwwAdapterHooks->>Backend: return "Pass"
Backend->>OkwwAdapterHooks: run_script_config(runtime)
OkwwAdapterHooks->>ScriptConfigTask: __init__(script_info, script_config, user_config)
Backend->>ScriptConfigTask: main_task()
ScriptConfigTask->>ScriptConfigTask: _kill_processes()
ScriptConfigTask->>ScriptConfigTask: _configure_okww_launcher(root_path, resource)
ScriptConfigTask->>ScriptConfigTask: copy mas_config_dir -> script_config_path
ScriptConfigTask->>ProcessManager: open_process(exe_path)
ProcessManager-->>OKWW: start ok-ww.exe
ScriptConfigTask-->>ScriptConfigTask: wait_event.wait()
User->>Frontend: Click stop in session overlay
Frontend->>Backend: POST /api/dispatch/stop
Backend->>ScriptConfigTask: final_task()
ScriptConfigTask->>ScriptConfigTask: wait_event.set()
ScriptConfigTask->>ScriptConfigTask: _kill_processes()
ScriptConfigTask->>ScriptConfigTask: _configure_okww_launcher(root_path, resource)
ScriptConfigTask->>ScriptConfigTask: _update_json(Basic Options.json)
ScriptConfigTask->>ScriptConfigTask: copy script_config_path -> mas_config_dir
ScriptConfigTask-->>Backend: user_item.status = "完成"
无主之海客户端解析与 MAS 游戏启动的时序图sequenceDiagram
participant AutoProxyTask
participant resolve_wuthering_waves_process_path
participant _decode_official_launcher_process_path
participant _find_wegame_process_path_from_registry
participant ProcessManager
participant System
AutoProxyTask->>AutoProxyTask: check()
AutoProxyTask->>resolve_wuthering_waves_process_path: resolve_wuthering_waves_process_path(launcher_path)
alt launcher_path.name == "wegame.exe"
resolve_wuthering_waves_process_path->>_find_wegame_process_path_from_registry: _find_wegame_process_path_from_registry()
_find_wegame_process_path_from_registry-->>resolve_wuthering_waves_process_path: game_process_path
else launcher_path.name == "launcher.exe"
resolve_wuthering_waves_process_path->>_decode_official_launcher_process_path: _decode_official_launcher_process_path(launcher_path)
_decode_official_launcher_process_path-->>resolve_wuthering_waves_process_path: game_process_path
end
resolve_wuthering_waves_process_path-->>AutoProxyTask: game_process_path
AutoProxyTask->>AutoProxyTask: _mas_launch_game_before_task()
AutoProxyTask->>ProcessManager: open_process(game_process_path, Game.Arguments)
AutoProxyTask->>AutoProxyTask: _game_process_info()
AutoProxyTask->>ProcessManager: search_process(ProcessInfo, deadline)
AutoProxyTask->>AutoProxyTask: _kill_game_process()
AutoProxyTask->>ProcessManager: kill()
AutoProxyTask->>System: kill_process(game_process_path)
文件级变更
Tips and commandsInteracting with Sourcery
Customizing Your Experience打开你的 dashboard 来:
Getting HelpOriginal review guide in EnglishReviewer's GuideMigrates OK-WW launcher/config handling and game-client resolution into the plugin adapter, replaces the bespoke JSON-config editor with schema-driven ScriptConfig sessions, and tightens runtime behavior around user config storage, game process management, and success detection with new tests. Sequence diagram for OK-WW ScriptConfig schema sessionsequenceDiagram
actor User
participant Frontend
participant Backend
participant OkwwAdapterHooks
participant ScriptConfigTask
participant ProcessManager
participant OKWW
User->>Frontend: Click Configure action
Frontend->>Backend: POST /api/dispatch/start (mode ScriptConfig)
Backend->>OkwwAdapterHooks: prepare(runtime)
OkwwAdapterHooks->>OkwwAdapterHooks: check(runtime)
OkwwAdapterHooks->>Backend: return "Pass"
Backend->>OkwwAdapterHooks: run_script_config(runtime)
OkwwAdapterHooks->>ScriptConfigTask: __init__(script_info, script_config, user_config)
Backend->>ScriptConfigTask: main_task()
ScriptConfigTask->>ScriptConfigTask: _kill_processes()
ScriptConfigTask->>ScriptConfigTask: _configure_okww_launcher(root_path, resource)
ScriptConfigTask->>ScriptConfigTask: copy mas_config_dir -> script_config_path
ScriptConfigTask->>ProcessManager: open_process(exe_path)
ProcessManager-->>OKWW: start ok-ww.exe
ScriptConfigTask-->>ScriptConfigTask: wait_event.wait()
User->>Frontend: Click stop in session overlay
Frontend->>Backend: POST /api/dispatch/stop
Backend->>ScriptConfigTask: final_task()
ScriptConfigTask->>ScriptConfigTask: wait_event.set()
ScriptConfigTask->>ScriptConfigTask: _kill_processes()
ScriptConfigTask->>ScriptConfigTask: _configure_okww_launcher(root_path, resource)
ScriptConfigTask->>ScriptConfigTask: _update_json(Basic Options.json)
ScriptConfigTask->>ScriptConfigTask: copy script_config_path -> mas_config_dir
ScriptConfigTask-->>Backend: user_item.status = "完成"
Sequence diagram for Wuthering Waves client resolution and MAS game launchsequenceDiagram
participant AutoProxyTask
participant resolve_wuthering_waves_process_path
participant _decode_official_launcher_process_path
participant _find_wegame_process_path_from_registry
participant ProcessManager
participant System
AutoProxyTask->>AutoProxyTask: check()
AutoProxyTask->>resolve_wuthering_waves_process_path: resolve_wuthering_waves_process_path(launcher_path)
alt launcher_path.name == "wegame.exe"
resolve_wuthering_waves_process_path->>_find_wegame_process_path_from_registry: _find_wegame_process_path_from_registry()
_find_wegame_process_path_from_registry-->>resolve_wuthering_waves_process_path: game_process_path
else launcher_path.name == "launcher.exe"
resolve_wuthering_waves_process_path->>_decode_official_launcher_process_path: _decode_official_launcher_process_path(launcher_path)
_decode_official_launcher_process_path-->>resolve_wuthering_waves_process_path: game_process_path
end
resolve_wuthering_waves_process_path-->>AutoProxyTask: game_process_path
AutoProxyTask->>AutoProxyTask: _mas_launch_game_before_task()
AutoProxyTask->>ProcessManager: open_process(game_process_path, Game.Arguments)
AutoProxyTask->>AutoProxyTask: _game_process_info()
AutoProxyTask->>ProcessManager: search_process(ProcessInfo, deadline)
AutoProxyTask->>AutoProxyTask: _kill_game_process()
AutoProxyTask->>ProcessManager: kill()
AutoProxyTask->>System: kill_process(game_process_path)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1w1w11w1
force-pushed
the
codex/okww-dev-v2-parity
branch
from
August 8, 2026 14:58
2a86ddf to
f4cfd74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppConfigon the newConfigEntryroot forsetting,queues, andtools; isolate scripts, plans, and emulators behind an explicit legacy bridge instead of inheriting the oldGlobalConfigroot.uv.lockfor the new configuration-base dependencies.Verification
uv run --group plugins python -m unittest discover -s tests/plugins(28 passed)uv run python -m app.config.tests.test_isolation(11/11 passed)python -m compileall -q app plugins tests,uv lock --check,git diff --checkyarn formatpassed;yarn lintpassed with 2 existingvue/no-v-htmlwarningsThe full
testsdiscovery still has 3 unrelated update-service failures already present on this branch.