lazycodex-ai 5.1.41 → 5.1.43
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.de.md +118 -0
- package/README.es.md +118 -0
- package/README.fr.md +118 -0
- package/README.it.md +118 -0
- package/README.ja.md +2 -1
- package/README.ko.md +2 -1
- package/README.md +3 -2
- package/README.pt-br.md +118 -0
- package/README.ru.md +2 -1
- package/README.zh-cn.md +2 -1
- package/dist/cli/index.js +187 -39
- package/dist/cli/service-auth/cli-keystore.fixture.d.ts +1 -7
- package/dist/cli/service-auth/index.d.ts +3 -0
- package/dist/cli/service-auth/keystore.d.ts +8 -2
- package/dist/cli/service-auth/secret-service-lock.d.ts +4 -0
- package/dist/cli/service-auth/session.d.ts +7 -1
- package/dist/cli-node/index.js +187 -39
- package/package.json +1 -1
- package/packages/lsp-daemon/dist/cli.js +363 -35
- package/packages/lsp-daemon/dist/client.js +341 -13
- package/packages/lsp-daemon/dist/index.js +344 -16
- package/packages/lsp-tools-mcp/dist/cli.js +333 -5
- package/packages/lsp-tools-mcp/dist/mcp.js +333 -5
- package/packages/lsp-tools-mcp/dist/tools.js +333 -5
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +68 -9
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +358 -36
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +2 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +2 -0
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +17 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +72 -11
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
|
@@ -4623,6 +4623,321 @@ function missingDependencyAvailability(error) {
|
|
|
4623
4623
|
}
|
|
4624
4624
|
}
|
|
4625
4625
|
|
|
4626
|
+
// ../lsp-core/src/lsp/bun-command-output.ts
|
|
4627
|
+
import { resolve as resolve10 } from "node:path";
|
|
4628
|
+
var TSC_LINE = /^(.+?)\((\d+),(\d+)\): (error|warning|message) (TS\d+): (.*)$/;
|
|
4629
|
+
var TSC_SEVERITY = { error: 1, warning: 2, message: 3 };
|
|
4630
|
+
function parseBunCheckOutput(stdout, cwd) {
|
|
4631
|
+
const results = [];
|
|
4632
|
+
for (const line of stdout.split(/\r?\n/)) {
|
|
4633
|
+
const match = TSC_LINE.exec(line);
|
|
4634
|
+
if (match) {
|
|
4635
|
+
const [, path, lineNumber, column, severity, code, message] = match;
|
|
4636
|
+
const start = { line: Number(lineNumber) - 1, character: Number(column) - 1 };
|
|
4637
|
+
results.push({
|
|
4638
|
+
file: resolve10(cwd, path ?? ""),
|
|
4639
|
+
diagnostic: {
|
|
4640
|
+
range: { start, end: start },
|
|
4641
|
+
severity: TSC_SEVERITY[severity ?? "error"] ?? 1,
|
|
4642
|
+
code: code ?? "",
|
|
4643
|
+
source: "bun check",
|
|
4644
|
+
message: message ?? ""
|
|
4645
|
+
}
|
|
4646
|
+
});
|
|
4647
|
+
continue;
|
|
4648
|
+
}
|
|
4649
|
+
const previous = results[results.length - 1];
|
|
4650
|
+
if (previous !== undefined && /^\s+\S/.test(line)) {
|
|
4651
|
+
previous.diagnostic.message = `${previous.diagnostic.message}
|
|
4652
|
+
${line.trim()}`;
|
|
4653
|
+
}
|
|
4654
|
+
}
|
|
4655
|
+
return results;
|
|
4656
|
+
}
|
|
4657
|
+
function parseBunLintJson(stdout) {
|
|
4658
|
+
let parsed;
|
|
4659
|
+
try {
|
|
4660
|
+
parsed = JSON.parse(stdout);
|
|
4661
|
+
} catch {
|
|
4662
|
+
return;
|
|
4663
|
+
}
|
|
4664
|
+
if (!Array.isArray(parsed))
|
|
4665
|
+
return;
|
|
4666
|
+
const results = [];
|
|
4667
|
+
for (const entry of parsed) {
|
|
4668
|
+
if (entry === null || typeof entry !== "object")
|
|
4669
|
+
continue;
|
|
4670
|
+
const filePath = entry.filePath;
|
|
4671
|
+
const messages = entry.messages;
|
|
4672
|
+
if (typeof filePath !== "string" || !Array.isArray(messages))
|
|
4673
|
+
continue;
|
|
4674
|
+
for (const raw of messages) {
|
|
4675
|
+
const start = { line: Math.max(0, (raw.line ?? 1) - 1), character: Math.max(0, (raw.column ?? 1) - 1) };
|
|
4676
|
+
const end = {
|
|
4677
|
+
line: raw.endLine === undefined ? start.line : Math.max(0, raw.endLine - 1),
|
|
4678
|
+
character: raw.endColumn === undefined ? start.character : Math.max(0, raw.endColumn - 1)
|
|
4679
|
+
};
|
|
4680
|
+
results.push({
|
|
4681
|
+
file: filePath,
|
|
4682
|
+
diagnostic: {
|
|
4683
|
+
range: { start, end },
|
|
4684
|
+
severity: raw.severity === 2 ? 1 : 2,
|
|
4685
|
+
...raw.ruleId ? { code: raw.ruleId } : {},
|
|
4686
|
+
source: "bun lint",
|
|
4687
|
+
message: raw.message ?? ""
|
|
4688
|
+
}
|
|
4689
|
+
});
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
4692
|
+
return results;
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4695
|
+
// ../lsp-core/src/lsp/bun-project-checks.ts
|
|
4696
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
4697
|
+
import { existsSync as existsSync12, mkdtempSync, readFileSync as readFileSync5, rmSync as rmSync2, statSync as statSync4, writeFileSync as writeFileSync3 } from "node:fs";
|
|
4698
|
+
import { homedir as homedir2, tmpdir } from "node:os";
|
|
4699
|
+
import { dirname as dirname9, join as join8, resolve as resolve11 } from "node:path";
|
|
4700
|
+
var BUN_LOCKFILES = ["bun.lock", "bun.lockb", "bunfig.toml"];
|
|
4701
|
+
var RUNNABLE_EXTENSIONS = [".tsx", ".ts", ".jsx", ".cts", ".cjs", ".js", ".mjs", ".mts"];
|
|
4702
|
+
var BIN_SUFFIXES = process.platform === "win32" ? [".exe", ".bunx", ".cmd", ""] : [""];
|
|
4703
|
+
var PROBE_TIMEOUT_MS = 1e4;
|
|
4704
|
+
var UNFORMATTED_PROBE = `const a=1
|
|
4705
|
+
`;
|
|
4706
|
+
var probeCache = new Map;
|
|
4707
|
+
function findBunProjectRoot(start, home = homedir2()) {
|
|
4708
|
+
const stopAt = resolve11(home);
|
|
4709
|
+
let dir = resolve11(start);
|
|
4710
|
+
for (;; ) {
|
|
4711
|
+
if (dir === stopAt)
|
|
4712
|
+
return;
|
|
4713
|
+
if (BUN_LOCKFILES.some((name) => existsSync12(join8(dir, name))))
|
|
4714
|
+
return dir;
|
|
4715
|
+
if (packageManagerIsBun(join8(dir, "package.json")))
|
|
4716
|
+
return dir;
|
|
4717
|
+
if (existsSync12(join8(dir, ".git")))
|
|
4718
|
+
return;
|
|
4719
|
+
const parent = dirname9(dir);
|
|
4720
|
+
if (parent === dir)
|
|
4721
|
+
return;
|
|
4722
|
+
dir = parent;
|
|
4723
|
+
}
|
|
4724
|
+
}
|
|
4725
|
+
function packageManagerIsBun(packageJsonPath) {
|
|
4726
|
+
const manifest = readJsonObject(packageJsonPath);
|
|
4727
|
+
const packageManager = manifest?.["packageManager"];
|
|
4728
|
+
return typeof packageManager === "string" && packageManager.startsWith("bun@");
|
|
4729
|
+
}
|
|
4730
|
+
function readJsonObject(path) {
|
|
4731
|
+
if (!existsSync12(path))
|
|
4732
|
+
return;
|
|
4733
|
+
try {
|
|
4734
|
+
const parsed = JSON.parse(readFileSync5(path, "utf8"));
|
|
4735
|
+
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : undefined;
|
|
4736
|
+
} catch {
|
|
4737
|
+
return;
|
|
4738
|
+
}
|
|
4739
|
+
}
|
|
4740
|
+
function isFile(path) {
|
|
4741
|
+
try {
|
|
4742
|
+
return statSync4(path).isFile();
|
|
4743
|
+
} catch {
|
|
4744
|
+
return false;
|
|
4745
|
+
}
|
|
4746
|
+
}
|
|
4747
|
+
function isDirectory(path) {
|
|
4748
|
+
try {
|
|
4749
|
+
return statSync4(path).isDirectory();
|
|
4750
|
+
} catch {
|
|
4751
|
+
return false;
|
|
4752
|
+
}
|
|
4753
|
+
}
|
|
4754
|
+
function projectShadowsBunCommand(command, cwd) {
|
|
4755
|
+
const packageJsonDir = nearestPackageJsonDir(cwd);
|
|
4756
|
+
if (packageJsonDir !== undefined) {
|
|
4757
|
+
const scripts = readJsonObject(join8(packageJsonDir, "package.json"))?.["scripts"];
|
|
4758
|
+
if (scripts !== null && typeof scripts === "object" && typeof scripts[command] === "string") {
|
|
4759
|
+
return true;
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4762
|
+
if (command === "check")
|
|
4763
|
+
return false;
|
|
4764
|
+
const base = join8(cwd, command);
|
|
4765
|
+
if (isFile(base) || RUNNABLE_EXTENSIONS.some((extension) => isFile(`${base}${extension}`)))
|
|
4766
|
+
return true;
|
|
4767
|
+
if (isDirectory(base) && (isFile(join8(base, "package.json")) || RUNNABLE_EXTENSIONS.some((extension) => isFile(join8(base, `index${extension}`))))) {
|
|
4768
|
+
return true;
|
|
4769
|
+
}
|
|
4770
|
+
let dir = resolve11(cwd);
|
|
4771
|
+
for (;; ) {
|
|
4772
|
+
if (BIN_SUFFIXES.some((suffix) => existsSync12(join8(dir, "node_modules", ".bin", `${command}${suffix}`))))
|
|
4773
|
+
return true;
|
|
4774
|
+
const parent = dirname9(dir);
|
|
4775
|
+
if (parent === dir)
|
|
4776
|
+
return false;
|
|
4777
|
+
dir = parent;
|
|
4778
|
+
}
|
|
4779
|
+
}
|
|
4780
|
+
function nearestPackageJsonDir(start) {
|
|
4781
|
+
let dir = resolve11(start);
|
|
4782
|
+
for (;; ) {
|
|
4783
|
+
if (existsSync12(join8(dir, "package.json")))
|
|
4784
|
+
return dir;
|
|
4785
|
+
const parent = dirname9(dir);
|
|
4786
|
+
if (parent === dir)
|
|
4787
|
+
return;
|
|
4788
|
+
dir = parent;
|
|
4789
|
+
}
|
|
4790
|
+
}
|
|
4791
|
+
function binaryIdentity(bunPath) {
|
|
4792
|
+
try {
|
|
4793
|
+
const stats = statSync4(bunPath);
|
|
4794
|
+
return `${stats.mtimeMs}:${stats.size}`;
|
|
4795
|
+
} catch {
|
|
4796
|
+
return "missing";
|
|
4797
|
+
}
|
|
4798
|
+
}
|
|
4799
|
+
function bunHasCommand(bunPath, command, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
4800
|
+
const key = `${bunPath}\x00${binaryIdentity(bunPath)}\x00${command}`;
|
|
4801
|
+
const cached = probeCache.get(key);
|
|
4802
|
+
if (cached !== undefined)
|
|
4803
|
+
return cached;
|
|
4804
|
+
const probe = probeOnce(bunPath, command, timeoutMs).then((answer) => {
|
|
4805
|
+
if (answer === undefined)
|
|
4806
|
+
probeCache.delete(key);
|
|
4807
|
+
return answer === true;
|
|
4808
|
+
});
|
|
4809
|
+
probeCache.set(key, probe);
|
|
4810
|
+
return probe;
|
|
4811
|
+
}
|
|
4812
|
+
async function probeOnce(bunPath, command, timeoutMs) {
|
|
4813
|
+
const emptyDir = mkdtempSync(join8(tmpdir(), "omo-bun-probe-"));
|
|
4814
|
+
const timeout = AbortSignal.timeout(timeoutMs);
|
|
4815
|
+
try {
|
|
4816
|
+
const help = await runBunCommand(bunPath, [command, "--help"], emptyDir, timeout);
|
|
4817
|
+
if (help.exitCode === null)
|
|
4818
|
+
return;
|
|
4819
|
+
if (help.exitCode !== 0)
|
|
4820
|
+
return false;
|
|
4821
|
+
if (command !== "format")
|
|
4822
|
+
return true;
|
|
4823
|
+
const probeFile = join8(emptyDir, "probe.ts");
|
|
4824
|
+
writeFileSync3(probeFile, UNFORMATTED_PROBE);
|
|
4825
|
+
const write = await runBunCommand(bunPath, ["format", "--write", "probe.ts"], emptyDir, timeout);
|
|
4826
|
+
if (write.exitCode === null)
|
|
4827
|
+
return;
|
|
4828
|
+
return write.exitCode === 0 && readFileSync5(probeFile, "utf8") !== UNFORMATTED_PROBE;
|
|
4829
|
+
} catch {
|
|
4830
|
+
return;
|
|
4831
|
+
} finally {
|
|
4832
|
+
rmSync2(emptyDir, { recursive: true, force: true });
|
|
4833
|
+
}
|
|
4834
|
+
}
|
|
4835
|
+
async function resolveBunProjectCommand(command, cwd, options = {}) {
|
|
4836
|
+
if (findBunProjectRoot(cwd, options.homeDir) === undefined)
|
|
4837
|
+
return;
|
|
4838
|
+
if (projectShadowsBunCommand(command, cwd))
|
|
4839
|
+
return;
|
|
4840
|
+
const bunPath = (options.resolveBun ?? defaultResolveBun)(cwd);
|
|
4841
|
+
if (!bunPath)
|
|
4842
|
+
return;
|
|
4843
|
+
return await bunHasCommand(bunPath, command) ? bunPath : undefined;
|
|
4844
|
+
}
|
|
4845
|
+
function defaultResolveBun(cwd) {
|
|
4846
|
+
return resolveServerBinary(["bun"], cwd);
|
|
4847
|
+
}
|
|
4848
|
+
function runBunCommand(bunPath, args, cwd, signal) {
|
|
4849
|
+
signal?.throwIfAborted();
|
|
4850
|
+
const prepared = createSpawnCommand([bunPath, ...args]);
|
|
4851
|
+
return new Promise((resolvePromise, reject) => {
|
|
4852
|
+
const child = spawn2(prepared.command, prepared.args, {
|
|
4853
|
+
cwd,
|
|
4854
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
4855
|
+
shell: prepared.shell,
|
|
4856
|
+
windowsHide: true,
|
|
4857
|
+
detached: process.platform !== "win32"
|
|
4858
|
+
});
|
|
4859
|
+
const stdout = [];
|
|
4860
|
+
const stderr = [];
|
|
4861
|
+
const onAbort = () => killProcessTree(child, "SIGKILL");
|
|
4862
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
4863
|
+
child.stdout?.on("data", (chunk) => stdout.push(chunk));
|
|
4864
|
+
child.stderr?.on("data", (chunk) => stderr.push(chunk));
|
|
4865
|
+
child.once("error", (error) => {
|
|
4866
|
+
signal?.removeEventListener("abort", onAbort);
|
|
4867
|
+
reject(error);
|
|
4868
|
+
});
|
|
4869
|
+
child.once("close", (exitCode) => {
|
|
4870
|
+
signal?.removeEventListener("abort", onAbort);
|
|
4871
|
+
if (signal?.aborted) {
|
|
4872
|
+
reject(signal.reason);
|
|
4873
|
+
return;
|
|
4874
|
+
}
|
|
4875
|
+
resolvePromise({
|
|
4876
|
+
exitCode,
|
|
4877
|
+
stdout: Buffer.concat(stdout).toString("utf8"),
|
|
4878
|
+
stderr: Buffer.concat(stderr).toString("utf8")
|
|
4879
|
+
});
|
|
4880
|
+
});
|
|
4881
|
+
});
|
|
4882
|
+
}
|
|
4883
|
+
|
|
4884
|
+
// ../lsp-core/src/tools/bun-directory-diagnostics.ts
|
|
4885
|
+
var TYPESCRIPT_EXTENSIONS = new Set([".ts", ".tsx", ".mts", ".cts"]);
|
|
4886
|
+
async function runBunDirectoryDiagnostics(absDir, extension, severity, signal, options = {}) {
|
|
4887
|
+
if (!TYPESCRIPT_EXTENSIONS.has(extension))
|
|
4888
|
+
return;
|
|
4889
|
+
const checkBun = await resolveBunProjectCommand("check", absDir, options);
|
|
4890
|
+
if (checkBun === undefined)
|
|
4891
|
+
return;
|
|
4892
|
+
let typecheck;
|
|
4893
|
+
try {
|
|
4894
|
+
const run = await runBunCommand(checkBun, ["check", "--no-pretty", "."], absDir, signal);
|
|
4895
|
+
typecheck = parseBunCheckOutput(run.stdout, absDir);
|
|
4896
|
+
const failedWithoutDiagnostics = run.exitCode === 1 && typecheck.length === 0;
|
|
4897
|
+
if (run.exitCode !== 0 && run.exitCode !== 1 || failedWithoutDiagnostics)
|
|
4898
|
+
return;
|
|
4899
|
+
} catch (error) {
|
|
4900
|
+
if (signal?.aborted)
|
|
4901
|
+
throw error;
|
|
4902
|
+
return;
|
|
4903
|
+
}
|
|
4904
|
+
const header = [`Directory: ${absDir}`, "Typecheck: bun check (files in this directory and everything they import)"];
|
|
4905
|
+
const projectCommands = ["bun check"];
|
|
4906
|
+
const collected = [...typecheck];
|
|
4907
|
+
const lintBun = await resolveBunProjectCommand("lint", absDir, options);
|
|
4908
|
+
if (lintBun !== undefined) {
|
|
4909
|
+
const lint = await runBunLint(lintBun, absDir, signal);
|
|
4910
|
+
header.push(lint.status);
|
|
4911
|
+
projectCommands.push("bun lint");
|
|
4912
|
+
collected.push(...lint.diagnostics);
|
|
4913
|
+
}
|
|
4914
|
+
const diagnostics = collected.filter(({ diagnostic }) => filterDiagnosticsBySeverity([diagnostic], severity).length > 0);
|
|
4915
|
+
const lines = [...header, `Total diagnostics: ${diagnostics.length}`];
|
|
4916
|
+
const shown = diagnostics.slice(0, DEFAULT_MAX_DIAGNOSTICS);
|
|
4917
|
+
if (shown.length > 0) {
|
|
4918
|
+
lines.push("", ...shown.map(({ file, diagnostic }) => `${file}: ${formatDiagnostic(diagnostic)}`));
|
|
4919
|
+
if (diagnostics.length > shown.length) {
|
|
4920
|
+
lines.push("", `... (${diagnostics.length - shown.length} more diagnostics not shown)`);
|
|
4921
|
+
}
|
|
4922
|
+
}
|
|
4923
|
+
return { output: lines.join(`
|
|
4924
|
+
`), diagnostics, projectCommands };
|
|
4925
|
+
}
|
|
4926
|
+
async function runBunLint(bunPath, absDir, signal) {
|
|
4927
|
+
try {
|
|
4928
|
+
const run = await runBunCommand(bunPath, ["lint", "-f", "json", "."], absDir, signal);
|
|
4929
|
+
const diagnostics = run.exitCode === 0 || run.exitCode === 1 ? parseBunLintJson(run.stdout) : undefined;
|
|
4930
|
+
if (diagnostics !== undefined)
|
|
4931
|
+
return { status: "Lint: bun lint", diagnostics };
|
|
4932
|
+
const reason = run.stderr.trim().split(/\r?\n/)[0] ?? "";
|
|
4933
|
+
return { status: `Lint: bun lint could not lint (exit ${run.exitCode ?? "signal"})${reason ? `: ${reason}` : ""}`, diagnostics: [] };
|
|
4934
|
+
} catch (error) {
|
|
4935
|
+
if (signal?.aborted)
|
|
4936
|
+
throw error;
|
|
4937
|
+
return { status: `Lint: bun lint could not run: ${error instanceof Error ? error.message : String(error)}`, diagnostics: [] };
|
|
4938
|
+
}
|
|
4939
|
+
}
|
|
4940
|
+
|
|
4626
4941
|
// ../lsp-core/src/tools/parameters.ts
|
|
4627
4942
|
function isRecord7(value) {
|
|
4628
4943
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -4677,7 +4992,7 @@ function asDiagnosticArray(result) {
|
|
|
4677
4992
|
return result;
|
|
4678
4993
|
return result.items ?? [];
|
|
4679
4994
|
}
|
|
4680
|
-
async function executeLspDiagnostics(params, signal) {
|
|
4995
|
+
async function executeLspDiagnostics(params, signal, bunOptions = {}) {
|
|
4681
4996
|
const filePath = requireString(params, "filePath");
|
|
4682
4997
|
const severity = severityFilter(params);
|
|
4683
4998
|
try {
|
|
@@ -4698,6 +5013,19 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
4698
5013
|
};
|
|
4699
5014
|
return text(message, details);
|
|
4700
5015
|
}
|
|
5016
|
+
const bun = await runBunDirectoryDiagnostics(absPath, extension, severity, signal, bunOptions);
|
|
5017
|
+
if (bun !== undefined) {
|
|
5018
|
+
const details = {
|
|
5019
|
+
filePath,
|
|
5020
|
+
severity,
|
|
5021
|
+
mode: "directory",
|
|
5022
|
+
diagnostics: [...bun.diagnostics],
|
|
5023
|
+
totalDiagnostics: bun.diagnostics.length,
|
|
5024
|
+
truncated: bun.diagnostics.length > DEFAULT_MAX_DIAGNOSTICS,
|
|
5025
|
+
projectCommands: [...bun.projectCommands]
|
|
5026
|
+
};
|
|
5027
|
+
return text(bun.output, details);
|
|
5028
|
+
}
|
|
4701
5029
|
const output = await aggregateDiagnosticsForDirectory(absPath, extension, severity, undefined, signal === undefined ? {} : { signal });
|
|
4702
5030
|
const details = {
|
|
4703
5031
|
filePath,
|
|
@@ -4758,7 +5086,7 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
4758
5086
|
}
|
|
4759
5087
|
}
|
|
4760
5088
|
// ../lsp-core/src/lsp/format-document.ts
|
|
4761
|
-
import { readFileSync as
|
|
5089
|
+
import { readFileSync as readFileSync6, renameSync as renameSync3, unlinkSync, writeFileSync as writeFileSync4 } from "node:fs";
|
|
4762
5090
|
var DEFAULT_FORMATTING_OPTIONS = {
|
|
4763
5091
|
tabSize: 4,
|
|
4764
5092
|
insertSpaces: false,
|
|
@@ -4773,7 +5101,7 @@ async function formatDocumentWithClient(client, filePath, options = {}) {
|
|
|
4773
5101
|
return { status: "unavailable", reason: "capability_not_advertised" };
|
|
4774
5102
|
if (edits.length === 0)
|
|
4775
5103
|
return UNCHANGED;
|
|
4776
|
-
const before =
|
|
5104
|
+
const before = readFileSync6(filePath, "utf-8");
|
|
4777
5105
|
const normalized = normalizeTextEdits(before, edits, 0);
|
|
4778
5106
|
if (normalized.text === before)
|
|
4779
5107
|
return UNCHANGED;
|
|
@@ -4796,7 +5124,7 @@ function lineDelta(edits) {
|
|
|
4796
5124
|
}
|
|
4797
5125
|
function writeAtomically(filePath, content) {
|
|
4798
5126
|
const tempPath = `${filePath}.omo-format.tmp`;
|
|
4799
|
-
|
|
5127
|
+
writeFileSync4(tempPath, content, "utf-8");
|
|
4800
5128
|
try {
|
|
4801
5129
|
renameSync3(tempPath, filePath);
|
|
4802
5130
|
} catch (error) {
|
|
@@ -5101,7 +5429,7 @@ var LSP_MCP_TOOLS = [
|
|
|
5101
5429
|
name: "diagnostics",
|
|
5102
5430
|
aliases: ["lsp_diagnostics"],
|
|
5103
5431
|
title: "LSP Diagnostics",
|
|
5104
|
-
description: "Get errors, warnings, and hints for a source file or directory.",
|
|
5432
|
+
description: "Get errors, warnings, and hints for a source file or directory. In a Bun project, a TypeScript directory is typechecked with `bun check`, plus `bun lint` when the installed Bun has it.",
|
|
5105
5433
|
inputSchema: objectSchema({
|
|
5106
5434
|
filePath: { type: "string", description: "File or directory path to check." },
|
|
5107
5435
|
severity: {
|
|
@@ -7288,9 +7288,11 @@ var OmoMemoryAgentOverridesSchema = object({
|
|
|
7288
7288
|
projection: OmoMemoryProjectionLayerSchema.optional(),
|
|
7289
7289
|
compile_warn_tokens: number2().int().positive().optional()
|
|
7290
7290
|
}).strict();
|
|
7291
|
+
var OmoMemoryAutoIdentitySchema = _enum(["path", "git"]);
|
|
7291
7292
|
var OmoMemorySettingsSchema = object({
|
|
7292
7293
|
enabled: boolean2().default(true),
|
|
7293
7294
|
agent: string2().min(1).default("auto"),
|
|
7295
|
+
auto_identity: OmoMemoryAutoIdentitySchema.default("path"),
|
|
7294
7296
|
reflection: OmoMemoryReflectionSchema.default({
|
|
7295
7297
|
enabled: true,
|
|
7296
7298
|
trigger: { step_count: 25, on_compaction: true },
|
|
@@ -7332,6 +7334,7 @@ var OmoMemorySettingsSchema = object({
|
|
|
7332
7334
|
var OmoMemorySettingsLayerSchema = object({
|
|
7333
7335
|
enabled: boolean2().optional(),
|
|
7334
7336
|
agent: string2().min(1).optional(),
|
|
7337
|
+
auto_identity: OmoMemoryAutoIdentitySchema.optional(),
|
|
7335
7338
|
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
7336
7339
|
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
7337
7340
|
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
@@ -7370,6 +7373,7 @@ function isRecord6(value) {
|
|
|
7370
7373
|
}
|
|
7371
7374
|
var OmoModelProfileInputSchema = object({
|
|
7372
7375
|
display_name: string2().optional(),
|
|
7376
|
+
caution: string2().optional(),
|
|
7373
7377
|
family: _enum(["daily", "geeky"]).optional(),
|
|
7374
7378
|
tier: _enum(["normal", "heavy"]).optional(),
|
|
7375
7379
|
models: array(union([string2(), OmoFallbackModelObjectSchema])).optional()
|
|
@@ -7641,6 +7645,7 @@ var OmoGatewaySectionSchema = record(string2(), unknown()).describe("Chat-surfac
|
|
|
7641
7645
|
// ../../omo-config-core/src/schema/config.ts
|
|
7642
7646
|
var OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
|
|
7643
7647
|
var OmoDisabledSkillsSchema = array(string2());
|
|
7648
|
+
var OmoExcludedModelsSchema = array(string2());
|
|
7644
7649
|
var OmoTypedHarnessConfigSchema = object({
|
|
7645
7650
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
7646
7651
|
gateway: OmoGatewaySectionSchema.optional(),
|
|
@@ -7656,7 +7661,8 @@ var OmoTypedHarnessConfigSchema = object({
|
|
|
7656
7661
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
7657
7662
|
side_panel: OmoSidePanelSettingsLayerSchema.optional(),
|
|
7658
7663
|
computer: OmoComputerSettingsLayerSchema.optional(),
|
|
7659
|
-
disabled_skills: OmoDisabledSkillsSchema.optional()
|
|
7664
|
+
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
7665
|
+
exclude_models: OmoExcludedModelsSchema.optional()
|
|
7660
7666
|
}).strict();
|
|
7661
7667
|
var OmoConfigProfileSchema = object({
|
|
7662
7668
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
@@ -7673,6 +7679,7 @@ var OmoConfigProfileSchema = object({
|
|
|
7673
7679
|
side_panel: OmoSidePanelSettingsLayerSchema.optional(),
|
|
7674
7680
|
computer: OmoComputerSettingsLayerSchema.optional(),
|
|
7675
7681
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
7682
|
+
exclude_models: OmoExcludedModelsSchema.optional(),
|
|
7676
7683
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
7677
7684
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
7678
7685
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -7695,6 +7702,7 @@ var OmoConfigSchema = object({
|
|
|
7695
7702
|
side_panel: OmoSidePanelSettingsSchema.optional(),
|
|
7696
7703
|
computer: OmoComputerSettingsSchema.optional(),
|
|
7697
7704
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
7705
|
+
exclude_models: OmoExcludedModelsSchema.optional(),
|
|
7698
7706
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
7699
7707
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
7700
7708
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -7720,6 +7728,7 @@ var OmoConfigLayerSchema = object({
|
|
|
7720
7728
|
side_panel: OmoSidePanelSettingsLayerSchema.optional(),
|
|
7721
7729
|
computer: OmoComputerSettingsLayerSchema.optional(),
|
|
7722
7730
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
7731
|
+
exclude_models: OmoExcludedModelsSchema.optional(),
|
|
7723
7732
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
7724
7733
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
7725
7734
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -7843,6 +7852,50 @@ var DEFAULT_READ_FILE_SYSTEM = {
|
|
|
7843
7852
|
realpathSync
|
|
7844
7853
|
};
|
|
7845
7854
|
|
|
7855
|
+
// ../../omo-config-core/src/loader/disabled-skills.ts
|
|
7856
|
+
function toRecord(value) {
|
|
7857
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
7858
|
+
return;
|
|
7859
|
+
return value;
|
|
7860
|
+
}
|
|
7861
|
+
function namesAt(record, key) {
|
|
7862
|
+
const value = record?.[key];
|
|
7863
|
+
if (!Array.isArray(value))
|
|
7864
|
+
return [];
|
|
7865
|
+
return value.filter((entry) => typeof entry === "string" && entry.trim() !== "");
|
|
7866
|
+
}
|
|
7867
|
+
function harnessBlockKeys(harness) {
|
|
7868
|
+
const canonical = canonicalHarnessName(harness);
|
|
7869
|
+
const legacy = Object.entries(OMO_CONFIG_LEGACY_HARNESS_ALIASES).filter(([, target]) => target === canonical).map(([name]) => harnessBlockKey(name));
|
|
7870
|
+
return [harnessBlockKey(canonical), ...legacy];
|
|
7871
|
+
}
|
|
7872
|
+
function scopesOf(config, harness) {
|
|
7873
|
+
if (harness === undefined)
|
|
7874
|
+
return [config];
|
|
7875
|
+
return [config, ...harnessBlockKeys(harness).map((key) => toRecord(config[key]))];
|
|
7876
|
+
}
|
|
7877
|
+
function collectExcludedModels(options) {
|
|
7878
|
+
return collectUnionedList("exclude_models", options);
|
|
7879
|
+
}
|
|
7880
|
+
function collectUnionedList(key, options) {
|
|
7881
|
+
const names = new Set;
|
|
7882
|
+
for (const layer of options.layers) {
|
|
7883
|
+
const config = toRecord(layer.config);
|
|
7884
|
+
if (config === undefined)
|
|
7885
|
+
continue;
|
|
7886
|
+
const profile = options.profile === undefined ? undefined : toRecord(toRecord(config["profiles"])?.[options.profile]);
|
|
7887
|
+
const scopes = [
|
|
7888
|
+
...scopesOf(config, options.harness),
|
|
7889
|
+
...profile === undefined ? [] : scopesOf(profile, options.harness)
|
|
7890
|
+
];
|
|
7891
|
+
for (const scope of scopes) {
|
|
7892
|
+
for (const name of namesAt(scope, key))
|
|
7893
|
+
names.add(name.trim());
|
|
7894
|
+
}
|
|
7895
|
+
}
|
|
7896
|
+
return [...names];
|
|
7897
|
+
}
|
|
7898
|
+
|
|
7846
7899
|
// ../../../node_modules/.bun/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
7847
7900
|
function createScanner(text, ignoreTrivia = false) {
|
|
7848
7901
|
const len = text.length;
|
|
@@ -8915,7 +8968,7 @@ function stripUnrecognizedKeys(record, issues) {
|
|
|
8915
8968
|
}
|
|
8916
8969
|
return { issuePaths, stripped };
|
|
8917
8970
|
}
|
|
8918
|
-
function
|
|
8971
|
+
function toRecord2(value) {
|
|
8919
8972
|
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
8920
8973
|
return null;
|
|
8921
8974
|
const record = {};
|
|
@@ -8930,7 +8983,7 @@ var validateLayerRecord = (record) => {
|
|
|
8930
8983
|
};
|
|
8931
8984
|
function validateConfigLayer(path, data) {
|
|
8932
8985
|
const sanitized = sanitizeUnsafeKeys(data);
|
|
8933
|
-
const record =
|
|
8986
|
+
const record = toRecord2(sanitized.value);
|
|
8934
8987
|
const unsafeIssuePaths = sanitized.issues.flatMap((issue) => issue.keys.map((key) => [...issue.path, key].join(".")));
|
|
8935
8988
|
const unsafeDiagnostics = unsafeIssuePaths.length === 0 ? [] : [{ kind: "unknown-keys", message: `Ignored unknown keys in ${path}: ${unsafeIssuePaths.join(", ")}`, path, issuePaths: unsafeIssuePaths }];
|
|
8936
8989
|
const validation = OmoConfigLayerSchema.safeParse(sanitized.value);
|
|
@@ -9070,7 +9123,7 @@ function resolveOmoProfileName(options = {}) {
|
|
|
9070
9123
|
const env = options.env ?? process.env;
|
|
9071
9124
|
return profileName(options.profile) ?? profileName(env["OMO_PROFILE"]) ?? profileName(env["OCX_PROFILE"]) ?? profileNameFromOpenCodeConfigDir(env["OPENCODE_CONFIG_DIR"]);
|
|
9072
9125
|
}
|
|
9073
|
-
function
|
|
9126
|
+
function toRecord3(value) {
|
|
9074
9127
|
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
9075
9128
|
return;
|
|
9076
9129
|
return Object.fromEntries(Object.entries(value));
|
|
@@ -9091,13 +9144,13 @@ function harnessLayer(config, harness) {
|
|
|
9091
9144
|
const legacyKeys = Object.entries(OMO_CONFIG_LEGACY_HARNESS_ALIASES).filter(([, target]) => target === canonical).map(([legacy]) => harnessBlockKey(legacy));
|
|
9092
9145
|
let layer = {};
|
|
9093
9146
|
for (const key of [...legacyKeys, harnessBlockKey(canonical)]) {
|
|
9094
|
-
layer = mergeOmoConfigRecords(layer,
|
|
9147
|
+
layer = mergeOmoConfigRecords(layer, toRecord3(config[key]) ?? {});
|
|
9095
9148
|
}
|
|
9096
9149
|
return layer;
|
|
9097
9150
|
}
|
|
9098
9151
|
function resolveOmoConfigView(options) {
|
|
9099
|
-
const profiles =
|
|
9100
|
-
const profile = options.profile === undefined ? undefined :
|
|
9152
|
+
const profiles = toRecord3(options.config["profiles"]);
|
|
9153
|
+
const profile = options.profile === undefined ? undefined : toRecord3(profiles?.[options.profile]);
|
|
9101
9154
|
const diagnostics = profile === undefined && options.profile !== undefined ? [{
|
|
9102
9155
|
kind: "profile",
|
|
9103
9156
|
message: `Activated omo profile "${options.profile}" does not exist; using the base configuration`,
|
|
@@ -9238,9 +9291,15 @@ function loadOmoConfig(options = {}) {
|
|
|
9238
9291
|
});
|
|
9239
9292
|
const finalInput = mergeOmoConfigRecords(DEFAULT_RAW_CONFIG, resolved.config);
|
|
9240
9293
|
const finalConfig = OmoConfigSchema.safeParse(finalInput);
|
|
9294
|
+
const excludeModels = collectExcludedModels({
|
|
9295
|
+
layers,
|
|
9296
|
+
...options.harness === undefined ? {} : { harness: options.harness },
|
|
9297
|
+
...resolved.profile === undefined ? {} : { profile: resolved.profile }
|
|
9298
|
+
});
|
|
9299
|
+
const withExcludedModels = (config) => excludeModels.length === 0 ? config : { ...config, exclude_models: [...excludeModels] };
|
|
9241
9300
|
if (finalConfig.success) {
|
|
9242
9301
|
return {
|
|
9243
|
-
config: stripResolutionControlKeys(finalConfig.data),
|
|
9302
|
+
config: withExcludedModels(stripResolutionControlKeys(finalConfig.data)),
|
|
9244
9303
|
diagnostics: [...diagnostics, ...resolved.diagnostics],
|
|
9245
9304
|
layers,
|
|
9246
9305
|
...resolved.profile === undefined ? {} : { profile: resolved.profile },
|
|
@@ -9253,7 +9312,7 @@ function loadOmoConfig(options = {}) {
|
|
|
9253
9312
|
});
|
|
9254
9313
|
if (pruned.ok) {
|
|
9255
9314
|
return {
|
|
9256
|
-
config: stripResolutionControlKeys(OmoConfigSchema.parse(pruned.config)),
|
|
9315
|
+
config: withExcludedModels(stripResolutionControlKeys(OmoConfigSchema.parse(pruned.config))),
|
|
9257
9316
|
diagnostics: [...diagnostics, ...resolved.diagnostics, ...invalidValueDiagnostics(MERGED_OMO_CONFIG_PATH, pruned.dropped)],
|
|
9258
9317
|
layers,
|
|
9259
9318
|
...resolved.profile === undefined ? {} : { profile: resolved.profile },
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
|
|
9
9
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
|
|
10
10
|
"timeout": 30,
|
|
11
|
-
"statusMessage": "(OmO 5.1.
|
|
11
|
+
"statusMessage": "(OmO 5.1.43) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
|
|
10
10
|
"timeout": 5,
|
|
11
|
-
"statusMessage": "(OmO 5.1.
|
|
11
|
+
"statusMessage": "(OmO 5.1.43) Recommending Git Bash MCP"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "command",
|
|
21
21
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
22
22
|
"timeout": 5,
|
|
23
|
-
"statusMessage": "(OmO 5.1.
|
|
23
|
+
"statusMessage": "(OmO 5.1.43) Resetting Git Bash MCP Reminder"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
10
10
|
"timeout": 10,
|
|
11
|
-
"statusMessage": "(OmO 5.1.
|
|
11
|
+
"statusMessage": "(OmO 5.1.43) Verifying LazyCodex Executor Evidence"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|