lycheedev 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/LICENSE +49 -0
  2. package/README.md +45 -0
  3. package/THIRD_PARTY_NOTICES +812 -0
  4. package/bin/lycheedev.mjs +56 -0
  5. package/native/windows-amd64/lycheedev.exe +0 -0
  6. package/package.json +12 -33
  7. package/payload/addon/Bridge/CaptureWriter.lua +154 -0
  8. package/payload/addon/Bridge/Definitions.lua +3 -0
  9. package/payload/addon/Bridge/Identity.lua +127 -0
  10. package/{vendor/addon/Libs/AutomationQR.lua → payload/addon/Bridge/MatrixSymbol.lua} +23 -30
  11. package/payload/addon/Bridge/ProbeQueue.lua +136 -0
  12. package/payload/addon/Bridge/ProbeRunner.lua +128 -0
  13. package/payload/addon/Bridge/ReceiptView.lua +160 -0
  14. package/payload/addon/Bridge/Reentry.lua +192 -0
  15. package/payload/addon/Bridge/ReportStore.lua +153 -0
  16. package/payload/addon/Bridge/Session.lua +163 -0
  17. package/payload/addon/Clients/Evergreen.lua +2 -0
  18. package/payload/addon/Clients/Live.lua +2 -0
  19. package/payload/addon/Clients/Pandaria.lua +2 -0
  20. package/payload/addon/Clients/Titan.lua +2 -0
  21. package/payload/addon/Core/Compat.lua +59 -0
  22. package/payload/addon/Core/Controls.lua +168 -0
  23. package/{vendor/addon/Core/Bootstrap.lua → payload/addon/Core/Execute.lua} +12 -23
  24. package/{vendor → payload}/addon/Core/Inspector.lua +19 -235
  25. package/{vendor → payload}/addon/Core/Locale.lua +129 -94
  26. package/{vendor → payload}/addon/Core/Locale_enUS.lua +129 -96
  27. package/payload/addon/Core/Persistence.lua +58 -0
  28. package/payload/addon/Core/Platform.lua +58 -0
  29. package/payload/addon/Core/Runtime.lua +25 -0
  30. package/payload/addon/Core/Safety.lua +56 -0
  31. package/{vendor → payload}/addon/Core/Serializer.lua +18 -6
  32. package/payload/addon/Core/Stores.lua +611 -0
  33. package/payload/addon/Lychee Dev_Forever.toc +52 -0
  34. package/payload/addon/Lychee Dev_Mainline.toc +52 -0
  35. package/payload/addon/Lychee Dev_Mists.toc +52 -0
  36. package/payload/addon/Lychee Dev_Wrath.toc +52 -0
  37. package/payload/addon/Modules/AutomationView.lua +393 -0
  38. package/{vendor → payload}/addon/Modules/Diagnostics.lua +92 -36
  39. package/{vendor → payload}/addon/Modules/Events/Catalog.lua +9 -0
  40. package/{vendor → payload}/addon/Modules/Events/Monitor.lua +45 -5
  41. package/payload/addon/Modules/FunctionTrace.lua +150 -0
  42. package/{vendor → payload}/addon/Modules/ObjectInspector.lua +105 -31
  43. package/{vendor → payload}/addon/UI/Export.lua +64 -34
  44. package/{vendor → payload}/addon/UI/Pages/About.lua +26 -14
  45. package/payload/addon/UI/Pages/Automation.lua +446 -0
  46. package/payload/addon/UI/Pages/Diagnostics.lua +402 -0
  47. package/{vendor/addon/UI/Features.lua → payload/addon/UI/Pages/Events.lua} +192 -302
  48. package/{vendor → payload}/addon/UI/Pages/ExportRecords.lua +213 -132
  49. package/{vendor → payload}/addon/UI/Pages/Object.lua +229 -121
  50. package/payload/addon/UI/Pages/Run.lua +423 -0
  51. package/payload/addon/UI/Pages/Trace.lua +314 -0
  52. package/payload/addon/UI/TreeView.lua +246 -0
  53. package/{vendor/addon/UI/MainWindow.lua → payload/addon/UI/Widgets.lua} +89 -529
  54. package/payload/addon/UI/Window.lua +425 -0
  55. package/payload/skill/SKILL.md +87 -0
  56. package/payload/skill/agents/openai.yaml +7 -0
  57. package/payload/skill/references/addon-validation.md +42 -0
  58. package/payload/skill/references/asset-export.md +109 -0
  59. package/payload/skill/references/commands.md +169 -0
  60. package/payload/skill/references/data-investigation.md +242 -0
  61. package/payload/skill/references/error-diagnosis.md +41 -0
  62. package/payload/skill/references/installation.md +18 -0
  63. package/payload/skill/references/live-investigation.md +129 -0
  64. package/payload/skill/references/source-research.md +82 -0
  65. package/payload/skill/scripts/lycheedev.mjs +59 -0
  66. package/release.json +346 -0
  67. package/bin/lycheedev.js +0 -742
  68. package/src/addon.js +0 -95
  69. package/src/config.js +0 -68
  70. package/src/doctor.js +0 -126
  71. package/src/install.js +0 -145
  72. package/src/paths.js +0 -93
  73. package/src/py/instances.py +0 -165
  74. package/src/python.js +0 -111
  75. package/src/skill.js +0 -48
  76. package/src/wow.js +0 -541
  77. package/vendor/addon/Core/Clients/Forever.lua +0 -9
  78. package/vendor/addon/Core/Clients/Mainline.lua +0 -9
  79. package/vendor/addon/Core/Clients/Mists.lua +0 -9
  80. package/vendor/addon/Core/Clients/Titan.lua +0 -9
  81. package/vendor/addon/Core/Compatibility.lua +0 -43
  82. package/vendor/addon/Core/Database.lua +0 -859
  83. package/vendor/addon/Core/Safety.lua +0 -42
  84. package/vendor/addon/Lychee Dev_Forever.toc +0 -43
  85. package/vendor/addon/Lychee Dev_Mainline.toc +0 -43
  86. package/vendor/addon/Lychee Dev_Mists.toc +0 -43
  87. package/vendor/addon/Lychee Dev_Wrath.toc +0 -43
  88. package/vendor/addon/Modules/Automation/Controller.lua +0 -884
  89. package/vendor/addon/Modules/Automation/Report.lua +0 -409
  90. package/vendor/addon/Modules/Automation/auto/auto.lua +0 -12
  91. package/vendor/addon/Modules/FunctionTrace.lua +0 -85
  92. package/vendor/addon/UI/AutomationOverlay.lua +0 -253
  93. package/vendor/addon/UI/Pages/Automation.lua +0 -417
  94. package/vendor/addon/UI/Pages/Diagnostics.lua +0 -289
  95. package/vendor/addon/UI/Pages/Trace.lua +0 -165
  96. package/vendor/skill/SKILL.md +0 -42
  97. package/vendor/skill/agents/openai.yaml +0 -4
  98. package/vendor/skill/references/automation.md +0 -128
  99. package/vendor/skill/references/clients.md +0 -51
  100. package/vendor/skill/references/runtime-investigations.md +0 -104
  101. package/vendor/skill/scripts/automation/__init__.py +0 -1
  102. package/vendor/skill/scripts/automation/registry.py +0 -516
  103. package/vendor/skill/scripts/automation/saved_variables.py +0 -438
  104. package/vendor/skill/scripts/automation/session.py +0 -207
  105. package/vendor/skill/scripts/automation/windows.py +0 -792
  106. package/vendor/skill/scripts/automation.py +0 -1034
  107. package/vendor/skill/scripts/requirements.txt +0 -13
  108. package/vendor/skill/scripts/selftest_offline.py +0 -1061
  109. package/vendor/skill/scripts/test_input_safety.py +0 -132
  110. /package/{vendor → payload}/addon/Media/GitHub.png +0 -0
  111. /package/{vendor → payload}/addon/Media/Logo.png +0 -0
  112. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Forever.lua +0 -0
  113. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Mainline.lua +0 -0
  114. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Mists.lua +0 -0
  115. /package/{vendor → payload}/addon/Modules/Events/CatalogData_Titan.lua +0 -0
