lycheedev 3.0.0 → 3.0.2
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/native/windows-amd64/lycheedev.exe +0 -0
- package/package.json +1 -1
- package/payload/addon/Bridge/ActivityView.lua +1 -1
- package/payload/addon/Bridge/InputSignal.lua +36 -0
- package/payload/addon/Bridge/InputState.lua +61 -13
- package/payload/addon/Bridge/SlotProtocol.lua +16 -9
- package/payload/addon/Bridge/SlotRuntime.lua +34 -15
- package/payload/addon/Core/Compat.lua +10 -1
- package/payload/addon/Core/Runtime.lua +1 -1
- package/payload/addon/Lychee Dev.toc +2 -1
- package/payload/skill/SKILL.md +89 -148
- package/payload/skill/agents/openai.yaml +2 -2
- package/payload/skill/references/asset-export.md +17 -1
- package/payload/skill/references/commands.md +26 -26
- package/payload/skill/references/data-hotfix.md +112 -0
- package/payload/skill/references/data-investigation.md +74 -320
- package/payload/skill/references/data-recovery.md +55 -0
- package/payload/skill/references/data-tables.md +170 -0
- package/payload/skill/references/data-targets.md +93 -0
- package/payload/skill/references/error-diagnosis.md +2 -2
- package/payload/skill/references/installation.md +15 -1
- package/payload/skill/references/live-investigation.md +46 -267
- package/payload/skill/references/live-probes.md +160 -0
- package/payload/skill/references/live-recovery.md +190 -0
- package/payload/skill/references/live-startup.md +26 -28
- package/payload/skill/references/runtime-investigations.md +17 -3
- package/payload/skill/references/source-preparation.md +58 -0
- package/payload/skill/references/source-relations.md +51 -0
- package/payload/skill/references/source-research.md +66 -162
- package/payload/skill/references/source-value-flow.md +48 -0
- package/release.json +93 -43
|
Binary file
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ local function create()
|
|
|
12
12
|
frame:SetSize(120, 120)
|
|
13
13
|
frame:SetFrameStrata("DIALOG")
|
|
14
14
|
frame:EnableMouse(false)
|
|
15
|
-
frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 8, -
|
|
15
|
+
frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 8, -12)
|
|
16
16
|
local anchor = CreateFrame("Frame", nil, frame)
|
|
17
17
|
anchor:SetSize(96, 96)
|
|
18
18
|
anchor:SetPoint("TOP", frame, "TOP", 0, 0)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
local _, ns = ...
|
|
2
|
+
|
|
3
|
+
-- Three physical 2x2 cells. This display owns no input or independent clock.
|
|
4
|
+
local frame,blocks,lastScale
|
|
5
|
+
local colors={red={1,0,0},green={0,1,0},blue={0,0,1},black={0,0,0},white={1,1,1}}
|
|
6
|
+
local codes={ready={"green","white"},input_keyboard_focus={"red","blue"},input_combat_lockdown={"blue","red"},unknown={"white","black"}}
|
|
7
|
+
local function create()
|
|
8
|
+
if frame then return frame end
|
|
9
|
+
frame=CreateFrame("Frame",nil,UIParent)
|
|
10
|
+
frame:Hide();frame:EnableMouse(false);frame:SetFrameStrata("TOOLTIP");frame:SetFrameLevel(10000)
|
|
11
|
+
blocks={}
|
|
12
|
+
for i=1,3 do blocks[i]=frame:CreateTexture(nil,"ARTWORK") end
|
|
13
|
+
return frame
|
|
14
|
+
end
|
|
15
|
+
ns.InputSignal={
|
|
16
|
+
Frame=create,
|
|
17
|
+
Hide=function()if blocks then for _,block in ipairs(blocks) do block:Hide() end end end,
|
|
18
|
+
Render=function(state,heartbeat)
|
|
19
|
+
local code=codes[state]
|
|
20
|
+
if not frame or not code then return nil end
|
|
21
|
+
local px=ns.Compat.GetPhysicalPixelSize()
|
|
22
|
+
if (issecretvalue and issecretvalue(px)) or type(px)~="number" or px~=px or px<=0 or px==math.huge then return nil end
|
|
23
|
+
if px~=lastScale then
|
|
24
|
+
frame:ClearAllPoints();frame:SetPoint("TOPLEFT",UIParent,"TOPLEFT",0,0);frame:SetSize(6*px,2*px)
|
|
25
|
+
for i,block in ipairs(blocks) do
|
|
26
|
+
block:SetPoint("TOPLEFT",frame,"TOPLEFT",(i-1)*2*px,0);block:SetSize(2*px,2*px)
|
|
27
|
+
end
|
|
28
|
+
lastScale=px
|
|
29
|
+
end
|
|
30
|
+
for i=1,2 do local c=colors[code[i]];blocks[i]:SetColorTexture(c[1],c[2],c[3],1) end
|
|
31
|
+
local value=heartbeat and 1 or 0
|
|
32
|
+
blocks[3]:SetColorTexture(value,value,value,1)
|
|
33
|
+
for _,block in ipairs(blocks) do block:Show() end
|
|
34
|
+
frame:Show();return true
|
|
35
|
+
end,
|
|
36
|
+
}
|
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
local _, ns = ...
|
|
2
2
|
|
|
3
|
-
-- Owner-approved native transport telemetry. One
|
|
3
|
+
-- Owner-approved native transport telemetry. One sampler/display, no input
|
|
4
4
|
-- hooks or focus mutation. Explicit bridge-off removes all recurring work.
|
|
5
|
-
local frame, provider, record, last, sequence
|
|
5
|
+
local frame, provider, record, last, sequence, lastTick
|
|
6
|
+
local loading,leaving,refreshing,heartbeat
|
|
6
7
|
local zero=string.rep("0",32)
|
|
8
|
+
local function nativeBindingsReady()
|
|
9
|
+
if not ns.SlotRuntime then return true end
|
|
10
|
+
if not ns.ReceiverBindings or type(ns.ReceiverBindings.Current)~="function" then return false end
|
|
11
|
+
local ok,profile=pcall(ns.ReceiverBindings.Current)
|
|
12
|
+
if not ok or (issecretvalue and issecretvalue(profile)) or type(profile)~="table" then return false end
|
|
13
|
+
for _,key in ipairs({"wake","submit","close"}) do
|
|
14
|
+
if issecretvalue and issecretvalue(profile[key]) then return false end
|
|
15
|
+
end
|
|
16
|
+
return profile.wake=="ALT-CTRL-F12" and profile.submit=="ALT-CTRL-SHIFT-F12" and profile.close=="ALT-CTRL-["
|
|
17
|
+
end
|
|
18
|
+
local function hide()record=nil;ns.InputSignal.Hide() end
|
|
7
19
|
local function sample()
|
|
20
|
+
if loading or leaving or ns.Compat.InWorld()~=true then hide();return end
|
|
8
21
|
local identity=provider and provider()
|
|
9
|
-
if not identity then
|
|
22
|
+
if not identity then hide();return end
|
|
10
23
|
local tick=ns.Compat.MonotonicSeconds()
|
|
11
|
-
if not tick then
|
|
24
|
+
if not tick or (lastTick and tick<lastTick) then hide();return end
|
|
25
|
+
lastTick=tick
|
|
12
26
|
local ready,reason=ns.Platform.ObserveInputState()
|
|
27
|
+
if issecretvalue and (issecretvalue(ready) or issecretvalue(reason)) then ready,reason=nil,"input_observation_unavailable" end
|
|
28
|
+
if not nativeBindingsReady() then ready,reason=false,"input_binding_unavailable" end
|
|
29
|
+
if ready~=true and (type(reason)~="string" or reason=="") then reason="input_observation_unavailable" end
|
|
13
30
|
sequence=sequence+1
|
|
14
31
|
if sequence>=4294967295 then ns.InputState.Stop();return end
|
|
15
32
|
identity.schema="lycheedev.input.v1"
|
|
@@ -17,29 +34,60 @@ local function sample()
|
|
|
17
34
|
identity.inputBlocked=ready~=true
|
|
18
35
|
identity.reason=reason or ""
|
|
19
36
|
local text=ns.CaptureWriter.Encode(identity,2048)
|
|
20
|
-
if not text then
|
|
37
|
+
if not text then hide();return end
|
|
21
38
|
record=ns.MemoryProtocol.Encode(identity.runtime,identity.runtime,zero,5,1,sequence,text)
|
|
39
|
+
if not record then hide();return end
|
|
40
|
+
local state=ready==true and "ready" or (reason=="input_keyboard_focus" or reason=="input_combat_lockdown") and reason or "unknown"
|
|
41
|
+
local nextHeartbeat=not heartbeat
|
|
42
|
+
if not ns.InputSignal.Render(state,nextHeartbeat) then hide();return end
|
|
43
|
+
heartbeat=nextHeartbeat
|
|
44
|
+
end
|
|
45
|
+
local function refresh()
|
|
46
|
+
if refreshing or not provider or not frame or not frame:GetScript("OnUpdate") then return end
|
|
47
|
+
refreshing=true
|
|
48
|
+
local ok=pcall(sample)
|
|
49
|
+
refreshing=false
|
|
50
|
+
if not ok then hide() end
|
|
22
51
|
end
|
|
23
52
|
ns.InputState={
|
|
24
53
|
Start=function(observe)
|
|
25
54
|
provider=observe
|
|
26
55
|
if frame and frame:GetScript("OnUpdate") then return true end
|
|
27
56
|
sequence,last=sequence or 0,0
|
|
28
|
-
if not frame then frame=
|
|
57
|
+
if not frame then frame=ns.InputSignal.Frame() end
|
|
58
|
+
loading,leaving=false,false
|
|
59
|
+
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
|
|
60
|
+
frame:SetScript("OnEvent",function(_,event)
|
|
61
|
+
if not provider then return end
|
|
62
|
+
if event=="PLAYER_LEAVING_WORLD" then leaving=true;hide();return end
|
|
63
|
+
if event=="LOADING_SCREEN_ENABLED" then loading=true;hide();return end
|
|
64
|
+
if event=="PLAYER_ENTERING_WORLD" then leaving=false end
|
|
65
|
+
if event=="LOADING_SCREEN_DISABLED" then loading=false end
|
|
66
|
+
refresh()
|
|
67
|
+
end)
|
|
68
|
+
frame:SetScript("OnHide",hide)
|
|
69
|
+
frame:SetScript("OnShow",refresh)
|
|
29
70
|
frame:SetScript("OnUpdate",function(_,elapsed)
|
|
30
71
|
last=last+elapsed
|
|
31
|
-
if last<
|
|
72
|
+
if last<1 then return end
|
|
32
73
|
last=0
|
|
33
|
-
|
|
34
|
-
if not ok then record=nil end
|
|
74
|
+
refresh()
|
|
35
75
|
end)
|
|
36
|
-
|
|
37
|
-
|
|
76
|
+
refreshing=true;frame:Show();refreshing=false
|
|
77
|
+
refresh()
|
|
38
78
|
return true
|
|
39
79
|
end,
|
|
80
|
+
-- Transaction completion refreshes facts without moving the periodic tick.
|
|
81
|
+
Refresh=refresh,
|
|
40
82
|
Stop=function()
|
|
41
|
-
if frame then
|
|
42
|
-
|
|
83
|
+
if frame then
|
|
84
|
+
frame:SetScript("OnUpdate",nil);frame:SetScript("OnEvent",nil)
|
|
85
|
+
frame:SetScript("OnShow",nil);frame:SetScript("OnHide",nil);frame:UnregisterAllEvents()
|
|
86
|
+
end
|
|
87
|
+
provider,record,lastTick=nil,nil,nil
|
|
88
|
+
hide()
|
|
89
|
+
if frame then frame:Hide() end
|
|
90
|
+
if ns.StartupBeacon then ns.StartupBeacon.Stop() end
|
|
43
91
|
end,
|
|
44
92
|
Snapshot=function()return record end,
|
|
45
93
|
}
|
|
@@ -3,7 +3,8 @@ local _, ns = ...
|
|
|
3
3
|
-- Pure bounded protocol engine. Host input, frames, file loading and async
|
|
4
4
|
-- execution are adapters; there is only one owner and one active business job.
|
|
5
5
|
local ZERO=string.rep("0",32)
|
|
6
|
-
local LIMIT=
|
|
6
|
+
local LIMIT=200
|
|
7
|
+
local MAX_OPERATIONS=math.floor((LIMIT-16)/4)
|
|
7
8
|
local function plain(v)return not (issecretvalue and issecretvalue(v)) and type(v)=="table" and getmetatable(v)==nil end
|
|
8
9
|
local function safe(v)return not (issecretvalue and issecretvalue(v))end
|
|
9
10
|
|
|
@@ -11,7 +12,7 @@ ns.SlotProtocol = { Count=LIMIT, Create=function(adapter)
|
|
|
11
12
|
assert(plain(adapter) and ns.MemoryProtocol.Token(adapter.runtime),"invalid slot adapter")
|
|
12
13
|
local wire=ns.MemoryProtocol
|
|
13
14
|
local owner,fence,active,pending
|
|
14
|
-
local sequence,count=0,0
|
|
15
|
+
local sequence,count,cursor=0,0,1
|
|
15
16
|
local consumed,operations,receipts={},{},{}
|
|
16
17
|
local descriptor
|
|
17
18
|
local api={}
|
|
@@ -22,8 +23,8 @@ ns.SlotProtocol = { Count=LIMIT, Create=function(adapter)
|
|
|
22
23
|
end
|
|
23
24
|
end
|
|
24
25
|
local function nextSlot()
|
|
25
|
-
|
|
26
|
-
return
|
|
26
|
+
while cursor<=LIMIT and consumed[cursor] do cursor=cursor+1 end
|
|
27
|
+
return cursor
|
|
27
28
|
end
|
|
28
29
|
local function actor()
|
|
29
30
|
local value=adapter.actor()
|
|
@@ -40,7 +41,7 @@ ns.SlotProtocol = { Count=LIMIT, Create=function(adapter)
|
|
|
40
41
|
if sequence>=4294967295 then return nil,"slot_sequence_exhausted" end
|
|
41
42
|
local a=actor();if not a then return nil,"slot_actor_unavailable" end
|
|
42
43
|
sequence=sequence+1
|
|
43
|
-
local value={schema="lycheedev.slot.
|
|
44
|
+
local value={schema="lycheedev.slot.v2",runtime=adapter.runtime,owner=owner or "",fence=fence or 0,
|
|
44
45
|
nonce=e.nonce,ticket=e.ticket or ZERO,action=e.action,state=state,sequence=sequence,
|
|
45
46
|
nextSlot=nextSlot(),slots=LIMIT,character=a.character,realm=a.realm,guid=a.guid,
|
|
46
47
|
build=adapter.build,product=adapter.product,release=adapter.release,inventory=adapter.inventory,inputState=adapter.inputState}
|
|
@@ -83,13 +84,19 @@ ns.SlotProtocol = { Count=LIMIT, Create=function(adapter)
|
|
|
83
84
|
if type(index)~="number" or index%1~=0 or index<1 or index>LIMIT then return nil,"slot_index_invalid" end
|
|
84
85
|
if consumed[index] then return nil,"slot_already_consumed" end
|
|
85
86
|
consumed[index]=true -- Load-on-demand is consumed even by invalid data.
|
|
87
|
+
if e==nil then return nil,"slot_skipped_empty",true end
|
|
86
88
|
if not plain(e) then return nil,"slot_envelope_invalid" end
|
|
87
89
|
-- Never inspect or execute encoded business code before these checks.
|
|
88
90
|
for _,key in ipairs({"schema","index","runtime","owner","fence","nonce","ticket","action","guid","build","challenge","preparedNonce","reportBytes","reportChecksum"}) do if not safe(e[key]) then return nil,"slot_secret_envelope" end end
|
|
89
|
-
if e.schema~="lycheedev.slot.
|
|
90
|
-
or not wire.Token(e.ticket) or not wire.Token(e.owner) then return nil,"slot_envelope_invalid" end
|
|
91
|
+
if e.schema~="lycheedev.slot.v2" or e.index~=index or not wire.Token(e.nonce)
|
|
92
|
+
or not wire.Token(e.ticket) or not wire.Token(e.owner) or not wire.Token(e.runtime) then return nil,"slot_envelope_invalid" end
|
|
93
|
+
if e.runtime~=adapter.runtime then
|
|
94
|
+
if type(e.guid)~="string" or type(e.build)~="string"
|
|
95
|
+
or type(e.fence)~="number" or e.fence<1 or e.fence%1~=0 or e.fence>9007199254740991
|
|
96
|
+
or (e.action~="bind" and e.action~="prepare" and e.action~="commit" and e.action~="confirm" and e.action~="release" and e.action~="unbind") then return nil,"slot_envelope_invalid" end
|
|
97
|
+
return nil,"slot_skipped_foreign",true
|
|
98
|
+
end
|
|
91
99
|
if receipts[e.nonce] then return receipts[e.nonce],"slot_nonce_reused" end
|
|
92
|
-
if e.runtime~=adapter.runtime then return reject(e,"slot_runtime_changed") end
|
|
93
100
|
local a=actor();if not a or a.guid~=e.guid or e.build~=adapter.build then return reject(e,"slot_target_changed") end
|
|
94
101
|
if type(e.fence)~="number" or e.fence<1 or e.fence%1~=0 or e.fence>9007199254740991 then return reject(e,"slot_fence_invalid") end
|
|
95
102
|
if e.action=="bind" then
|
|
@@ -103,7 +110,7 @@ ns.SlotProtocol = { Count=LIMIT, Create=function(adapter)
|
|
|
103
110
|
if e.action=="prepare" then
|
|
104
111
|
if active or pending then return reject(e,"slot_busy") end
|
|
105
112
|
if operations[e.ticket] then return reject(e,"slot_operation_exists") end
|
|
106
|
-
if nextSlot()>LIMIT-3 or count>=
|
|
113
|
+
if nextSlot()>LIMIT-3 or count>=MAX_OPERATIONS then return reject(e,"slot_capacity") end
|
|
107
114
|
if not safe(e.code) or type(e.code)~="string" or #e.code<1 or #e.code>262144 or e.code:byte(1)==27
|
|
108
115
|
or not safe(e.codeBytes) or e.codeBytes~=#e.code or not safe(e.codeChecksum) or e.codeChecksum~=wire.Checksum(e.code)
|
|
109
116
|
or not safe(e.budget) or type(e.budget)~="number" or e.budget%1~=0 or e.budget<1 or e.budget>120 then return reject(e,"slot_code_invalid") end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
local _, ns = ...
|
|
2
2
|
|
|
3
|
-
local engine,receiving,inputLease,expectedSlot
|
|
3
|
+
local engine,receiving,inputLease,expectedSlot,skipLoaded
|
|
4
|
+
local LIMIT=ns.SlotProtocol.Count
|
|
4
5
|
local zero=string.rep("0",32)
|
|
5
6
|
local function releaseInput()
|
|
6
7
|
receiving=false
|
|
@@ -38,14 +39,15 @@ local function start()
|
|
|
38
39
|
state.memoryEpoch=epoch+1
|
|
39
40
|
local runtime=string.format("%08x%08x%04x%04x%04x%04x",epoch+1,math.floor(clock),math.random(0,65535),math.random(0,65535),math.random(0,65535),math.random(0,65535))
|
|
40
41
|
local available=0
|
|
41
|
-
for i=1,
|
|
42
|
+
for i=1,LIMIT do
|
|
42
43
|
local name=string.format("Lychee Dev Slot %02d",i)
|
|
43
44
|
if ns.Compat.GetAddOnMetadata(name,"X-Lychee-Slot")==tostring(i)
|
|
44
|
-
and ns.Compat.GetAddOnMetadata(name,"Version")==ns.Release
|
|
45
|
+
and ns.Compat.GetAddOnMetadata(name,"Version")==ns.Release
|
|
46
|
+
and ns.Compat.GetAddOnMetadata(name,"X-Lychee-Transport")=="memory-slot-v2" then available=available+1 end
|
|
45
47
|
end
|
|
46
48
|
ns.AutomationHistory.Begin(runtime,{character=actor.character,realm=actor.realm,guid=actor.guid,build=build.build,product=build.product})
|
|
47
49
|
engine=ns.SlotProtocol.Create({runtime=runtime,build=build.build,product=build.product,release=ns.Release,inventory=available,
|
|
48
|
-
inputState=ns.InputState and "lycheedev.input.v1" or nil,
|
|
50
|
+
inputState=ns.InputState and "lycheedev.input.hybrid.v1" or nil,
|
|
49
51
|
actor=function()
|
|
50
52
|
local current=ns.Platform.ObserveActor()
|
|
51
53
|
if current and current.guid==actor.guid then return current end
|
|
@@ -58,10 +60,11 @@ local function start()
|
|
|
58
60
|
return true
|
|
59
61
|
end
|
|
60
62
|
local function inventory()
|
|
61
|
-
for i=1,
|
|
63
|
+
for i=1,LIMIT do
|
|
62
64
|
local name=string.format("Lychee Dev Slot %02d",i)
|
|
63
65
|
if ns.Compat.GetAddOnMetadata(name,"X-Lychee-Slot")~=tostring(i)
|
|
64
|
-
or ns.Compat.GetAddOnMetadata(name,"Version")~=ns.Release
|
|
66
|
+
or ns.Compat.GetAddOnMetadata(name,"Version")~=ns.Release
|
|
67
|
+
or ns.Compat.GetAddOnMetadata(name,"X-Lychee-Transport")~="memory-slot-v2" then return nil,"slot_inventory_incomplete:"..i end
|
|
65
68
|
end
|
|
66
69
|
return true
|
|
67
70
|
end
|
|
@@ -74,11 +77,19 @@ local function wake()
|
|
|
74
77
|
state.options.bridgeEnabled=true -- Explicit wake opts in; explicit off stays off.
|
|
75
78
|
if ns.StartupBeacon then ns.StartupBeacon.Stop() end
|
|
76
79
|
ok,reason=protectInput();if not ok then releaseInput();return nil,reason end
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
-- One wake may traverse foreign/empty physical slots, but can process at
|
|
81
|
+
-- most one own-runtime envelope. A rejected own envelope is still a stop.
|
|
82
|
+
for attempt=1,LIMIT do
|
|
83
|
+
local index=engine.NextSlot()
|
|
84
|
+
if index>LIMIT then releaseInput();engine.Describe();return nil,"slot_exhausted" end
|
|
85
|
+
expectedSlot,skipLoaded=index,nil
|
|
86
|
+
local loaded,failure=ns.Compat.LoadInputSlot(string.format("Lychee Dev Slot %02d",index))
|
|
87
|
+
expectedSlot=nil
|
|
88
|
+
if not loaded then releaseInput();engine.Describe();return nil,failure end
|
|
89
|
+
if skipLoaded==nil then releaseInput();engine.Describe();return nil,"slot_loader_no_dispatch" end
|
|
90
|
+
if not skipLoaded then break end
|
|
91
|
+
end
|
|
92
|
+
if skipLoaded and engine.NextSlot()>LIMIT then releaseInput();engine.Describe();return nil,"slot_exhausted" end
|
|
82
93
|
-- Control transactions have no long-lived keyboard ownership. A fresh
|
|
83
94
|
-- wake protects each input burst; business entry already released it.
|
|
84
95
|
releaseInput()
|
|
@@ -87,20 +98,28 @@ local function wake()
|
|
|
87
98
|
end
|
|
88
99
|
local function guardedWake()
|
|
89
100
|
local ok,result,reason=pcall(wake)
|
|
90
|
-
expectedSlot=nil
|
|
101
|
+
expectedSlot,skipLoaded=nil,nil
|
|
91
102
|
releaseInput()
|
|
103
|
+
if ns.InputState then ns.InputState.Refresh() end
|
|
92
104
|
if not ok then return nil,"slot_wake_failed" end
|
|
93
105
|
return result,reason
|
|
94
106
|
end
|
|
107
|
+
local function close()
|
|
108
|
+
releaseInput()
|
|
109
|
+
ns.InputProtection.Cancel()
|
|
110
|
+
if ns.InputState then ns.InputState.Refresh() end
|
|
111
|
+
end
|
|
95
112
|
ns.SlotRuntime={
|
|
96
|
-
Start=start,Wake=guardedWake,Close=
|
|
113
|
+
Start=start,Wake=guardedWake,Close=close,
|
|
97
114
|
IsActive=function()return ns.InputProtection.IsActive()end,
|
|
98
115
|
Receive=function(index,envelope)
|
|
99
116
|
if not engine or index~=expectedSlot then return nil,"slot_not_requested" end
|
|
100
|
-
|
|
117
|
+
local record,value,skip=engine.Receive(index,envelope)
|
|
118
|
+
skipLoaded=skip==true
|
|
119
|
+
return record,value
|
|
101
120
|
end,
|
|
102
121
|
Snapshot=function()return engine and engine.Snapshot()end,
|
|
103
122
|
Register=function()
|
|
104
|
-
return ns.ReceiverBindings.Register({wake=guardedWake,submit=guardedWake,close=
|
|
123
|
+
return ns.ReceiverBindings.Register({wake=guardedWake,submit=guardedWake,close=close})
|
|
105
124
|
end,
|
|
106
125
|
}
|
|
@@ -5,8 +5,17 @@ local ADDON_NAME, ns = ...
|
|
|
5
5
|
-- before it is compared, formatted, indexed or branched on; failures open to a
|
|
6
6
|
-- harmless visible state instead of throwing.
|
|
7
7
|
ns.Compat = {
|
|
8
|
+
-- Pinned PlayerScriptDocumentation declares this on Retail/Classic/Titan.
|
|
9
|
+
InWorld = function()
|
|
10
|
+
if type(IsPlayerInWorld)~="function" then return nil end
|
|
11
|
+
local ok,value=pcall(IsPlayerInWorld)
|
|
12
|
+
if not ok or (issecretvalue and issecretvalue(value)) or type(value)~="boolean" then return nil end
|
|
13
|
+
return value
|
|
14
|
+
end,
|
|
8
15
|
LoadInputSlot = function(name)
|
|
9
|
-
if type(name)~="string"
|
|
16
|
+
if type(name)~="string" then return nil,"slot_name_invalid" end
|
|
17
|
+
local index=tonumber(name:match("^Lychee Dev Slot (%d+)$"))
|
|
18
|
+
if not index or index<1 or index>200 or name~=string.format("Lychee Dev Slot %02d",index) then return nil,"slot_name_invalid" end
|
|
10
19
|
if type(C_AddOns)~="table" or type(C_AddOns.LoadAddOn)~="function" then return nil,"slot_loader_unavailable" end
|
|
11
20
|
local ok,loaded,reason=pcall(C_AddOns.LoadAddOn,name)
|
|
12
21
|
if not ok or (issecretvalue and (issecretvalue(loaded) or issecretvalue(reason))) then return nil,"slot_load_failed" end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
local ADDON_NAME, ns = ...
|
|
2
2
|
|
|
3
|
-
ns.Release = "3.0.
|
|
3
|
+
ns.Release = "3.0.2"
|
|
4
4
|
ns.Startup = { ready = false, reason = "addon_not_loaded" }
|
|
5
5
|
-- Observability handle: mirrors the addon namespace for host-side /run
|
|
6
6
|
-- introspection (startup state, identity, commandFailure) on every client.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Interface: 120100, 50504, 38002, 16001
|
|
2
2
|
## Title: Lychee Dev
|
|
3
|
-
## Version: 3.0.
|
|
3
|
+
## Version: 3.0.2
|
|
4
4
|
## SavedVariables: LycheeToolkitDB
|
|
5
5
|
## SavedVariablesPerCharacter: LycheeToolkitBridgeDB
|
|
6
6
|
|
|
@@ -43,6 +43,7 @@ Bridge\ReceiverBindings.lua
|
|
|
43
43
|
Bridge\StartupBeacon.lua
|
|
44
44
|
Bridge\Receiver.lua
|
|
45
45
|
Bridge\SlotRuntime.lua
|
|
46
|
+
Bridge\InputSignal.lua
|
|
46
47
|
Bridge\InputState.lua
|
|
47
48
|
# --- Event catalogs: all four load; Catalog.lua selects ns.Client's table ---
|
|
48
49
|
Modules\Events\CatalogData_Mainline.lua
|