lycheedev 3.2.1 → 3.2.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lycheedev",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "private": false,
5
5
  "description": "Unified native World of Warcraft development toolkit",
6
6
  "license": "MIT",
@@ -34,6 +34,9 @@ local function sample()
34
34
  identity.inputBlocked=ready~=true
35
35
  identity.reason=reason or ""
36
36
  identity.escapeLimit=0
37
+ if ns.SlotRuntime and ns.SlotRuntime.SlotReloadRequired then
38
+ identity.slotReloadRequired=ns.SlotRuntime.SlotReloadRequired() or nil
39
+ end
37
40
  -- Always obtain a detached private snapshot; public mailbox values never
38
41
  -- drive the attempt sequence or any input/receipt authorization.
39
42
  if ns.SlotRuntime and ns.SlotRuntime.InputDiagnostic then identity.inputAttempt=ns.SlotRuntime.InputDiagnostic() end
@@ -1,6 +1,7 @@
1
1
  local _, ns = ...
2
2
 
3
3
  local engine,receiving,inputLease,expectedSlot,skipLoaded,mailbox,runtimeToken
4
+ local slotReloadRequired,slotEnableSavePending=false,false
4
5
  local LIMIT=ns.SlotProtocol.Count
5
6
  local zero=string.rep("0",32)
6
7
  -- Latest private callback outcome only. This is diagnostic data, never a
@@ -72,13 +73,22 @@ local function start()
72
73
  state.memoryEpoch=epoch+1
73
74
  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))
74
75
  runtimeToken=runtime
75
- local available=0
76
+ local available,enableFailure=0,nil
76
77
  for i=1,LIMIT do
77
78
  local name=string.format("Lychee Dev Slot %02d",i)
78
79
  if ns.Compat.GetAddOnMetadata(name,"X-Lychee-Slot")==tostring(i)
79
80
  and ns.Compat.GetAddOnMetadata(name,"Version")==ns.Release
80
- and ns.Compat.GetAddOnMetadata(name,"X-Lychee-Transport")=="Lycheedev mailbox protocol v1" then available=available+1 end
81
+ and ns.Compat.GetAddOnMetadata(name,"X-Lychee-Transport")=="Lycheedev mailbox protocol v1" then
82
+ available=available+1
83
+ local changed,failure=ns.Compat.EnsureInputSlotEnabled(name,actor.guid)
84
+ if changed then slotEnableSavePending=true elseif changed==nil then enableFailure=enableFailure or failure end
85
+ end
86
+ end
87
+ if slotEnableSavePending then
88
+ local saved,failure=ns.Compat.SaveInputSlots()
89
+ if saved then slotReloadRequired,slotEnableSavePending=true,false else enableFailure=failure end
81
90
  end
91
+ if enableFailure then return nil,enableFailure end
82
92
  ns.AutomationHistory.Begin(runtime,{character=actor.character,realm=actor.realm,guid=actor.guid,build=build.build,product=build.product})
