lycheedev 3.1.2 → 3.2.1

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 (77) hide show
  1. package/README.md +16 -38
  2. package/THIRD_PARTY_NOTICES +4 -314
  3. package/bin/lycheedev.mjs +1 -1
  4. package/bin/update.mjs +26 -32
  5. package/native/windows-amd64/lycheedev.exe +0 -0
  6. package/package.json +1 -1
  7. package/payload/addon/Bindings.xml +12 -0
  8. package/payload/addon/Bridge/ActivityView.lua +2 -5
  9. package/payload/addon/Bridge/CaptureWriter.lua +9 -115
  10. package/payload/addon/Bridge/FocusBindings.lua +71 -0
  11. package/payload/addon/Bridge/InputProtection.lua +2 -9
  12. package/payload/addon/Bridge/InputState.lua +15 -19
  13. package/payload/addon/Bridge/MemoryProtocol.lua +1 -1
  14. package/payload/addon/Bridge/ProbeExecution.lua +1 -0
  15. package/payload/addon/Bridge/ReceiverBindings.lua +73 -279
  16. package/payload/addon/Bridge/SlotProtocol.lua +30 -12
  17. package/payload/addon/Bridge/SlotRuntime.lua +9 -12
  18. package/payload/addon/Core/ClientGate.lua +3 -0
  19. package/payload/addon/Core/Compat.lua +25 -24
  20. package/payload/addon/Core/Controls.lua +27 -248
  21. package/payload/addon/Core/Execute.lua +22 -19
  22. package/payload/addon/Core/Locale.lua +4 -116
  23. package/payload/addon/Core/Locale_enUS.lua +4 -116
  24. package/payload/addon/Core/Persistence.lua +2 -2
  25. package/payload/addon/Core/Runtime.lua +46 -64
  26. package/payload/addon/Core/Serializer.lua +9 -1
  27. package/payload/addon/Core/Startup.lua +20 -0
  28. package/payload/addon/Core/Stores.lua +63 -95
  29. package/payload/addon/LICENSE +21 -0
  30. package/payload/addon/Lychee Dev.toc +10 -21
  31. package/payload/addon/Modules/AutomationView.lua +47 -383
  32. package/payload/addon/Modules/Diagnostics.lua +0 -4
  33. package/payload/addon/Modules/Events/Catalog.lua +1 -1
  34. package/payload/addon/Modules/Events/CatalogData_Anniversary.lua +1489 -0
  35. package/payload/addon/Modules/Events/CatalogData_Era.lua +1489 -0
  36. package/payload/addon/Modules/FunctionTrace.lua +17 -6
  37. package/payload/addon/Modules/ObjectInspector.lua +27 -25
  38. package/payload/addon/THIRD_PARTY_NOTICES +483 -0
  39. package/payload/addon/UI/Pages/Automation.lua +7 -64
  40. package/payload/addon/UI/Pages/Events.lua +0 -4
  41. package/payload/addon/UI/Pages/ExportRecords.lua +1 -1
  42. package/payload/addon/UI/Pages/Object.lua +5 -4
  43. package/payload/addon/UI/Pages/Run.lua +7 -1
  44. package/payload/addon/UI/TreeView.lua +0 -11
  45. package/payload/addon/UI/Widgets.lua +0 -102
  46. package/payload/addon/UI/Window.lua +0 -6
  47. package/payload/skill/SKILL.md +11 -2
  48. package/payload/skill/references/commands.md +17 -27
  49. package/payload/skill/references/data-hotfix.md +6 -3
  50. package/payload/skill/references/data-investigation.md +5 -2
  51. package/payload/skill/references/data-tables.md +4 -0
  52. package/payload/skill/references/data-targets.md +4 -2
  53. package/payload/skill/references/installation.md +9 -3
  54. package/payload/skill/references/live-investigation.md +14 -6
  55. package/payload/skill/references/live-probes.md +9 -8
  56. package/payload/skill/references/live-recovery.md +73 -43
  57. package/payload/skill/references/live-startup.md +97 -76
  58. package/payload/skill/references/runtime-investigations.md +10 -8
  59. package/payload/skill/references/source-preparation.md +23 -2
  60. package/payload/skill/references/source-research.md +58 -5
  61. package/payload/skill/scripts/lycheedev.mjs +16 -12
  62. package/release.json +136 -176
  63. package/payload/addon/Bridge/Definitions.lua +0 -3
  64. package/payload/addon/Bridge/FaultRunner.lua +0 -44
  65. package/payload/addon/Bridge/Identity.lua +0 -127
  66. package/payload/addon/Bridge/InputProtocol.lua +0 -76
  67. package/payload/addon/Bridge/InputSignal.lua +0 -36
  68. package/payload/addon/Bridge/Investigation.lua +0 -159
  69. package/payload/addon/Bridge/MatrixSymbol.lua +0 -1169
  70. package/payload/addon/Bridge/ProbeQueue.lua +0 -205
  71. package/payload/addon/Bridge/ProbeRunner.lua +0 -349
  72. package/payload/addon/Bridge/ReceiptView.lua +0 -316
  73. package/payload/addon/Bridge/Receiver.lua +0 -326
  74. package/payload/addon/Bridge/Reentry.lua +0 -261
  75. package/payload/addon/Bridge/ReportStore.lua +0 -224
  76. package/payload/addon/Bridge/Session.lua +0 -173
  77. package/payload/addon/Bridge/StartupBeacon.lua +0 -63
