@cortexkit/aft 0.31.1 → 0.33.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/dist/index.js
CHANGED
|
@@ -10929,7 +10929,7 @@ var init_lsp_cache = __esm(() => {
|
|
|
10929
10929
|
|
|
10930
10930
|
// src/lib/onnx.ts
|
|
10931
10931
|
import { existsSync as existsSync10, readdirSync as readdirSync5, readlinkSync, realpathSync, statSync as statSync6 } from "node:fs";
|
|
10932
|
-
import { isAbsolute, join as join9, win32 } from "node:path";
|
|
10932
|
+
import { isAbsolute, join as join9, resolve as resolve4, win32 } from "node:path";
|
|
10933
10933
|
function getOnnxLibraryName() {
|
|
10934
10934
|
if (process.platform === "darwin")
|
|
10935
10935
|
return "libonnxruntime.dylib";
|
|
@@ -10983,14 +10983,28 @@ function directoryContainsLibrary(dir, libName) {
|
|
|
10983
10983
|
}
|
|
10984
10984
|
function findSystemOnnxRuntime() {
|
|
10985
10985
|
const libName = getOnnxLibraryName();
|
|
10986
|
-
const searchPaths =
|
|
10986
|
+
const searchPaths = [];
|
|
10987
|
+
if (process.platform === "darwin") {
|
|
10988
|
+
searchPaths.push("/opt/homebrew/lib", "/usr/local/lib");
|
|
10989
|
+
} else if (process.platform === "linux") {
|
|
10990
|
+
searchPaths.push("/usr/lib", "/usr/lib/x86_64-linux-gnu", "/usr/lib/aarch64-linux-gnu", "/usr/local/lib");
|
|
10991
|
+
} else if (process.platform === "win32") {
|
|
10992
|
+
searchPaths.push(...pathEntriesForPlatform());
|
|
10993
|
+
const programFiles = process.env.ProgramFiles ?? "C:\\Program Files";
|
|
10994
|
+
const programFilesX86 = process.env["ProgramFiles(x86)"] ?? "C:\\Program Files (x86)";
|
|
10995
|
+
searchPaths.push(join9(programFiles, "onnxruntime", "lib"), join9(programFiles, "Microsoft ONNX Runtime", "lib"), join9(programFiles, "Microsoft Machine Learning", "lib"), join9(programFilesX86, "onnxruntime", "lib"));
|
|
10996
|
+
}
|
|
10997
|
+
const normalizeCase = process.platform === "win32" || process.platform === "darwin";
|
|
10987
10998
|
const seen = new Set;
|
|
10988
|
-
for (const
|
|
10989
|
-
|
|
10999
|
+
for (const dir of searchPaths) {
|
|
11000
|
+
let key = resolve4(dir).replace(/[/\\]+$/, "");
|
|
11001
|
+
if (normalizeCase)
|
|
11002
|
+
key = key.toLowerCase();
|
|
11003
|
+
if (seen.has(key))
|
|
10990
11004
|
continue;
|
|
10991
|
-
seen.add(
|
|
10992
|
-
if (directoryContainsLibrary(
|
|
10993
|
-
return
|
|
11005
|
+
seen.add(key);
|
|
11006
|
+
if (directoryContainsLibrary(dir, libName))
|
|
11007
|
+
return dir;
|
|
10994
11008
|
}
|
|
10995
11009
|
return null;
|
|
10996
11010
|
}
|
|
@@ -11077,7 +11091,15 @@ function sanitizeValue(value) {
|
|
|
11077
11091
|
var init_sanitize = () => {};
|
|
11078
11092
|
|
|
11079
11093
|
// src/lib/diagnostics.ts
|
|
11080
|
-
import {
|
|
11094
|
+
import {
|
|
11095
|
+
accessSync,
|
|
11096
|
+
closeSync,
|
|
11097
|
+
constants,
|
|
11098
|
+
existsSync as existsSync11,
|
|
11099
|
+
openSync,
|
|
11100
|
+
readSync,
|
|
11101
|
+
statSync as statSync7
|
|
11102
|
+
} from "node:fs";
|
|
11081
11103
|
async function collectDiagnostics(adapters) {
|
|
11082
11104
|
const cliVersion = getSelfVersion();
|
|
11083
11105
|
const binaryVersion = probeBinaryVersion(cliVersion);
|
|
@@ -11104,6 +11126,16 @@ async function diagnoseHarness(adapter) {
|
|
|
11104
11126
|
const storage = adapter.getStorageDir();
|
|
11105
11127
|
const logPath = adapter.getLogFile();
|
|
11106
11128
|
const pluginCache = adapter.getPluginCacheInfo();
|
|
11129
|
+
const storageAccessible = (() => {
|
|
11130
|
+
if (!existsSync11(storage))
|
|
11131
|
+
return false;
|
|
11132
|
+
try {
|
|
11133
|
+
accessSync(storage, constants.R_OK | constants.W_OK);
|
|
11134
|
+
return true;
|
|
11135
|
+
} catch {
|
|
11136
|
+
return false;
|
|
11137
|
+
}
|
|
11138
|
+
})();
|
|
11107
11139
|
const describeStorage = "describeStorageSubtrees" in adapter && typeof adapter.describeStorageSubtrees === "function" ? adapter.describeStorageSubtrees() : {};
|
|
11108
11140
|
const semanticEnabled = aftConfigRead.value?.semantic_search === true || aftConfigRead.value?.experimental_semantic_search === true;
|
|
11109
11141
|
const systemOrtDir = findSystemOnnxRuntime();
|
|
@@ -11126,6 +11158,7 @@ async function diagnoseHarness(adapter) {
|
|
|
11126
11158
|
storageDir: {
|
|
11127
11159
|
path: storage,
|
|
11128
11160
|
exists: existsSync11(storage),
|
|
11161
|
+
accessible: storageAccessible,
|
|
11129
11162
|
sizesByKey: describeStorage
|
|
11130
11163
|
},
|
|
11131
11164
|
onnxRuntime: {
|
|
@@ -36,7 +36,10 @@ export interface HarnessDiagnostic {
|
|
|
36
36
|
pluginCache: ReturnType<HarnessAdapter["getPluginCacheInfo"]>;
|
|
37
37
|
storageDir: {
|
|
38
38
|
path: string;
|
|
39
|
+
/** True when the storage directory is present on disk. */
|
|
39
40
|
exists: boolean;
|
|
41
|
+
/** True when the directory exists and is readable + writable. */
|
|
42
|
+
accessible: boolean;
|
|
40
43
|
sizesByKey: Record<string, number>;
|
|
41
44
|
};
|
|
42
45
|
onnxRuntime: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/diagnostics.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAsB,MAAM,mBAAmB,CAAC;AAG7E,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAaxE,MAAM,WAAW,gBAAgB;IAC/B,S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ources":["../../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,
|
|
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,CA0CrD;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/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/aft",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
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",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/cortexkit/aft"
|
|
9
|
+
"url": "git+https://github.com/cortexkit/aft.git"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
12
|
"aft": "dist/index.js"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@clack/prompts": "^1.2.0",
|
|
26
|
-
"@cortexkit/aft-bridge": "0.
|
|
26
|
+
"@cortexkit/aft-bridge": "0.33.0",
|
|
27
27
|
"comment-json": "^4.6.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|