lycheedev 1.2.0 → 2.0.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.
Files changed (118) hide show
  1. package/LICENSE +49 -0
  2. package/README.md +45 -0
  3. package/THIRD_PARTY_NOTICES +812 -0
  4. package/bin/lycheedev.mjs +56 -0
  5. package/native/windows-amd64/lycheedev.exe +0 -0
  6. package/package.json +12 -33
  7. package/payload/addon/Bridge/CaptureWriter.lua +154 -0
  8. package/payload/addon/Bridge/Definitions.lua +3 -0
  9. package/payload/addon/Bridge/Identity.lua +127 -0
  10. package/{vendor/addon/Libs/AutomationQR.lua → payload/addon/Bridge/MatrixSymbol.lua} +23 -30
  11. package/payload/addon/Bridge/ProbeQueue.lua +136 -0
  12. package/payload/addon/Bridge/ProbeRunner.lua +128 -0
  13. package/payload/addon/Bridge/ReceiptView.lua +160 -0
  14. package/payload/addon/Bridge/Reentry.lua +192 -0
  15. package/payload/addon/Bridge/ReportStore.lua +153 -0
  16. package/payload/addon/Bridge/Session.lua +163 -0
  17. package/payload/addon/Clients/Evergreen.lua +2 -0
  18. package/payload/addon/Clients/Live.lua +2 -0
  19. package/payload/addon/Clients/Pandaria.lua +2 -0
  20. package/payload/addon/Clients/Titan.lua +2 -0
  21. package/payload/addon/Core/Compat.lua +59 -0
  22. package/payload/addon/Core/Controls.lua +168 -0
  23. package/{vendor/addon/Core/Bootstrap.lua → payload/addon/Core/Execute.lua} +12 -23
  24. package/{vendor → payload}/addon/Core/Inspector.lua +19 -235
  25. package/{vendor → payload}/addon/Core/Locale.lua +128 -93
  26. package/{vendor → payload}/addon/Core/Locale_enUS.lua +128 -95
  27. package/payload/addon/Core/Persistence.lua +58 -0
  28. package/payload/addon/Core/Platform.lua +58 -0
  29. package/payload/addon/Core/Runtime.lua +25 -0
  30. package/payload/addon/Core/Safety.lua +56 -0
  31. package/{vendor → payload}/addon/Core/Serializer.lua +18 -6
  32. package/payload/addon/Core/Stores.lua +611 -0
  33. package/payload/addon/Lychee Dev_Forever.toc +52 -0
  34. package/payload/addon/Lychee Dev_Mainline.toc +52 -0
  35. package/payload/addon/Lychee Dev_Mists.toc +52 -0
  36. package/payload/addon/Lychee Dev_Wrath.toc +52 -0
  37. package/payload/addon/Modules/AutomationView.lua +393 -0
  38. package/{vendor → payload}/addon/Modules/Diagnostics.lua +92 -36
  39. package/{vendor → payload}/addon/Modules/Events/Catalog.lua +9 -0
  40. package/{vendor → payload}/addon/Modules/Events/Monitor.lua +45 -5
  41. package/payload/addon/Modules/FunctionTrace.lua +150 -0
  42. package/{vendor → payload}/addon/Modules/ObjectInspector.lua +105 -31
  43. package/{vendor → payload}/addon/UI/Export.lua +64 -34
  44. package/{vendor → payload}/addon/UI/Pages/About.lua +26 -14
  45. package/payload/addon/UI/Pages/Automation.lua +446 -0
  46. package/payload/addon/UI/Pages/Diagnostics.lua +402 -0
  47. package/{vendor/addon/UI/Features.lua → payload/addon/UI/Pages/Events.lua} +192 -302
  48. package/{vendor → payload}/addon/UI/Pages/ExportRecords.lua +213 -132
  49. package/{vendor → payload}/addon/UI/Pages/Object.lua +229 -121
  50. package/payload/addon/UI/Pages/Run.lua +423 -0
  51. package/payload/addon/UI/Pages/Trace.lua +314 -0
  52. package/payload/addon/UI/TreeView.lua +246 -0
  53. package/{vendor/addon/UI/MainWindow.lua → payload/addon/UI/Widgets.lua} +89 -529
  54. package/payload/addon/UI/Window.lua +425 -0
  55. package/payload/skill/SKILL.md +87 -0
  56. package/payload/skill/agents/openai.yaml +7 -0
  57. package/payload/skill/references/addon-validation.md +42 -0
  58. package/payload/skill/references/asset-export.md +109 -0
  59. package/payload/skill/references/commands.md +169 -0
  60. package/payload/skill/references/data-investigation.md +242 -0
  61. package/payload/skill/references/error-diagnosis.md +41 -0
  62. package/payload/skill/references/installation.md +18 -0
  63. package/payload/skill/references/live-investigation.md +129 -0
  64. package/payload/skill/references/source-research.md +82 -0
  65. package/payload/skill/scripts/lycheedev.mjs +59 -0
  66. package/release.json +346 -0
  67. package/bin/lycheedev.js +0 -746
  68. package/src/addon.js +0 -95
  69. package/src/config.js +0 -68
  70. package/src/doctor.js +0 -126
  71. package/src/install.js +0 -145
  72. package/src/paths.js +0 -93
  73. package/src/py/instances.py +0 -165
  74. package/src/python.js +0 -111
  75. package/src/skill.js +0 -48
  76. package/src/wow.js +0 -541
  77. package/vendor/addon/Core/Clients/Forever.lua +0 -9
  78. package/vendor/addon/Core/Clients/Mainline.lua +0 -9
  79. package/vendor/addon/Core/Clients/Mists.lua +0 -9
  80. package/vendor/addon/Core/Clients/Titan.lua +0 -9
  81. package/vendor/addon/Core/Compatibility.lua +0 -43
  82. package/vendor/addon/Core/Database.lua +0 -859
  83. package/vendor/addon/Core/Safety.lua +0 -42
  84. package/vendor/addon/Lychee Dev_Forever.toc +0 -44
  85. package/vendor/addon/Lychee Dev_Mainline.toc +0 -44
  86. package/vendor/addon/Lychee Dev_Mists.toc +0 -44
  87. package/vendor/addon/Lychee Dev_Wrath.toc +0 -44
  88. package/vendor/addon/Modules/Automation/Controller.lua +0 -896
  89. package/vendor/addon/Modules/Automation/Reload.lua +0 -101
  90. package/vendor/addon/Modules/Automation/Report.lua +0 -409
  91. package/vendor/addon/Modules/Automation/auto/auto.lua +0 -12
  92. package/vendor/addon/Modules/FunctionTrace.lua +0 -85
  93. package/vendor/addon/UI/AutomationOverlay.lua +0 -253
  94. package/vendor/addon/UI/Pages/Automation.lua +0 -417
  95. package/vendor/addon/UI/Pages/Diagnostics.lua +0 -289
  96. package/vendor/addon/UI/Pages/Trace.lua +0 -165
  97. package/vendor/skill/SKILL.md +0 -44
  98. package/vendor/skill/agents/openai.yaml +0 -4
  99. package/vendor/skill/references/automation.md +0 -130
  100. package/vendor/skill/references/clients.md +0 -51
  101. package/vendor/skill/references/runtime-investigations.md +0 -104
  102. package/vendor/skill/scripts/automation/__init__.py +0 -1
  103. package/vendor/skill/scripts/automation/registry.py +0 -516
  104. package/vendor/skill/scripts/automation/reload.py +0 -121
  105. package/vendor/skill/scripts/automation/saved_variables.py +0 -438
  106. package/vendor/skill/scripts/automation/session.py +0 -207
  107. package/vendor/skill/scripts/automation/windows.py +0 -792
  108. package/vendor/skill/scripts/automation.py +0 -1067
  109. package/vendor/skill/scripts/requirements.txt +0 -13
  110. package/vendor/skill/scripts/selftest_offline.py +0 -1061
  111. package/vendor/skill/scripts/test_input_safety.py +0 -132
  112. package/vendor/skill/scripts/test_reload.py +0 -120
  113. /package/{vendor → payload}/addon/Media/GitHub.png +0 -0
  114. /package/{vendor → payload}/addon/Media/Logo.png +0 -0
  115. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Forever.lua +0 -0
  116. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Mainline.lua +0 -0
  117. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Mists.lua +0 -0
  118. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Titan.lua +0 -0
