lycheedev 3.1.2 → 3.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/README.md +16 -38
- package/THIRD_PARTY_NOTICES +4 -314
- package/bin/lycheedev.mjs +1 -1
- package/bin/update.mjs +26 -32
- package/native/windows-amd64/lycheedev.exe +0 -0
- package/package.json +1 -1
- package/payload/addon/Bindings.xml +12 -0
- package/payload/addon/Bridge/ActivityView.lua +2 -5
- package/payload/addon/Bridge/CaptureWriter.lua +9 -115
- package/payload/addon/Bridge/FocusBindings.lua +71 -0
- package/payload/addon/Bridge/InputProtection.lua +2 -9
- package/payload/addon/Bridge/InputState.lua +15 -19
- package/payload/addon/Bridge/MemoryProtocol.lua +1 -1
- package/payload/addon/Bridge/ProbeExecution.lua +1 -0
- package/payload/addon/Bridge/ReceiverBindings.lua +73 -279
- package/payload/addon/Bridge/SlotProtocol.lua +30 -12
- package/payload/addon/Bridge/SlotRuntime.lua +9 -12
- package/payload/addon/Core/ClientGate.lua +2 -0
- package/payload/addon/Core/Compat.lua +25 -24
- package/payload/addon/Core/Controls.lua +27 -248
- package/payload/addon/Core/Execute.lua +22 -19
- package/payload/addon/Core/Locale.lua +4 -116
- package/payload/addon/Core/Locale_enUS.lua +4 -116
- package/payload/addon/Core/Persistence.lua +2 -2
- package/payload/addon/Core/Runtime.lua +46 -64
- package/payload/addon/Core/Serializer.lua +9 -1
- package/payload/addon/Core/Startup.lua +20 -0
- package/payload/addon/Core/Stores.lua +63 -95
- package/payload/addon/LICENSE +21 -0
- package/payload/addon/Lychee Dev.toc +10 -21
- package/payload/addon/Modules/AutomationView.lua +47 -383
- package/payload/addon/Modules/Diagnostics.lua +0 -4
- package/payload/addon/Modules/Events/Catalog.lua +1 -1
- package/payload/addon/Modules/Events/CatalogData_Anniversary.lua +1489 -0
- package/payload/addon/Modules/Events/CatalogData_Era.lua +1489 -0
- package/payload/addon/Modules/FunctionTrace.lua +17 -6
- package/payload/addon/Modules/ObjectInspector.lua +27 -25
- package/payload/addon/THIRD_PARTY_NOTICES +483 -0
- package/payload/addon/UI/Pages/Automation.lua +7 -64
- package/payload/addon/UI/Pages/Events.lua +0 -4
- package/payload/addon/UI/Pages/ExportRecords.lua +1 -1
- package/payload/addon/UI/Pages/Object.lua +5 -4
- package/payload/addon/UI/Pages/Run.lua +7 -1
- package/payload/addon/UI/TreeView.lua +0 -11
- package/payload/addon/UI/Widgets.lua +0 -102
- package/payload/addon/UI/Window.lua +0 -6
- package/payload/skill/SKILL.md +11 -2
- package/payload/skill/references/commands.md +17 -27
- package/payload/skill/references/data-hotfix.md +6 -3
- package/payload/skill/references/data-investigation.md +5 -2
- package/payload/skill/references/data-tables.md +4 -0
- package/payload/skill/references/data-targets.md +4 -2
- package/payload/skill/references/installation.md +9 -3
- package/payload/skill/references/live-investigation.md +14 -6
- package/payload/skill/references/live-probes.md +9 -8
- package/payload/skill/references/live-recovery.md +67 -43
- package/payload/skill/references/live-startup.md +97 -76
- package/payload/skill/references/runtime-investigations.md +10 -8
- package/payload/skill/references/source-preparation.md +23 -2
- package/payload/skill/references/source-research.md +58 -5
- package/payload/skill/scripts/lycheedev.mjs +16 -12
- package/release.json +136 -176
- package/payload/addon/Bridge/Definitions.lua +0 -3
- package/payload/addon/Bridge/FaultRunner.lua +0 -44
- package/payload/addon/Bridge/Identity.lua +0 -127
- package/payload/addon/Bridge/InputProtocol.lua +0 -76
- package/payload/addon/Bridge/InputSignal.lua +0 -36
- package/payload/addon/Bridge/Investigation.lua +0 -159
- package/payload/addon/Bridge/MatrixSymbol.lua +0 -1169
- package/payload/addon/Bridge/ProbeQueue.lua +0 -205
- package/payload/addon/Bridge/ProbeRunner.lua +0 -349
- package/payload/addon/Bridge/ReceiptView.lua +0 -316
- package/payload/addon/Bridge/Receiver.lua +0 -326
- package/payload/addon/Bridge/Reentry.lua +0 -261
- package/payload/addon/Bridge/ReportStore.lua +0 -224
- package/payload/addon/Bridge/Session.lua +0 -173
- package/payload/addon/Bridge/StartupBeacon.lua +0 -63
|
@@ -78,7 +78,10 @@ local function encodeDocument(value, limit)
|
|
|
78
78
|
end
|
|
79
79
|
if child % 1 == 0 and math.abs(child) <= 9007199254740991 then
|
|
80
80
|
append(string.format("%.0f", child))
|
|
81
|
-
else
|
|
81
|
+
else
|
|
82
|
+
-- Lua 5.1 tostring rounds to fewer than binary64's required digits.
|
|
83
|
+
append(string.format("%.17g", child))
|
|
84
|
+
end
|
|
82
85
|
elseif kind == "table" then
|
|
83
86
|
if getmetatable(child) then error("report_metatable", 0) end
|
|
84
87
|
if seen[child] then error("report_cycle", 0) end
|
|
@@ -139,122 +142,13 @@ local function digestBytes(text)
|
|
|
139
142
|
return string.format("%04x%04x", high, low)
|
|
140
143
|
end
|
|
141
144
|
|
|
142
|
-
-- Every signal is drawn into a QR symbol, so its size decides whether the host
|
|
143
|
-
-- can sample the module grid at all. A retained session already proved the actor
|
|
144
|
-
-- and the build, so repeating them in each receipt only spends modules: the host
|
|
145
|
-
-- fills them back from its baseline and still refuses a value that contradicts
|
|
146
|
-
-- it. Identity, reset and cleared markers are the exception, because they
|
|
147
|
-
-- establish or re-establish the actor.
|
|
148
|
-
--
|
|
149
|
-
-- The session nonce is different and must NOT be dropped blindly: the ready and
|
|
150
|
-
-- loaded receipts are what establish it, so the host has nothing to fill from
|
|
151
|
-
-- until one of them has been read. Only the receipts that echo an
|
|
152
|
-
-- already-established session may omit it.
|
|
153
|
-
local WIRE_FIELDS = {
|
|
154
|
-
schema = true, kind = true, sessionNonce = true, requestId = true,
|
|
155
|
-
release = true, product = true, build = true,
|
|
156
|
-
reloadNonce = true, cleanupNonce = true, probeNonce = true,
|
|
157
|
-
actorState = true, inputReason = true, sequence = true, runtimeEpoch = true,
|
|
158
|
-
inputReady = true, codeBytes = true, codeAdler32 = true,
|
|
159
|
-
reportBytes = true, reportAdler32 = true,
|
|
160
|
-
receiverNonce = true, attemptId = true, bodyBytes = true,
|
|
161
|
-
bodyAdler32 = true, commitNonce = true, accepted = true, errorCode = true,
|
|
162
|
-
wakeBinding = true, submitBinding = true, closeBinding = true,
|
|
163
|
-
priorSessionSequence = true, priorSessionEpoch = true, receiverProtocol = true,
|
|
164
|
-
reportScope = true,
|
|
165
|
-
workState = true, codeSHA256 = true, receipt = true, resourcesReleased = true,
|
|
166
|
-
}
|
|
167
|
-
local WIRE_MARKER_FIELDS = { character = true, realm = true, guid = true }
|
|
168
|
-
-- A standalone ready can establish a read-only live bind without a preceding
|
|
169
|
-
-- identity probe. Keep its actor on the wire; paired readiness is compacted
|
|
170
|
-
-- only after the host already owns a request-scoped session.
|
|
171
|
-
local WIRE_MARKERS = { identity = true, reset = true, cleared = true, ready = true,
|
|
172
|
-
receiver_ready = true, receiver_staged = true, receiver_commit_ready = true,
|
|
173
|
-
receiver_accepted = true, receiver_rejected = true,
|
|
174
|
-
receiver_cancelled = true, receiver_timeout = true,
|
|
175
|
-
report_error = true, checkpoint = true }
|
|
176
|
-
-- Kinds whose session nonce is redundant because the session provably exists on
|
|
177
|
-
-- the host already: they answer a request the host itself created for that
|
|
178
|
-
-- nonce, and the host compares the nonce it filled in.
|
|
179
|
-
local WIRE_ECHOES_SESSION = { reported = true, acknowledged = true, cancelled = true }
|
|
180
|
-
|
|
181
|
-
-- wireDocument projects a signal onto its transmitted form. Fields outside the
|
|
182
|
-
-- profile are dropped rather than rejected: the projection is what the host
|
|
183
|
-
-- compares against the archived receipt, so an unlisted field simply stops
|
|
184
|
-
-- matching and never lets a caller believe a value was carried when it was not.
|
|
185
|
-
local function wireDocument(value)
|
|
186
|
-
rejectRestricted(value)
|
|
187
|
-
if type(value) ~= "table" or getmetatable(value) ~= nil then
|
|
188
|
-
return value
|
|
189
|
-
end
|
|
190
|
-
rejectRestricted(value.schema)
|
|
191
|
-
if value.schema ~= "lycheedev.signal.v1" then return value end
|
|
192
|
-
rejectRestricted(value.kind)
|
|
193
|
-
local marker = WIRE_MARKERS[value.kind] == true
|
|
194
|
-
local echoes = WIRE_ECHOES_SESSION[value.kind] == true
|
|
195
|
-
local filtered = {}
|
|
196
|
-
for key, child in pairs(value) do
|
|
197
|
-
rejectRestricted(key)
|
|
198
|
-
local carried = WIRE_FIELDS[key] or (marker and WIRE_MARKER_FIELDS[key])
|
|
199
|
-
if carried and not (key == "sessionNonce" and echoes) then
|
|
200
|
-
filtered[key] = child
|
|
201
|
-
end
|
|
202
|
-
end
|
|
203
|
-
return filtered
|
|
204
|
-
end
|
|
205
|
-
|
|
206
145
|
ns.CaptureWriter = {
|
|
207
146
|
Encode = function(value, limit)
|
|
208
|
-
if issecretvalue and issecretvalue(limit) then return nil,
|
|
209
|
-
limit
|
|
210
|
-
if type(limit)
|
|
211
|
-
|
|
212
|
-
end
|
|
213
|
-
local ok, result = pcall(encodeDocument, value, limit)
|
|
214
|
-
if not ok then return nil, result end
|
|
215
|
-
-- Every encoded value is the exact UTF-8 JSON text that is both drawn
|
|
216
|
-
-- into the QR symbol and stored in SavedVariables. Transport
|
|
217
|
-
-- compression is not applied here: a raw DEFLATE stream is not valid
|
|
218
|
-
-- UTF-8, and SavedVariables must stay valid UTF-8 for the host to read
|
|
219
|
-
-- any of the toolkit state at all.
|
|
220
|
-
return result
|
|
221
|
-
end,
|
|
222
|
-
-- EncodeSignal is the only entry point that produces a machine-readable
|
|
223
|
-
-- receipt. Encode stays byte-exact for whatever a caller passes. A rejected
|
|
224
|
-
-- projection reports the exact offending field so a caller can tell an
|
|
225
|
-
-- unrecognized field from a malformed value.
|
|
226
|
-
EncodeSignal = function(value, limit)
|
|
227
|
-
local ok, projected = pcall(wireDocument, value)
|
|
228
|
-
if not ok then
|
|
229
|
-
if type(projected) == "string" and #projected > 0 and #projected <= 128 then
|
|
230
|
-
return nil, projected
|
|
231
|
-
end
|
|
232
|
-
return nil, "report_invalid_document"
|
|
233
|
-
end
|
|
234
|
-
local encoded, failure = ns.CaptureWriter.Encode(projected, limit)
|
|
235
|
-
return encoded, failure, encoded and projected or nil
|
|
236
|
-
end,
|
|
237
|
-
-- Optical-only envelope: the stored receipt stays byte-exact. Readiness is
|
|
238
|
-
-- a fresh, independently sequenced observation of the same session. The
|
|
239
|
-
-- host expands this tuple into a second signal, never into report content.
|
|
240
|
-
EncodeReceiptPair = function(receipt, ready)
|
|
241
|
-
local ok, suffix = pcall(function()
|
|
242
|
-
rejectRestricted(receipt); rejectRestricted(ready)
|
|
243
|
-
if type(receipt) ~= "string" or #receipt > 2048 or not isUTF8(receipt)
|
|
244
|
-
or type(ready) ~= "table" or getmetatable(ready) then error("receipt_invalid_pair", 0) end
|
|
245
|
-
-- Traverse before branching, including any secret-valued fields.
|
|
246
|
-
encodeDocument(ready, 4096)
|
|
247
|
-
if ready.kind ~= "ready" or ready.inputReady ~= true or ready.requestId ~= ""
|
|
248
|
-
or type(ready.sessionNonce) ~= "string" or #ready.sessionNonce ~= 32
|
|
249
|
-
or not string.match(ready.sessionNonce, "^[0-9a-f]+$")
|
|
250
|
-
or type(ready.sequence) ~= "number" or type(ready.runtimeEpoch) ~= "number" then
|
|
251
|
-
error("receipt_invalid_pair", 0)
|
|
252
|
-
end
|
|
253
|
-
return encodeDocument({ready.sessionNonce, ready.sequence, ready.runtimeEpoch}, 256)
|
|
254
|
-
end)
|
|
255
|
-
if not ok then return nil, "receipt_invalid_pair" end
|
|
256
|
-
local result = '{"schema":"lycheedev.receipt.v1","receipt":' .. receipt .. ',"ready":' .. suffix .. '}'
|
|
257
|
-
if #result > 4096 then return nil, "receipt_invalid_pair" end
|
|
147
|
+
if issecretvalue and issecretvalue(limit) then return nil,"report_invalid_budget" end
|
|
148
|
+
limit=limit or MAX_REPORT_BYTES
|
|
149
|
+
if type(limit)~="number" or limit<1 or limit>MAX_REPORT_BYTES or limit%1~=0 then return nil,"report_invalid_budget" end
|
|
150
|
+
local ok,result=pcall(encodeDocument,value,limit)
|
|
151
|
+
if not ok then return nil,result end
|
|
258
152
|
return result
|
|
259
153
|
end,
|
|
260
154
|
DigestBytes = digestBytes,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
local _, ns = ...
|
|
2
|
+
|
|
3
|
+
-- Enabled-only forwarding for the current ordinary EditBox. Keep its own
|
|
4
|
+
-- handler and typing behavior; only our two registered actions propagate.
|
|
5
|
+
local enabled, attached, original, wrapper, propagation
|
|
6
|
+
local callbackOwner = {}
|
|
7
|
+
local function restricted(value) return issecretvalue and issecretvalue(value) end
|
|
8
|
+
local function focus()
|
|
9
|
+
if type(GetCurrentKeyBoardFocus) ~= "function" then return nil end
|
|
10
|
+
local ok, value = pcall(GetCurrentKeyBoardFocus)
|
|
11
|
+
if not ok or restricted(value) then return nil end
|
|
12
|
+
return value
|
|
13
|
+
end
|
|
14
|
+
local function detach()
|
|
15
|
+
if attached and attached:GetScript("OnKeyDown") == wrapper then
|
|
16
|
+
attached:SetScript("OnKeyDown", original)
|
|
17
|
+
attached:SetPropagateKeyboardInput(propagation)
|
|
18
|
+
end
|
|
19
|
+
attached, original, wrapper, propagation = nil, nil, nil, nil
|
|
20
|
+
end
|
|
21
|
+
local function eligible(editBox)
|
|
22
|
+
if not editBox or editBox:IsForbidden() then return false end
|
|
23
|
+
for _, method in ipairs({ "IsProtected", "IsPassword", "IsSecureText" }) do
|
|
24
|
+
if type(editBox[method]) ~= "function" then return false end
|
|
25
|
+
local value = editBox[method](editBox)
|
|
26
|
+
if restricted(value) or value ~= false then return false end
|
|
27
|
+
end
|
|
28
|
+
return true
|
|
29
|
+
end
|
|
30
|
+
local function refresh()
|
|
31
|
+
if not enabled then return false end
|
|
32
|
+
local editBox = focus()
|
|
33
|
+
if editBox == attached and attached and attached:GetScript("OnKeyDown") == wrapper then return true end
|
|
34
|
+
detach()
|
|
35
|
+
if not eligible(editBox) then return false end
|
|
36
|
+
local prior = editBox:GetScript("OnKeyDown")
|
|
37
|
+
local propagate = editBox:GetPropagateKeyboardInput()
|
|
38
|
+
if restricted(prior) or restricted(propagate) then return false end
|
|
39
|
+
local function onKeyDown(self, key, ...)
|
|
40
|
+
self:SetPropagateKeyboardInput(propagate)
|
|
41
|
+
if prior then prior(self, key, ...) end
|
|
42
|
+
if not enabled or InCombatLockdown() or restricted(key) then return end
|
|
43
|
+
local chord = ns.Compat.ReceiverChord(key)
|
|
44
|
+
if not chord then return end
|
|
45
|
+
local profile = ns.ReceiverBindings.Current()
|
|
46
|
+
if profile and (chord == profile.wake or chord == profile.reload) then
|
|
47
|
+
self:SetPropagateKeyboardInput(true)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
attached, original, wrapper, propagation = editBox, prior, onKeyDown, propagate
|
|
51
|
+
editBox:SetScript("OnKeyDown", onKeyDown)
|
|
52
|
+
return true
|
|
53
|
+
end
|
|
54
|
+
ns.FocusBindings = {
|
|
55
|
+
Refresh = refresh,
|
|
56
|
+
Ready = function() return enabled and attached ~= nil and focus() == attached and attached:GetScript("OnKeyDown") == wrapper end,
|
|
57
|
+
Start = function()
|
|
58
|
+
if enabled then return end
|
|
59
|
+
enabled = true
|
|
60
|
+
ns.Compat.ObserveChatFocus(callbackOwner, function()
|
|
61
|
+
refresh()
|
|
62
|
+
if ns.InputState then ns.InputState.Refresh() end
|
|
63
|
+
end)
|
|
64
|
+
refresh()
|
|
65
|
+
end,
|
|
66
|
+
Stop = function()
|
|
67
|
+
enabled = false
|
|
68
|
+
ns.Compat.StopObservingChatFocus(callbackOwner)
|
|
69
|
+
detach()
|
|
70
|
+
end,
|
|
71
|
+
}
|
|
@@ -25,13 +25,7 @@ ns.InputProtection={
|
|
|
25
25
|
if not ns.ReceiverBindings or type(ns.ReceiverBindings.Current)~="function" then return nil,"input_protection_not_ready" end
|
|
26
26
|
local ok,profile=pcall(ns.ReceiverBindings.Current)
|
|
27
27
|
if not ok or (issecretvalue and issecretvalue(profile)) or type(profile)~="table" then return nil,"input_protection_not_ready" end
|
|
28
|
-
|
|
29
|
-
if issecretvalue and issecretvalue(profile[action]) then return nil,"input_protection_not_ready" end
|
|
30
|
-
end
|
|
31
|
-
if profile.close~="ALT-CTRL-[" or not
|
|
32
|
-
((profile.wake=="ALT-CTRL-F12" and profile.submit=="ALT-CTRL-SHIFT-F12")
|
|
33
|
-
or (profile.wake=="ALT-CTRL-F11" and profile.submit=="ALT-CTRL-SHIFT-F11")) then return nil,"input_protection_not_ready" end
|
|
34
|
-
bindings={wake=profile.wake,submit=profile.submit,close=profile.close}
|
|
28
|
+
bindings={wake=profile.wake,reload=profile.reload}
|
|
35
29
|
end
|
|
36
30
|
if not frame then
|
|
37
31
|
local candidate
|
|
@@ -43,9 +37,8 @@ ns.InputProtection={
|
|
|
43
37
|
local chord=ns.Compat.ReceiverChord(key)
|
|
44
38
|
local token=active
|
|
45
39
|
self:SetPropagateKeyboardInput(false)
|
|
46
|
-
if chord=="ALT-CTRL-[" then release(token,"input_protection_cancelled");return end
|
|
47
40
|
if token and activeBindings then
|
|
48
|
-
self:SetPropagateKeyboardInput(chord==activeBindings.wake or chord==activeBindings.
|
|
41
|
+
self:SetPropagateKeyboardInput(chord==activeBindings.wake or chord==activeBindings.reload)
|
|
49
42
|
end
|
|
50
43
|
end)
|
|
51
44
|
end)
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
local _, ns = ...
|
|
2
2
|
|
|
3
|
-
-- Owner-approved native transport telemetry. One sampler
|
|
3
|
+
-- Owner-approved native transport telemetry. One sampler, no input
|
|
4
4
|
-- hooks or focus mutation. Explicit bridge-off removes all recurring work.
|
|
5
5
|
local frame, provider, record, last, sequence, lastTick,mailbox
|
|
6
|
-
local loading,leaving,refreshing
|
|
6
|
+
local loading,leaving,refreshing
|
|
7
7
|
local zero=string.rep("0",32)
|
|
8
8
|
local function nativeBindings()
|
|
9
9
|
if not ns.ReceiverBindings or type(ns.ReceiverBindings.Current)~="function" then return nil end
|
|
10
10
|
local ok,profile=pcall(ns.ReceiverBindings.Current)
|
|
11
11
|
if not ok or (issecretvalue and issecretvalue(profile)) or type(profile)~="table" then return nil end
|
|
12
|
-
|
|
13
|
-
if issecretvalue and issecretvalue(profile[key]) then return nil end
|
|
14
|
-
end
|
|
15
|
-
if profile.close~="ALT-CTRL-[" or not
|
|
16
|
-
((profile.wake=="ALT-CTRL-F12" and profile.submit=="ALT-CTRL-SHIFT-F12")
|
|
17
|
-
or (profile.wake=="ALT-CTRL-F11" and profile.submit=="ALT-CTRL-SHIFT-F11")) then return nil end
|
|
18
|
-
return {wake=profile.wake,submit=profile.submit,close=profile.close}
|
|
12
|
+
return {wake=profile.wake,reload=profile.reload}
|
|
19
13
|
end
|
|
20
|
-
local function hide()record=nil;if mailbox then rawset(mailbox,"input",nil) end
|
|
14
|
+
local function hide()record=nil;if mailbox then rawset(mailbox,"input",nil) end end
|
|
21
15
|
local function sample()
|
|
22
16
|
if loading or leaving or ns.Compat.InWorld()~=true then hide();return end
|
|
23
17
|
local identity=provider and provider()
|
|
@@ -25,18 +19,21 @@ local function sample()
|
|
|
25
19
|
local tick=ns.Compat.MonotonicSeconds()
|
|
26
20
|
if not tick or (lastTick and tick<lastTick) then hide();return end
|
|
27
21
|
lastTick=tick
|
|
28
|
-
local
|
|
22
|
+
local forwarded=ns.FocusBindings and ns.FocusBindings.Refresh()
|
|
23
|
+
local ready,reason=ns.Platform.ObserveInputState(forwarded==true)
|
|
24
|
+
if ns.FocusBindings and reason=="input_keyboard_focus" then reason="input_focus_unavailable" end
|
|
29
25
|
if issecretvalue and (issecretvalue(ready) or issecretvalue(reason)) then ready,reason=nil,"input_observation_unavailable" end
|
|
30
26
|
local bindings=nativeBindings()
|
|
31
27
|
if not bindings then ready,reason=false,"input_binding_unavailable" end
|
|
32
28
|
if ready~=true and (type(reason)~="string" or reason=="") then reason="input_observation_unavailable" end
|
|
33
29
|
sequence=sequence+1
|
|
34
30
|
if sequence>=4294967295 then ns.InputState.Stop();return end
|
|
35
|
-
identity.schema="
|
|
36
|
-
identity.bindings=bindings or {wake="",
|
|
31
|
+
identity.schema="Lycheedev mailbox protocol v1"
|
|
32
|
+
identity.bindings=bindings or {wake="",reload=""}
|
|
37
33
|
identity.sampleMillis=math.floor(tick*1000)
|
|
38
34
|
identity.inputBlocked=ready~=true
|
|
39
35
|
identity.reason=reason or ""
|
|
36
|
+
identity.escapeLimit=0
|
|
40
37
|
-- Always obtain a detached private snapshot; public mailbox values never
|
|
41
38
|
-- drive the attempt sequence or any input/receipt authorization.
|
|
42
39
|
if ns.SlotRuntime and ns.SlotRuntime.InputDiagnostic then identity.inputAttempt=ns.SlotRuntime.InputDiagnostic() end
|
|
@@ -44,10 +41,6 @@ local function sample()
|
|
|
44
41
|
if not text then hide();return end
|
|
45
42
|
record=ns.MemoryProtocol.Encode(identity.runtime,identity.runtime,zero,5,1,sequence,text)
|
|
46
43
|
if not record then hide();return end
|
|
47
|
-
local state=ready==true and "ready" or (reason=="input_keyboard_focus" or reason=="input_combat_lockdown") and reason or "unknown"
|
|
48
|
-
local nextHeartbeat=not heartbeat
|
|
49
|
-
if not ns.InputSignal.Render(state,nextHeartbeat) then hide();return end
|
|
50
|
-
heartbeat=nextHeartbeat
|
|
51
44
|
if mailbox then rawset(mailbox,"input",record) end
|
|
52
45
|
end
|
|
53
46
|
local function refresh()
|
|
@@ -66,8 +59,11 @@ ns.InputState={
|
|
|
66
59
|
end
|
|
67
60
|
provider=observe
|
|
68
61
|
if frame and frame:GetScript("OnUpdate") then return true end
|
|
62
|
+
if ns.FocusBindings then ns.FocusBindings.Start() end
|
|
69
63
|
sequence,last=sequence or 0,0
|
|
70
|
-
|
|
64
|
+
-- AFK/cinematic UIs hide UIParent. Transport telemetry has no visual
|
|
65
|
+
-- content and must remain independent while the player is in-world.
|
|
66
|
+
if not frame then frame=CreateFrame("Frame");frame:Hide();frame:EnableMouse(false) end
|
|
71
67
|
loading,leaving=false,false
|
|
72
68
|
for _,event in ipairs({"PLAYER_ENTERING_WORLD","PLAYER_LEAVING_WORLD","LOADING_SCREEN_ENABLED","LOADING_SCREEN_DISABLED","PLAYER_REGEN_ENABLED","PLAYER_REGEN_DISABLED"}) do frame:RegisterEvent(event) end
|
|
73
69
|
frame:SetScript("OnEvent",function(_,event)
|
|
@@ -93,6 +89,7 @@ ns.InputState={
|
|
|
93
89
|
-- Transaction completion refreshes facts without moving the periodic tick.
|
|
94
90
|
Refresh=refresh,
|
|
95
91
|
Stop=function()
|
|
92
|
+
if ns.FocusBindings then ns.FocusBindings.Stop() end
|
|
96
93
|
if frame then
|
|
97
94
|
frame:SetScript("OnUpdate",nil);frame:SetScript("OnEvent",nil)
|
|
98
95
|
frame:SetScript("OnShow",nil);frame:SetScript("OnHide",nil);frame:UnregisterAllEvents()
|
|
@@ -101,7 +98,6 @@ ns.InputState={
|
|
|
101
98
|
hide()
|
|
102
99
|
mailbox=nil
|
|
103
100
|
if frame then frame:Hide() end
|
|
104
|
-
if ns.StartupBeacon then ns.StartupBeacon.Stop() end
|
|
105
101
|
end,
|
|
106
102
|
Snapshot=function()return record end,
|
|
107
103
|
}
|
|
@@ -20,7 +20,7 @@ ns.MemoryProtocol = {
|
|
|
20
20
|
Encode=function(nonce,runtime,ticket,kind,state,sequence,payload)
|
|
21
21
|
if not token(nonce) or not token(runtime) or not token(ticket)
|
|
22
22
|
or type(payload)~="string" or #payload>524288
|
|
23
|
-
or kind<1 or kind>
|
|
23
|
+
or kind<1 or kind>6 or state<1 or state>255
|
|
24
24
|
or type(sequence)~="number" or sequence<0 or sequence>=4294967296 or sequence%1~=0 then
|
|
25
25
|
return nil,"memory_record_invalid"
|
|
26
26
|
end
|
|
@@ -137,6 +137,7 @@ ns.ProbeExecution={Run=function(fn,budget,done)
|
|
|
137
137
|
logs[#logs+1]=line;logBytes=logBytes+#line;return true
|
|
138
138
|
end
|
|
139
139
|
function api:IsCancelled()return not live end
|
|
140
|
+
function api:Cancel()return settle(false,"probe_cancelled")end
|
|
140
141
|
depth=1;local ok,result=pcall(fn,api);depth=0
|
|
141
142
|
if not ok then api:Fail(result)
|
|
142
143
|
elseif pending then finish()
|