lycheedev 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/lycheedev.js CHANGED
@@ -40,6 +40,7 @@ commands
40
40
  use --character <n> pin the window that reports character <n>
41
41
  use --clear drop the pin
42
42
  send <text> type one slash command into the running game
43
+ reload reload and locally confirm readiness; --resume <nonce> resumes without reloading
43
44
  capture poll the game window and decode the completion notice
44
45
  run --task <id> deliver, decode, reload once and read the result ticket
45
46
  bugs --count <n> snapshot recent errors and read the result ticket
@@ -121,6 +122,8 @@ function targetArgs(client) {
121
122
  const args = [];
122
123
  if (client && client.hwnd) args.push('--hwnd', String(client.hwnd));
123
124
  if (client && client.pid) args.push('--pid', String(client.pid));
125
+ const exePath = client?.exePath || client?.instance?.exePath;
126
+ if (exePath) args.push('--exe-path', exePath);
124
127
  return args;
125
128
  }
126
129
 
@@ -595,12 +598,12 @@ function main(argv) {
595
598
  // Commands that type into the game must target a live window, and the
596
599
  // executable name cannot tell two instances apart, so resolve which running
597
600
  // instance to use before forwarding.
598
- const runtime = ['send', 'capture', 'run', 'bugs'].includes(command)
601
+ const runtime = ['send', 'capture', 'run', 'bugs', 'reload'].includes(command)
599
602
  ? resolveRuntime(flags)
600
603
  : null;
601
604
  if (runtime && runtime.error) return 1;
602
605
  const live = runtime && runtime.hwnd
603
- ? { hwnd: runtime.hwnd, pid: runtime.pid }
606
+ ? runtime
604
607
  : null;
605
608
 
606
609
  switch (command) {
@@ -613,6 +616,9 @@ function main(argv) {
613
616
  if (!live) return 1;
614
617
  return forward(['send', ...targetArgs(live), '--text', text, ...passthrough(flags)]);
615
618
  }
619
+ case 'reload':
620
+ if (!live) return 1;
621
+ return forward(['reload', ...targetArgs(live), ...passthrough(flags)]);
616
622
  case 'capture':
617
623
  if (!live) return 1;
618
624
  return forward(['capture', ...targetArgs(live), ...passthrough(flags)]);
@@ -626,7 +632,7 @@ function main(argv) {
626
632
  console.error('error: no SavedVariables path recorded for this client; re-run `lycheedev install`');
627
633
  return 1;
628
634
  }
629
- return forward(['run', ...targetArgs(live), '--task', flags.task, '--sv', client.svPath,
635
+ return forward(['run', ...forwarded, ...targetArgs(live), '--task', flags.task, '--sv', client.svPath,
630
636
  ...passthrough(flags)]);
631
637
  case 'bugs':
632
638
  if (!flags.count) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lycheedev",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "lycheedev: install the World of Warcraft inspection addon, its in-game automation tooling, and drive it from the command line.",
5
5
  "keywords": [
6
6
  "wow",
@@ -276,7 +276,7 @@ ns.L = {
276
276
  AUTO_STATUS_LINE = "任务 %s | 请求 %s | 状态 %s | 结果 %s",
277
277
  AUTO_RESULT_EXPIRED = "结果已过期",
278
278
  AUTO_RESULT_MISSING = "没有找到 Ticket %s 对应的已保存结果。",
279
- AUTO_USAGE = "用法:/dev auto run <任务ID> | bug <1-100> [请求ID] | status <任务ID> | show <Ticket> | ack <Ticket> received|failed | cancel <任务ID> | identify | unidentify | stop",
279
+ AUTO_USAGE = "用法:/dev auto run <任务ID> | bug <1-100> [请求ID] | reload <编号> [Ticket] | status <任务ID> | show <Ticket> | ack <Ticket> received|failed | cancel <任务ID> | identify | unidentify | stop",
280
280
  AUTO_PROVIDER_FAILED = "错误快照失败:%s",
281
281
  AUTO_BUG_TITLE = "错误快照(%d 条)",
282
282
  AUTO_EXECUTION_COUNT = "%d 条执行记录",
@@ -283,7 +283,7 @@ local english = {
283
283
  AUTO_STATUS_LINE = "Task %s | request %s | status %s | result %s",
284
284
  AUTO_RESULT_EXPIRED = "Result expired",
285
285
  AUTO_RESULT_MISSING = "No saved result found for ticket %s.",
286
- AUTO_USAGE = "Usage: /dev auto run <task-id> | bug <1-100> [request-id] | status <task-id> | show <ticket> | ack <ticket> received|failed | cancel <task-id> | identify | unidentify | stop",
286
+ AUTO_USAGE = "Usage: /dev auto run <task-id> | bug <1-100> [request-id] | reload <nonce> [ticket] | status <task-id> | show <ticket> | ack <ticket> received|failed | cancel <task-id> | identify | unidentify | stop",
287
287
  AUTO_PROVIDER_FAILED = "Error snapshot failed: %s",
288
288
  AUTO_BUG_TITLE = "Bug snapshot (%d)",
289
289
  AUTO_EXECUTION_COUNT = "%d executions",
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.1.0
9
+ ## Version: 1.2.0
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png
@@ -33,6 +33,7 @@ Modules\Events\Monitor.lua
33
33
  Libs\AutomationQR.lua
34
34
  UI\Export.lua
35
35
  UI\AutomationOverlay.lua
36
+ Modules\Automation\Reload.lua
36
37
  UI\Pages\ExportRecords.lua
37
38
  UI\Features.lua
38
39
  UI\Pages\Object.lua
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.1.0
9
+ ## Version: 1.2.0
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png
@@ -33,6 +33,7 @@ Modules\Events\Monitor.lua
33
33
  Libs\AutomationQR.lua
34
34
  UI\Export.lua
35
35
  UI\AutomationOverlay.lua
36
+ Modules\Automation\Reload.lua
36
37
  UI\Pages\ExportRecords.lua
37
38
  UI\Features.lua
38
39
  UI\Pages\Object.lua
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.1.0
9
+ ## Version: 1.2.0
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png
@@ -33,6 +33,7 @@ Modules\Events\Monitor.lua
33
33
  Libs\AutomationQR.lua
34
34
  UI\Export.lua
35
35
  UI\AutomationOverlay.lua
36
+ Modules\Automation\Reload.lua
36
37
  UI\Pages\ExportRecords.lua
37
38
  UI\Features.lua
38
39
  UI\Pages\Object.lua
@@ -6,7 +6,7 @@
6
6
  ## Notes-zhCN: 运行 Lua,检查对象与事件,追踪函数并查看错误。
7
7
  ## Notes-zhTW: 執行 Lua,檢查物件與事件,追蹤函式並檢視錯誤。
8
8
  ## Author: Follen
9
- ## Version: 1.1.0
9
+ ## Version: 1.2.0
10
10
  ## Dependencies: !BugGrabber
11
11
  ## SavedVariables: LycheeDevDB, DumperDB
12
12
  ## IconTexture: Interface\AddOns\Lychee Dev\Media\Logo.png
@@ -33,6 +33,7 @@ Modules\Events\Monitor.lua
33
33
  Libs\AutomationQR.lua
34
34
  UI\Export.lua
35
35
  UI\AutomationOverlay.lua
36
+ Modules\Automation\Reload.lua
36
37
  UI\Pages\ExportRecords.lua
37
38
  UI\Features.lua
38
39
  UI\Pages\Object.lua
@@ -28,6 +28,7 @@ local MAX_UNACKNOWLEDGED_RESULTS = 3
28
28
 
29
29
  local activeContext
30
30
  local awaitingNotice
31
+ local identityReceiptNonce
31
32
  local unacknowledgedResults = 0
32
33
  local executedRequests = {}
33
34
 
@@ -641,7 +642,12 @@ function Controller.Stop()
641
642
  Print(L.AUTO_STOPPED)
642
643
  end
643
644
 
644
- function Controller.StopIdentify()
645
+ function Controller.StopIdentify(nonce)
646
+ if ns.AutomationReload then ns.AutomationReload.Clear(nonce) end
647
+ if nonce and nonce ~= identityReceiptNonce then
648
+ return
649
+ end
650
+ identityReceiptNonce = nil
645
651
  ns.AutomationOverlay.HideIdentity()
646
652
  Print(L.AUTO_IDENTITY_HIDDEN)
647
653
  end
@@ -708,6 +714,7 @@ function Controller.Identify()
708
714
  return
709
715
  end
710
716
 
717
+ identityReceiptNonce = nil
711
718
  if ns.AutomationOverlay.ShowIdentity(json) then
712
719
  Print(L.AUTO_IDENTITY_SHOWN:format(character, realm or "-"))
713
720
  else
@@ -719,7 +726,7 @@ end
719
726
  -- it back as a chat command: `/dev auto ack <ticket> <received|failed>`. That
720
727
  -- clears the pending-flush block immediately (no reload needed) and records the
721
728
  -- outcome so the page can show it and a later session keeps it.
722
- function Controller.Ack(ticket, outcome)
729
+ function Controller.Ack(ticket, outcome, nonce)
723
730
  if not EnsureReady() then
724
731
  return
725
732
  end
@@ -736,6 +743,16 @@ function Controller.Ack(ticket, outcome)
736
743
  Print(L.AUTO_ACK_TICKET_UNKNOWN:format(ticket))
737
744
  return
738
745
  end
746
+ if nonce then
747
+ if not IsValidRequestId(nonce) or #ticket > 64 then
748
+ Print(L.AUTO_USAGE)
749
+ return
750
+ end
751
+ if awaitingNotice and awaitingNotice.ticket ~= ticket then
752
+ Print(L.AUTO_IDENTITY_NOTICE_SHOWN)
753
+ return
754
+ end
755
+ end
739
756
  record.receivedAt = time()
740
757
  record.receivedStatus = outcome
741
758
  -- Only the first acknowledgement of a result frees a backlog slot; a repeat
@@ -750,13 +767,34 @@ function Controller.Ack(ticket, outcome)
750
767
  awaitingNotice = nil
751
768
  ns.AutomationOverlay.HideNotice()
752
769
  end
770
+ if nonce then
771
+ -- Echo only validated identifiers. A fresh nonce separates this receipt
772
+ -- from an older acknowledgement still visible on screen.
773
+ local receipt = string.format(
774
+ '{"v":1,"ticket":"%s","task":"ack","run":"%s","ts":%d,"status":"%s"}',
775
+ ticket, nonce, record.receivedAt, outcome)
776
+ if ns.AutomationOverlay.ShowIdentity(receipt) then
777
+ identityReceiptNonce = nonce
778
+ end
779
+ end
753
780
  Print(L.AUTO_ACK_DONE:format(ticket, outcome))
754
781
  end
755
782
 
756
783
  function Controller.HandleCommand(text)
757
784
  local action, rest = tostring(text or ""):match("^(%S+)%s*(.-)%s*$")
758
785
  action = action and action:lower() or ""
759
- if action == "run" then
786
+ if action ~= "reload" and action ~= "unidentify" and ns.AutomationReload then
787
+ ns.AutomationReload.Clear()
788
+ end
789
+ if action == "reload" then
790
+ local nonce, ticket = rest:match("^(%S+)%s+(%S+)$")
791
+ if not nonce then nonce = rest:match("^(%S+)$") end
792
+ if activeContext or not IsValidRequestId(nonce) or (ticket and not IsValidTicket(ticket))
793
+ or (awaitingNotice and awaitingNotice.ticket ~= ticket)
794
+ or not ns.AutomationReload or not ns.AutomationReload.Request(nonce) then
795
+ Print(L.AUTO_USAGE)
796
+ end
797
+ elseif action == "run" then
760
798
  local taskId = rest:match("^(%S+)$")
761
799
  if not taskId then
762
800
  Print(L.AUTO_USAGE)
@@ -807,18 +845,22 @@ function Controller.HandleCommand(text)
807
845
  end
808
846
  Controller.Identify()
809
847
  elseif action == "unidentify" then
810
- if rest ~= "" then
848
+ local nonce = rest ~= "" and rest:match("^(%S+)$") or nil
849
+ if rest ~= "" and not IsValidRequestId(nonce) then
811
850
  Print(L.AUTO_USAGE)
812
851
  return
813
852
  end
814
- Controller.StopIdentify()
853
+ Controller.StopIdentify(nonce)
815
854
  elseif action == "ack" then
816
- local ticket, outcome = rest:match("^(%S+)%s+(%S+)$")
855
+ local ticket, outcome, nonce = rest:match("^(%S+)%s+(%S+)%s+(%S+)$")
856
+ if not ticket then
857
+ ticket, outcome = rest:match("^(%S+)%s+(%S+)$")
858
+ end
817
859
  if not ticket or not outcome then
818
860
  Print(L.AUTO_USAGE)
819
861
  return
820
862
  end
821
- Controller.Ack(ticket, outcome:lower())
863
+ Controller.Ack(ticket, outcome:lower(), nonce)
822
864
  else
823
865
  Print(L.AUTO_USAGE)
824
866
  end
@@ -0,0 +1,101 @@
1
+ local ADDON_NAME, ns = ...
2
+
3
+ -- One bootstrap listener is required to read a pending request after SV load.
4
+ -- Without a request it unregisters immediately; no overlay or timer is built.
5
+ local Reload = {}
6
+ ns.AutomationReload = Reload
7
+ local driver = CreateFrame("Frame")
8
+ local pending, expiry, markerShown
9
+ local entered, loadingDone = false, false
10
+ local requestedThisSession = false
11
+ local TTL = 120
12
+
13
+ local function ValidNonce(value)
14
+ return type(value) == "string" and #value > 0 and #value <= 64
15
+ and value:match("^[A-Za-z0-9%.%-]+$") ~= nil
16
+ end
17
+
18
+ local function PlainText(value)
19
+ return not (issecretvalue and issecretvalue(value)) and type(value) == "string" and value ~= ""
20
+ end
21
+
22
+ function Reload.Clear(nonce)
23
+ if nonce and (not pending or pending.nonce ~= nonce) then return false end
24
+ if expiry then expiry:Cancel(); expiry = nil end
25
+ driver:UnregisterAllEvents()
26
+ if markerShown then ns.AutomationOverlay.HideIdentity() end
27
+ markerShown, pending = nil, nil
28
+ return true
29
+ end
30
+
31
+ local function TryReady()
32
+ if not pending or not entered or not loadingDone or ns.IsCombatBlocked() then return end
33
+ if not SlashCmdList.LYCHEEDEV or not ns.Automation or not ns.AutomationOverlay then return end
34
+ local character, realm = UnitName("player"), GetRealmName()
35
+ if not PlainText(character) or not PlainText(realm)
36
+ or character ~= pending.character or realm ~= pending.realm then Reload.Clear(); return end
37
+ local version, build = GetBuildInfo()
38
+ local json = string.format(
39
+ '{"v":1,"kind":"reload","run":"%s","status":"ready","ts":%d,"client":"%s","build":"%s.%s"}',
40
+ pending.nonce, time(), ns.Client.id, version, build)
41
+ markerShown = ns.AutomationOverlay.ShowIdentity(json) and true or false
42
+ driver:UnregisterEvent("PLAYER_ENTERING_WORLD")
43
+ driver:UnregisterEvent("LOADING_SCREEN_DISABLED")
44
+ end
45
+
46
+ function Reload.Request(nonce)
47
+ if not ValidNonce(nonce) or ns.IsCombatBlocked() or requestedThisSession then return false end
48
+ ns.InitializeDatabase()
49
+ -- Do not overwrite an unknown/newer request format.
50
+ if LycheeDevDB.reloadHandshake ~= nil then return false end
51
+ local character, realm = UnitName("player"), GetRealmName()
52
+ if not PlainText(character) or not PlainText(realm) then return false end
53
+ Reload.Clear()
54
+ ns.EnsureSafety()
55
+ local request = {schema=1, nonce=nonce, requestedAt=time(),
56
+ character=character, realm=realm}
57
+ LycheeDevDB.reloadHandshake = request
58
+ requestedThisSession = true
59
+ local ok = pcall(ReloadUI)
60
+ if not ok then
61
+ if LycheeDevDB.reloadHandshake == request then LycheeDevDB.reloadHandshake = nil end
62
+ return false
63
+ end
64
+ -- Only the next Lua session can publish ready, never this call stack.
65
+ return true
66
+ end
67
+
68
+ driver:RegisterEvent("ADDON_LOADED")
69
+ driver:SetScript("OnEvent", function(_, event, name, isReloadingUi)
70
+ if event == "ADDON_LOADED" then
71
+ if name ~= ADDON_NAME then return end
72
+ driver:UnregisterEvent("ADDON_LOADED")
73
+ local request = type(LycheeDevDB) == "table" and LycheeDevDB.reloadHandshake
74
+ if type(request) ~= "table" or request.schema ~= 1 then return end
75
+ LycheeDevDB.reloadHandshake = nil
76
+ if not ValidNonce(request.nonce) or type(request.requestedAt) ~= "number"
77
+ or time() < request.requestedAt or time() - request.requestedAt > TTL
78
+ or not PlainText(request.character) or not PlainText(request.realm) then return end
79
+ pending = {nonce=request.nonce,character=request.character,realm=request.realm}
80
+ ns.EnsureSafety()
81
+ driver:RegisterEvent("PLAYER_ENTERING_WORLD")
82
+ driver:RegisterEvent("LOADING_SCREEN_DISABLED")
83
+ driver:RegisterEvent("LOADING_SCREEN_ENABLED")
84
+ driver:RegisterEvent("PLAYER_LEAVING_WORLD")
85
+ expiry = C_Timer.NewTimer(TTL, function() Reload.Clear() end)
86
+ elseif event == "PLAYER_ENTERING_WORLD" then
87
+ if not isReloadingUi then Reload.Clear(); return end
88
+ entered = true
89
+ TryReady()
90
+ elseif event == "LOADING_SCREEN_DISABLED" then
91
+ loadingDone = true
92
+ TryReady()
93
+ elseif event == "LOADING_SCREEN_ENABLED" then
94
+ loadingDone = false
95
+ if markerShown then Reload.Clear() end
96
+ elseif event == "PLAYER_LEAVING_WORLD" then
97
+ Reload.Clear()
98
+ end
99
+ end)
100
+
101
+ ns.RegisterCombatShutdown(function() Reload.Clear() end)
@@ -1,129 +1,44 @@
1
1
  ---
2
2
  name: lychee-dev
3
- description: Use when working with the Lychee Dev WoW addon to read persisted runtime evidence by Ticket or prepare bounded /run memory/CPU investigations, object inspection, and event monitoring. Do not use for generic WoW API research or unrelated addon implementation.
3
+ description: 编排 Lychee Dev 的 WoW 后台自动化任务、错误快照、二维码回执和 SavedVariables Ticket 读取;也用于有界 Run 性能调查、对象检查与事件监控。不用于无关插件实现或通用 WoW API 查询。
4
4
  ---
5
5
 
6
- # Lychee Dev skill
6
+ # Lychee Dev
7
7
 
8
- Use this skill as the operational guide for Lychee Dev, an in-game evidence workbench. The desired output is either (a) an evidence-backed diagnosis from SavedVariables or (b) a command/workflow the user can paste into WoW and report back.
8
+ 把用户的调查问题变成完整、可追溯的游戏运行证据。已获授权的自动化应连续完成发送、读取、确认和收尾,不能停在“已发送”、二维码出现或脚本生成。
9
9
 
10
- Detail lives in `references/`. Read the one that matches the task instead of guessing:
10
+ ## 按任务读取资料
11
11
 
12
- | Reference | Read it when |
13
- | --- | --- |
14
- | [references/clients.md](references/clients.md) | Any command that types into the game, or the user has several builds or instances open |
15
- | [references/automation.md](references/automation.md) | Authorized scripted task delivery: task blocks, run, notice, reload, receipt |
16
- | [references/runtime-investigations.md](references/runtime-investigations.md) | Designing a memory/CPU probe |
12
+ - 要操作正在运行的游戏:先读 [clients.md](references/clients.md),确定版本、实例和安装位置。
13
+ - 要执行自动任务、获取最近 n 条错误、ACK 或恢复中断:读 [automation.md](references/automation.md),按其闭环继续到完成。
14
+ - 设计内存/CPU 调查:另读 [runtime-investigations.md](references/runtime-investigations.md)。只读已有 Ticket 不需要准备新探针。
17
15
 
18
- ## Choose the workflow
16
+ ## 默认后台通路
19
17
 
20
- - **Persisted evidence:** locate the WoW `WTF` SavedVariables file, find the exact Ticket, and read the complete payload.
21
- - **Run:** open `/dev`, use the Run page, and paste `/run` or `/script` Lua.
22
- - **Automated task delivery:** when the user authorized scripted task delivery and reload, use the Python tooling in `scripts/` to upsert a task block, run it, decode the completion notice, reload once, and read the Ticket. Read [references/automation.md](references/automation.md) first; live-window steps still need per-host verification.
23
- - **Memory/CPU investigation:** use Run with a question-specific script; read [references/runtime-investigations.md](references/runtime-investigations.md) before designing a probe.
24
- - **Objects:** open `/dev` > Objects and inspect a global/object path or use the mouse picker.
25
- - **Events:** open `/dev` > Events, search the current client's catalog, select events, start monitoring, reproduce the behavior, then stop and save.
18
+ 使用随 Skill 附带的 `scripts/automation.py`。发送显式传 `--mode messages`,通过 PostMessage 投递到绑定的 HWND;WGC 直接捕获窗口,zxing-cpp 解码。两者都不要求窗口获得前台焦点,不使用 GDI 截屏,也不需要剪贴板。不要自行换成 SetForegroundWindow、SendInput、点击聊天框或要求用户粘贴。
26
19
 
27
- The Performance page, automatic capture, health scan and function benchmark have been removed. Run, Objects, Events, Trace, Errors and Saved Records remain available. Do not route a new investigation to the removed UI. There are no separate `/object` or `/event` slash commands. Do not invent them; give the `/dev` UI steps instead.
20
+ 工具仍保留显式 `foreground` 模式;它不是后台通路的自动降级方案。后台异常时检查状态和证据,不把失败直接转成人工提交。用户明确选择人工 Run 时,才按该方式组织。
28
21
 
29
- ## Know which client you are driving
22
+ 无焦点要求不等于所有窗口状态都可用:最小化、客户端切换、战斗、尚未载入世界、其他游戏编辑框和自定义聊天键位可能影响操作。只报告本次实际验证的客户端/版本/状态。消息成功入队不证明游戏执行;二维码出现不证明 SV 已落盘。
30
23
 
31
- Four builds are supported: Retail `12.1.0` (`_retail_`), Classic `5.5.4` (`_classic_`), Classic Titan `3.80.2` (`_classic_titan_`) and WoW: Forever (无限服) `1.60.1` (`_classic_beta_`, or `_forever_`). Other folders may exist on disk — `_classic_era_`, `_anniversary_`, `_beta_` — and the addon does not serve those; `_classic_beta_` is served when it holds Forever, so never decide from the folder name. Never infer the build from the window title, and never assume `WowClassic.exe` means Classic — every non-retail build uses that name.
24
+ 支持重载握手的插件与脚本应配套更新。自动化重载使用 `reload --mode messages`:脚本本地识别本次 nonce 的就绪二维码并清理,只向 Agent 返回简短 JSON。正常流程不要采集整图交给 Agent 判断。`run`/`bugs` 的输出重载同样等待就绪;超时查看日志中的阶段和本地截图,使用 `reload --resume <nonce>` 继续等待/清理,禁止重新发送重载。该信号证明命令通路已在重载后进入世界,不代表任意第三方异步任务都已完成。
32
25
 
33
- A folder name is a location, not an identity: the launcher reuses a test folder for whatever is on the test track, so Forever currently lives under `_classic_beta_`, which a MoP-era classic test client also uses. The CLI resolves each client from its own `.flavor.info` product code and build instead of the folder; do the same when reasoning about a machine, and never promise a build because a folder is named a certain way.
26
+ ## 完成标准
34
27
 
35
- Before a command that types into the game, confirm the target:
28
+ 一次自动调查需要取得匹配 task/requestId/Ticket 的完整报告,核对身份与校验信息、保存证据、确认 ACK,并完成该回执的界面清理。未完成的阶段必须明确说明。不要为了清理画面重跑任务。
36
29
 
37
- ```text
38
- lycheedev clients # every build on disk, its version, and install state
39
- lycheedev instances # what is running now, with pid and window handle
40
- lycheedev instances --identify # also read each window's character and build
41
- lycheedev use [index] # pin one as the default target
42
- lycheedev use --character <name> # pin the window reporting that character
43
- ```
30
+ - 接收已有 Ticket:先找精确记录,禁止重新执行原任务来“获取同样结果”。
31
+ - 新任务:只在目标安装目录 `Modules/Automation/auto/auto.lua` 更新自己拥有的 task-id 区块;同一次逻辑执行保持 requestId 不变。
32
+ - 错误调查:`bugs --count n` 获取最多 n 条已有错误,不制造新错误填满数量。
33
+ - 完整内容始终走 SV;超过 10 KB 不切换传输方式,不把正文塞进二维码。
34
+ - 测试也是完整工作:每个用例结束或中断时处理自己留下的草稿、回执与任务块,再报告状态;不要在没有解释的情况下留在下一用例的中间步骤。
44
35
 
45
- When more than one window is running and you cannot tell them apart, ask the user to run `/dev auto identify` in the windows they care about, then run `lycheedev instances --identify`. That reads a small identity QR code from the top-left corner of each window — through window capture, so no window is focused and nothing is typed — and prints the character and build behind every window:
36
+ 保留当前会话已给出的授权,不重复请求常规步骤确认。调查授权不意味着可覆盖其他任务、重置数据库或发布插件;共享游戏实例存在实际占用时先协调。
46
37
 
47
- ```text
48
- [0] Retail pid=62460 hwnd=0x12410c7a v12.1.0.69587
49
- character: 荔枝-白银之手 client: retail build: 12.1.0
50
- ```
38
+ ## 已有证据与人工工具
51
39
 
52
- Then pin the intended window by name — `lycheedev use --character 荔枝-白银之手` — and confirm that character back to the user, instead of guessing from a pid. `/dev auto unidentify` hides the marker again. The marker is not shown by default because it shares the corner with the completion notice.
40
+ SV 是数据:用受限解析器读取,不能在宿主执行 Lua。主记录位于 `LycheeDevDB.exports.records[TICKET]`,完整内容是 `payload.content`;`history` 与 metadata 都不能代替完整报告。未知/较新字段应保留,已有旧性能记录仍可作为历史证据。
53
41
 
54
- With several clients open, `--instance <index>` or `--character <name>` overrides the pin for one command, and `--client` filters by build. Different builds can stay open together because each install holds its own addon copy. Two windows of the **same** build that show the **same character and realm** — or that show no marker at all — still cannot be told apart, so ask the user to close all but one instead of picking for them. Full rules and the precedence order are in [references/clients.md](references/clients.md).
42
+ 用户选择手动操作时:Run 支持 `/run` 或 `/script` 和 Lua 5.1;异步调查使用验证过的完成写入机制。对象检查走 `/dev > Objects`,事件监控走 `/dev > Events`。没有独立 `/object`、`/event` 命令;Performance、自动性能采集、health scan 和 benchmark 页面已移除。脚本必须有界,异步资源用清理回调释放,不对可能为 secret 的值直接比较或格式化。
55
43
 
56
- ## Read SavedVariables
57
-
58
- 1. Search the user's WoW installation for the global SavedVariables file, normally `WTF/Account/<account>/SavedVariables/Lychee Dev.lua`. The exact account/realm path is installation-specific. Use a filename search or `rg` for `LycheeDevDB`/the Ticket rather than assuming a path.
59
- 2. Treat the file as data, not trusted code. Do not `dofile` or execute an unknown SavedVariables file in the host environment. Use a restricted Lua parser/sandbox or inspect the relevant assignment safely.
60
- 3. For a Ticket `LYCHEE-...`, read:
61
-
62
- ```text
63
- LycheeDevDB.exports.records[TICKET]
64
- LycheeDevDB.exports.records[TICKET].payload.content
65
- ```
66
-
67
- Validate `schema == "lychee.evidence.v1"`, and use `source.kind`, `source.title`, `source.path`, `environment`, and `createdAt` to identify the record. Validate the report schema inside the payload separately; record-level schema/source do not belong to `metadata`. Prefer the exact Ticket already supplied to the owning task, including directly delivered messages; do not ask the user to resend it to several tasks. The payload is the authoritative complete report; `metadata` is bounded context, not a replacement for it.
68
- Current kinds include `run_result`, `object_snapshot`, `object_node`, `event_log`, `function_trace`, `error_log`, and `automation_result` (whose payload is one `lychee.automation.result.v1` JSON report and whose `metadata.contentChecksum` is an Adler-32 over the exact payload bytes). Legacy `performance_*` records remain valid historical evidence; read their complete payload without requiring the deleted module or discarding them.
69
- 4. `LycheeDevDB.exports.order` is newest-first. Recent ad-hoc runs are in `LycheeDevDB.history` and may contain `code`, `result`, and a bounded `tree`; they are not the same as a saved export. Old installations may contain `DumperDB`, which the addon migrates into `LycheeDevDB`.
70
- 5. A record created in-game is only in memory until `/reload`, logout, or exit. If the user has not completed one of those writes, explain that the Ticket cannot yet be found on disk. Exports and history are bounded and older entries can be pruned.
71
-
72
- When reporting persisted evidence, quote the Ticket, source kind, client environment, and the exact payload path. Do not claim that a record is absent until the likely SavedVariables locations and the exact Ticket have been searched.
73
-
74
- ## Run commands
75
-
76
- The runner accepts either `/run` or `/script` prefixes and evaluates Lua 5.1 code. Prefer returning a compact structured report; use `print` for short scalar messages. Check the installed runner and serializer limits before delivery. A returned value is captured immediately, so an asynchronous script needs a verified completion/export writer; do not return an unfinished table and assume later mutations will be saved.
77
-
78
- ```text
79
- /run print(GetBuildInfo())
80
- /run return { addon = MyAddon, profile = MyAddonDB and MyAddonDB.profile }
81
- /script return UIParent and { name = UIParent:GetName(), shown = UIParent:IsShown() }
82
- ```
83
-
84
- Give commands that are explicit and bounded. Avoid unbounded table walks, per-frame polling, network calls, protected UI mutations, and writes to SavedVariables unless the user explicitly requests them. Lychee Dev truncates large run output, and combat blocks the workbench and active inspection/monitoring tools.
85
-
86
- One complete investigation does not mean pasting a bundle of implementation source. Use Run for a small probe; for large source-dependent studies, use a verified independent diagnostic carrier and a short entry command, with its installation/loading and cleanup explained. Never assume WoW can read arbitrary host files or hot-load Lua. When the user asks for one paste, cover the automatic matrix from one practical entry point and one final report; list external actions and missing coverage honestly. For a requested check, include the exact pasteable command, what result to expect, and what field or error the user should report back. If a value may be secret in combat, tell the user to leave combat before running it and do not suggest comparing or formatting that value.
87
-
88
- ## Object inspection
89
-
90
- Use the Objects page for live object state. Valid paths are `_G`, dot-separated identifiers, numeric indexes, and quoted string indexes, for example:
91
-
92
- ```text
93
- _G.MyAddon
94
- MyAddon.db.profile
95
- _G["MyAddon"]["db"]
96
- UIParent
97
- ```
98
-
99
- The page can search globals or fields, expand tables, show frame overview/children/regions, and save an object snapshot or node. The mouse picker temporarily hides the window; press `F` or `Enter` to capture the object under the cursor, `Esc` to cancel. If a path is not known, use a short run command to return the candidate global, then inspect that path in Objects.
100
-
101
- Never promise a complete object graph: inspection is bounded, cyclic tables are marked, and secret combat values stop the read. Protected Blizzard frames must not be mutated as part of a diagnostic command.
102
-
103
- ## Event monitoring
104
-
105
- Use the Events page, not a guessed slash command:
106
-
107
- 1. Search for the uppercase event name in the catalog shown for the running client (for example `PLAYER_TARGET_CHANGED`).
108
- 2. Select one or more events and click **Start Monitoring**.
109
- 3. Reproduce the behavior, click **Stop Monitoring**, inspect payload arguments, and use **Save** if the evidence must be handed to an Agent.
110
-
111
- Event names and payload signatures are build-specific. The supported profiles are Retail `12.1.0`/Interface `120100`, Classic Mists `5.5.4`/`50504`, Classic Titan `3.80.2`/`38002`, and WoW: Forever `1.60.1`/`16001`; do not transfer a signature between profiles without checking the catalog. `ALL`/“monitor all events” is an explicit diagnostic mode, not a default recommendation. Monitoring is bounded (newest 500 records; at most 16 arguments per record, each shortened), and it stops on combat entry.
112
-
113
- ## Delivery and ownership
114
-
115
- Use available computer controls only within the authorized workflow. Inspect their actual capabilities before attempting game input; a browser-only tool cannot type into WoW. After a failed input attempt, verify focus/state once and use one manual paste when reliable native input is unavailable. Do not loop speculative key presses.
116
-
117
- If the user authorized clipboard delivery, announce the exact script/version, write it, and read back the clipboard to verify equality. Keep that version stable while awaiting execution. A revision needs an explicit replacement notice and a new verification; another task's clipboard, game session, or pending probe is not yours to replace.
118
-
119
- Do not deploy addon changes or run destructive Provider/storage experiments merely to diagnose a problem. Preserve the current task's decision scope: a request for a proposal remains a proposal; an authorized implementation can proceed. A past project's memory target or plan-only decision is not a universal skill restriction.
120
-
121
- ## Handoff format
122
-
123
- For a command request, answer with:
124
-
125
- 1. **Paste:** the exact `/run` or `/script` text, or the `/dev` page and fields to use.
126
- 2. **Reproduce:** the short action sequence and when to start/stop monitoring.
127
- 3. **Report back:** the expected output fields or the Ticket to copy after saving and reloading.
128
-
129
- For a Ticket request, return the record's `source.kind`, client/build, creation time, payload path, and a concise evidence-based finding. Keep observations separate from hypotheses, and state when the evidence is truncated, pending disk write, client-specific, or blocked by combat/secret values.
44
+ 结果说明以用户问题的结论开头,附 Ticket、客户端实际版本、完整 payload 路径和验证边界。区分“提交”“游戏完成”“报告读取”“收尾完成”,不要用一个“成功”掩盖中间阶段。
@@ -1,4 +1,4 @@
1
1
  interface:
2
- display_name: "Lychee Dev skill"
3
- short_description: "Read WoW evidence and prepare bounded Run investigations"
4
- default_prompt: "Use $lychee-dev to investigate a specific WoW issue through Lychee Dev Run, one bounded script, and complete Ticket evidence."
2
+ display_name: "Lychee Dev"
3
+ short_description: "Orchestrate background WoW tasks and verified Ticket evidence"
4
+ default_prompt: "Use $lychee-dev to complete a background WoW investigation through verified Ticket evidence, acknowledgement, cleanup, and recovery if interrupted."