Fix architecture review findings and align CLI metadata

This commit is contained in:
gitea committed 2026-10-17 20:17:06 +08:00
1 parent 780a4ba9c0
commit 50e4e492b4
83 files changed
+966 -792

No files matched your search

+4 -4
View File
@@ -2,7 +2,6 @@ import { existsSync, symlinkSync } from "node:fs";
import { homedir } from "node:os";
import { basename, dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { syncGlobalSkillIfPresent } from "./embedded-skill.js";
export function isCompiledBinary(execPath = process.execPath, metaUrl = import.meta.url): boolean {
if (metaUrl.includes("/$bunfs/") || metaUrl.includes("\\$bunfs\\")) {
@@ -42,10 +41,10 @@ export function resolveDefaultLauncher(
};
}
export function performRuntimeSelfHealing(): {
export async function performRuntimeSelfHealing(): Promise<{
binaryHealed?: boolean;
skillHealed?: boolean;
} {
}> {
const result: { binaryHealed?: boolean; skillHealed?: boolean } = {};
// 1. Binary executable alias self-healing
@@ -77,7 +76,8 @@ export function performRuntimeSelfHealing(): {
try {
const legacySkillDir = join(homedir(), ".agents", "skills", "seal-home");
if (existsSync(legacySkillDir)) {
syncGlobalSkillIfPresent();
// Ordinary discovery must not initialize the embedded resource graph.
(await import("./embedded-skill.js")).syncGlobalSkillIfPresent();
result.skillHealed = true;
}
} catch {