package/README.md CHANGED
@@ -1,55 +1,33 @@
1
1
  # Lychee Dev Toolkit
2
2
 
3
- **WoW source research, game data, asset export and live investigation in one native toolkit.**
3
+ 魔兽世界插件开发工具:查源码、读取 DB2/SQL 和 Hotfix、导出资源,以及通过配套 addon 执行实机 Lua 探针。
4
4
 
5
- [![npm](https://img.shields.io/npm/v/lycheedev)](https://www.npmjs.com/package/lycheedev)
6
- [![CI](https://github.com/Follen/Lychee-Dev/actions/workflows/toolkit-ci.yml/badge.svg?branch=main)](https://github.com/Follen/Lychee-Dev/actions/workflows/toolkit-ci.yml)
7
- [![Windows amd64](https://img.shields.io/badge/platform-Windows_amd64-0078d4)](https://github.com/Follen/Lychee-Dev)
8
- [![Zero runtime dependencies](https://img.shields.io/badge/runtime_dependencies-0-52a788)](https://www.npmjs.com/package/lycheedev)
9
- [![MIT](https://img.shields.io/badge/license-MIT-52a788)](https://github.com/Follen/Lychee-Dev/blob/main/LICENSE)
5
+ [项目文档](https://github.com/Follen/Lychee-Dev#readme) · [设计](https://github.com/Follen/Lychee-Dev/blob/main/Design.md) · [更新记录](https://github.com/Follen/Lychee-Dev/blob/main/Changelog.md)
10
6
 
11
- [English documentation](https://github.com/Follen/Lychee-Dev#readme) · [简体中文](https://github.com/Follen/Lychee-Dev/blob/main/README_zhCN.md)
7
+ ## 安装
12
8
 
13
- ## For developers
14
-
15
- | Workflow | Capabilities |
16
- | --- | --- |
17
- | Source | Pin Blizzard UI source; search APIs, symbols and paths; compare revisions and validate addon closures. |
18
- | Data | Query DB2 and SQL; inspect spells, items, creatures, encounters, decor and independent Hotfix records. |
19
- | Assets | Search listfiles; inspect CASC files; export raw files and BLP2 images as PNG or lossless WebP. |
20
- | Live | Use the in-game `/dev` workbench or bounded Lua probes with archived reports and explicit cleanup. |
21
- | Evidence | Reuse fixed project references, verify captures and manage bounded caches. |
22
-
23
- Windows x64 and Node.js **≥22.14.0** are required. The CLI is native Go; the Node launcher forwards arguments and exit codes. There are no runtime npm dependencies or required install scripts.
9
+ 需要 Windows amd64 和 Node.js 22.14.0 或以上。
24
10
 
25
11
  ```powershell
26
- npm install --global lycheedev --ignore-scripts
12
+ npm install --global lycheedev@latest --ignore-scripts
27
13
  lycheedev version --format json
28
14
  lycheedev describe --format json
29
-
30
- $release = Join-Path (npm root -g) 'lycheedev'
31
- lycheedev addon install --release $release --installation 'D:\Game\World of Warcraft\_retail_'
32
- lycheedev skill install --release $release --path (Join-Path $env:USERPROFILE '.agents\skills\lycheedev')
33
15
  ```
34
16
 
35
- The last two commands explicitly deploy the included resources for first installation. npm installation alone does not deploy them. For upgrades, inspect component status and use a recovery directory on the same drive; see the [installation guide](https://github.com/Follen/Lychee-Dev#install).
36
-
37
- Source and data investigation do not require a running game. Live investigation requires a logged-in client with the addon loaded. Encrypted records may be unavailable; bounded Hotfix pages and static validation retain their completeness limits.
17
+ 启动器没有运行时 npm 依赖。包内包含原生 CLI、addon、Agent Skill、LuaLS 工具资源、发行清单和许可文件。
38
18
 
39
- ## For Agents
19
+ ## 部署组件
40
20
 
41
- The included `lycheedev` skill routes source, data, assets, validation and running-client questions. Automatic invocation is enabled; discover the installed command surface through `lycheedev describe --format json` and carry returned fixed references between calls.
21
+ 安装 npm 包后,按需要部署游戏插件和 Skill:
42
22
 
43
- **A visible QR is an intermediate state.** Within an authorized live investigation, read and retain the verified report, ACK the same operation, then hide the final receipt and verify it cleared. Recover interruptions by the existing operation ID. Respect an explicit pause or report-retention request.
44
-
45
- See the [Agent guide](https://github.com/Follen/Lychee-Dev#for-agents) and [skill](https://github.com/Follen/Lychee-Dev/blob/main/skills/lycheedev/SKILL.md).
23
+ ```powershell
24
+ $release = Join-Path (npm root -g) 'lycheedev'
25
+ lycheedev addon install --release $release --installation 'D:/Game/World of Warcraft/_retail_'
26
+ lycheedev skill install --release $release --path (Join-Path $env:USERPROFILE '.agents/skills/lycheedev')
27
+ ```
46
28
 
47
- ## Package contents
29
+ Source、Data 和 Assets 无需启动游戏。Live 需要运行中的客户端和配套受管插件;恢复时保留原 project、CON、request 与预算。
48
30
 
49
- - `native/windows-amd64/lycheedev.exe` — native CLI.
50
- - `bin/lycheedev.mjs` — platform selection and process forwarding.
51
- - `payload/addon/`, `payload/skill/` — deployable addon and Agent skill.
52
- - `release.json` — component sizes and SHA-256 digests checked by the installer.
53
- - `LICENSE`, `THIRD_PARTY_NOTICES` — licensing and third-party attribution.
31
+ 本包版本为 3.2.1,通过 `latest` 渠道发布。以已安装版本的 `version`、`describe` 和 `--help` 确认能力。
54
32
 
55
- The launcher never downloads fallback binaries. The toolkit uses `~/.lycheedev` and does not import legacy workspaces or SavedVariables. Uninstalling npm does not remove deployed resources; component removal is explicit.
33
+ 项目代码采用 MIT,第三方组件声明见包内 LICENSE 与 THIRD_PARTY_NOTICES。
@@ -26,42 +26,6 @@ https://visualstudio.microsoft.com/license-terms/
26
26
  Other files in the pinned LuaLS archive retain their upstream notices and
27
27
  licenses. The release inventory records every file's SHA-256 and byte length.
28
28
 
29
- ===============================================================================
30
- luaqrcode (adapted) - payload/addon/Bridge/MatrixSymbol.lua
31
- https://github.com/speedata/luaqrcode
32
- License: BSD-3-Clause
33
- ===============================================================================
34
-
35
- -- Copyright (c) 2012-2020, Patrick Gundlach and contributors, see https://github.com/speedata/luaqrcode
36
- -- All rights reserved.
37
- --
38
- -- Redistribution and use in source and binary forms, with or without
39
- -- modification, are permitted provided that the following conditions are met:
40
- -- * Redistributions of source code must retain the above copyright
41
- -- notice, this list of conditions and the following disclaimer.
42
- -- * Redistributions in binary form must reproduce the above copyright
43
- -- notice, this list of conditions and the following disclaimer in the
44
- -- documentation and/or other materials provided with the distribution.
45
- -- * Neither the name of SPEEDATA nor the
46
- -- names of its contributors may be used to endorse or promote products
47
- -- derived from this software without specific prior written permission.
48
- --
49
- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
50
- -- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
51
- -- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
52
- -- DISCLAIMED. IN NO EVENT SHALL SPEEDATA GMBH BE LIABLE FOR ANY
53
- -- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
54
- -- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
55
- -- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
56
- -- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
57
- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
58
- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59
-
60
- The notice above is also retained verbatim at the top of the distributed Lua
61
- file it covers. Toolkit changes to that file (lazy codec initialization, a
62
- 16x16 nibble XOR table and a bounded private interface) do not remove the
63
- upstream copyright or license.
64
-
65
29
  ===============================================================================
66
30
  github.com/HugoSmits86/nativewebp v1.3.0 - compiled into native/ binaries
67
31
  https://github.com/HugoSmits86/nativewebp/tree/v1.3.0
@@ -90,243 +54,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
90
54
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
91
55
  SOFTWARE.
92
56
 
93
- ===============================================================================
94
- github.com/makiuchi-d/gozxing v0.1.1 - compiled into native/ binaries
95
- https://github.com/makiuchi-d/gozxing
96
- License: MIT, with the upstream ZXing core under Apache-2.0 (both texts below,
97
- as distributed in the gozxing LICENSE file)
98
- ===============================================================================
99
-
100
- MIT License
101
-
102
- Copyright (c) 2018 Daisuke MAKIUCHI (MakKi; makki_d)
103
-
104
- Permission is hereby granted, free of charge, to any person obtaining a copy
105
- of this software and associated documentation files (the "Software"), to deal
106
- in the Software without restriction, including without limitation the rights
107
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
108
- copies of the Software, and to permit persons to whom the Software is
109
- furnished to do so, subject to the following conditions:
110
-
111
- The above copyright notice and this permission notice shall be included in all
112
- copies or substantial portions of the Software.
113
-
114
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
115
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
116
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
117
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
118
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
119
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
120
- SOFTWARE.
121
-
122
-
123
- =======================================================================
124
- Original zxing License
125
- Copyright 2007-2018 ZXing authors
126
- =======================================================================
127
-
128
- Apache License
129
- Version 2.0, January 2004
130
- http://www.apache.org/licenses/
131
-
132
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
133
-
134
- 1. Definitions.
135
-
136
- "License" shall mean the terms and conditions for use, reproduction,
137
- and distribution as defined by Sections 1 through 9 of this document.
138
-
139
- "Licensor" shall mean the copyright owner or entity authorized by
140
- the copyright owner that is granting the License.
141
-
142
- "Legal Entity" shall mean the union of the acting entity and all
143
- other entities that control, are controlled by, or are under common
144
- control with that entity. For the purposes of this definition,
145
- "control" means (i) the power, direct or indirect, to cause the
146
- direction or management of such entity, whether by contract or
147
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
148
- outstanding shares, or (iii) beneficial ownership of such entity.
149
-
150
- "You" (or "Your") shall mean an individual or Legal Entity
151
- exercising permissions granted by this License.
152
-
153
- "Source" form shall mean the preferred form for making modifications,
154
- including but not limited to software source code, documentation
155
- source, and configuration files.
156
-
157
- "Object" form shall mean any form resulting from mechanical
158
- transformation or translation of a Source form, including but
159
- not limited to compiled object code, generated documentation,
160
- and conversions to other media types.
161
-
162
- "Work" shall mean the work of authorship, whether in Source or
163
- Object form, made available under the License, as indicated by a
164
- copyright notice that is included in or attached to the work
165
- (an example is provided in the Appendix below).
166
-
167
- "Derivative Works" shall mean any work, whether in Source or Object
168
- form, that is based on (or derived from) the Work and for which the
169
- editorial revisions, annotations, elaborations, or other modifications
170
- represent, as a whole, an original work of authorship. For the purposes
171
- of this License, Derivative Works shall not include works that remain
172
- separable from, or merely link (or bind by name) to the interfaces of,
173
- the Work and Derivative Works thereof.
174
-
175
- "Contribution" shall mean any work of authorship, including
176
- the original version of the Work and any modifications or additions
177
- to that Work or Derivative Works thereof, that is intentionally
178
- submitted to Licensor for inclusion in the Work by the copyright owner
179
- or by an individual or Legal Entity authorized to submit on behalf of
180
- the copyright owner. For the purposes of this definition, "submitted"
181
- means any form of electronic, verbal, or written communication sent
182
- to the Licensor or its representatives, including but not limited to
183
- communication on electronic mailing lists, source code control systems,
184
- and issue tracking systems that are managed by, or on behalf of, the
185
- Licensor for the purpose of discussing and improving the Work, but
186
- excluding communication that is conspicuously marked or otherwise
187
- designated in writing by the copyright owner as "Not a Contribution."
188
-
189
- "Contributor" shall mean Licensor and any individual or Legal Entity
190
- on behalf of whom a Contribution has been received by Licensor and
191
- subsequently incorporated within the Work.
192
-
193
- 2. Grant of Copyright License. Subject to the terms and conditions of
194
- this License, each Contributor hereby grants to You a perpetual,
195
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
196
- copyright license to reproduce, prepare Derivative Works of,
197
- publicly display, publicly perform, sublicense, and distribute the
198
- Work and such Derivative Works in Source or Object form.
199
-
200
- 3. Grant of Patent License. Subject to the terms and conditions of
201
- this License, each Contributor hereby grants to You a perpetual,
202
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
203
- (except as stated in this section) patent license to make, have made,
204
- use, offer to sell, sell, import, and otherwise transfer the Work,
205
- where such license applies only to those patent claims licensable
206
- by such Contributor that are necessarily infringed by their
207
- Contribution(s) alone or by combination of their Contribution(s)
208
- with the Work to which such Contribution(s) was submitted. If You
209
- institute patent litigation against any entity (including a
210
- cross-claim or counterclaim in a lawsuit) alleging that the Work
211
- or a Contribution incorporated within the Work constitutes direct
212
- or contributory patent infringement, then any patent licenses
213
- granted to You under this License for that Work shall terminate
214
- as of the date such litigation is filed.
215
-
216
- 4. Redistribution. You may reproduce and distribute copies of the
217
- Work or Derivative Works thereof in any medium, with or without
218
- modifications, and in Source or Object form, provided that You
219
- meet the following conditions:
220
-
221
- (a) You must give any other recipients of the Work or
222
- Derivative Works a copy of this License; and
223
-
224
- (b) You must cause any modified files to carry prominent notices
225
- stating that You changed the files; and
226
-
227
- (c) You must retain, in the Source form of any Derivative Works
228
- that You distribute, all copyright, patent, trademark, and
229
- attribution notices from the Source form of the Work,
230
- excluding those notices that do not pertain to any part of
231
- the Derivative Works; and
232
-
233
- (d) If the Work includes a "NOTICE" text file as part of its
234
- distribution, then any Derivative Works that You distribute must
235
- include a readable copy of the attribution notices contained
236
- within such NOTICE file, excluding those notices that do not
237
- pertain to any part of the Derivative Works, in at least one
238
- of the following places: within a NOTICE text file distributed
239
- as part of the Derivative Works; within the Source form or
240
- documentation, if provided along with the Derivative Works; or,
241
- within a display generated by the Derivative Works, if and
242
- wherever such third-party notices normally appear. The contents
243
- of the NOTICE file are for informational purposes only and
244
- do not modify the License. You may add Your own attribution
245
- notices within Derivative Works that You distribute, alongside
246
- or as an addendum to the NOTICE text from the Work, provided
247
- that such additional attribution notices cannot be construed
248
- as modifying the License.
249
-
250
- You may add Your own copyright statement to Your modifications and
251
- may provide additional or different license terms and conditions
252
- for use, reproduction, or distribution of Your modifications, or
253
- for any such Derivative Works as a whole, provided Your use,
254
- reproduction, and distribution of the Work otherwise complies with
255
- the conditions stated in this License.
256
-
257
- 5. Submission of Contributions. Unless You explicitly state otherwise,
258
- any Contribution intentionally submitted for inclusion in the Work
259
- by You to the Licensor shall be under the terms and conditions of
260
- this License, without any additional terms or conditions.
261
- Notwithstanding the above, nothing herein shall supersede or modify
262
- the terms of any separate license agreement you may have executed
263
- with Licensor regarding such Contributions.
264
-
265
- 6. Trademarks. This License does not grant permission to use the trade
266
- names, trademarks, service marks, or product names of the Licensor,
267
- except as required for reasonable and customary use in describing the
268
- origin of the Work and reproducing the content of the NOTICE file.
269
-
270
- 7. Disclaimer of Warranty. Unless required by applicable law or
271
- agreed to in writing, Licensor provides the Work (and each
272
- Contributor provides its Contributions) on an "AS IS" BASIS,
273
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
274
- implied, including, without limitation, any warranties or conditions
275
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
276
- PARTICULAR PURPOSE. You are solely responsible for determining the
277
- appropriateness of using or redistributing the Work and assume any
278
- risks associated with Your exercise of permissions under this License.
279
-
280
- 8. Limitation of Liability. In no event and under no legal theory,
281
- whether in tort (including negligence), contract, or otherwise,
282
- unless required by applicable law (such as deliberate and grossly
283
- negligent acts) or agreed to in writing, shall any Contributor be
284
- liable to You for damages, including any direct, indirect, special,
285
- incidental, or consequential damages of any character arising as a
286
- result of this License or out of the use or inability to use the
287
- Work (including but not limited to damages for loss of goodwill,
288
- work stoppage, computer failure or malfunction, or any and all
289
- other commercial damages or losses), even if such Contributor
290
- has been advised of the possibility of such damages.
291
-
292
- 9. Accepting Warranty or Additional Liability. While redistributing
293
- the Work or Derivative Works thereof, You may choose to offer,
294
- and charge a fee for, acceptance of support, warranty, indemnity,
295
- or other liability obligations and/or rights consistent with this
296
- License. However, in accepting such obligations, You may act only
297
- on Your own behalf and on Your sole responsibility, not on behalf
298
- of any other Contributor, and only if You agree to indemnify,
299
- defend, and hold each Contributor harmless for any liability
300
- incurred by, or claims asserted against, such Contributor by reason
301
- of your accepting any such warranty or additional liability.
302
-
303
- END OF TERMS AND CONDITIONS
304
-
305
- APPENDIX: How to apply the Apache License to your work.
306
-
307
- To apply the Apache License to your work, attach the following
308
- boilerplate notice, with the fields enclosed by brackets "[]"
309
- replaced with your own identifying information. (Don't include
310
- the brackets!) The text should be enclosed in the appropriate
311
- comment syntax for the file format. We also recommend that a
312
- file or class name and description of purpose be included on the
313
- same "printed page" as the copyright notice for easier
314
- identification within third-party archives.
315
-
316
- Copyright [yyyy] [name of copyright owner]
317
-
318
- Licensed under the Apache License, Version 2.0 (the "License");
319
- you may not use this file except in compliance with the License.
320
- You may obtain a copy of the License at
321
-
322
- http://www.apache.org/licenses/LICENSE-2.0
323
-
324
- Unless required by applicable law or agreed to in writing, software
325
- distributed under the License is distributed on an "AS IS" BASIS,
326
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
327
- See the License for the specific language governing permissions and
328
- limitations under the License.
329
-
330
57
  ===============================================================================
331
58
  github.com/yuin/gopher-lua v1.1.1 - compiled into native/ binaries
332
59
  https://github.com/yuin/gopher-lua
@@ -473,10 +200,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
473
200
  ===============================================================================
474
201
  golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b,
475
202
  golang.org/x/image v0.24.0,
476
- golang.org/x/sys v0.36.0,
477
- golang.org/x/text v0.22.0 - compiled into native/ binaries
478
- (https://go.googlesource.com/exp / image / sys / text)
479
- License: BSD-3-Clause (identical text for all four modules)
203
+ golang.org/x/sys v0.36.0 - compiled into native/ binaries
204
+ (https://go.googlesource.com/exp / image / sys)
205
+ License: BSD-3-Clause (identical text for all three modules)
480
206
  ===============================================================================
481
207
 
482
208
  Copyright 2009 The Go Authors.
@@ -508,43 +234,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
508
234
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
509
235
 
510
236
  Note: golang.org/x/image is linked into the binaries as the WebP/RIFF
511
- decoder dependency of nativewebp (golang.org/x/image/webp, riff, vp8, vp8l);
512
- golang.org/x/text supplies character-set decoding for gozxing.
513
-
514
- ===============================================================================
515
- golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 -
516
- compiled into native/ binaries (through gozxing)
517
- https://go.googlesource.com/xerrors
518
- License: BSD-3-Clause
519
- ===============================================================================
520
-
521
- Copyright (c) 2019 The Go Authors. All rights reserved.
522
-
523
- Redistribution and use in source and binary forms, with or without
524
- modification, are permitted provided that the following conditions are
525
- met:
526
-
527
- * Redistributions of source code must retain the above copyright
528
- notice, this list of conditions and the following disclaimer.
529
- * Redistributions in binary form must reproduce the above
530
- copyright notice, this list of conditions and the following disclaimer
531
- in the documentation and/or other materials provided with the
532
- distribution.
533
- * Neither the name of Google Inc. nor the names of its
534
- contributors may be used to endorse or promote products derived from
535
- this software without specific prior written permission.
536
-
537
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
538
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
539
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
540
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
541
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
542
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
543
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
544
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
545
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
546
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
547
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
237
+ decoder dependency of nativewebp (golang.org/x/image/webp, riff, vp8, vp8l).
548
238
 
549
239
  ===============================================================================
550
240
  modernc.org/sqlite v1.39.1 - compiled into native/ binaries
package/bin/lycheedev.mjs CHANGED
@@ -69,7 +69,7 @@ if (process.argv[1] && realpathSync(resolve(process.argv[1])) === fileURLToPath(
69
69
  const forwarded = args.filter((arg, index) => arg !== '--format' && !arg.startsWith('--format=') && args[index - 1] !== '--format');
70
70
  // Keep native argument validation authoritative, including output format.
71
71
  if (!['json', 'jsonl', 'text'].includes(format) || args.filter(arg => arg === '--format' || arg.startsWith('--format=')).length > 1) throw Object.assign(new Error('update.invalid_format'), { exit: 2 });
72
- result = update(root, forwarded, nativePath);
72
+ result = await update(root, forwarded, nativePath);
73
73
  if (format === 'jsonl') {
74
74
  process.stdout.write(`${JSON.stringify({ type: 'begin', schema: result.envelope.schema })}\n`);
75
75
  if (result.envelope.ok) process.stdout.write(`${JSON.stringify({ type: 'record', result: result.envelope.result })}\n${JSON.stringify({ type: 'end', envelope: result.envelope })}\n`);
package/bin/update.mjs CHANGED
@@ -1,9 +1,10 @@
1
1
  // npm owns replacement of the CLI package. Native delivery owns target identity,
2
2
  // receipts and recoverable addon/skill replacement. No native process stays alive
3
3
  // while npm replaces its executable (Windows denies replacing a running image).
4
+ import { createServer } from 'node:net';
4
5
  import { spawnSync } from 'node:child_process';
5
6
  import { createHash } from 'node:crypto';
6
- import { existsSync, lstatSync, mkdirSync, openSync, closeSync, readFileSync, writeFileSync, renameSync, rmSync, realpathSync } from 'node:fs';
7
+ import { existsSync, lstatSync, mkdirSync, readFileSync, writeFileSync, renameSync, rmSync, realpathSync } from 'node:fs';
7
8
  import { delimiter, dirname, join, resolve } from 'node:path';
8
9
 
9
10
  function readJSON(file) {
@@ -46,42 +47,35 @@ function frozenTargets(plan) {
46
47
  });
47
48
  }
48
49
 
49
- function takeLock(directory) {
50
+ export async function takeLock(directory) {
51
+ // The OS owns this mutex. A terminated reclaiming process cannot leave a
52
+ // second stale lock which prevents recovery of the original transaction.
53
+ const identity = createHash('sha256').update(resolve(directory).toLowerCase()).digest('hex');
54
+ const server = createServer(socket => socket.destroy());
55
+ if (process.platform !== 'win32') throw new Error('distribution.unsupported_platform');
56
+ const address = `\\\\.\\pipe\\lycheedev-update-${identity}`;
57
+ await new Promise((resolve, reject) => {
58
+ server.once('error', error => reject(new Error(`update.busy: ${error.message}`)));
59
+ server.listen(address, resolve);
60
+ });
50
61
  const file = join(directory, 'lock.json');
51
- for (let attempt = 0; attempt < 2; attempt++) {
52
- try {
53
- const descriptor = openSync(file, 'wx');
54
- writeFileSync(descriptor, JSON.stringify({ pid: process.pid })); closeSync(descriptor);
55
- return () => rmSync(file);
56
- } catch (error) {
57
- if (error.code !== 'EEXIST') throw error;
62
+ try {
63
+ if (existsSync(file)) {
58
64
  const owner = readJSON(file);
59
65
  if (!Number.isSafeInteger(owner.pid) || owner.pid < 1) throw new Error('update.invalid_lock');
60
- try { process.kill(owner.pid, 0); } catch (error) {
61
- if (error.code === 'ESRCH') {
62
- // Serialize stale reclamation separately. Two retriers must not remove
63
- // each other's newly acquired owner file after observing one dead PID.
64
- const reclaim = join(directory, 'reclaim.lock');
65
- let descriptor;
66
- try { descriptor = openSync(reclaim, 'wx'); } catch { throw new Error('update.busy: stale-lock recovery is already in progress'); }
67
- try {
68
- const current = readJSON(file);
69
- if (current.pid !== owner.pid) throw new Error('update.busy: owner changed during recovery');
70
- try { process.kill(current.pid, 0); throw new Error('update.busy'); } catch (error) {
71
- if (error.code !== 'ESRCH') throw error;
72
- }
73
- rmSync(file);
74
- } finally { closeSync(descriptor); rmSync(reclaim); }
75
- continue;
76
- }
77
- }
78
- throw new Error('update.busy: another updater owns this npm prefix');
66
+ try { process.kill(owner.pid, 0); throw new Error('update.busy: another updater owns this npm prefix'); }
67
+ catch (error) { if (error.code !== 'ESRCH') throw error; }
79
68
  }
80
- }
81
- throw new Error('update.busy');
69
+ writeFileSync(`${file}.next`, JSON.stringify({ pid: process.pid }));
70
+ renameSync(`${file}.next`, file);
71
+ // Old releases used an empty persistent reclaim lock. Holding the kernel
72
+ // mutex and replacing a proven dead owner makes that marker obsolete.
73
+ rmSync(join(directory, 'reclaim.lock'), { force: true });
74
+ return () => { try { rmSync(file); } finally { server.close(); } };
75
+ } catch (error) { server.close(); throw error; }
82
76
  }
83
77
 
84
- export function update(root, args, nativePath) {
78
+ export async function update(root, args, nativePath) {
85
79
  root = realpathSync(root);
86
80
  const prefix = dirname(dirname(root));
87
81
  if (root.toLowerCase() !== join(prefix, 'node_modules', 'lycheedev').toLowerCase() || !existsSync(join(prefix, 'lycheedev.cmd'))) {
@@ -93,7 +87,7 @@ export function update(root, args, nativePath) {
93
87
  const directory = join(prefix, '.lycheedev-update');
94
88
  mkdirSync(directory, { recursive: true });
95
89
  if (lstatSync(directory).isSymbolicLink() || realpathSync(directory).toLowerCase() !== resolve(directory).toLowerCase()) throw new Error('update.redirected_state');
96
- const unlock = takeLock(directory);
90
+ const unlock = await takeLock(directory);
97
91
  const journal = join(directory, 'transaction.json');
98
92
  const save = value => {
99
93
  writeFileSync(`${journal}.next`, JSON.stringify(value));
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lycheedev",
3
- "version": "3.1.2",
3
+ "version": "3.2.1",
4
4
  "private": false,
5
5
  "description": "Unified native World of Warcraft development toolkit",
6
6
  "license": "MIT",
@@ -0,0 +1,12 @@
1
+ <Bindings>
2
+ <Binding name="LYCHEEDEV_WAKE" header="LYCHEEDEV" category="Lychee Dev">
3
+ if LycheeDevInternal and LycheeDevInternal.ReceiverBindings then
4
+ LycheeDevInternal.ReceiverBindings.Dispatch("wake")
5
+ end
6
+ </Binding>
7
+ <Binding name="LYCHEEDEV_RELOAD" category="Lychee Dev">
8
+ if LycheeDevInternal and LycheeDevInternal.ReceiverBindings then
9
+ LycheeDevInternal.ReceiverBindings.Dispatch("reload")
10
+ end
11
+ </Binding>
12
+ </Bindings>
@@ -1,7 +1,7 @@
1
1
  local _, ns = ...
2
2
 
3
- -- Presentation has no input authority. The receiver owns the short input
4
- -- shield; this independent, click-through companion owns only task feedback.
3
+ -- Presentation has no input authority. InputProtection owns the transport
4
+ -- input shield; this click-through view owns only task feedback.
5
5
  local frame, receiving, requestId, startedAt, failed, collecting, collectionTimer
6
6
  local function clearTimer()
7
7
  if collectionTimer then collectionTimer:Cancel();collectionTimer=nil end
@@ -26,7 +26,6 @@ local function create()
26
26
  frame.label:SetPoint("TOP", anchor, "BOTTOM", 0, 0)
27
27
  frame:SetScript("OnHide", function(self) self:SetScript("OnUpdate", nil) end)
28
28
  end
29
- local function anchor() end -- Position belongs to this view, never a receipt.
30
29
  local function render()
31
30
  if not receiving and not requestId then
32
31
  if frame then frame:SetScript("OnUpdate", nil); frame:Hide() end
@@ -36,7 +35,6 @@ local function render()
36
35
  if not frame then create() end
37
36
  startedAt = startedAt or GetTime()
38
37
  frame.label:SetText(receiving and ns.L.ACTIVITY_CONNECTING or collecting and ns.L.ACTIVITY_COLLECTING or ns.L.ACTIVITY_PROBE)
39
- anchor()
40
38
  local current = ns.Persistence.Current()
41
39
  local reduced = current and current.options and current.options.reducedMotion == true
42
40
  ns.Theme.DrawConnectionBounce(frame.logo, frame.anchor, 96, 0)
@@ -79,6 +77,5 @@ ns.ActivityView = {
79
77
  end,
80
78
  Stop = function() clearTimer();receiving, requestId, collecting = false, nil, false; update() end,
81
79
  Refresh = update,
82
- Anchor = anchor,
83
80
  Current = function() return receiving and "connecting" or collecting and "collecting" or requestId and "probe" or nil, requestId end,
84
81
  }