@draig/lexis-two 1.0.0 → 1.0.3
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/README.md +3 -3
- package/package.json +7 -2
- package/.claude-plugin/marketplace.json +0 -29
- package/.claude-plugin/plugin.json +0 -9
- package/.codex-plugin/plugin.json +0 -31
- package/.env.example +0 -8
- package/.github/FUNDING.yml +0 -1
- package/.github/copilot-instructions.md +0 -47
- package/.github/plugin/marketplace.json +0 -20
- package/.github/plugin/plugin.json +0 -16
- package/.github/workflows/deploy-site.yml +0 -53
- package/.github/workflows/test.yml +0 -29
- package/AUDIT.md +0 -74
- package/SPECXIS.md +0 -576
- package/benchmarks/README.md +0 -114
- package/benchmarks/arms/baseline.js +0 -2
- package/benchmarks/arms/caveman-SKILL.md +0 -67
- package/benchmarks/arms/caveman.js +0 -8
- package/benchmarks/arms/lexis-two.js +0 -10
- package/benchmarks/arms/ponytail.js +0 -6
- package/benchmarks/behavior.js +0 -58
- package/benchmarks/behavior.yaml +0 -40
- package/benchmarks/benchmark-local.py +0 -156
- package/benchmarks/benchmark-opencode-go.js +0 -294
- package/benchmarks/correctness.js +0 -294
- package/benchmarks/lib/aggregate-opencode-go.js +0 -103
- package/benchmarks/lib/load-env.js +0 -31
- package/benchmarks/lib/opencode-go-client.js +0 -151
- package/benchmarks/loc.js +0 -13
- package/benchmarks/opencode-go-models.json +0 -31
- package/benchmarks/promptfooconfig.yaml +0 -41
- package/benchmarks/prompts.json +0 -15
- package/benchmarks/render-opencode-go-report.js +0 -28
- package/benchmarks/results/2026-06-15-llama3.2-local.md +0 -76
- package/benchmarks/results/2026-06-16-opencode-go.md +0 -56
- package/benchmarks/results/opencode-go-2026-06-16-report.html +0 -226
- package/benchmarks/results/opencode-go-2026-06-16.json +0 -1339
- package/docs/assets/lexis-two-nobg.png +0 -0
- package/docs/assets/logo.png +0 -0
- package/docs/assets/logo.svg +0 -4
- package/docs/portability.md +0 -147
- package/docs/site.md +0 -52
- package/gemini-extension.json +0 -7
- package/pi-extension/index.js +0 -161
- package/pi-extension/package.json +0 -8
- package/pi-extension/test/extension.test.js +0 -89
- package/pi-extension/test/helpers.test.js +0 -35
- package/scripts/check-rule-copies.js +0 -82
- package/site/astro.config.mjs +0 -18
- package/site/package-lock.json +0 -4913
- package/site/package.json +0 -14
- package/site/public/CNAME +0 -1
- package/site/public/assets/lexis-two-nobg.png +0 -0
- package/site/public/assets/logo.png +0 -0
- package/site/public/assets/logo.svg +0 -4
- package/site/public/robots.txt +0 -4
- package/site/src/components/Adapt.astro +0 -33
- package/site/src/components/Benchmarks.astro +0 -232
- package/site/src/components/Commands.astro +0 -33
- package/site/src/components/Ecosystem.astro +0 -30
- package/site/src/components/Example.astro +0 -77
- package/site/src/components/Footer.astro +0 -28
- package/site/src/components/Header.astro +0 -87
- package/site/src/components/Hero.astro +0 -58
- package/site/src/components/Home.astro +0 -46
- package/site/src/components/Hosts.astro +0 -62
- package/site/src/components/Install.astro +0 -143
- package/site/src/components/LanguageSwitcher.astro +0 -82
- package/site/src/components/Philosophy.astro +0 -23
- package/site/src/components/Stacks.astro +0 -33
- package/site/src/components/Suggested.astro +0 -39
- package/site/src/data/opencode-go-benchmark.json +0 -230
- package/site/src/i18n/en.ts +0 -155
- package/site/src/i18n/es.ts +0 -158
- package/site/src/i18n/index.ts +0 -14
- package/site/src/layouts/Layout.astro +0 -114
- package/site/src/pages/benchmarks.astro +0 -4
- package/site/src/pages/es/benchmarks.astro +0 -4
- package/site/src/pages/es/index.astro +0 -10
- package/site/src/pages/index.astro +0 -10
- package/site/src/styles/global.css +0 -780
- package/site/tsconfig.json +0 -3
- package/tests/behavior.test.js +0 -80
- package/tests/commands.test.js +0 -40
- package/tests/copilot-plugin.test.js +0 -33
- package/tests/correctness.test.js +0 -191
- package/tests/gemini-extension.test.js +0 -78
- package/tests/hooks-windows.test.js +0 -48
- package/tests/hooks.test.js +0 -177
- package/tests/opencode-plugin.test.js +0 -64
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Smoke test for the OpenCode adapter: the plugin's hooks behave against the
|
|
3
|
-
// real (structural) OpenCode hook shapes. No live OpenCode needed.
|
|
4
|
-
|
|
5
|
-
const test = require('node:test');
|
|
6
|
-
const assert = require('node:assert/strict');
|
|
7
|
-
const fs = require('fs');
|
|
8
|
-
const os = require('os');
|
|
9
|
-
const path = require('path');
|
|
10
|
-
const { pathToFileURL } = require('url');
|
|
11
|
-
|
|
12
|
-
// Point the plugin's mode-flag at a temp config home BEFORE it loads — the
|
|
13
|
-
// plugin resolves its state path once at load (as it does under a real OpenCode
|
|
14
|
-
// process, where XDG_CONFIG_HOME is already set). The dynamic import below runs
|
|
15
|
-
// after this assignment, so the ordering holds.
|
|
16
|
-
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'lexis-two-opencode-'));
|
|
17
|
-
process.env.XDG_CONFIG_HOME = tmp;
|
|
18
|
-
delete process.env.LEXIS_TWO_DEFAULT_MODE;
|
|
19
|
-
const statePath = path.join(tmp, 'opencode', '.lexis-two-active');
|
|
20
|
-
|
|
21
|
-
let loadPlugin;
|
|
22
|
-
test.before(async () => {
|
|
23
|
-
const url = pathToFileURL(path.join(__dirname, '..', '.opencode', 'plugins', 'lexis-two.mjs'));
|
|
24
|
-
loadPlugin = (await import(url)).default;
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
function transform(hooks) {
|
|
28
|
-
const output = { system: [] };
|
|
29
|
-
return hooks['experimental.chat.system.transform']({ model: {} }, output).then(() => output.system);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
test('system.transform injects the ruleset at the default mode (full)', async () => {
|
|
33
|
-
try { fs.unlinkSync(statePath); } catch (e) {}
|
|
34
|
-
const hooks = await loadPlugin({});
|
|
35
|
-
const system = await transform(hooks);
|
|
36
|
-
assert.equal(system.length, 1);
|
|
37
|
-
assert.match(system[0], /LEXIS-TWO MODE ACTIVE — level: full/);
|
|
38
|
-
assert.match(system[0], /lazy senior developer/);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
test('command.execute.before persists /lexis-two ultra, transform follows it', async () => {
|
|
42
|
-
const hooks = await loadPlugin({});
|
|
43
|
-
await hooks['command.execute.before']({ command: 'lexis-two', arguments: 'ultra', sessionID: 's' });
|
|
44
|
-
assert.equal(fs.readFileSync(statePath, 'utf8'), 'ultra');
|
|
45
|
-
const system = await transform(hooks);
|
|
46
|
-
assert.match(system[0], /LEXIS-TWO MODE ACTIVE — level: ultra/);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
test('/lexis-two off persists off and transform injects nothing', async () => {
|
|
50
|
-
const hooks = await loadPlugin({});
|
|
51
|
-
await hooks['command.execute.before']({ command: 'lexis-two', arguments: 'off', sessionID: 's' });
|
|
52
|
-
assert.equal(fs.readFileSync(statePath, 'utf8'), 'off');
|
|
53
|
-
const system = await transform(hooks);
|
|
54
|
-
assert.deepEqual(system, []);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
test('unrelated commands do not touch the flag', async () => {
|
|
58
|
-
try { fs.unlinkSync(statePath); } catch (e) {}
|
|
59
|
-
const hooks = await loadPlugin({});
|
|
60
|
-
await hooks['command.execute.before']({ command: 'commit', arguments: 'x', sessionID: 's' });
|
|
61
|
-
assert.equal(fs.existsSync(statePath), false);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
test.after(() => fs.rmSync(tmp, { recursive: true, force: true }));
|