83
93
  engine=ns.SlotProtocol.Create({runtime=runtime,build=build.build,product=build.product,release=ns.Release,inventory=available,
84
94
  inputState=ns.InputState and "Lycheedev mailbox protocol v1" or nil,
@@ -163,6 +173,7 @@ ns.SlotRuntime={
163
173
  Start=start,Wake=guardedWake,Close=close,
164
174
  IsActive=function()return ns.InputProtection.IsActive()end,
165
175
  InputDiagnostic=attemptSnapshot,
176
+ SlotReloadRequired=function()return slotReloadRequired end,
166
177
  Receive=function(index,envelope)
167
178
  if not engine or index~=expectedSlot then return nil,"slot_not_requested" end
168
179
  attemptReceived=true
@@ -45,6 +45,30 @@ ns.Compat = {
45
45
  if loaded~=true and reason=="DISABLED" then return nil,"slot_addon_disabled" end
46
46
  return loaded==true and true or nil,type(reason)=="string" and reason or "slot_load_failed"
47
47
  end,
48
+ -- Caller has verified this managed slot's metadata and current actor.
49
+ -- These APIs change enable settings only; no slot is loaded or consumed.
50
+ EnsureInputSlotEnabled = function(name,character)
51
+ if type(C_AddOns)~="table" or type(C_AddOns.GetAddOnEnableState)~="function" then return nil,"slot_enable_state_unavailable" end
52
+ local function state()
53
+ local ok,value=pcall(C_AddOns.GetAddOnEnableState,name,character)
54
+ if not ok or (issecretvalue and issecretvalue(value)) or type(value)~="number"
55
+ or (value~=0 and value~=1 and value~=2) then return nil end
56
+ return value
57
+ end
58
+ local before=state()
59
+ if before==nil then return nil,"slot_enable_state_failed" end
60
+ if before~=0 then return false end
61
+ if type(C_AddOns.EnableAddOn)~="function" or type(C_AddOns.SaveAddOns)~="function" then return nil,"slot_enable_unavailable" end
62
+ if not pcall(C_AddOns.EnableAddOn,name,character) then return nil,"slot_enable_failed" end
63
+ local after=state()
64
+ if after==nil or after==0 then return nil,"slot_enable_failed" end
65
+ return true
66
+ end,
67
+ SaveInputSlots = function()
68
+ if type(C_AddOns)~="table" or type(C_AddOns.SaveAddOns)~="function" then return nil,"slot_enable_save_unavailable" end
69
+ if not pcall(C_AddOns.SaveAddOns) then return nil,"slot_enable_save_failed" end
70
+ return true
71
+ end,
48
72
  ReceiverChord = function(key)
49
73
  if (issecretvalue and issecretvalue(key)) or type(key)~="string" then return nil end
50
74
  local number=string.match(key,"^F([1-9]%d?)$")
@@ -1,6 +1,6 @@
1
1
  local ADDON_NAME, ns = ...
2
2
 
3
- ns.Release = "3.2.1"
3
+ ns.Release = "3.2.2"
4
4
  ns.Startup = { ready = false, reason = "addon_not_loaded" }
5
5
  _G.LycheeDevInternal = ns
6
6
 
@@ -1,6 +1,6 @@
1
1
  ## Interface: 120105, 120100, 50504, 38002, 16001, 11509, 20506
2
2
  ## Title: Lychee Dev
3
- ## Version: 3.2.1
3
+ ## Version: 3.2.2
4
4
  ## SavedVariables: LycheeToolkitDB
5
5
  ## SavedVariablesPerCharacter: LycheeToolkitBridgeDB
6
6
 
@@ -49,6 +49,7 @@ need [installation](installation.md) diagnosis, not an overlay copy.
49
49
  | Result | Continue |
50
50
  | --- | --- |
51
51
  | Ready runtime, clean installation | Connect and keep the returned CON |
52
+ | INPUT slotReloadRequired=true | Startup enabled managed slots for this character; connect or resume lets the CLI reload within the original CON and deadline before binding |
52
53
  | Two formal bindings loaded under the previous protocol name | Let fix/resume send the verified reload key once, then bind the current protocol; do not ask for manual reload merely because the name changed |
53
54
  | Existing connection in this project | Resume its original request; pending input is not replaced |
54
55
  | Foreign project owns the PID | Continue from the owning project; do not delete its claim |
@@ -63,6 +64,15 @@ instance’s claim can block the shared-directory update; retain the original ID
63
64
  Each process sharing the installation must load and verify the new runtime
64
65
  independently. One PID’s successful reload never activates another PID.
65
66
 
67
+ At startup the main addon checks the current character's managed slots, enables
68
+ disabled ones and saves the settings without loading slots. A changed setting
69
+ sets `Mailbox.input.slotReloadRequired` until reload. This is separate from
70
+ physical input readiness: combat, restricted focus and keyboard activity still
71
+ delay the reload. Already enabled slots cause no settings write or reload.
72
+ The CLI retains any existing reload request and pending business evidence;
73
+ the flag never authorizes replay of submitted or unknown input. Read-only doctor
74
+ reports this state as `live.slot_activation`; it does not send the reload itself.
75
+
66
76
  ## First installation and reload
67
77
 
68
78
  A loaded runtime with fresh two-key INPUT can reload automatically during a
package/release.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schema": "lycheedev.release.v1",
3
- "version": "3.2.1",
4
- "commit": "10b561db5706702cd42e047eaeed4ccb5e825351",
3
+ "version": "3.2.2",
4
+ "commit": "0bec60e4406f5d5dc155ee25cef44f9a710e37e8",
5
5
  "binaries": {
6
6
  "windows-amd64": {
7
7
  "path": "native/windows-amd64/lycheedev.exe",
8
- "bytes": 24501760,
9
- "sha256": "aaf88025e78004110a40e1e654fad66361b4af1b2194eff89e59090b29f03b6e"
8
+ "bytes": 24507904,
9
+ "sha256": "b9e3e472762114fc3af73023c3b9fe3e86660dfb1209c13e8d31a32a481d6ccc"
10
10
  }
11
11
  },
12
12
  "resources": [
@@ -37,8 +37,8 @@
37
37
  },
38
38
  {
39
39
  "path": "addon/Bridge/InputState.lua",
40
- "bytes": 5067,
41
- "sha256": "e2ce20c45d8f941cfa01de6499ec1ca2d88efdbd85e02922e5afaed70a972a10"
40
+ "bytes": 5219,
41
+ "sha256": "b6466861ba7caf3b9958932fc3e92318a504c4d790bd1e519b4b55c2198e43b1"
42
42
  },
43
43
  {
44
44
  "path": "addon/Bridge/MemoryProtocol.lua",
@@ -62,8 +62,8 @@
62
62
  },
63
63
  {
64
64
  "path": "addon/Bridge/SlotRuntime.lua",
65
- "bytes": 9427,
66
- "sha256": "636ed871d85829dcae6aafc8d349d6ea4ec7511a276ffefb2454e5769309fc25"
65
+ "bytes": 10052,
66
+ "sha256": "c542f8394e9929edbedfcbdd2de5f39c2fa14b89d27b2e16258127092a0ea75c"
67
67
  },
68
68
  {
69
69
  "path": "addon/Core/ClientGate.lua",
@@ -72,8 +72,8 @@
72
72
  },
73
73
  {
74
74
  "path": "addon/Core/Compat.lua",
75
- "bytes": 4892,
76
- "sha256": "70a007746df96f2789aab59e04f1a69f3101c829da991e33320cf8940e7fb9b2"
75
+ "bytes": 6335,
76
+ "sha256": "24ff493bf98b304b21873c7630308c6a3fe46e34dfe8dc1f8de80c4a2fcfb069"
77
77
  },
78
78
  {
79
79
  "path": "addon/Core/Controls.lua",
@@ -113,7 +113,7 @@
113
113
  {
114
114
  "path": "addon/Core/Runtime.lua",
115
115
  "bytes": 2615,
116
- "sha256": "86b0fdf6c2cf92517ae75b0552697335da90e94d2cf71593e81c8b5556bfb142"
116
+ "sha256": "5dcbf55e3018a1b29ee4e92368f34283dadf277b3346289cd14fd1287bcbbc28"
117
117
  },
118
118
  {
119
119
  "path": "addon/Core/Safety.lua",
@@ -143,7 +143,7 @@
143
143
  {
144
144
  "path": "addon/Lychee Dev.toc",
145
145
  "bytes": 2005,
146
- "sha256": "b84eded88afdf96645b283f4c4c6782438d59e9fe61d8a0ffa7f162ca46d8b98"
146
+ "sha256": "73573ae8336ceac7505032aa2403804313a8d06ff69c68b1d8044fc81f303833"
147
147
  },
148
148
  {
149
149
  "path": "addon/Media/GitHub.png",
@@ -377,8 +377,8 @@
377
377
  },
378
378
  {
379
379
  "path": "skill/references/live-startup.md",
380
- "bytes": 5972,
381
- "sha256": "bf8efb4575b6f44d9dafd4569c52cc4ae8a27c71304af64dd7da758d1620699d"
380
+ "bytes": 6775,
381
+ "sha256": "e710a3d60b8432dd5d83cbf0c5cbc10175266ce542cfd7570ddf5cc508a3a86c"
382
382
  },
383
383
  {
384
384
  "path": "skill/references/runtime-investigations.md",
@@ -6448,9 +6448,9 @@
6448
6448
  ],
6449
6449
  "correspondingSource": {
6450
6450
  "repository": "https://github.com/Follen/Lychee-Dev",
6451
- "commit": "10b561db5706702cd42e047eaeed4ccb5e825351",
6452
- "tag": "v3.2.1",
6453
- "archive": "lycheedev-3.2.1-corresponding-source.tar.gz",
6454
- "sha256": "476f2ff25af1af38eee4b3904c615db1ed2e931e799f80edace4e0ea305f0740"
6451
+ "commit": "0bec60e4406f5d5dc155ee25cef44f9a710e37e8",
6452
+ "tag": "v3.2.2",
6453
+ "archive": "lycheedev-3.2.2-corresponding-source.tar.gz",
6454
+ "sha256": "355e2f00c811b235cf936863c85224377e7a3039f77e509c476526d2edb36bc0"
6455
6455
  }
6456
6456
  }