package/src/python.js DELETED
@@ -1,111 +0,0 @@
1
- /** Install and run the Python automation helper that the CLI delegates to. */
2
-
3
- import { spawnSync } from 'node:child_process';
4
- import fs from 'node:fs';
5
- import path from 'node:path';
6
-
7
- import { dataDir, exists, pythonDepsDir, vendorRoot } from './paths.js';
8
-
9
- const REQUIREMENTS = path.join(vendorRoot, 'skill', 'scripts', 'requirements.txt');
10
- export const automationScript = path.join(vendorRoot, 'skill', 'scripts', 'automation.py');
11
-
12
- /** Candidate interpreters, in the order we prefer them. */
13
- export function pythonCandidates(explicit = null) {
14
- if (explicit) return [explicit];
15
- const list = [];
16
- if (process.env.LYCHEEDEV_PYTHON) list.push(process.env.LYCHEEDEV_PYTHON);
17
- if (process.platform === 'win32') {
18
- list.push('python', 'python3', 'py');
19
- } else {
20
- list.push('python3', 'python');
21
- }
22
- return list;
23
- }
24
-
25
- function run(command, args, options = {}) {
26
- const result = spawnSync(command, args, {
27
- encoding: 'utf8',
28
- windowsHide: true,
29
- ...options,
30
- });
31
- return {
32
- ok: result.status === 0,
33
- status: result.status,
34
- stdout: (result.stdout || '').trim(),
35
- stderr: (result.stderr || '').trim(),
36
- error: result.error ? result.error.message : null,
37
- };
38
- }
39
-
40
- /** Find a working Python 3 interpreter, or null. */
41
- export function findPython(explicit = null) {
42
- for (const candidate of pythonCandidates(explicit)) {
43
- const probe = run(candidate, ['-c', 'import sys; print(sys.version_info[0])']);
44
- if (probe.ok && probe.stdout.startsWith('3')) {
45
- return { bin: candidate, version: run(candidate, ['--version']).stdout };
46
- }
47
- }
48
- return null;
49
- }
50
-
51
- export function depsInstalled() {
52
- const marker = path.join(pythonDepsDir(), 'zxingcpp');
53
- return exists(marker);
54
- }
55
-
56
- /** Environment that makes the vendored helper import the installed packages. */
57
- export function pythonEnv() {
58
- const deps = pythonDepsDir();
59
- const existing = process.env.PYTHONPATH;
60
- return {
61
- ...process.env,
62
- PYTHONPATH: existing ? `${deps}${path.delimiter}${existing}` : deps,
63
- PYTHONDONTWRITEBYTECODE: '1',
64
- // Player names, window titles and zone names are not ASCII; without this
65
- // the helper's stdout is encoded with the console code page and comes back
66
- // as mojibake.
67
- PYTHONIOENCODING: 'utf-8',
68
- };
69
- }
70
-
71
- /**
72
- * Install the pinned optional dependencies into ~/.lycheedev/python.
73
- *
74
- * They live outside the package so npm can stay dependency-free and a global
75
- * install never needs write access to site-packages.
76
- */
77
- export function installDeps({ pythonBin, quiet = false, onLine = null } = {}) {
78
- const python = pythonBin || (findPython() || {}).bin;
79
- if (!python) {
80
- return { ok: false, error: 'no Python 3 interpreter found on PATH' };
81
- }
82
- if (!exists(REQUIREMENTS)) {
83
- return { ok: false, error: `requirements file is missing: ${REQUIREMENTS}` };
84
- }
85
- fs.mkdirSync(dataDir(), { recursive: true });
86
- const args = ['-m', 'pip', 'install', '--upgrade', '--no-input',
87
- '--target', pythonDepsDir(), '-r', REQUIREMENTS];
88
- const result = run(python, args, {
89
- stdio: quiet ? 'pipe' : 'inherit',
90
- env: process.env,
91
- });
92
- if (!result.ok && quiet && onLine) onLine(result.stderr);
93
- if (result.ok && onLine) onLine('python dependencies installed');
94
- return { ok: result.ok, status: result.status, error: result.error, dir: pythonDepsDir() };
95
- }
96
-
97
- /** Run the delegated automation CLI with the pinned dependency path. */
98
- export function runAutomation(args, { pythonBin = null, inherit = true } = {}) {
99
- const python = pythonBin || (findPython() || {}).bin;
100
- if (!python) {
101
- return { ok: false, status: 1, stderr: 'no Python 3 interpreter found on PATH' };
102
- }
103
- return run(python, ['-B', automationScript, ...args], {
104
- stdio: inherit ? 'inherit' : 'pipe',
105
- env: pythonEnv(),
106
- });
107
- }
108
-
109
- export function requirementsPath() {
110
- return REQUIREMENTS;
111
- }
package/src/skill.js DELETED
@@ -1,48 +0,0 @@
1
- /** Install the vendored skill into ~/.agents/skills/lycheedev. */
2
-
3
- import fs from 'node:fs';
4
- import path from 'node:path';
5
-
6
- import { copyTree, exists, removeTree, skillTargetDir, vendorRoot } from './paths.js';
7
-
8
- export function vendoredSkillRoot() {
9
- return path.join(vendorRoot, 'skill');
10
- }
11
-
12
- export function skillVersion() {
13
- const skillFile = path.join(vendoredSkillRoot(), 'SKILL.md');
14
- try {
15
- const text = fs.readFileSync(skillFile, 'utf8');
16
- const match = text.match(/^version:\s*(.+)$/m);
17
- return match ? match[1].trim() : null;
18
- } catch {
19
- return null;
20
- }
21
- }
22
-
23
- function countFiles(dir) {
24
- let total = 0;
25
- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
26
- if (entry.isDirectory()) total += countFiles(path.join(dir, entry.name));
27
- else total += 1;
28
- }
29
- return total;
30
- }
31
-
32
- /**
33
- * Replace the installed skill with the vendored copy.
34
- *
35
- * The skill is replaced rather than merged: a stale reference file that no
36
- * longer ships would otherwise stay discoverable forever.
37
- */
38
- export function installSkill() {
39
- const source = vendoredSkillRoot();
40
- if (!exists(source)) {
41
- return { ok: false, error: 'vendored skill payload is missing; reinstall the package' };
42
- }
43
- const target = skillTargetDir();
44
- removeTree(target);
45
- fs.mkdirSync(path.dirname(target), { recursive: true });
46
- copyTree(source, target);
47
- return { ok: true, target, files: countFiles(target) };
48
- }