@cortexkit/aft 0.31.0 → 0.31.1
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/dist/adapters/opencode.d.ts.map +1 -1
- package/dist/adapters/pi.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +3 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/index.js +294 -46
- package/dist/lib/diagnostics.d.ts +11 -0
- package/dist/lib/diagnostics.d.ts.map +1 -1
- package/dist/lib/onnx.d.ts.map +1 -1
- package/dist/lib/paths.d.ts +1 -0
- package/dist/lib/paths.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAoFpB,qBAAa,eAAgB,YAAW,cAAc;IACpD,QAAQ,CAAC,IAAI,EAAG,UAAU,CAAU;IACpC,QAAQ,CAAC,WAAW,cAAc;IAClC,QAAQ,CAAC,iBAAiB,6BAAe;IACzC,QAAQ,CAAC,sBAAsB,oCAAgB;IAE/C,WAAW,IAAI,OAAO;IAStB,cAAc,IAAI,MAAM,GAAG,IAAI;IAQ/B,iBAAiB,IAAI,kBAAkB;IAgBvC,cAAc,IAAI,OAAO;IAOnB,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAkDrD,kBAAkB,IAAI,eAAe;IA0BrC,aAAa,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAoFpB,qBAAa,eAAgB,YAAW,cAAc;IACpD,QAAQ,CA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62
|
export declare function clearOldBinaries(): BinaryCacheClearResult;
|
|
63
63
|
export interface DoctorFixPlanItem {
|
|
64
|
-
kind: "plugin" | "binary" | "onnx";
|
|
64
|
+
kind: "plugin" | "binary" | "onnx" | "storage";
|
|
65
65
|
message: string;
|
|
66
66
|
}
|
|
67
67
|
export declare function buildDoctorFixPlan(adapters: HarnessAdapter[], report: DiagnosticReport): DoctorFixPlanItem[];
|
|
68
68
|
export declare function shouldSkipDoctorFixConfirmation(argv: string[]): boolean;
|
|
69
|
+
export declare function doctorSkewBinaryDownloadDecision(argv: string[]): "prompt" | "proceed" | "skip";
|
|
70
|
+
export declare function formatDoctorStorageStatus(h: DiagnosticReport["harnesses"][number]): string;
|
|
69
71
|
export declare function fixPluginEntries(adapters: HarnessAdapter[]): Promise<void>;
|
|
70
72
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAEL,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAEL,KAAK,gBAAgB,EAKtB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAMvE,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,WAAW,GAAG,cAAc,CAAC;AAE9E,eAAO,MAAM,2BAA2B,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,EAapF,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,EAAqB,CAAC;AAEhF,M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AE,CAAC;IAC1C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CAsDzD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,EAAE,EAC1B,MAAM,EAAE,gBAAgB,GACvB,iBAAiB,EAAE,CAwDrB;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAIvE;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAK9F;AA4JD,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAK1F;AAsGD,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhF"}
|
package/dist/index.js
CHANGED
|
@@ -7948,6 +7948,22 @@ function getAftLspBinariesDir() {
|
|
|
7948
7948
|
const base = process.env.XDG_CACHE_HOME || join2(homedir(), ".cache");
|
|
7949
7949
|
return join2(base, "aft", "lsp-binaries");
|
|
7950
7950
|
}
|
|
7951
|
+
function homeDir() {
|
|
7952
|
+
if (process.platform === "win32")
|
|
7953
|
+
return process.env.USERPROFILE || process.env.HOME || homedir();
|
|
7954
|
+
return process.env.HOME || homedir();
|
|
7955
|
+
}
|
|
7956
|
+
function dataHome() {
|
|
7957
|
+
if (process.env.XDG_DATA_HOME)
|
|
7958
|
+
return process.env.XDG_DATA_HOME;
|
|
7959
|
+
if (process.platform === "win32") {
|
|
7960
|
+
return process.env.LOCALAPPDATA || process.env.APPDATA || join2(homeDir(), "AppData", "Local");
|
|
7961
|
+
}
|
|
7962
|
+
return join2(homeDir(), ".local", "share");
|
|
7963
|
+
}
|
|
7964
|
+
function getCortexKitStorageRoot() {
|
|
7965
|
+
return join2(dataHome(), "cortexkit", "aft");
|
|
7966
|
+
}
|
|
7951
7967
|
function getTmpLogPath(filename) {
|
|
7952
7968
|
return join2(tmpdir(), filename);
|
|
7953
7969
|
}
|
|
@@ -8143,8 +8159,7 @@ class OpenCodeAdapter {
|
|
|
8143
8159
|
};
|
|
8144
8160
|
}
|
|
8145
8161
|
getStorageDir() {
|
|
8146
|
-
|
|
8147
|
-
return join3(xdg, "opencode", "storage", "plugin", "aft");
|
|
8162
|
+
return getCortexKitStorageRoot();
|
|
8148
8163
|
}
|
|
8149
8164
|
getLogFile() {
|
|
8150
8165
|
return getTmpLogPath("aft-plugin.log");
|
|
@@ -8395,7 +8410,7 @@ class PiAdapter {
|
|
|
8395
8410
|
};
|
|
8396
8411
|
}
|
|
8397
8412
|
getStorageDir() {
|
|
8398
|
-
return
|
|
8413
|
+
return getCortexKitStorageRoot();
|
|
8399
8414
|
}
|
|
8400
8415
|
getLogFile() {
|
|
8401
8416
|
return getTmpLogPath("aft-pi.log");
|
|
@@ -10914,7 +10929,7 @@ var init_lsp_cache = __esm(() => {
|
|
|
10914
10929
|
|
|
10915
10930
|
// src/lib/onnx.ts
|
|
10916
10931
|
import { existsSync as existsSync10, readdirSync as readdirSync5, readlinkSync, realpathSync, statSync as statSync6 } from "node:fs";
|
|
10917
|
-
import { join as join9 } from "node:path";
|
|
10932
|
+
import { isAbsolute, join as join9, win32 } from "node:path";
|
|
10918
10933
|
function getOnnxLibraryName() {
|
|
10919
10934
|
if (process.platform === "darwin")
|
|
10920
10935
|
return "libonnxruntime.dylib";
|
|
@@ -10943,11 +10958,38 @@ function getManualInstallHint() {
|
|
|
10943
10958
|
}
|
|
10944
10959
|
return "ONNX Runtime must be installed manually for this platform";
|
|
10945
10960
|
}
|
|
10961
|
+
function pathEnvValue() {
|
|
10962
|
+
return process.env.PATH ?? process.env.Path ?? process.env.path ?? "";
|
|
10963
|
+
}
|
|
10964
|
+
function pathEntriesForPlatform() {
|
|
10965
|
+
const delimiter = process.platform === "win32" ? ";" : ":";
|
|
10966
|
+
return pathEnvValue().split(delimiter).map((entry) => entry.trim().replace(/^"|"$/g, "")).filter((entry) => {
|
|
10967
|
+
if (!entry || entry === "." || entry.includes("\x00"))
|
|
10968
|
+
return false;
|
|
10969
|
+
return isAbsolute(entry) || win32.isAbsolute(entry);
|
|
10970
|
+
});
|
|
10971
|
+
}
|
|
10972
|
+
function directoryContainsLibrary(dir, libName) {
|
|
10973
|
+
try {
|
|
10974
|
+
const entries = readdirSync5(dir);
|
|
10975
|
+
if (process.platform === "win32") {
|
|
10976
|
+
const expected = libName.toLowerCase();
|
|
10977
|
+
return entries.some((entry) => entry.toLowerCase() === expected);
|
|
10978
|
+
}
|
|
10979
|
+
return entries.includes(libName);
|
|
10980
|
+
} catch {
|
|
10981
|
+
return false;
|
|
10982
|
+
}
|
|
10983
|
+
}
|
|
10946
10984
|
function findSystemOnnxRuntime() {
|
|
10947
10985
|
const libName = getOnnxLibraryName();
|
|
10948
|
-
const searchPaths = process.platform === "darwin" ? ["/opt/homebrew/lib", "/usr/local/lib"] : process.platform === "linux" ? ["/usr/lib", "/usr/lib/x86_64-linux-gnu", "/usr/lib/aarch64-linux-gnu", "/usr/local/lib"] : [];
|
|
10986
|
+
const searchPaths = process.platform === "darwin" ? ["/opt/homebrew/lib", "/usr/local/lib"] : process.platform === "linux" ? ["/usr/lib", "/usr/lib/x86_64-linux-gnu", "/usr/lib/aarch64-linux-gnu", "/usr/local/lib"] : process.platform === "win32" ? pathEntriesForPlatform() : [];
|
|
10987
|
+
const seen = new Set;
|
|
10949
10988
|
for (const path of searchPaths) {
|
|
10950
|
-
if (
|
|
10989
|
+
if (seen.has(path))
|
|
10990
|
+
continue;
|
|
10991
|
+
seen.add(path);
|
|
10992
|
+
if (directoryContainsLibrary(path, libName))
|
|
10951
10993
|
return path;
|
|
10952
10994
|
}
|
|
10953
10995
|
return null;
|
|
@@ -11061,6 +11103,7 @@ async function diagnoseHarness(adapter) {
|
|
|
11061
11103
|
const aftFlags = sanitizeValue(aftConfigRead.value ?? {}) ?? {};
|
|
11062
11104
|
const storage = adapter.getStorageDir();
|
|
11063
11105
|
const logPath = adapter.getLogFile();
|
|
11106
|
+
const pluginCache = adapter.getPluginCacheInfo();
|
|
11064
11107
|
const describeStorage = "describeStorageSubtrees" in adapter && typeof adapter.describeStorageSubtrees === "function" ? adapter.describeStorageSubtrees() : {};
|
|
11065
11108
|
const semanticEnabled = aftConfigRead.value?.semantic_search === true || aftConfigRead.value?.experimental_semantic_search === true;
|
|
11066
11109
|
const systemOrtDir = findSystemOnnxRuntime();
|
|
@@ -11079,7 +11122,7 @@ async function diagnoseHarness(adapter) {
|
|
|
11079
11122
|
...aftConfigRead.error ? { parseError: aftConfigRead.error } : {},
|
|
11080
11123
|
flags: aftFlags
|
|
11081
11124
|
},
|
|
11082
|
-
pluginCache
|
|
11125
|
+
pluginCache,
|
|
11083
11126
|
storageDir: {
|
|
11084
11127
|
path: storage,
|
|
11085
11128
|
exists: existsSync11(storage),
|
|
@@ -11111,12 +11154,21 @@ function renderDiagnosticsMarkdown(report) {
|
|
|
11111
11154
|
lines.push(`- AFT binary: ${report.binaryVersion ?? "unknown"}`);
|
|
11112
11155
|
lines.push(`- OS: ${report.platform} ${report.arch}`);
|
|
11113
11156
|
lines.push(`- Node: ${report.nodeVersion}`);
|
|
11157
|
+
const issues = collectDiagnosticIssues(report);
|
|
11158
|
+
if (issues.length > 0) {
|
|
11159
|
+
lines.push("");
|
|
11160
|
+
lines.push("### Issues found");
|
|
11161
|
+
for (const issue of issues) {
|
|
11162
|
+
lines.push(`- **${issue.severity.toUpperCase()}** ${issue.scope}: ${issue.message} Remediation: ${issue.remediation}`);
|
|
11163
|
+
}
|
|
11164
|
+
}
|
|
11114
11165
|
for (const h of report.harnesses) {
|
|
11115
11166
|
lines.push("");
|
|
11116
11167
|
lines.push(`### ${h.displayName}`);
|
|
11117
11168
|
lines.push(`- Host installed: ${h.hostInstalled}`);
|
|
11118
11169
|
lines.push(`- Host version: ${h.hostVersion ?? "unknown"}`);
|
|
11119
11170
|
lines.push(`- Plugin registered: ${h.pluginRegistered}`);
|
|
11171
|
+
lines.push(`- Plugin version: ${h.pluginCache.cached ?? "not installed"}`);
|
|
11120
11172
|
lines.push(`- AFT config parse error: ${h.aftConfig.parseError ?? "none"}`);
|
|
11121
11173
|
lines.push("");
|
|
11122
11174
|
lines.push("#### Config paths");
|
|
@@ -11160,6 +11212,130 @@ function renderDiagnosticsMarkdown(report) {
|
|
|
11160
11212
|
return lines.join(`
|
|
11161
11213
|
`);
|
|
11162
11214
|
}
|
|
11215
|
+
function normalizeVersion(version) {
|
|
11216
|
+
return version.trim().replace(/^v/, "");
|
|
11217
|
+
}
|
|
11218
|
+
function compareLooseSemver(a, b) {
|
|
11219
|
+
const aParts = normalizeVersion(a).split(/[.-]/).slice(0, 3).map((part) => Number.parseInt(part, 10));
|
|
11220
|
+
const bParts = normalizeVersion(b).split(/[.-]/).slice(0, 3).map((part) => Number.parseInt(part, 10));
|
|
11221
|
+
for (let i = 0;i < 3; i += 1) {
|
|
11222
|
+
const av = Number.isFinite(aParts[i]) ? aParts[i] : 0;
|
|
11223
|
+
const bv = Number.isFinite(bParts[i]) ? bParts[i] : 0;
|
|
11224
|
+
if (av !== bv)
|
|
11225
|
+
return av - bv;
|
|
11226
|
+
}
|
|
11227
|
+
return 0;
|
|
11228
|
+
}
|
|
11229
|
+
function pluginPackageNameForHarness(kind) {
|
|
11230
|
+
if (kind === "pi")
|
|
11231
|
+
return "@cortexkit/aft-pi";
|
|
11232
|
+
return "@cortexkit/aft-opencode";
|
|
11233
|
+
}
|
|
11234
|
+
function pluginVersionSkewIssue(harness, cliVersion) {
|
|
11235
|
+
const pluginVersion = harness.pluginCache.cached;
|
|
11236
|
+
if (!pluginVersion)
|
|
11237
|
+
return null;
|
|
11238
|
+
if (normalizeVersion(pluginVersion) === normalizeVersion(cliVersion))
|
|
11239
|
+
return null;
|
|
11240
|
+
const relation = compareLooseSemver(pluginVersion, cliVersion) < 0 ? "older than" : "different from";
|
|
11241
|
+
const packageName = pluginPackageNameForHarness(harness.kind);
|
|
11242
|
+
return {
|
|
11243
|
+
code: "plugin_cli_version_skew",
|
|
11244
|
+
severity: "high",
|
|
11245
|
+
scope: harness.displayName,
|
|
11246
|
+
message: relation === "older than" ? `Plugin version (${pluginVersion}) is older than CLI (${cliVersion}). New binary cache won't be used until you update the plugin.` : `Plugin version (${pluginVersion}) does not match CLI (${cliVersion}). New binary cache may not be used until the plugin and CLI match.`,
|
|
11247
|
+
remediation: `Update \`${packageName}\` in your harness config to \`@latest\`.`
|
|
11248
|
+
};
|
|
11249
|
+
}
|
|
11250
|
+
function collectDiagnosticIssues(report) {
|
|
11251
|
+
const issues = [];
|
|
11252
|
+
if (!report.binaryVersion) {
|
|
11253
|
+
issues.push({
|
|
11254
|
+
code: "binary_missing",
|
|
11255
|
+
severity: "high",
|
|
11256
|
+
scope: "AFT binary",
|
|
11257
|
+
message: `No aft binary matching CLI ${report.cliVersion} was detected.`,
|
|
11258
|
+
remediation: "Run `aft doctor --fix` to download the matching binary, or start an AFT-enabled session to trigger plugin-side install."
|
|
11259
|
+
});
|
|
11260
|
+
}
|
|
11261
|
+
for (const h of report.harnesses) {
|
|
11262
|
+
if (!h.hostInstalled) {
|
|
11263
|
+
issues.push({
|
|
11264
|
+
code: "host_missing",
|
|
11265
|
+
severity: "high",
|
|
11266
|
+
scope: h.displayName,
|
|
11267
|
+
message: "Host CLI is not installed or is not on PATH.",
|
|
11268
|
+
remediation: `Install ${h.displayName} and rerun \`aft doctor\`.`
|
|
11269
|
+
});
|
|
11270
|
+
continue;
|
|
11271
|
+
}
|
|
11272
|
+
if (!h.pluginRegistered) {
|
|
11273
|
+
issues.push({
|
|
11274
|
+
code: "plugin_missing",
|
|
11275
|
+
severity: "medium",
|
|
11276
|
+
scope: h.displayName,
|
|
11277
|
+
message: "AFT plugin is not registered with this harness.",
|
|
11278
|
+
remediation: "Run `aft setup` or `aft doctor --fix` to register the plugin."
|
|
11279
|
+
});
|
|
11280
|
+
}
|
|
11281
|
+
if (h.aftConfig.parseError) {
|
|
11282
|
+
issues.push({
|
|
11283
|
+
code: "config_parse_error",
|
|
11284
|
+
severity: "high",
|
|
11285
|
+
scope: h.displayName,
|
|
11286
|
+
message: `AFT config parse error: ${h.aftConfig.parseError}`,
|
|
11287
|
+
remediation: `Fix JSON/JSONC syntax in ${h.configPaths.aftConfig}.`
|
|
11288
|
+
});
|
|
11289
|
+
}
|
|
11290
|
+
const skewIssue = pluginVersionSkewIssue(h, report.cliVersion);
|
|
11291
|
+
if (skewIssue)
|
|
11292
|
+
issues.push(skewIssue);
|
|
11293
|
+
if (h.onnxRuntime.required) {
|
|
11294
|
+
if (!h.onnxRuntime.cachedPath && !h.onnxRuntime.systemPath) {
|
|
11295
|
+
issues.push({
|
|
11296
|
+
code: "onnx_missing",
|
|
11297
|
+
severity: "medium",
|
|
11298
|
+
scope: h.displayName,
|
|
11299
|
+
message: "ONNX Runtime is required for semantic search but was not detected.",
|
|
11300
|
+
remediation: `Run \`aft doctor --fix\` or install ONNX Runtime manually (${h.onnxRuntime.installHint}).`
|
|
11301
|
+
});
|
|
11302
|
+
}
|
|
11303
|
+
if (h.onnxRuntime.cachedCompatible === false) {
|
|
11304
|
+
issues.push({
|
|
11305
|
+
code: "onnx_incompatible",
|
|
11306
|
+
severity: "medium",
|
|
11307
|
+
scope: h.displayName,
|
|
11308
|
+
message: `Cached ONNX Runtime ${h.onnxRuntime.cachedVersion ?? "unknown"} is incompatible (requires ${h.onnxRuntime.requirement}).`,
|
|
11309
|
+
remediation: "Run `aft doctor --fix` to refresh AFT-managed ONNX Runtime state."
|
|
11310
|
+
});
|
|
11311
|
+
}
|
|
11312
|
+
if (h.onnxRuntime.systemCompatible === false) {
|
|
11313
|
+
issues.push({
|
|
11314
|
+
code: "onnx_incompatible",
|
|
11315
|
+
severity: "medium",
|
|
11316
|
+
scope: h.displayName,
|
|
11317
|
+
message: `System ONNX Runtime ${h.onnxRuntime.systemVersion ?? "unknown"} is incompatible (requires ${h.onnxRuntime.requirement}).`,
|
|
11318
|
+
remediation: "Install a compatible ONNX Runtime or let AFT use its managed runtime."
|
|
11319
|
+
});
|
|
11320
|
+
}
|
|
11321
|
+
}
|
|
11322
|
+
}
|
|
11323
|
+
return issues;
|
|
11324
|
+
}
|
|
11325
|
+
function findPluginCliVersionSkews(report) {
|
|
11326
|
+
return collectDiagnosticIssues(report).filter((issue) => issue.code === "plugin_cli_version_skew");
|
|
11327
|
+
}
|
|
11328
|
+
function formatDiagnosticIssuesSection(report) {
|
|
11329
|
+
const issues = collectDiagnosticIssues(report);
|
|
11330
|
+
if (issues.length === 0)
|
|
11331
|
+
return [];
|
|
11332
|
+
const lines = ["--- Issues found ---"];
|
|
11333
|
+
for (const issue of issues) {
|
|
11334
|
+
lines.push(`[${issue.severity.toUpperCase()}] ${issue.scope}: ${issue.message}`);
|
|
11335
|
+
lines.push(` Remediation: ${issue.remediation}`);
|
|
11336
|
+
}
|
|
11337
|
+
return lines;
|
|
11338
|
+
}
|
|
11163
11339
|
function tailLogFile(path, lines) {
|
|
11164
11340
|
if (!existsSync11(path))
|
|
11165
11341
|
return "";
|
|
@@ -11428,14 +11604,16 @@ __export(exports_doctor, {
|
|
|
11428
11604
|
shouldSkipDoctorFixConfirmation: () => shouldSkipDoctorFixConfirmation,
|
|
11429
11605
|
runDoctor: () => runDoctor,
|
|
11430
11606
|
hasDoctorProblems: () => hasDoctorProblems,
|
|
11607
|
+
formatDoctorStorageStatus: () => formatDoctorStorageStatus,
|
|
11431
11608
|
fixPluginEntries: () => fixPluginEntries,
|
|
11609
|
+
doctorSkewBinaryDownloadDecision: () => doctorSkewBinaryDownloadDecision,
|
|
11432
11610
|
clearOldBinaries: () => clearOldBinaries,
|
|
11433
11611
|
clearDoctorCaches: () => clearDoctorCaches,
|
|
11434
11612
|
buildDoctorFixPlan: () => buildDoctorFixPlan,
|
|
11435
11613
|
DOCTOR_FORCE_CLEAR_TARGETS: () => DOCTOR_FORCE_CLEAR_TARGETS,
|
|
11436
11614
|
DOCTOR_CLEAR_TARGET_OPTIONS: () => DOCTOR_CLEAR_TARGET_OPTIONS
|
|
11437
11615
|
});
|
|
11438
|
-
import { existsSync as existsSync13, rmSync as rmSync4, statSync as statSync8, writeFileSync as writeFileSync2 } from "node:fs";
|
|
11616
|
+
import { existsSync as existsSync13, mkdirSync as mkdirSync2, rmSync as rmSync4, statSync as statSync8, writeFileSync as writeFileSync2 } from "node:fs";
|
|
11439
11617
|
import { join as join11 } from "node:path";
|
|
11440
11618
|
async function runDoctor(options) {
|
|
11441
11619
|
if (options.issue) {
|
|
@@ -11473,6 +11651,7 @@ async function runDoctor(options) {
|
|
|
11473
11651
|
}
|
|
11474
11652
|
O2.info(` host: ${h.hostVersion ?? "unknown version"}`);
|
|
11475
11653
|
O2.info(` plugin registered: ${h.pluginRegistered ? "yes" : "no"}`);
|
|
11654
|
+
O2.info(` plugin version: ${h.pluginCache.cached ?? "not installed"}`);
|
|
11476
11655
|
if (!h.pluginRegistered) {
|
|
11477
11656
|
O2.warn(" plugin registration can be fixed with `aft setup` or `aft doctor --fix`");
|
|
11478
11657
|
}
|
|
@@ -11480,7 +11659,7 @@ async function runDoctor(options) {
|
|
|
11480
11659
|
if (h.aftConfig.parseError) {
|
|
11481
11660
|
O2.error(` aft config parse error: ${h.aftConfig.parseError}`);
|
|
11482
11661
|
}
|
|
11483
|
-
O2.info(` storage: ${
|
|
11662
|
+
O2.info(` storage: ${formatDoctorStorageStatus(h)}`);
|
|
11484
11663
|
if (h.onnxRuntime.required) {
|
|
11485
11664
|
const parts = [];
|
|
11486
11665
|
parts.push(`required: yes (${h.onnxRuntime.platform})`);
|
|
@@ -11506,6 +11685,7 @@ async function runDoctor(options) {
|
|
|
11506
11685
|
await clearDoctorCaches(adapters, DOCTOR_FORCE_CLEAR_TARGETS, { includePluginBytes: false });
|
|
11507
11686
|
}
|
|
11508
11687
|
if (hadProblems) {
|
|
11688
|
+
logDoctorIssues(report);
|
|
11509
11689
|
wt("Run `aft setup` or `aft doctor --fix` to register AFT with any harness showing `plugin registered: no`. Run `aft doctor --fix` for ONNX Runtime issues or to download a missing aft binary.", "Tips");
|
|
11510
11690
|
gt("Done — some issues found.");
|
|
11511
11691
|
return 1;
|
|
@@ -11514,25 +11694,7 @@ async function runDoctor(options) {
|
|
|
11514
11694
|
return 0;
|
|
11515
11695
|
}
|
|
11516
11696
|
function hasDoctorProblems(report) {
|
|
11517
|
-
|
|
11518
|
-
return true;
|
|
11519
|
-
return report.harnesses.some((h) => {
|
|
11520
|
-
if (!h.hostInstalled)
|
|
11521
|
-
return true;
|
|
11522
|
-
if (!h.pluginRegistered)
|
|
11523
|
-
return true;
|
|
11524
|
-
if (h.aftConfig.parseError)
|
|
11525
|
-
return true;
|
|
11526
|
-
if (!h.onnxRuntime.required)
|
|
11527
|
-
return false;
|
|
11528
|
-
if (!h.onnxRuntime.cachedPath && !h.onnxRuntime.systemPath)
|
|
11529
|
-
return true;
|
|
11530
|
-
if (h.onnxRuntime.cachedCompatible === false)
|
|
11531
|
-
return true;
|
|
11532
|
-
if (h.onnxRuntime.systemCompatible === false)
|
|
11533
|
-
return true;
|
|
11534
|
-
return false;
|
|
11535
|
-
});
|
|
11697
|
+
return formatDiagnosticIssuesSection(report).length > 0;
|
|
11536
11698
|
}
|
|
11537
11699
|
async function runClearFlow(argv) {
|
|
11538
11700
|
const targets = await selectMany("What do you want to clear?", DOCTOR_CLEAR_TARGET_OPTIONS, undefined, false);
|
|
@@ -11655,9 +11817,18 @@ function buildDoctorFixPlan(adapters, report) {
|
|
|
11655
11817
|
}
|
|
11656
11818
|
}
|
|
11657
11819
|
if (!report.binaryVersion) {
|
|
11820
|
+
const skews = findPluginCliVersionSkews(report);
|
|
11658
11821
|
items.push({
|
|
11659
11822
|
kind: "binary",
|
|
11660
|
-
message: `Will download/cache the aft binary matching CLI v${report.cliVersion}`
|
|
11823
|
+
message: skews.length > 0 ? `Will ask before caching CLI v${report.cliVersion} because the installed plugin will not use it until updated` : `Will download/cache the aft binary matching CLI v${report.cliVersion}`
|
|
11824
|
+
});
|
|
11825
|
+
}
|
|
11826
|
+
for (const harness of report.harnesses) {
|
|
11827
|
+
if (!harness.hostInstalled || !harness.pluginRegistered || harness.storageDir.exists)
|
|
11828
|
+
continue;
|
|
11829
|
+
items.push({
|
|
11830
|
+
kind: "storage",
|
|
11831
|
+
message: `Will create AFT storage directory at ${harness.storageDir.path}`
|
|
11661
11832
|
});
|
|
11662
11833
|
}
|
|
11663
11834
|
for (const candidate of findOnnxFixCandidates(report)) {
|
|
@@ -11682,6 +11853,15 @@ function shouldSkipDoctorFixConfirmation(argv) {
|
|
|
11682
11853
|
return true;
|
|
11683
11854
|
return process.stdin.isTTY !== true || process.stdout.isTTY !== true;
|
|
11684
11855
|
}
|
|
11856
|
+
function doctorSkewBinaryDownloadDecision(argv) {
|
|
11857
|
+
if (argv.includes("--yes") || argv.includes("-y"))
|
|
11858
|
+
return "proceed";
|
|
11859
|
+
if (argv.includes("--ci"))
|
|
11860
|
+
return "skip";
|
|
11861
|
+
if (process.stdin.isTTY !== true || process.stdout.isTTY !== true)
|
|
11862
|
+
return "skip";
|
|
11863
|
+
return "prompt";
|
|
11864
|
+
}
|
|
11685
11865
|
async function confirmDoctorFixPlan(plan, argv) {
|
|
11686
11866
|
if (plan.length === 0)
|
|
11687
11867
|
return true;
|
|
@@ -11723,29 +11903,36 @@ async function runFixFlow(argv) {
|
|
|
11723
11903
|
}
|
|
11724
11904
|
}
|
|
11725
11905
|
await fixPluginEntries(adapters);
|
|
11906
|
+
const storageSummary = ensureStorageDirsForRegisteredPlugins(adapters);
|
|
11726
11907
|
let binaryDownloaded = false;
|
|
11908
|
+
let binaryDownloadSkipped = false;
|
|
11727
11909
|
let binaryDownloadError = null;
|
|
11728
11910
|
if (!report.binaryVersion) {
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11911
|
+
const shouldDownload = await confirmBinaryDownloadDespitePluginSkew(report, argv);
|
|
11912
|
+
if (!shouldDownload) {
|
|
11913
|
+
binaryDownloadSkipped = true;
|
|
11914
|
+
} else {
|
|
11915
|
+
O2.info("AFT binary not found. Downloading…");
|
|
11916
|
+
try {
|
|
11917
|
+
const bridgePackageName = "@cortexkit/aft-bridge";
|
|
11918
|
+
const { ensureBinary } = await import(bridgePackageName);
|
|
11919
|
+
const path = await ensureBinary(`v${report.cliVersion}`);
|
|
11920
|
+
if (path) {
|
|
11921
|
+
O2.success(`AFT binary installed at ${path}`);
|
|
11922
|
+
binaryDownloaded = true;
|
|
11923
|
+
} else {
|
|
11924
|
+
O2.error("AFT binary download failed — no matching release asset on GitHub. " + "Try opening any AFT-enabled session to trigger plugin-side download instead.");
|
|
11925
|
+
binaryDownloadError = "no matching release asset";
|
|
11926
|
+
}
|
|
11927
|
+
} catch (err) {
|
|
11928
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
11929
|
+
O2.error(`AFT binary download failed: ${message}`);
|
|
11930
|
+
binaryDownloadError = message;
|
|
11740
11931
|
}
|
|
11741
|
-
} catch (err) {
|
|
11742
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
11743
|
-
O2.error(`AFT binary download failed: ${message}`);
|
|
11744
|
-
binaryDownloadError = message;
|
|
11745
11932
|
}
|
|
11746
11933
|
}
|
|
11747
11934
|
const onnxResult = await runOnnxFix(adapters, report, { yes: true });
|
|
11748
|
-
if (onnxResult === null && !binaryDownloaded && !binaryDownloadError) {
|
|
11935
|
+
if (onnxResult === null && !binaryDownloaded && !binaryDownloadSkipped && !binaryDownloadError && storageSummary.created === 0 && storageSummary.errors === 0) {
|
|
11749
11936
|
O2.info("No auto-fixable issues detected.");
|
|
11750
11937
|
wt("If you're still seeing 'Semantic Index: failed' in the TUI sidebar, run `aft doctor` (without --fix) for a full diagnostic dump.", "Tip");
|
|
11751
11938
|
const afterReport2 = await collectDiagnostics(adapters);
|
|
@@ -11753,12 +11940,73 @@ async function runFixFlow(argv) {
|
|
|
11753
11940
|
gt(stillHasProblems2 ? "Done — some issues remain." : "Done.");
|
|
11754
11941
|
return stillHasProblems2 ? 1 : 0;
|
|
11755
11942
|
}
|
|
11756
|
-
const hadErrors = (onnxResult?.errors.length ?? 0) > 0 || binaryDownloadError !== null;
|
|
11943
|
+
const hadErrors = (onnxResult?.errors.length ?? 0) > 0 || binaryDownloadError !== null || storageSummary.errors > 0;
|
|
11757
11944
|
const afterReport = await collectDiagnostics(adapters);
|
|
11758
11945
|
const stillHasProblems = hasDoctorProblems(afterReport);
|
|
11759
11946
|
gt(hadErrors ? "Done — some fixes failed." : stillHasProblems ? "Done — some issues remain." : "Done.");
|
|
11760
11947
|
return hadErrors || stillHasProblems ? 1 : 0;
|
|
11761
11948
|
}
|
|
11949
|
+
function logDoctorIssues(report) {
|
|
11950
|
+
const lines = formatDiagnosticIssuesSection(report);
|
|
11951
|
+
if (lines.length === 0)
|
|
11952
|
+
return;
|
|
11953
|
+
O2.warn(lines[0]);
|
|
11954
|
+
for (let i = 1;i < lines.length; i += 2) {
|
|
11955
|
+
const issue = lines[i];
|
|
11956
|
+
const remediation = lines[i + 1];
|
|
11957
|
+
if (issue.startsWith("[HIGH]")) {
|
|
11958
|
+
O2.error(issue);
|
|
11959
|
+
} else {
|
|
11960
|
+
O2.warn(issue);
|
|
11961
|
+
}
|
|
11962
|
+
if (remediation)
|
|
11963
|
+
O2.warn(remediation);
|
|
11964
|
+
}
|
|
11965
|
+
}
|
|
11966
|
+
function formatDoctorStorageStatus(h) {
|
|
11967
|
+
const state = h.storageDir.exists ? h.storageDir.path : `${h.storageDir.path} (${h.pluginRegistered ? "not yet created (lazy — created on first tool call)" : "not created"})`;
|
|
11968
|
+
return `${state} (${formatStorageSizes(h.storageDir.sizesByKey)})`;
|
|
11969
|
+
}
|
|
11970
|
+
async function confirmBinaryDownloadDespitePluginSkew(report, argv) {
|
|
11971
|
+
const skews = findPluginCliVersionSkews(report);
|
|
11972
|
+
if (skews.length === 0)
|
|
11973
|
+
return true;
|
|
11974
|
+
O2.warn("Plugin/CLI version mismatch detected before binary download:");
|
|
11975
|
+
for (const skew of skews) {
|
|
11976
|
+
O2.warn(` ${skew.scope}: ${skew.message}`);
|
|
11977
|
+
O2.warn(` ${skew.remediation}`);
|
|
11978
|
+
}
|
|
11979
|
+
O2.warn("A newly cached binary will not be used by the older plugin until the plugin is updated.");
|
|
11980
|
+
const decision = doctorSkewBinaryDownloadDecision(argv);
|
|
11981
|
+
if (decision === "proceed") {
|
|
11982
|
+
O2.info("Proceeding because --yes/-y was provided.");
|
|
11983
|
+
return true;
|
|
11984
|
+
}
|
|
11985
|
+
if (decision === "skip") {
|
|
11986
|
+
O2.info("Skipped binary download. Update the plugin to @latest, then rerun `aft doctor --fix`.");
|
|
11987
|
+
return false;
|
|
11988
|
+
}
|
|
11989
|
+
return confirm("Download/cache the CLI-matching binary anyway for after you update the plugin?", false);
|
|
11990
|
+
}
|
|
11991
|
+
function ensureStorageDirsForRegisteredPlugins(adapters) {
|
|
11992
|
+
const summary = { created: 0, errors: 0 };
|
|
11993
|
+
for (const adapter of adapters) {
|
|
11994
|
+
try {
|
|
11995
|
+
if (!adapter.isInstalled() || !adapter.hasPluginEntry())
|
|
11996
|
+
continue;
|
|
11997
|
+
const storageDir = adapter.getStorageDir();
|
|
11998
|
+
if (existsSync13(storageDir))
|
|
11999
|
+
continue;
|
|
12000
|
+
mkdirSync2(storageDir, { recursive: true });
|
|
12001
|
+
summary.created += 1;
|
|
12002
|
+
O2.success(`${adapter.displayName}: created AFT storage directory at ${storageDir}`);
|
|
12003
|
+
} catch (err) {
|
|
12004
|
+
summary.errors += 1;
|
|
12005
|
+
O2.error(`${adapter.displayName}: failed to create AFT storage directory: ${err instanceof Error ? err.message : String(err)}`);
|
|
12006
|
+
}
|
|
12007
|
+
}
|
|
12008
|
+
return summary;
|
|
12009
|
+
}
|
|
11762
12010
|
async function clearPluginCache(adapter, includeBytes) {
|
|
11763
12011
|
const info = adapter.getPluginCacheInfo();
|
|
11764
12012
|
const bytes = info.exists ? dirSize(info.path) : 0;
|
|
@@ -13,6 +13,14 @@ export interface DiagnosticReport {
|
|
|
13
13
|
/** LSP package and binary caches populated by plugin auto-install. */
|
|
14
14
|
lspCache: LspCacheReport;
|
|
15
15
|
}
|
|
16
|
+
export type DiagnosticIssueSeverity = "high" | "medium" | "low";
|
|
17
|
+
export interface DiagnosticIssue {
|
|
18
|
+
code: "binary_missing" | "host_missing" | "plugin_missing" | "config_parse_error" | "plugin_cli_version_skew" | "onnx_missing" | "onnx_incompatible";
|
|
19
|
+
severity: DiagnosticIssueSeverity;
|
|
20
|
+
scope: string;
|
|
21
|
+
message: string;
|
|
22
|
+
remediation: string;
|
|
23
|
+
}
|
|
16
24
|
export interface HarnessDiagnostic {
|
|
17
25
|
kind: string;
|
|
18
26
|
displayName: string;
|
|
@@ -51,6 +59,9 @@ export interface HarnessDiagnostic {
|
|
|
51
59
|
}
|
|
52
60
|
export declare function collectDiagnostics(adapters: HarnessAdapter[]): Promise<DiagnosticReport>;
|
|
53
61
|
export declare function renderDiagnosticsMarkdown(report: DiagnosticReport): string;
|
|
62
|
+
export declare function collectDiagnosticIssues(report: DiagnosticReport): DiagnosticIssue[];
|
|
63
|
+
export declare function findPluginCliVersionSkews(report: DiagnosticReport): DiagnosticIssue[];
|
|
64
|
+
export declare function formatDiagnosticIssuesSection(report: DiagnosticReport): string[];
|
|
54
65
|
/** Utility: read the tail of a log file, best-effort. */
|
|
55
66
|
export declare function tailLogFile(path: string, lines: number): string;
|
|
56
67
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 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AG,IAAI,CAAC;QAC7B,gBAAgB,EAAE,OAAO,GAAG,IAAI,CAAC;QACjC,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAoB9F;AAkED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CA8E1E;AAmDD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAiFnF;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAIrF;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAUhF;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA0C/D"}
|
package/dist/lib/onnx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../src/lib/onnx.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAkB7C;
|
|
1
|
+
{"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../src/lib/onnx.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAkB7C;AA8BD,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAoBrD;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGvE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmC9D;AAED,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAM/D;AAED,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB,CAQA"}
|
package/dist/lib/paths.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare function getAftLspPackagesDir(): string;
|
|
|
15
15
|
* servers (clangd, lua-ls, zls, tinymist, texlab).
|
|
16
16
|
*/
|
|
17
17
|
export declare function getAftLspBinariesDir(): string;
|
|
18
|
+
export declare function getCortexKitStorageRoot(): string;
|
|
18
19
|
/** Resolve the plugin log file path. Shared with the plugin's logger. */
|
|
19
20
|
export declare function getTmpLogPath(filename: string): string;
|
|
20
21
|
//# sourceMappingURL=paths.d.ts.map
|
package/dist/lib/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"AAGA,yFAAyF;AACzF,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"AAGA,yFAAyF;AACzF,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAW7C;AAeD,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified CLI for Agent File Tools (AFT) — setup, doctor, and diagnostics across supported agent harnesses (OpenCode, Pi)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@clack/prompts": "^1.2.0",
|
|
26
|
-
"@cortexkit/aft-bridge": "0.31.
|
|
26
|
+
"@cortexkit/aft-bridge": "0.31.1",
|
|
27
27
|
"comment-json": "^4.6.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|