lycheedev 1.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.
- package/bin/lycheedev.js +257 -0
- package/package.json +42 -0
- package/src/addon.js +87 -0
- package/src/config.js +64 -0
- package/src/doctor.js +100 -0
- package/src/install.js +131 -0
- package/src/paths.js +93 -0
- package/src/python.js +107 -0
- package/src/skill.js +48 -0
- package/src/wow.js +110 -0
- package/vendor/addon/Core/Bootstrap.lua +131 -0
- package/vendor/addon/Core/Clients/Mainline.lua +9 -0
- package/vendor/addon/Core/Clients/Mists.lua +9 -0
- package/vendor/addon/Core/Clients/Titan.lua +9 -0
- package/vendor/addon/Core/Compatibility.lua +43 -0
- package/vendor/addon/Core/Database.lua +859 -0
- package/vendor/addon/Core/Inspector.lua +647 -0
- package/vendor/addon/Core/Locale.lua +307 -0
- package/vendor/addon/Core/Locale_enUS.lua +318 -0
- package/vendor/addon/Core/Safety.lua +42 -0
- package/vendor/addon/Core/Serializer.lua +324 -0
- package/vendor/addon/Libs/AutomationQR.lua +1176 -0
- package/vendor/addon/Lychee Dev_Mainline.toc +43 -0
- package/vendor/addon/Lychee Dev_Mists.toc +43 -0
- package/vendor/addon/Lychee Dev_Wrath.toc +43 -0
- package/vendor/addon/Media/GitHub.png +0 -0
- package/vendor/addon/Media/Logo.png +0 -0
- package/vendor/addon/Modules/Automation/Controller.lua +757 -0
- package/vendor/addon/Modules/Automation/Report.lua +409 -0
- package/vendor/addon/Modules/Automation/auto/auto.lua +12 -0
- package/vendor/addon/Modules/Diagnostics.lua +238 -0
- package/vendor/addon/Modules/Events/Catalog.lua +184 -0
- package/vendor/addon/Modules/Events/CatalogData_Mainline.lua +1788 -0
- package/vendor/addon/Modules/Events/CatalogData_Mists.lua +1489 -0
- package/vendor/addon/Modules/Events/CatalogData_Titan.lua +1492 -0
- package/vendor/addon/Modules/Events/Monitor.lua +181 -0
- package/vendor/addon/Modules/FunctionTrace.lua +85 -0
- package/vendor/addon/Modules/ObjectInspector.lua +329 -0
- package/vendor/addon/UI/AutomationOverlay.lua +183 -0
- package/vendor/addon/UI/Export.lua +140 -0
- package/vendor/addon/UI/Features.lua +890 -0
- package/vendor/addon/UI/MainWindow.lua +1145 -0
- package/vendor/addon/UI/Pages/About.lua +223 -0
- package/vendor/addon/UI/Pages/Automation.lua +417 -0
- package/vendor/addon/UI/Pages/Diagnostics.lua +289 -0
- package/vendor/addon/UI/Pages/ExportRecords.lua +387 -0
- package/vendor/addon/UI/Pages/Object.lua +573 -0
- package/vendor/addon/UI/Pages/Trace.lua +165 -0
- package/vendor/skill/SKILL.md +94 -0
- package/vendor/skill/agents/openai.yaml +4 -0
- package/vendor/skill/references/automation.md +327 -0
- package/vendor/skill/references/runtime-investigations.md +97 -0
- package/vendor/skill/scripts/automation/__init__.py +1 -0
- package/vendor/skill/scripts/automation/registry.py +516 -0
- package/vendor/skill/scripts/automation/saved_variables.py +438 -0
- package/vendor/skill/scripts/automation/session.py +207 -0
- package/vendor/skill/scripts/automation/windows.py +573 -0
- package/vendor/skill/scripts/automation.py +865 -0
- package/vendor/skill/scripts/requirements.txt +13 -0
- package/vendor/skill/scripts/selftest_offline.py +981 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
local ADDON_NAME, ns = ...
|
|
2
|
+
|
|
3
|
+
local data = ns.EventCatalogData
|
|
4
|
+
local L = ns.L
|
|
5
|
+
local ALL_INDEX = 0
|
|
6
|
+
local catalog = {}
|
|
7
|
+
local Selection = {}
|
|
8
|
+
Selection.__index = Selection
|
|
9
|
+
|
|
10
|
+
local function NormalizeQuery(query)
|
|
11
|
+
query = type(query) == "string" and query or ""
|
|
12
|
+
query = query:match("^%s*(.-)%s*$"):upper()
|
|
13
|
+
if query == "\229\133\168\233\131\168" or query == "\229\133\168\233\131\168\228\186\139\228\187\182" then
|
|
14
|
+
return "ALL"
|
|
15
|
+
end
|
|
16
|
+
return query
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
function catalog.GetCount()
|
|
20
|
+
return #data / 2
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
function catalog.Get(index)
|
|
24
|
+
if index == ALL_INDEX then
|
|
25
|
+
return "ALL", "*"
|
|
26
|
+
end
|
|
27
|
+
local offset = index * 2 - 1
|
|
28
|
+
return data[offset], data[offset + 1]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
function catalog.Find(eventName)
|
|
32
|
+
eventName = NormalizeQuery(eventName)
|
|
33
|
+
if eventName == "" then
|
|
34
|
+
return nil
|
|
35
|
+
elseif eventName == "ALL" then
|
|
36
|
+
return ALL_INDEX
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
local low = 1
|
|
40
|
+
local high = catalog.GetCount()
|
|
41
|
+
while low <= high do
|
|
42
|
+
local middle = math.floor((low + high) / 2)
|
|
43
|
+
local name = data[middle * 2 - 1]
|
|
44
|
+
if name == eventName then
|
|
45
|
+
return middle
|
|
46
|
+
elseif name < eventName then
|
|
47
|
+
low = middle + 1
|
|
48
|
+
else
|
|
49
|
+
high = middle - 1
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
return nil
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
function catalog.Search(query, limit, results)
|
|
56
|
+
query = NormalizeQuery(query)
|
|
57
|
+
results = results or {}
|
|
58
|
+
for index = #results, 1, -1 do
|
|
59
|
+
results[index] = nil
|
|
60
|
+
end
|
|
61
|
+
if query == "" then
|
|
62
|
+
return results
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
limit = math.max(1, math.floor(tonumber(limit) or 8))
|
|
66
|
+
local exactIndex = catalog.Find(query)
|
|
67
|
+
if exactIndex then
|
|
68
|
+
results[1] = exactIndex
|
|
69
|
+
if #results >= limit then
|
|
70
|
+
return results
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
local queryLength = #query
|
|
75
|
+
local count = catalog.GetCount()
|
|
76
|
+
for index = 1, count do
|
|
77
|
+
local name = data[index * 2 - 1]
|
|
78
|
+
if name ~= query and name:sub(1, queryLength) == query then
|
|
79
|
+
results[#results + 1] = index
|
|
80
|
+
if #results >= limit then
|
|
81
|
+
return results
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
for index = 1, count do
|
|
87
|
+
local name = data[index * 2 - 1]
|
|
88
|
+
local matchStart = name:find(query, 1, true)
|
|
89
|
+
if matchStart and matchStart > 1 then
|
|
90
|
+
results[#results + 1] = index
|
|
91
|
+
if #results >= limit then
|
|
92
|
+
return results
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
return results
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
function Selection:Add(catalogIndex)
|
|
100
|
+
local eventName = catalog.Get(catalogIndex)
|
|
101
|
+
if not eventName then
|
|
102
|
+
return false, L.UNKNOWN_EVENT
|
|
103
|
+
elseif self.selected[eventName] then
|
|
104
|
+
return false, L.EVENT_ALREADY_SELECTED
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if eventName == "ALL" then
|
|
108
|
+
for index = #self.indices, 1, -1 do
|
|
109
|
+
self.indices[index] = nil
|
|
110
|
+
end
|
|
111
|
+
for name in pairs(self.selected) do
|
|
112
|
+
self.selected[name] = nil
|
|
113
|
+
end
|
|
114
|
+
elseif self.selected.ALL then
|
|
115
|
+
self.indices[1] = nil
|
|
116
|
+
self.selected.ALL = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
self.indices[#self.indices + 1] = catalogIndex
|
|
120
|
+
self.selected[eventName] = true
|
|
121
|
+
return true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
function Selection:AddName(eventName)
|
|
125
|
+
local catalogIndex = catalog.Find(eventName)
|
|
126
|
+
if not catalogIndex then
|
|
127
|
+
return false, L.NO_DOCUMENTED_EVENT
|
|
128
|
+
end
|
|
129
|
+
return self:Add(catalogIndex)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
function Selection:Remove(eventName)
|
|
133
|
+
eventName = NormalizeQuery(eventName)
|
|
134
|
+
if not self.selected[eventName] then
|
|
135
|
+
return false
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
for index = 1, #self.indices do
|
|
139
|
+
local selectedName = catalog.Get(self.indices[index])
|
|
140
|
+
if selectedName == eventName then
|
|
141
|
+
table.remove(self.indices, index)
|
|
142
|
+
break
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
self.selected[eventName] = nil
|
|
146
|
+
return true
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
function Selection:Contains(eventName)
|
|
150
|
+
return self.selected[NormalizeQuery(eventName)] and true or false
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
function Selection:GetCount()
|
|
154
|
+
return #self.indices
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
function Selection:Get(index)
|
|
158
|
+
local catalogIndex = self.indices[index]
|
|
159
|
+
if not catalogIndex then
|
|
160
|
+
return nil
|
|
161
|
+
end
|
|
162
|
+
local eventName, signature = catalog.Get(catalogIndex)
|
|
163
|
+
return eventName, signature, catalogIndex
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
function Selection:GetNames()
|
|
167
|
+
local names = {}
|
|
168
|
+
for index = 1, #self.indices do
|
|
169
|
+
names[index] = catalog.Get(self.indices[index])
|
|
170
|
+
end
|
|
171
|
+
return names
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
function catalog.CreateSelection(initialNames)
|
|
175
|
+
local selection = setmetatable({ indices = {}, selected = {} }, Selection)
|
|
176
|
+
if type(initialNames) == "table" then
|
|
177
|
+
for index = 1, #initialNames do
|
|
178
|
+
selection:AddName(initialNames[index])
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
return selection
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
ns.EventCatalog = catalog
|