@@ -1,13 +1,18 @@
1
1
  local ADDON_NAME, ns = ...
2
2
 
3
- local FORCE_ENGLISH_SCREENSHOTS = false
3
+ -- English overlay: applied unless the client locale is zhCN or zhTW (zhTW
4
+ -- inherits the Chinese source table). Every value must stay ASCII. Keep this
5
+ -- table in lockstep with Locale.lua: equal key sets and equal placeholders.
6
+
4
7
  local locale = GetLocale and GetLocale()
5
- if not FORCE_ENGLISH_SCREENSHOTS and (locale == "zhCN" or locale == "zhTW") then
8
+ if locale == "zhCN" or locale == "zhTW" then
6
9
  return
7
10
  end
8
11
 
9
12
  local L = ns.L
10
13
  local english = {
14
+
15
+ -- Shell and shared labels
11
16
  ADDON_TITLE = "|cffd83b4e[Lychee]|r Dev Tools",
12
17
  TAB_RUNNER = "Run",
13
18
  TAB_OBJECTS = "Objects",
@@ -15,12 +20,24 @@ local english = {
15
20
  TAB_TRACE = "Trace",
16
21
  TAB_DIAGNOSTICS = "Errors",
17
22
  TAB_EXPORTS = "Saved Records",
23
+ TAB_AUTOMATION = "Automation",
18
24
  TAB_ABOUT = "About",
19
- HISTORY = "History",
20
- NO_HISTORY = "No history yet",
21
- UNKNOWN_TIME = "Unknown time",
25
+ READY = "Ready",
26
+ COMPLETED = "Completed",
27
+ FAILED = "Failed",
28
+ CLOSE = "Close",
29
+ YES = "Yes",
30
+ NO = "No",
31
+ ON = "On",
32
+ OFF = "Off",
22
33
  UNKNOWN = "Unknown",
34
+ UNKNOWN_TIME = "Unknown time",
23
35
  NOT_AVAILABLE = "Not available",
36
+ COMBAT_BLOCKED = "Lychee Dev cannot be used during combat.",
37
+
38
+ -- Run page and history
39
+ HISTORY = "History",
40
+ NO_HISTORY = "No history yet",
24
41
  EMPTY_INPUT = "(empty)",
25
42
  LUA_INPUT = "Lua Input",
26
43
  RUN = "Run",
@@ -31,10 +48,12 @@ local english = {
31
48
  SELECT_RESULT = "Select Result",
32
49
  SAVE_TO_DISK = "Save",
33
50
  CLEAR_HISTORY = "Clear History",
34
- READY = "Ready",
35
- COMPLETED = "Completed",
36
- FAILED = "Failed",
51
+ ENTER_LUA = "Enter Lua code to run.",
52
+ COMPILE_ERROR = "Compile error:\n",
53
+ RUNTIME_ERROR = "Runtime error:\n",
54
+ COMPLETED_NO_OUTPUT = "Completed with no output.",
37
55
 
56
+ -- Value trees and frame overview
38
57
  TREE_EMPTY = "No structured return value",
39
58
  TREE_SECRET = "<secret value>",
40
59
  TREE_TABLE = "Table",
@@ -59,6 +78,45 @@ local english = {
59
78
  FRAME_LEVEL = "Frame Level",
60
79
  FRAME_STRATA = "Frame Strata",
61
80
  FRAME_PARENT = "Parent",
81
+
82
+ -- Object inspection page
83
+ OBJECT_INSPECTOR = "Object Inspector",
84
+ INSPECT = "Inspect",
85
+ OBJECT_INPUT_HINT = "Enter an object path; use Search for keywords",
86
+ OBJECT_PATH_REQUIRED = "Enter an object path.",
87
+ OBJECT_PATH_INVALID = "The object path is invalid.",
88
+ OBJECT_PATH_UNREADABLE = "The object path could not be read.",
89
+ OBJECT_NOT_FOUND = "The object was not found.",
90
+ OBJECT_SNAPSHOT = "Object Snapshot",
91
+ OBJECT_TEXT_HEADER = "Object: %s Type: %s",
92
+ OBJECT_READY = "Object: %s Type: %s",
93
+ OBJECT_READY_MORE = "Object: %s Type: %s; scroll down to load more text",
94
+ OBJECT_LOADING_PROGRESS = "Object: %s Type: %s; about %d KB loaded",
95
+ INSPECT_OR_CAPTURE_FIRST = "Inspect or capture an object first.",
96
+ SECRET_VALUE_BLOCKED = "The target contains a secret combat value. Inspection stopped.",
97
+ NO_MOUSE_FOCUS = "There is no inspectable UI object under the cursor.",
98
+ CAPTURE_MOUSE = "Pick UI Object",
99
+ PICKER_ACTIVE = "Picking a UI object",
100
+ PICKER_HELP = "Point at a target, press F or Enter to capture, or press Esc to cancel.",
101
+ PICKER_PROMPT = "Point at target | F capture | Esc cancel",
102
+ PICKER_TARGET = "%s | %s",
103
+ PICKER_CANCELLED = "Frame picker cancelled",
104
+ SEARCH = "Search",
105
+ SEARCH_RESULTS = "Search Results",
106
+ SEARCH_TERM_REQUIRED = "Enter a search term.",
107
+ SEARCH_REQUIRES_TABLE = "Fields can only be searched inside table objects.",
108
+ NO_SEARCH_RESULTS = "No results",
109
+ MATCH_COUNT = "%d matches found",
110
+ GLOBAL_MATCH_COUNT = "Global objects searched | %d matches found",
111
+ SELECT_SNAPSHOT = "Select Snapshot",
112
+ SELECT_LOADED_TEXT = "Select Loaded Text",
113
+ TREE_CONTEXT_HINT = "Right-click a node to view and copy it",
114
+ NODE_TEXT_TITLE = "Node Text",
115
+ TEXT_LOADED_MORE = "About %d KB loaded; scroll down to continue",
116
+ TEXT_LOADED_COMPLETE = "Full content loaded, about %d KB",
117
+ TEXT_LIMIT_REACHED = "The 16 MB safety limit was reached. Right-click a smaller tree node instead.",
118
+
119
+ -- Event monitoring page
62
120
  FIND_EVENT = "Select Events",
63
121
  CATALOG_COUNT = "%d documented",
64
122
  EVENT_SEARCH_HINT = "Enter an event name, such as PLAYER_LOGIN",
@@ -66,97 +124,50 @@ local english = {
66
124
  STOP = "Stop",
67
125
  START_MONITORING = "Start Monitoring",
68
126
  STOP_MONITORING = "Stop Monitoring",
69
- START_TRACE = "Start Trace",
70
- STOP_TRACE = "Stop Trace",
71
127
  CLEAR_LOG = "Clear Log",
72
128
  SELECTED_EVENTS = "Selected Events",
73
129
  SELECTED_COUNT = "%d selected",
74
130
  NO_EVENTS_SELECTED = "Search above and select events to monitor",
131
+ SELECT_ONE_EVENT = "Select at least one event.",
132
+ INVALID_EVENT = "Invalid event name: ",
133
+ UNAVAILABLE_EVENT = "Unknown or unavailable event: ",
134
+ UNKNOWN_EVENT = "Unknown event.",
135
+ EVENT_ALREADY_SELECTED = "That event is already selected.",
136
+ NO_DOCUMENTED_EVENT = "No exact documented event match was found.",
137
+ EVENTS_SELECTED_STATUS = "%d events selected",
138
+ EVENT_READY = "Select events, then start monitoring",
139
+ COULD_NOT_SELECT_EVENT = "Could not select that event",
75
140
  CAPTURED_EVENTS = "Captured Events",
141
+ NO_EVENTS_CAPTURED = "No captured events",
76
142
  PAYLOAD = "Payload",
77
143
  PAYLOAD_PREFIX = "Payload ",
78
144
  NO_PAYLOAD = "No payload",
79
- NO_EVENTS_CAPTURED = "No captured events",
80
145
  SELECT_EVENT_DETAIL = "Select an event record to inspect its payload.",
81
146
  EVENT_DETAIL = "Event: %s",
82
147
  ELAPSED_DETAIL = "Elapsed: +%.3f seconds",
83
148
  EVENT_HAS_NO_PAYLOAD = "This event has no payload.",
84
- EVENTS_SELECTED_STATUS = "%d events selected",
85
- EVENT_READY = "Select events, then start monitoring",
86
- COULD_NOT_SELECT_EVENT = "Could not select that event",
87
149
  MONITORING_EVENTS = "Monitoring %d events",
88
150
  MONITORING_ALL_EVENTS = "Monitoring all events",
89
151
  COULD_NOT_START = "Could not start monitoring",
90
152
  STOPPED = "Stopped",
91
153
  ALL_EVENTS = "Monitor All Events",
92
154
 
93
- ENTER_LUA = "Enter Lua code to run.",
94
- COMPILE_ERROR = "Compile error:\n",
95
- RUNTIME_ERROR = "Runtime error:\n",
96
- COMPLETED_NO_OUTPUT = "Completed with no output.",
97
- SELECT_ONE_EVENT = "Select at least one event.",
98
- INVALID_EVENT = "Invalid event name: ",
99
- UNAVAILABLE_EVENT = "Unknown or unavailable event: ",
100
- UNKNOWN_EVENT = "Unknown event.",
101
- EVENT_ALREADY_SELECTED = "That event is already selected.",
102
- NO_DOCUMENTED_EVENT = "No exact documented event match was found.",
103
-
104
- COMBAT_BLOCKED = "Lychee Dev cannot be used during combat.",
105
- OBJECT_PATH_REQUIRED = "Enter an object path.",
106
- OBJECT_PATH_INVALID = "The object path is invalid.",
107
- OBJECT_PATH_UNREADABLE = "The object path could not be read.",
108
- OBJECT_NOT_FOUND = "The object was not found.",
109
- SECRET_VALUE_BLOCKED = "The target contains a secret combat value. Inspection stopped.",
110
- NO_MOUSE_FOCUS = "There is no inspectable UI object under the cursor.",
111
- SEARCH_TERM_REQUIRED = "Enter a search term.",
112
- SEARCH_REQUIRES_TABLE = "Fields can only be searched inside table objects.",
113
- FUNCTION_PATH_INVALID = "The function path is invalid.",
114
- FUNCTION_NOT_FOUND = "The function was not found.",
115
- FUNCTION_HOOK_FAILED = "The function could not be traced safely.",
116
- SELECT_ERROR_DETAIL = "Select an error to view its details.",
117
- ERROR_OCCURRENCES = "Occurrences: %d",
118
- ERROR_STACK = "Stack Trace",
119
- ERROR_LOCALS = "Locals",
120
- BUGGRABBER_UNAVAILABLE = "The error capture dependency is not loaded.",
121
- ERRORS_CLEARED = "Error records cleared.",
122
- ERRORS_CLEAR_FAILED = "Error records could not be cleared.",
123
- OBJECT_INSPECTOR = "Object Inspector",
124
- INSPECT = "Inspect",
125
- OBJECT_INPUT_HINT = "Enter an object path; use Search for keywords",
126
- INSPECT_OR_CAPTURE_FIRST = "Inspect or capture an object first.",
127
- CAPTURE_MOUSE = "Pick UI Object",
128
- PICKER_ACTIVE = "Picking a UI object",
129
- PICKER_HELP = "Point at a target, press F or Enter to capture, or press Esc to cancel.",
130
- PICKER_PROMPT = "Point at target | F capture | Esc cancel",
131
- PICKER_TARGET = "%s | %s",
132
- PICKER_CANCELLED = "Frame picker cancelled",
133
- SEARCH = "Search",
134
- SEARCH_RESULTS = "Search Results",
135
- OBJECT_SNAPSHOT = "Object Snapshot",
136
- SELECT_SNAPSHOT = "Select Snapshot",
137
- SELECT_LOADED_TEXT = "Select Loaded Text",
138
- TREE_CONTEXT_HINT = "Right-click a node to view and copy it",
139
- NODE_TEXT_TITLE = "Node Text",
140
- CLOSE = "Close",
141
- OBJECT_TEXT_HEADER = "Object: %s Type: %s",
142
- NO_SEARCH_RESULTS = "No results",
143
- OBJECT_READY = "Object: %s Type: %s",
144
- OBJECT_READY_MORE = "Object: %s Type: %s; scroll down to load more text",
145
- OBJECT_LOADING_PROGRESS = "Object: %s Type: %s; about %d KB loaded",
146
- TEXT_LOADED_MORE = "About %d KB loaded; scroll down to continue",
147
- TEXT_LOADED_COMPLETE = "Full content loaded, about %d KB",
148
- TEXT_LIMIT_REACHED = "The 16 MB safety limit was reached. Right-click a smaller tree node instead.",
149
- MATCH_COUNT = "%d matches found",
150
- GLOBAL_MATCH_COUNT = "Global objects searched | %d matches found",
155
+ -- Function trace page
151
156
  FUNCTION_TRACE = "Function Trace",
157
+ START_TRACE = "Start Trace",
158
+ STOP_TRACE = "Stop Trace",
159
+ TRACE_PATH = "Function: %s",
160
+ TRACING_FUNCTION = "Tracing %s",
152
161
  CALL_RECORDS = "Call Records",
153
162
  CALL_ARGUMENTS = "Call Arguments",
154
163
  NO_CALLS_CAPTURED = "No calls captured",
155
164
  SELECT_CALL_DETAIL = "Select a call to inspect its arguments.",
156
- TRACE_PATH = "Function: %s",
157
165
  NO_ARGUMENTS = "No arguments",
158
- TRACING_FUNCTION = "Tracing %s",
166
+ FUNCTION_PATH_INVALID = "The function path is invalid.",
167
+ FUNCTION_NOT_FOUND = "The function was not found.",
168
+ FUNCTION_HOOK_FAILED = "The function could not be traced safely.",
159
169
 
170
+ -- Diagnostics page
160
171
  DIAGNOSTICS = "Errors",
161
172
  REFRESH = "Refresh",
162
173
  CLEAR_ERRORS = "Clear Errors",
@@ -168,17 +179,20 @@ local english = {
168
179
  AGENT_REPORT = "Agent Report",
169
180
  SELECT_REPORT = "Select Report",
170
181
  SELECT_ERROR_FIRST = "Select an error first.",
182
+ SELECT_ERROR_DETAIL = "Select an error to view its details.",
171
183
  NO_ERRORS = "No errors in the current session",
172
184
  UNKNOWN_ERROR = "Unknown error",
173
185
  UNKNOWN_SOURCE = "Unknown source",
174
186
  ERROR_ROW_META = "Session %d | %s",
175
187
  CURRENT_ERRORS_STATUS = "%d errors in this session",
176
188
  ALL_ERRORS_STATUS = "%d errors across all records",
189
+ ERROR_OCCURRENCES = "Occurrences: %d",
190
+ ERROR_STACK = "Stack Trace",
191
+ ERROR_LOCALS = "Locals",
192
+ BUGGRABBER_UNAVAILABLE = "The error capture dependency is not loaded.",
193
+ ERRORS_CLEARED = "Error records cleared.",
194
+ ERRORS_CLEAR_FAILED = "Error records could not be cleared.",
177
195
  ADDON_COLUMN = "Addon",
178
- YES = "Yes",
179
- NO = "No",
180
- ON = "On",
181
- OFF = "Off",
182
196
  AGENT_REPORT_TITLE = "[Lychee Dev] Lua Error Report",
183
197
  REPORT_CONTEXT = "Context",
184
198
  REPORT_TIME = "Time: %s",
@@ -193,22 +207,8 @@ local english = {
193
207
  REPORT_STACK = "Stack Trace",
194
208
  REPORT_LOCALS = "Locals",
195
209
  REPORT_NOT_AVAILABLE = "Not available",
196
- ABOUT_TITLE = "About Lychee Dev",
197
- ABOUT_DESCRIPTION = "A focused workspace for running, inspecting, monitoring, and diagnosing World of Warcraft addons.",
198
- ABOUT_PROJECT = "Project",
199
- ABOUT_VERSION = "Version",
200
- ABOUT_AUTHOR = "Author",
201
- ABOUT_CLIENT = "Supported Clients",
202
- ABOUT_COMMAND = "Open Command",
203
- ABOUT_DEPENDENCY = "Error Capture",
204
- ABOUT_CLIENT_VALUE = "Retail 12.1 / Classic 5.5.4 / Titan 3.80.2 / Forever 1.60.1",
205
- ABOUT_DEPENDENCY_VALUE = "BugGrabber",
206
- ABOUT_GITHUB = "GitHub",
207
- ABOUT_REPOSITORY = "Source Code and Issues",
208
- ABOUT_COPY_HINT = "Press Ctrl+C to copy. Press Escape to close.",
209
- ABOUT_SELECTED_HINT = "Address selected; press Ctrl+C to copy",
210
- SELECT_ADDRESS = "Select Address",
211
- ADDRESS_SELECTED = "Selected",
210
+
211
+ -- Export records and ticket popup
212
212
  EXPORT_SAVED_TITLE = "Record Ready",
213
213
  EXPORT_TICKET = "Ticket",
214
214
  EXPORT_TICKET_HELP = "Selected. Press Ctrl+C to copy the Ticket",
@@ -217,6 +217,7 @@ local english = {
217
217
  EXPORT_EMPTY = "There is no content to save.",
218
218
  EXPORT_TOO_LARGE = "The content exceeds 16 MB and cannot be added to the save queue.",
219
219
  EXPORT_DATABASE_UNAVAILABLE = "The database is not initialized yet.",
220
+ EXPORT_DATABASE_NEWER = "The saved export data uses a newer version; new export writes are disabled.",
220
221
  EXPORT_FAILED = "The content could not be saved.",
221
222
  EXPORT_BUILD_FAILED = "Could not build the complete export: ",
222
223
  EXPORT_CACHE = "Saved Record Cache",
@@ -247,8 +248,21 @@ local english = {
247
248
  EXPORT_KIND_EVENT_LOG = "Event Log",
248
249
  EXPORT_KIND_FUNCTION_TRACE = "Function Trace",
249
250
  EXPORT_KIND_ERROR_LOG = "Error Report",
251
+ EXPORT_KIND_AUTOMATION_RESULT = "Automation Result",
250
252
  EXPORT_KIND_PERFORMANCE = "Legacy Performance",
251
253
  EXPORT_KIND_UNKNOWN = "Other Data",
254
+
255
+ -- About page
256
+ ABOUT_TITLE = "About Lychee Dev",
257
+ ABOUT_DESCRIPTION = "A focused workspace for running, inspecting, monitoring, and diagnosing World of Warcraft addons.",
258
+ ABOUT_PROJECT = "Project",
259
+ ABOUT_VERSION = "Version",
260
+ ABOUT_AUTHOR = "Author",
261
+ ABOUT_CLIENT = "Supported Clients",
262
+ ABOUT_CLIENT_VALUE = "Retail 12.1 / Classic 5.5.4 / Titan 3.80.2 / Forever 1.60.1",
263
+ ABOUT_COMMAND = "Open Command",
264
+ ABOUT_DEPENDENCY = "Error Capture",
265
+ ABOUT_DEPENDENCY_VALUE = "BugGrabber",
252
266
  ABOUT_ENVIRONMENT = "Runtime Environment",
253
267
  ABOUT_VERSION_TEXT = "Version %s",
254
268
  ABOUT_DEPENDENCY_STATUS = "BugGrabber Loaded",
@@ -256,8 +270,14 @@ local english = {
256
270
  ABOUT_SAFETY = "Combat Safety",
257
271
  ABOUT_SAFETY_STATUS = "Stops Automatically in Combat",
258
272
  ABOUT_SAFETY_TEXT = "Closes the window and stops event monitoring and function tracing. Reopen it after combat.",
273
+ ABOUT_GITHUB = "GitHub",
274
+ ABOUT_REPOSITORY = "Source Code and Issues",
275
+ ABOUT_COPY_HINT = "Press Ctrl+C to copy. Press Escape to close.",
276
+ ABOUT_SELECTED_HINT = "Address selected; press Ctrl+C to copy",
277
+ SELECT_ADDRESS = "Select Address",
278
+ ADDRESS_SELECTED = "Selected",
259
279
 
260
- TAB_AUTOMATION = "Automation",
280
+ -- Automation page and commands
261
281
  AUTO_TASK_INVALID = "Automation task '%s' failed validation: %s",
262
282
  AUTO_TASK_NOT_LOADED = "Automation task '%s' is not loaded in this session.",
263
283
  AUTO_TASK_EXPIRED = "Automation task '%s' has expired and cannot run.",
@@ -315,6 +335,19 @@ local english = {
315
335
  AUTO_STATUS_INTERRUPTED = "Interrupted",
316
336
  AUTO_KIND_LUA = "Lua Task",
317
337
  AUTO_KIND_BUG = "Bug Snapshot",
338
+ -- Workbench automation page (2.0 bridge view)
339
+ AUTO_EXECUTE = "Execute",
340
+ AUTO_FIELD_CODE = "Code / checksum",
341
+ AUTO_FIELD_TIME = "Recorded",
342
+ AUTO_CODE_SUMMARY = "%d bytes | Adler %s | SHA %s",
343
+ AUTO_STATUS_QUEUED = "Queued",
344
+ AUTO_STATUS_LOADED = "Loaded",
345
+ AUTO_STATUS_REPORTED = "Reported",
346
+ AUTO_STATUS_ACKNOWLEDGED = "Acknowledged",
347
+ AUTO_STATUS_CLEARED = "Cleared",
348
+ AUTO_STATUS_UNAVAILABLE = "Unavailable",
349
+ AUTO_NO_REPORT = "This request has no report to view.",
350
+ -- LOCALE:END
318
351
  }
319
352
 
320
353
  for key, value in pairs(english) do
@@ -0,0 +1,58 @@
1
+ local ADDON_NAME, ns = ...
2
+
3
+ local ready = false
4
+ local function restricted(value)
5
+ return issecretvalue and issecretvalue(value)
6
+ end
7
+ local function plain(value)
8
+ return not restricted(value)
9
+ and type(value) == "table" and getmetatable(value) == nil
10
+ end
11
+
12
+ local function validate(value)
13
+ if not plain(value) then return nil, "state_invalid_root" end
14
+ if restricted(value.schema) then return nil, "state_invalid_schema" end
15
+ if value.schema ~= 1 then return nil, "state_unsupported_schema" end
16
+ if restricted(value.options) or (value.options ~= nil and not plain(value.options)) then return nil, "state_invalid_options" end
17
+ if restricted(value.reports) or (value.reports ~= nil and not plain(value.reports)) then return nil, "state_invalid_reports" end
18
+ -- Workbench stores (Core/Stores.lua) own these sections and their own
19
+ -- schema versions; the root schema stays 1 for the bridge contract.
20
+ if restricted(value.history) or (value.history ~= nil and not plain(value.history)) then return nil, "state_invalid_history" end
21
+ if restricted(value.exports) or (value.exports ~= nil and not plain(value.exports)) then return nil, "state_invalid_exports" end
22
+ if value.options then
23
+ local enabled = value.options.bridgeEnabled
24
+ if issecretvalue and issecretvalue(enabled) then return nil, "state_invalid_option" end
25
+ if enabled ~= nil and type(enabled) ~= "boolean" then return nil, "state_invalid_option" end
26
+ end
27
+ if value.exports ~= nil then
28
+ local nextId = value.exports.nextId
29
+ if issecretvalue and issecretvalue(nextId) then return nil, "state_invalid_exports" end
30
+ if nextId ~= nil and (type(nextId) ~= "number" or nextId < 0 or nextId % 1 ~= 0) then
31
+ return nil, "state_invalid_exports"
32
+ end
33
+ end
34
+ return value
35
+ end
36
+
37
+ ns.Persistence = {
38
+ Load = function()
39
+ ready = false
40
+ -- Called only by the owning ADDON_LOADED handler. No legacy globals
41
+ -- are read, cleared, or imported, and newer schemas are left untouched.
42
+ local value = LycheeToolkitDB
43
+ if restricted(value) then return nil, "state_invalid_root" end
44
+ if value == nil then value = { schema = 1 } end
45
+ local valid, reason = validate(value)
46
+ if not valid then ready = false; return nil, reason end
47
+ if value.options == nil then value.options = {} end
48
+ if value.reports == nil then value.reports = {} end
49
+ LycheeToolkitDB = value
50
+ ready = true
51
+ return true
52
+ end,
53
+ Current = function()
54
+ if not ready then return nil, "state_not_loaded" end
55
+ -- Read the current root at use time, including after a profile re-root.
56
+ return validate(LycheeToolkitDB)
57
+ end,
58
+ }
@@ -0,0 +1,58 @@
1
+ local ADDON_NAME, ns = ...
2
+
3
+ local profile = assert(ns.PlatformProfile, "platform_profile_required")
4
+ local function restricted(value)
5
+ return issecretvalue and issecretvalue(value)
6
+ end
7
+
8
+ ns.Platform = {
9
+ -- A point-in-time observation, not permission to send input later. The
10
+ -- caller must also own a current session and observe focus after slash
11
+ -- dispatch unwinds. Missing or restricted APIs fail closed.
12
+ ObserveInputState = function()
13
+ if type(IsLoggedIn) ~= "function" or type(InCombatLockdown) ~= "function"
14
+ or type(GetCurrentKeyBoardFocus) ~= "function" then
15
+ return nil, "input_observation_unavailable"
16
+ end
17
+ local ok, loggedIn = pcall(IsLoggedIn)
18
+ if not ok or restricted(loggedIn) or type(loggedIn) ~= "boolean" then
19
+ return nil, "input_login_unavailable"
20
+ end
21
+ if not loggedIn then return false, "input_not_logged_in" end
22
+ local combatOK, combat = pcall(InCombatLockdown)
23
+ if not combatOK or restricted(combat) or type(combat) ~= "boolean" then
24
+ return nil, "input_combat_unavailable"
25
+ end
26
+ if combat then return false, "input_combat_lockdown" end
27
+ local focusOK, focus = pcall(GetCurrentKeyBoardFocus)
28
+ if not focusOK or restricted(focus) then return nil, "input_focus_unavailable" end
29
+ if focus ~= nil then return false, "input_keyboard_focus" end
30
+ return true
31
+ end,
32
+ ObserveActor = function()
33
+ local character, realm = UnitFullName("player")
34
+ local guid = UnitGUID("player")
35
+ for _, value in pairs({ character = character, realm = realm, guid = guid }) do
36
+ if restricted(value) then return nil, "actor_restricted_identity" end
37
+ if type(value) ~= "string" or #value == 0 or #value > 128
38
+ or string.find(value, "[%z\1-\31\127]") then return nil, "actor_invalid_identity" end
39
+ end
40
+ if character == nil or realm == nil or guid == nil then return nil, "actor_unavailable" end
41
+ return { character = character, realm = realm, guid = guid }
42
+ end,
43
+ ObserveBuild = function()
44
+ local version, build, _, interface = GetBuildInfo()
45
+ if restricted(version) or restricted(build) or restricted(interface) then
46
+ return nil, "platform_restricted_identity"
47
+ end
48
+ if type(version) ~= "string" or type(build) ~= "string"
49
+ or not string.match(build, "^%d+$") or type(interface) ~= "number" then
50
+ return nil, "platform_invalid_identity"
51
+ end
52
+ if version ~= profile.version or interface ~= profile.interface then
53
+ return nil, "platform_unsupported_build"
54
+ end
55
+ return { product = profile.product, build = version .. "." .. build,
56
+ interface = interface }
57
+ end,
58
+ }
@@ -0,0 +1,25 @@
1
+ local ADDON_NAME, ns = ...
2
+
3
+ ns.Release = "2.0.0"
4
+ ns.Startup = { ready = false, reason = "addon_not_loaded" }
5
+
6
+ -- This one-shot loader is core infrastructure, not an enabled bridge feature.
7
+ -- No optional feature creates frames, hooks, timers, or event subscriptions here.
8
+ local loader = CreateFrame("Frame")
9
+ loader:RegisterEvent("ADDON_LOADED")
10
+ loader:SetScript("OnEvent", function(self, event, name)
11
+ if name ~= ADDON_NAME then return end
12
+ self:UnregisterAllEvents()
13
+ self:SetScript("OnEvent", nil)
14
+ local identity, reason = ns.Platform.ObserveBuild()
15
+ if not identity then ns.Startup.reason = reason; return end
16
+ local loaded, failure = ns.Persistence.Load()
17
+ if not loaded then ns.Startup.reason = failure; return end
18
+ ns.Startup = { ready = true, identity = identity }
19
+ local registered, registrationFailure = ns.Controls.Register()
20
+ if not registered then ns.Startup.commandFailure = registrationFailure end
21
+ if registered then
22
+ local resumed, resumeFailure = ns.Reentry.Start(self)
23
+ if not resumed then ns.Startup.resumeFailure = resumeFailure end
24
+ end
25
+ end)
@@ -0,0 +1,56 @@
1
+ local ADDON_NAME, ns = ...
2
+
3
+ -- Combat trust boundary. A secret InCombatLockdown() result counts as blocked
4
+ -- (fail closed). The PLAYER_REGEN_DISABLED driver frame is created only when
5
+ -- the first shutdown callback registers, so an addon session that never opens
6
+ -- the workbench never creates it.
7
+ local shutdownCallbacks = {}
8
+ local driver
9
+
10
+ local function IsCombatBlocked()
11
+ if not InCombatLockdown then
12
+ return false
13
+ end
14
+ local succeeded, blocked = pcall(InCombatLockdown)
15
+ if not succeeded then
16
+ return true
17
+ end
18
+ if issecretvalue and issecretvalue(blocked) then
19
+ return true
20
+ end
21
+ return blocked and true or false
22
+ end
23
+
24
+ local function RunCombatShutdown()
25
+ for index = 1, #shutdownCallbacks do
26
+ pcall(shutdownCallbacks[index])
27
+ end
28
+ end
29
+
30
+ local function RegisterCombatShutdown(callback)
31
+ if type(callback) ~= "function" then
32
+ return
33
+ end
34
+ shutdownCallbacks[#shutdownCallbacks + 1] = callback
35
+ if driver then
36
+ return
37
+ end
38
+ driver = CreateFrame("Frame")
39
+ driver:RegisterEvent("PLAYER_REGEN_DISABLED")
40
+ driver:SetScript("OnEvent", RunCombatShutdown)
41
+ end
42
+
43
+ local function PrintBlocked()
44
+ print("|cffd83b4eLychee Dev:|r " .. ns.L.COMBAT_BLOCKED)
45
+ end
46
+
47
+ ns.Safety = {
48
+ IsCombatBlocked = IsCombatBlocked,
49
+ RegisterCombatShutdown = RegisterCombatShutdown,
50
+ RunCombatShutdown = RunCombatShutdown,
51
+ PrintBlocked = PrintBlocked,
52
+ }
53
+
54
+ -- Named entry points kept at the namespace root for feature modules.
55
+ ns.IsCombatBlocked = IsCombatBlocked
56
+ ns.RegisterCombatShutdown = RegisterCombatShutdown
@@ -1,5 +1,7 @@
1
1
  local ADDON_NAME, ns = ...
2
2
 
3
+ -- Bounded deterministic serialization. Every cap is a hard number shared with
4
+ -- the export pipeline; markers must stay visible when a cap trips.
3
5
  local DEFAULT_MAX_DEPTH = 6
4
6
  local DEFAULT_MAX_ENTRIES = 200
5
7
  local DEFAULT_MAX_OUTPUT_BYTES = 44000
@@ -122,14 +124,14 @@ local function SerializeWithLimits(value, maxDepth, maxEntries, maxOutputBytes)
122
124
  return table.concat(state.parts), state.incomplete
123
125
  end
124
126
 
125
- function ns.Serialize(value)
127
+ local function Serialize(value)
126
128
  return SerializeWithLimits(value, DEFAULT_MAX_DEPTH, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_OUTPUT_BYTES)
127
129
  end
128
130
 
129
- function ns.SerializeValues(values)
131
+ local function SerializeValues(values)
130
132
  local lines = {}
131
133
  for index = 1, values.n do
132
- lines[index] = "[" .. index .. "] = " .. ns.Serialize(values[index])
134
+ lines[index] = "[" .. index .. "] = " .. Serialize(values[index])
133
135
  end
134
136
  return table.concat(lines, "\n")
135
137
  end
@@ -257,7 +259,10 @@ local function CreateStreamCoroutine(value, streamState)
257
259
  end)
258
260
  end
259
261
 
260
- function ns.CreateSerializationStream(value)
262
+ -- Coroutine-backed streaming variant: yields at least every 4096 bytes, hands
263
+ -- out chunks of at most 44000 bytes, and bounds growth at depth 32 / 10000
264
+ -- entries / 16 MB of total output with a visible "... <output limit reached>".
265
+ local function CreateStream(value)
261
266
  local state = { limited = false }
262
267
  local thread = CreateStreamCoroutine(value, state)
263
268
  local stream = {
@@ -308,8 +313,8 @@ function ns.CreateSerializationStream(value)
308
313
  return stream
309
314
  end
310
315
 
311
- function ns.SerializeForExport(value)
312
- local stream = ns.CreateSerializationStream(value)
316
+ local function SerializeForExport(value)
317
+ local stream = CreateStream(value)
313
318
  local parts = {}
314
319
  repeat
315
320
  local chunk = stream:ReadChunk()
@@ -322,3 +327,10 @@ function ns.SerializeForExport(value)
322
327
  end
323
328
  return table.concat(parts), stream:WasLimited(), stream.errorMessage
324
329
  end
330
+
331
+ ns.Serializer = {
332
+ Serialize = Serialize,
333
+ SerializeValues = SerializeValues,
334
+ CreateStream = CreateStream,
335
+ SerializeForExport = SerializeForExport,
336
+ }