lycheedev 1.2.0 → 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.
- package/LICENSE +49 -0
- package/README.md +45 -0
- package/THIRD_PARTY_NOTICES +812 -0
- package/bin/lycheedev.mjs +56 -0
- package/native/windows-amd64/lycheedev.exe +0 -0
- package/package.json +12 -33
- package/payload/addon/Bridge/CaptureWriter.lua +154 -0
- package/payload/addon/Bridge/Definitions.lua +3 -0
- package/payload/addon/Bridge/Identity.lua +127 -0
- package/{vendor/addon/Libs/AutomationQR.lua → payload/addon/Bridge/MatrixSymbol.lua} +23 -30
- package/payload/addon/Bridge/ProbeQueue.lua +136 -0
- package/payload/addon/Bridge/ProbeRunner.lua +128 -0
- package/payload/addon/Bridge/ReceiptView.lua +160 -0
- package/payload/addon/Bridge/Reentry.lua +192 -0
- package/payload/addon/Bridge/ReportStore.lua +153 -0
- package/payload/addon/Bridge/Session.lua +163 -0
- package/payload/addon/Clients/Evergreen.lua +2 -0
- package/payload/addon/Clients/Live.lua +2 -0
- package/payload/addon/Clients/Pandaria.lua +2 -0
- package/payload/addon/Clients/Titan.lua +2 -0
- package/payload/addon/Core/Compat.lua +59 -0
- package/payload/addon/Core/Controls.lua +168 -0
- package/{vendor/addon/Core/Bootstrap.lua → payload/addon/Core/Execute.lua} +12 -23
- package/{vendor → payload}/addon/Core/Inspector.lua +19 -235
- package/{vendor → payload}/addon/Core/Locale.lua +128 -93
- package/{vendor → payload}/addon/Core/Locale_enUS.lua +128 -95
- package/payload/addon/Core/Persistence.lua +58 -0
- package/payload/addon/Core/Platform.lua +58 -0
- package/payload/addon/Core/Runtime.lua +25 -0
- package/payload/addon/Core/Safety.lua +56 -0
- package/{vendor → payload}/addon/Core/Serializer.lua +18 -6
- package/payload/addon/Core/Stores.lua +611 -0
- package/payload/addon/Lychee Dev_Forever.toc +52 -0
- package/payload/addon/Lychee Dev_Mainline.toc +52 -0
- package/payload/addon/Lychee Dev_Mists.toc +52 -0
- package/payload/addon/Lychee Dev_Wrath.toc +52 -0
- package/payload/addon/Modules/AutomationView.lua +393 -0
- package/{vendor → payload}/addon/Modules/Diagnostics.lua +92 -36
- package/{vendor → payload}/addon/Modules/Events/Catalog.lua +9 -0
- package/{vendor → payload}/addon/Modules/Events/Monitor.lua +45 -5
- package/payload/addon/Modules/FunctionTrace.lua +150 -0
- package/{vendor → payload}/addon/Modules/ObjectInspector.lua +105 -31
- package/{vendor → payload}/addon/UI/Export.lua +64 -34
- package/{vendor → payload}/addon/UI/Pages/About.lua +26 -14
- package/payload/addon/UI/Pages/Automation.lua +446 -0
- package/payload/addon/UI/Pages/Diagnostics.lua +402 -0
- package/{vendor/addon/UI/Features.lua → payload/addon/UI/Pages/Events.lua} +192 -302
- package/{vendor → payload}/addon/UI/Pages/ExportRecords.lua +213 -132
- package/{vendor → payload}/addon/UI/Pages/Object.lua +229 -121
- package/payload/addon/UI/Pages/Run.lua +423 -0
- package/payload/addon/UI/Pages/Trace.lua +314 -0
- package/payload/addon/UI/TreeView.lua +246 -0
- package/{vendor/addon/UI/MainWindow.lua → payload/addon/UI/Widgets.lua} +89 -529
- package/payload/addon/UI/Window.lua +425 -0
- package/payload/skill/SKILL.md +87 -0
- package/payload/skill/agents/openai.yaml +7 -0
- package/payload/skill/references/addon-validation.md +42 -0
- package/payload/skill/references/asset-export.md +109 -0
- package/payload/skill/references/commands.md +169 -0
- package/payload/skill/references/data-investigation.md +242 -0
- package/payload/skill/references/error-diagnosis.md +41 -0
- package/payload/skill/references/installation.md +18 -0
- package/payload/skill/references/live-investigation.md +129 -0
- package/payload/skill/references/source-research.md +82 -0
- package/payload/skill/scripts/lycheedev.mjs +59 -0
- package/release.json +346 -0
- package/bin/lycheedev.js +0 -746
- package/src/addon.js +0 -95
- package/src/config.js +0 -68
- package/src/doctor.js +0 -126
- package/src/install.js +0 -145
- package/src/paths.js +0 -93
- package/src/py/instances.py +0 -165
- package/src/python.js +0 -111
- package/src/skill.js +0 -48
- package/src/wow.js +0 -541
- package/vendor/addon/Core/Clients/Forever.lua +0 -9
- package/vendor/addon/Core/Clients/Mainline.lua +0 -9
- package/vendor/addon/Core/Clients/Mists.lua +0 -9
- package/vendor/addon/Core/Clients/Titan.lua +0 -9
- package/vendor/addon/Core/Compatibility.lua +0 -43
- package/vendor/addon/Core/Database.lua +0 -859
- package/vendor/addon/Core/Safety.lua +0 -42
- package/vendor/addon/Lychee Dev_Forever.toc +0 -44
- package/vendor/addon/Lychee Dev_Mainline.toc +0 -44
- package/vendor/addon/Lychee Dev_Mists.toc +0 -44
- package/vendor/addon/Lychee Dev_Wrath.toc +0 -44
- package/vendor/addon/Modules/Automation/Controller.lua +0 -896
- package/vendor/addon/Modules/Automation/Reload.lua +0 -101
- package/vendor/addon/Modules/Automation/Report.lua +0 -409
- package/vendor/addon/Modules/Automation/auto/auto.lua +0 -12
- package/vendor/addon/Modules/FunctionTrace.lua +0 -85
- package/vendor/addon/UI/AutomationOverlay.lua +0 -253
- package/vendor/addon/UI/Pages/Automation.lua +0 -417
- package/vendor/addon/UI/Pages/Diagnostics.lua +0 -289
- package/vendor/addon/UI/Pages/Trace.lua +0 -165
- package/vendor/skill/SKILL.md +0 -44
- package/vendor/skill/agents/openai.yaml +0 -4
- package/vendor/skill/references/automation.md +0 -130
- package/vendor/skill/references/clients.md +0 -51
- package/vendor/skill/references/runtime-investigations.md +0 -104
- package/vendor/skill/scripts/automation/__init__.py +0 -1
- package/vendor/skill/scripts/automation/registry.py +0 -516
- package/vendor/skill/scripts/automation/reload.py +0 -121
- package/vendor/skill/scripts/automation/saved_variables.py +0 -438
- package/vendor/skill/scripts/automation/session.py +0 -207
- package/vendor/skill/scripts/automation/windows.py +0 -792
- package/vendor/skill/scripts/automation.py +0 -1067
- package/vendor/skill/scripts/requirements.txt +0 -13
- package/vendor/skill/scripts/selftest_offline.py +0 -1061
- package/vendor/skill/scripts/test_input_safety.py +0 -132
- package/vendor/skill/scripts/test_reload.py +0 -120
- /package/{vendor → payload}/addon/Media/GitHub.png +0 -0
- /package/{vendor → payload}/addon/Media/Logo.png +0 -0
- /package/{vendor → payload}/addon/Modules/Events/CatalogData_Forever.lua +0 -0
- /package/{vendor → payload}/addon/Modules/Events/CatalogData_Mainline.lua +0 -0
- /package/{vendor → payload}/addon/Modules/Events/CatalogData_Mists.lua +0 -0
- /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
|
-
}
|