@cortexkit/aft 0.35.1 → 0.35.2

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.
@@ -61,7 +61,7 @@ export interface BinaryCacheClearResult {
61
61
  }
62
62
  export declare function clearOldBinaries(): BinaryCacheClearResult;
63
63
  export interface DoctorFixPlanItem {
64
- kind: "plugin" | "binary" | "onnx" | "storage" | "schema";
64
+ kind: "plugin" | "plugin-update" | "binary" | "onnx" | "storage" | "schema";
65
65
  message: string;
66
66
  }
67
67
  export declare function buildDoctorFixPlan(adapters: HarnessAdapter[], report: DiagnosticReport): DoctorFixPlanItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAEL,KAAK,gBAAgB,EAKtB,MAAM,uBAAuB,CAAC;AAe/B,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAOvE,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,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,WAAW,CAAC;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAkHvE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAOnE;AA4BD,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,cAAc,EAAE,EAC1B,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,iBAAiB,CAAC,CAgD5B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CAsDzD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC5E,OAAO,EAAE,MAAM,CAAC;CACjB;AA0ID,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,EAAE,EAC1B,MAAM,EAAE,gBAAgB,GACvB,iBAAiB,EAAE,CAsErB;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;AAwKD,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;AA4DD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7D"}
package/dist/index.js CHANGED
@@ -975,6 +975,122 @@ var init_migration = __esm(() => {
975
975
  DEFAULT_TIMEOUT_MS = 30 * 60 * 1000;
976
976
  });
977
977
 
978
+ // ../aft-bridge/dist/npm-resolver.js
979
+ import { readdirSync, statSync } from "node:fs";
980
+ import { homedir as homedir2 } from "node:os";
981
+ import { delimiter, dirname, isAbsolute, join as join2 } from "node:path";
982
+ function defaultDeps() {
983
+ return {
984
+ platform: process.platform,
985
+ env: process.env,
986
+ home: homedir2(),
987
+ execPath: process.execPath
988
+ };
989
+ }
990
+ function npmBinaryName(platform) {
991
+ return platform === "win32" ? "npm.cmd" : "npm";
992
+ }
993
+ function isFile(p) {
994
+ try {
995
+ return statSync(p).isFile();
996
+ } catch {
997
+ return false;
998
+ }
999
+ }
1000
+ function npmFromPath(deps) {
1001
+ const name = npmBinaryName(deps.platform);
1002
+ const raw = deps.env.PATH ?? deps.env.Path ?? "";
1003
+ for (const entry of raw.split(delimiter)) {
1004
+ const dir = entry.trim().replace(/^"|"$/g, "");
1005
+ if (!dir || !isAbsolute(dir))
1006
+ continue;
1007
+ if (isFile(join2(dir, name)))
1008
+ return dir;
1009
+ }
1010
+ return null;
1011
+ }
1012
+ function npmAdjacentToNode(deps) {
1013
+ const dir = dirname(deps.execPath);
1014
+ return isFile(join2(dir, npmBinaryName(deps.platform))) ? dir : null;
1015
+ }
1016
+ function highestVersionedNodeBin(installsDir, name) {
1017
+ let entries;
1018
+ try {
1019
+ entries = readdirSync(installsDir);
1020
+ } catch {
1021
+ return null;
1022
+ }
1023
+ const candidates = entries.filter((v) => isFile(join2(installsDir, v, "bin", name))).sort((a, b) => compareVersionsDesc(a, b));
1024
+ return candidates.length > 0 ? join2(installsDir, candidates[0], "bin") : null;
1025
+ }
1026
+ function compareVersionsDesc(a, b) {
1027
+ const pa = a.replace(/^v/, "").split(".").map((n) => Number.parseInt(n, 10));
1028
+ const pb = b.replace(/^v/, "").split(".").map((n) => Number.parseInt(n, 10));
1029
+ for (let i = 0;i < Math.max(pa.length, pb.length); i++) {
1030
+ const na = Number.isFinite(pa[i]) ? pa[i] : -1;
1031
+ const nb = Number.isFinite(pb[i]) ? pb[i] : -1;
1032
+ if (na !== nb)
1033
+ return nb - na;
1034
+ }
1035
+ return b.localeCompare(a);
1036
+ }
1037
+ function wellKnownNpmDirs(deps) {
1038
+ const { platform, env, home } = deps;
1039
+ const name = npmBinaryName(platform);
1040
+ const dirs = [];
1041
+ const push = (dir) => {
1042
+ if (dir && !dirs.includes(dir))
1043
+ dirs.push(dir);
1044
+ };
1045
+ if (platform === "win32") {
1046
+ const programFiles = env.ProgramFiles || "C:\\Program Files";
1047
+ const appData = env.APPDATA;
1048
+ const localAppData = env.LOCALAPPDATA;
1049
+ push(join2(programFiles, "nodejs"));
1050
+ if (appData)
1051
+ push(join2(appData, "npm"));
1052
+ if (localAppData)
1053
+ push(join2(localAppData, "Volta", "bin"));
1054
+ if (env.NVM_SYMLINK)
1055
+ push(env.NVM_SYMLINK);
1056
+ } else {
1057
+ if (env.NVM_BIN)
1058
+ push(env.NVM_BIN);
1059
+ push(highestVersionedNodeBin(join2(home, ".nvm", "versions", "node"), name));
1060
+ push(highestVersionedNodeBin(join2(home, ".local", "share", "mise", "installs", "node"), name));
1061
+ push(highestVersionedNodeBin(join2(home, ".asdf", "installs", "nodejs"), name));
1062
+ push(join2(home, ".volta", "bin"));
1063
+ push(join2(home, ".asdf", "shims"));
1064
+ const systemDirs = deps.systemNpmDirs ?? (platform === "darwin" ? ["/opt/homebrew/bin", "/usr/local/bin"] : ["/usr/local/bin", "/usr/bin", join2(home, ".local", "bin")]);
1065
+ for (const dir of systemDirs)
1066
+ push(dir);
1067
+ }
1068
+ return dirs;
1069
+ }
1070
+ function resolveNpm(deps = defaultDeps()) {
1071
+ const name = npmBinaryName(deps.platform);
1072
+ const onPath = npmFromPath(deps);
1073
+ if (onPath)
1074
+ return { command: join2(onPath, name), binDir: onPath };
1075
+ const adjacent = npmAdjacentToNode(deps);
1076
+ if (adjacent)
1077
+ return { command: join2(adjacent, name), binDir: adjacent };
1078
+ for (const dir of wellKnownNpmDirs(deps)) {
1079
+ const candidate = join2(dir, name);
1080
+ if (isFile(candidate))
1081
+ return { command: candidate, binDir: dir };
1082
+ }
1083
+ return null;
1084
+ }
1085
+ function npmSpawnEnv(resolved, baseEnv = process.env) {
1086
+ if (!resolved.binDir)
1087
+ return { ...baseEnv };
1088
+ const existing = baseEnv.PATH ?? baseEnv.Path ?? "";
1089
+ const next = existing ? `${resolved.binDir}${delimiter}${existing}` : resolved.binDir;
1090
+ return { ...baseEnv, PATH: next };
1091
+ }
1092
+ var init_npm_resolver = () => {};
1093
+
978
1094
  // ../aft-bridge/dist/onnx-runtime.js
979
1095
  var ORT_VERSION = "1.24.4", MAX_DOWNLOAD_BYTES2, MAX_EXTRACT_BYTES, STALE_LOCK_MS, ORT_PLATFORM_MAP;
980
1096
  var init_onnx_runtime = __esm(() => {
@@ -1206,6 +1322,7 @@ var init_dist = __esm(() => {
1206
1322
  init_bridge();
1207
1323
  init_downloader();
1208
1324
  init_migration();
1325
+ init_npm_resolver();
1209
1326
  init_onnx_runtime();
1210
1327
  init_paths();
1211
1328
  init_platform();
@@ -1214,65 +1331,65 @@ var init_dist = __esm(() => {
1214
1331
  });
1215
1332
 
1216
1333
  // src/lib/paths.ts
1217
- import { homedir as homedir2, tmpdir } from "node:os";
1218
- import { join as join2 } from "node:path";
1334
+ import { homedir as homedir3, tmpdir } from "node:os";
1335
+ import { join as join3 } from "node:path";
1219
1336
  function getAftBinaryCacheDir() {
1220
1337
  if (process.env.AFT_CACHE_DIR) {
1221
- return join2(process.env.AFT_CACHE_DIR, "bin");
1338
+ return join3(process.env.AFT_CACHE_DIR, "bin");
1222
1339
  }
1223
1340
  if (process.platform === "win32") {
1224
1341
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
1225
- const base2 = localAppData || join2(homedir2(), "AppData", "Local");
1226
- return join2(base2, "aft", "bin");
1342
+ const base2 = localAppData || join3(homedir3(), "AppData", "Local");
1343
+ return join3(base2, "aft", "bin");
1227
1344
  }
1228
- const base = process.env.XDG_CACHE_HOME || join2(homedir2(), ".cache");
1229
- return join2(base, "aft", "bin");
1345
+ const base = process.env.XDG_CACHE_HOME || join3(homedir3(), ".cache");
1346
+ return join3(base, "aft", "bin");
1230
1347
  }
1231
1348
  function getAftBinaryName() {
1232
1349
  return process.platform === "win32" ? "aft.exe" : "aft";
1233
1350
  }
1234
1351
  function getAftLspPackagesDir() {
1235
1352
  if (process.env.AFT_CACHE_DIR) {
1236
- return join2(process.env.AFT_CACHE_DIR, "lsp-packages");
1353
+ return join3(process.env.AFT_CACHE_DIR, "lsp-packages");
1237
1354
  }
1238
1355
  if (process.platform === "win32") {
1239
1356
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
1240
- const base2 = localAppData || join2(homedir2(), "AppData", "Local");
1241
- return join2(base2, "aft", "lsp-packages");
1357
+ const base2 = localAppData || join3(homedir3(), "AppData", "Local");
1358
+ return join3(base2, "aft", "lsp-packages");
1242
1359
  }
1243
- const base = process.env.XDG_CACHE_HOME || join2(homedir2(), ".cache");
1244
- return join2(base, "aft", "lsp-packages");
1360
+ const base = process.env.XDG_CACHE_HOME || join3(homedir3(), ".cache");
1361
+ return join3(base, "aft", "lsp-packages");
1245
1362
  }
1246
1363
  function getAftLspBinariesDir() {
1247
1364
  if (process.env.AFT_CACHE_DIR) {
1248
- return join2(process.env.AFT_CACHE_DIR, "lsp-binaries");
1365
+ return join3(process.env.AFT_CACHE_DIR, "lsp-binaries");
1249
1366
  }
1250
1367
  if (process.platform === "win32") {
1251
1368
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
1252
- const base2 = localAppData || join2(homedir2(), "AppData", "Local");
1253
- return join2(base2, "aft", "lsp-binaries");
1369
+ const base2 = localAppData || join3(homedir3(), "AppData", "Local");
1370
+ return join3(base2, "aft", "lsp-binaries");
1254
1371
  }
1255
- const base = process.env.XDG_CACHE_HOME || join2(homedir2(), ".cache");
1256
- return join2(base, "aft", "lsp-binaries");
1372
+ const base = process.env.XDG_CACHE_HOME || join3(homedir3(), ".cache");
1373
+ return join3(base, "aft", "lsp-binaries");
1257
1374
  }
1258
1375
  function homeDir() {
1259
1376
  if (process.platform === "win32")
1260
- return process.env.USERPROFILE || process.env.HOME || homedir2();
1261
- return process.env.HOME || homedir2();
1377
+ return process.env.USERPROFILE || process.env.HOME || homedir3();
1378
+ return process.env.HOME || homedir3();
1262
1379
  }
1263
1380
  function dataHome() {
1264
1381
  if (process.env.XDG_DATA_HOME)
1265
1382
  return process.env.XDG_DATA_HOME;
1266
1383
  if (process.platform === "win32") {
1267
- return process.env.LOCALAPPDATA || process.env.APPDATA || join2(homeDir(), "AppData", "Local");
1384
+ return process.env.LOCALAPPDATA || process.env.APPDATA || join3(homeDir(), "AppData", "Local");
1268
1385
  }
1269
- return join2(homeDir(), ".local", "share");
1386
+ return join3(homeDir(), ".local", "share");
1270
1387
  }
1271
1388
  function getCortexKitStorageRoot() {
1272
- return join2(dataHome(), "cortexkit", "aft");
1389
+ return join3(dataHome(), "cortexkit", "aft");
1273
1390
  }
1274
1391
  function getTmpLogPath(filename) {
1275
- return join2(tmpdir(), filename);
1392
+ return join3(tmpdir(), filename);
1276
1393
  }
1277
1394
  var init_paths2 = () => {};
1278
1395
 
@@ -1280,8 +1397,8 @@ var init_paths2 = () => {};
1280
1397
  import { execSync, spawnSync } from "node:child_process";
1281
1398
  import { existsSync as existsSync2 } from "node:fs";
1282
1399
  import { createRequire } from "node:module";
1283
- import { homedir as homedir3 } from "node:os";
1284
- import { join as join3 } from "node:path";
1400
+ import { homedir as homedir4 } from "node:os";
1401
+ import { join as join4 } from "node:path";
1285
1402
  async function loadPluginVersion() {
1286
1403
  try {
1287
1404
  const bridgePackageName = "@cortexkit/aft-bridge";
@@ -1404,7 +1521,7 @@ function aftBinaryCandidates(preferredVersion) {
1404
1521
  const candidates = [];
1405
1522
  if (preferredVersion) {
1406
1523
  const tag = preferredVersion.startsWith("v") ? preferredVersion : `v${preferredVersion}`;
1407
- pushCandidate(candidates, join3(getAftBinaryCacheDir(), tag, getAftBinaryName()));
1524
+ pushCandidate(candidates, join4(getAftBinaryCacheDir(), tag, getAftBinaryName()));
1408
1525
  }
1409
1526
  const key = platformKey2();
1410
1527
  if (key) {
@@ -1427,7 +1544,7 @@ function aftBinaryCandidates(preferredVersion) {
1427
1544
  }
1428
1545
  }
1429
1546
  } catch {}
1430
- pushCandidate(candidates, join3(homedir3(), ".cargo", "bin", getAftBinaryName()));
1547
+ pushCandidate(candidates, join4(homedir4(), ".cargo", "bin", getAftBinaryName()));
1431
1548
  return candidates;
1432
1549
  }
1433
1550
  function findAftBinary(preferredVersion) {
@@ -1442,13 +1559,13 @@ var init_binary_probe = __esm(async () => {
1442
1559
  });
1443
1560
 
1444
1561
  // src/lib/fs-util.ts
1445
- import { existsSync as existsSync3, readdirSync, statSync } from "node:fs";
1446
- import { join as join4 } from "node:path";
1562
+ import { existsSync as existsSync3, readdirSync as readdirSync2, statSync as statSync2 } from "node:fs";
1563
+ import { join as join5 } from "node:path";
1447
1564
  function dirSize(path) {
1448
1565
  if (!existsSync3(path)) {
1449
1566
  return 0;
1450
1567
  }
1451
- const stat = statSync(path);
1568
+ const stat = statSync2(path);
1452
1569
  if (stat.isFile()) {
1453
1570
  return stat.size;
1454
1571
  }
@@ -1456,8 +1573,8 @@ function dirSize(path) {
1456
1573
  return 0;
1457
1574
  }
1458
1575
  let total = 0;
1459
- for (const entry of readdirSync(path)) {
1460
- total += dirSize(join4(path, entry));
1576
+ for (const entry of readdirSync2(path)) {
1577
+ total += dirSize(join5(path, entry));
1461
1578
  }
1462
1579
  return total;
1463
1580
  }
@@ -9065,9 +9182,9 @@ var require_stringify = __commonJS((exports, module) => {
9065
9182
  if (line_breaks_before === null) {
9066
9183
  line_breaks_before = inline ? 0 : 1;
9067
9184
  }
9068
- const delimiter = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i === 0 ? EMPTY : LF + deeper_gap;
9185
+ const delimiter2 = line_breaks_before > 0 ? repeat_line_breaks(line_breaks_before, deeper_gap) : inline ? SPACE : i === 0 ? EMPTY : LF + deeper_gap;
9069
9186
  const is_line_comment = type === "LineComment";
9070
- str += delimiter + comment_stringify(value, is_line_comment);
9187
+ str += delimiter2 + comment_stringify(value, is_line_comment);
9071
9188
  last_comment = comment;
9072
9189
  });
9073
9190
  const default_line_breaks_after = display_block || last_comment.type === "LineComment" ? 1 : 0;
@@ -9080,10 +9197,10 @@ var require_stringify = __commonJS((exports, module) => {
9080
9197
  replacer = null;
9081
9198
  indent = EMPTY;
9082
9199
  };
9083
- var join5 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(one, gap)), gap) : two ? two.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(two, gap)), gap) : EMPTY;
9200
+ var join6 = (one, two, gap) => one ? two ? one + two.trim() + LF + gap : one.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(one, gap)), gap) : two ? two.trimRight() + repeat_line_breaks(Math.max(1, count_trailing_line_breaks(two, gap)), gap) : EMPTY;
9084
9201
  var join_content = (inside, value, gap) => {
9085
9202
  const comment = process_comments(value, PREFIX_BEFORE, gap + indent, true);
9086
- return join5(comment, inside, gap);
9203
+ return join6(comment, inside, gap);
9087
9204
  };
9088
9205
  var stringify_string = (holder, key, value) => {
9089
9206
  const raw = get_raw_string_literal(holder, key);
@@ -9105,13 +9222,13 @@ var require_stringify = __commonJS((exports, module) => {
9105
9222
  if (i !== 0) {
9106
9223
  inside += COMMA;
9107
9224
  }
9108
- const before = join5(after_comma, process_comments(value, BEFORE(i), deeper_gap), deeper_gap);
9225
+ const before = join6(after_comma, process_comments(value, BEFORE(i), deeper_gap), deeper_gap);
9109
9226
  inside += before || LF + deeper_gap;
9110
9227
  inside += stringify(i, value, deeper_gap) || STR_NULL;
9111
9228
  inside += process_comments(value, AFTER_VALUE(i), deeper_gap);
9112
9229
  after_comma = process_comments(value, AFTER(i), deeper_gap);
9113
9230
  }
9114
- inside += join5(after_comma, process_comments(value, PREFIX_AFTER, deeper_gap), deeper_gap);
9231
+ inside += join6(after_comma, process_comments(value, PREFIX_AFTER, deeper_gap), deeper_gap);
9115
9232
  return BRACKET_OPEN + join_content(inside, value, gap) + BRACKET_CLOSE;
9116
9233
  };
9117
9234
  var object_stringify = (value, gap) => {
@@ -9132,13 +9249,13 @@ var require_stringify = __commonJS((exports, module) => {
9132
9249
  inside += COMMA;
9133
9250
  }
9134
9251
  first = false;
9135
- const before = join5(after_comma, process_comments(value, BEFORE(key), deeper_gap), deeper_gap);
9252
+ const before = join6(after_comma, process_comments(value, BEFORE(key), deeper_gap), deeper_gap);
9136
9253
  inside += before || LF + deeper_gap;
9137
9254
  inside += quote(key) + process_comments(value, AFTER_PROP(key), deeper_gap) + COLON + process_comments(value, AFTER_COLON(key), deeper_gap) + SPACE + sv + process_comments(value, AFTER_VALUE(key), deeper_gap);
9138
9255
  after_comma = process_comments(value, AFTER(key), deeper_gap);
9139
9256
  };
9140
9257
  keys.forEach(iteratee);
9141
- inside += join5(after_comma, process_comments(value, PREFIX_AFTER, deeper_gap), deeper_gap);
9258
+ inside += join6(after_comma, process_comments(value, PREFIX_AFTER, deeper_gap), deeper_gap);
9142
9259
  return CURLY_BRACKET_OPEN + join_content(inside, value, gap) + CURLY_BRACKET_CLOSE;
9143
9260
  };
9144
9261
  function stringify(key, holder, gap) {
@@ -9232,7 +9349,7 @@ var require_src2 = __commonJS((exports, module) => {
9232
9349
 
9233
9350
  // src/lib/jsonc.ts
9234
9351
  import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync, writeFileSync } from "node:fs";
9235
- import { dirname } from "node:path";
9352
+ import { dirname as dirname2 } from "node:path";
9236
9353
  function detectJsoncFile(configDir, baseName) {
9237
9354
  const jsoncPath = `${configDir}/${baseName}.jsonc`;
9238
9355
  const jsonPath = `${configDir}/${baseName}.json`;
@@ -9260,7 +9377,7 @@ function readJsoncFile(path) {
9260
9377
  }
9261
9378
  }
9262
9379
  function writeJsoncFile(path, value, format = "json") {
9263
- mkdirSync2(dirname(path), { recursive: true });
9380
+ mkdirSync2(dirname2(path), { recursive: true });
9264
9381
  const serialized = format === "jsonc" ? import_comment_json.stringify(value, null, 2) : JSON.stringify(value, null, 2);
9265
9382
  writeFileSync(path, `${serialized}
9266
9383
  `);
@@ -9319,26 +9436,26 @@ var init_self_version = () => {};
9319
9436
 
9320
9437
  // src/adapters/opencode.ts
9321
9438
  import { execSync as execSync2 } from "node:child_process";
9322
- import { existsSync as existsSync5, readFileSync as readFileSync2, rmSync, statSync as statSync2 } from "node:fs";
9323
- import { homedir as homedir4 } from "node:os";
9324
- import { dirname as dirname2, join as join5, parse, resolve } from "node:path";
9439
+ import { existsSync as existsSync5, readFileSync as readFileSync2, rmSync, statSync as statSync3 } from "node:fs";
9440
+ import { homedir as homedir5 } from "node:os";
9441
+ import { dirname as dirname3, join as join6, parse, resolve } from "node:path";
9325
9442
  import { fileURLToPath } from "node:url";
9326
9443
  function getOpenCodeConfigDir() {
9327
9444
  const envDir = process.env.OPENCODE_CONFIG_DIR?.trim();
9328
9445
  if (envDir)
9329
9446
  return resolve(envDir);
9330
- const xdg = process.env.XDG_CONFIG_HOME || join5(homedir4(), ".config");
9331
- return join5(xdg, "opencode");
9447
+ const xdg = process.env.XDG_CONFIG_HOME || join6(homedir5(), ".config");
9448
+ return join6(xdg, "opencode");
9332
9449
  }
9333
9450
  function getOpenCodeCacheDir() {
9334
9451
  const xdg = process.env.XDG_CACHE_HOME;
9335
9452
  if (xdg)
9336
- return join5(xdg, "opencode");
9453
+ return join6(xdg, "opencode");
9337
9454
  if (process.platform === "win32") {
9338
- const localAppData = process.env.LOCALAPPDATA ?? join5(homedir4(), "AppData", "Local");
9339
- return join5(localAppData, "opencode");
9455
+ const localAppData = process.env.LOCALAPPDATA ?? join6(homedir5(), "AppData", "Local");
9456
+ return join6(localAppData, "opencode");
9340
9457
  }
9341
- return join5(homedir4(), ".cache", "opencode");
9458
+ return join6(homedir5(), ".cache", "opencode");
9342
9459
  }
9343
9460
  function hasOpenCodeCli() {
9344
9461
  try {
@@ -9351,12 +9468,12 @@ function hasOpenCodeCli() {
9351
9468
  function openCodeDesktopAppExists() {
9352
9469
  const candidates = [];
9353
9470
  if (process.platform === "darwin") {
9354
- candidates.push("/Applications/OpenCode.app", "/Applications/OpenCode Beta.app", join5(homedir4(), "Applications", "OpenCode.app"), join5(homedir4(), "Applications", "OpenCode Beta.app"));
9471
+ candidates.push("/Applications/OpenCode.app", "/Applications/OpenCode Beta.app", join6(homedir5(), "Applications", "OpenCode.app"), join6(homedir5(), "Applications", "OpenCode Beta.app"));
9355
9472
  } else if (process.platform === "win32") {
9356
- const localAppData = process.env.LOCALAPPDATA ?? join5(homedir4(), "AppData", "Local");
9357
- candidates.push(join5(localAppData, "Programs", "opencode"), join5(localAppData, "opencode"));
9473
+ const localAppData = process.env.LOCALAPPDATA ?? join6(homedir5(), "AppData", "Local");
9474
+ candidates.push(join6(localAppData, "Programs", "opencode"), join6(localAppData, "opencode"));
9358
9475
  } else {
9359
- candidates.push("/opt/OpenCode", "/usr/lib/opencode", join5(homedir4(), ".local", "share", "applications", "opencode.desktop"));
9476
+ candidates.push("/opt/OpenCode", "/usr/lib/opencode", join6(homedir5(), ".local", "share", "applications", "opencode.desktop"));
9360
9477
  }
9361
9478
  return candidates.some((p) => {
9362
9479
  try {
@@ -9385,15 +9502,15 @@ function pathPointsToOurPlugin(entry) {
9385
9502
  try {
9386
9503
  if (!existsSync5(fsPath))
9387
9504
  return false;
9388
- let searchDir = statSync2(fsPath).isDirectory() ? fsPath : dirname2(fsPath);
9505
+ let searchDir = statSync3(fsPath).isDirectory() ? fsPath : dirname3(fsPath);
9389
9506
  let pkgJsonPath = null;
9390
9507
  while (true) {
9391
- const candidate = join5(searchDir, "package.json");
9508
+ const candidate = join6(searchDir, "package.json");
9392
9509
  if (existsSync5(candidate)) {
9393
9510
  pkgJsonPath = candidate;
9394
9511
  break;
9395
9512
  }
9396
- const parent = dirname2(searchDir);
9513
+ const parent = dirname3(searchDir);
9397
9514
  if (parent === searchDir || searchDir === parse(searchDir).root)
9398
9515
  break;
9399
9516
  searchDir = parent;
@@ -9501,10 +9618,10 @@ class OpenCodeAdapter {
9501
9618
  };
9502
9619
  }
9503
9620
  getPluginCacheInfo() {
9504
- const path = join5(getOpenCodeCacheDir(), "packages", PLUGIN_ENTRY);
9621
+ const path = join6(getOpenCodeCacheDir(), "packages", PLUGIN_ENTRY);
9505
9622
  let cached;
9506
9623
  try {
9507
- const installedPkgPath = join5(path, "node_modules", "@cortexkit", "aft-opencode", "package.json");
9624
+ const installedPkgPath = join6(path, "node_modules", "@cortexkit", "aft-opencode", "package.json");
9508
9625
  if (existsSync5(installedPkgPath)) {
9509
9626
  const pkg = JSON.parse(readFileSync2(installedPkgPath, "utf-8"));
9510
9627
  cached = typeof pkg.version === "string" ? pkg.version : undefined;
@@ -9565,11 +9682,11 @@ class OpenCodeAdapter {
9565
9682
  describeStorageSubtrees() {
9566
9683
  const storage = this.getStorageDir();
9567
9684
  return {
9568
- index: dirSize(join5(storage, "index")),
9569
- semantic: dirSize(join5(storage, "semantic")),
9570
- backups: dirSize(join5(storage, "backups")),
9571
- url_cache: dirSize(join5(storage, "url_cache")),
9572
- onnxruntime: dirSize(join5(storage, "onnxruntime"))
9685
+ index: dirSize(join6(storage, "index")),
9686
+ semantic: dirSize(join6(storage, "semantic")),
9687
+ backups: dirSize(join6(storage, "backups")),
9688
+ url_cache: dirSize(join6(storage, "url_cache")),
9689
+ onnxruntime: dirSize(join6(storage, "onnxruntime"))
9573
9690
  };
9574
9691
  }
9575
9692
  }
@@ -9585,15 +9702,15 @@ var init_opencode = __esm(() => {
9585
9702
  // src/adapters/pi.ts
9586
9703
  import { execSync as execSync3, spawnSync as spawnSync2 } from "node:child_process";
9587
9704
  import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
9588
- import { homedir as homedir5 } from "node:os";
9589
- import { join as join6 } from "node:path";
9705
+ import { homedir as homedir6 } from "node:os";
9706
+ import { join as join7 } from "node:path";
9590
9707
  function getPiAgentDir() {
9591
9708
  const envHome = process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME;
9592
- const home = envHome && envHome.length > 0 ? envHome : homedir5();
9593
- return join6(home, ".pi", "agent");
9709
+ const home = envHome && envHome.length > 0 ? envHome : homedir6();
9710
+ return join7(home, ".pi", "agent");
9594
9711
  }
9595
9712
  function readPiExtensionIndex() {
9596
- const settingsPath = join6(getPiAgentDir(), "settings.json");
9713
+ const settingsPath = join7(getPiAgentDir(), "settings.json");
9597
9714
  if (existsSync6(settingsPath)) {
9598
9715
  try {
9599
9716
  const raw = readFileSync3(settingsPath, "utf-8");
@@ -9607,10 +9724,10 @@ function readPiExtensionIndex() {
9607
9724
  } catch {}
9608
9725
  }
9609
9726
  const candidates = [
9610
- join6(getPiAgentDir(), "extensions.json"),
9611
- join6(getPiAgentDir(), "extensions.jsonc"),
9612
- join6(getPiAgentDir(), "config.json"),
9613
- join6(getPiAgentDir(), "config.jsonc")
9727
+ join7(getPiAgentDir(), "extensions.json"),
9728
+ join7(getPiAgentDir(), "extensions.jsonc"),
9729
+ join7(getPiAgentDir(), "config.json"),
9730
+ join7(getPiAgentDir(), "config.jsonc")
9614
9731
  ];
9615
9732
  for (const path of candidates) {
9616
9733
  if (!existsSync6(path))
@@ -9646,14 +9763,14 @@ function piEntryMatchesAft(entry) {
9646
9763
  } else if (entry.startsWith("/")) {
9647
9764
  resolved = entry;
9648
9765
  } else if (entry.length > 0) {
9649
- resolved = join6(getPiAgentDir(), entry);
9766
+ resolved = join7(getPiAgentDir(), entry);
9650
9767
  }
9651
9768
  if (!resolved)
9652
9769
  return false;
9653
9770
  try {
9654
9771
  if (!existsSync6(resolved))
9655
9772
  return false;
9656
- const pkgPath = join6(resolved, "package.json");
9773
+ const pkgPath = join7(resolved, "package.json");
9657
9774
  if (!existsSync6(pkgPath))
9658
9775
  return false;
9659
9776
  const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
@@ -9704,7 +9821,7 @@ class PiAdapter {
9704
9821
  const aft = detectJsoncFile(configDir, "aft");
9705
9822
  return {
9706
9823
  configDir,
9707
- harnessConfig: index.path ?? join6(configDir, "extensions.json"),
9824
+ harnessConfig: index.path ?? join7(configDir, "extensions.json"),
9708
9825
  harnessConfigFormat: index.path ? "json" : "none",
9709
9826
  aftConfig: aft.path,
9710
9827
  aftConfigFormat: aft.format
@@ -9749,8 +9866,8 @@ class PiAdapter {
9749
9866
  }
9750
9867
  getPluginCacheInfo() {
9751
9868
  const candidates = [
9752
- join6(getPiAgentDir(), "node_modules", "@cortexkit", "aft-pi", "package.json"),
9753
- join6(getPiAgentDir(), "extensions", "node_modules", "@cortexkit", "aft-pi", "package.json")
9869
+ join7(getPiAgentDir(), "node_modules", "@cortexkit", "aft-pi", "package.json"),
9870
+ join7(getPiAgentDir(), "extensions", "node_modules", "@cortexkit", "aft-pi", "package.json")
9754
9871
  ];
9755
9872
  for (const candidate of candidates) {
9756
9873
  if (!existsSync6(candidate))
@@ -9767,7 +9884,7 @@ class PiAdapter {
9767
9884
  } catch {}
9768
9885
  }
9769
9886
  return {
9770
- path: join6(getPiAgentDir(), "extensions"),
9887
+ path: join7(getPiAgentDir(), "extensions"),
9771
9888
  exists: false
9772
9889
  };
9773
9890
  }
@@ -9789,11 +9906,11 @@ class PiAdapter {
9789
9906
  describeStorageSubtrees() {
9790
9907
  const storage = this.getStorageDir();
9791
9908
  return {
9792
- index: dirSize(join6(storage, "index")),
9793
- semantic: dirSize(join6(storage, "semantic")),
9794
- backups: dirSize(join6(storage, "backups")),
9795
- url_cache: dirSize(join6(storage, "url_cache")),
9796
- onnxruntime: dirSize(join6(storage, "onnxruntime"))
9909
+ index: dirSize(join7(storage, "index")),
9910
+ semantic: dirSize(join7(storage, "semantic")),
9911
+ backups: dirSize(join7(storage, "backups")),
9912
+ url_cache: dirSize(join7(storage, "url_cache")),
9913
+ onnxruntime: dirSize(join7(storage, "onnxruntime"))
9797
9914
  };
9798
9915
  }
9799
9916
  }
@@ -11522,23 +11639,23 @@ __export(exports_lsp, {
11522
11639
  printLspDoctorHelp: () => printLspDoctorHelp,
11523
11640
  findProjectRootForFile: () => findProjectRootForFile
11524
11641
  });
11525
- import { existsSync as existsSync7, readdirSync as readdirSync2, statSync as statSync3 } from "node:fs";
11526
- import { dirname as dirname3, join as join7, resolve as resolve2 } from "node:path";
11642
+ import { existsSync as existsSync7, readdirSync as readdirSync3, statSync as statSync4 } from "node:fs";
11643
+ import { dirname as dirname4, join as join8, resolve as resolve2 } from "node:path";
11527
11644
  function findProjectRootForFile(filePath, fallbackCwd = process.cwd()) {
11528
11645
  const resolvedFile = resolve2(fallbackCwd, filePath);
11529
- let dir = dirname3(resolvedFile);
11646
+ let dir = dirname4(resolvedFile);
11530
11647
  try {
11531
- if (existsSync7(resolvedFile) && statSync3(resolvedFile).isDirectory()) {
11648
+ if (existsSync7(resolvedFile) && statSync4(resolvedFile).isDirectory()) {
11532
11649
  dir = resolvedFile;
11533
11650
  }
11534
11651
  } catch {
11535
- dir = dirname3(resolvedFile);
11652
+ dir = dirname4(resolvedFile);
11536
11653
  }
11537
11654
  while (true) {
11538
- if (PROJECT_ROOT_MARKERS.some((marker) => existsSync7(join7(dir, marker)))) {
11655
+ if (PROJECT_ROOT_MARKERS.some((marker) => existsSync7(join8(dir, marker)))) {
11539
11656
  return dir;
11540
11657
  }
11541
- const parent = dirname3(dir);
11658
+ const parent = dirname4(dir);
11542
11659
  if (parent === dir)
11543
11660
  return resolve2(fallbackCwd);
11544
11661
  dir = parent;
@@ -11673,8 +11790,8 @@ function buildConfigureParams(adapter, projectRoot) {
11673
11790
  }
11674
11791
  function readProjectConfig(kind, projectRoot) {
11675
11792
  const dir = kind === "pi" ? ".pi" : ".opencode";
11676
- const jsonc = join7(projectRoot, dir, "aft.jsonc");
11677
- const json = join7(projectRoot, dir, "aft.json");
11793
+ const jsonc = join8(projectRoot, dir, "aft.jsonc");
11794
+ const json = join8(projectRoot, dir, "aft.json");
11678
11795
  if (existsSync7(jsonc))
11679
11796
  return readJsoncFile(jsonc).value ?? {};
11680
11797
  if (existsSync7(json))
@@ -11740,10 +11857,10 @@ function resolveCustomServers(servers) {
11740
11857
  function inferLspPathsExtra(_lsp) {
11741
11858
  const paths = new Set;
11742
11859
  for (const entry of childDirs(getAftLspPackagesDir())) {
11743
- paths.add(join7(entry, "node_modules", ".bin"));
11860
+ paths.add(join8(entry, "node_modules", ".bin"));
11744
11861
  }
11745
11862
  for (const entry of childDirs(getAftLspBinariesDir())) {
11746
- paths.add(join7(entry, "bin"));
11863
+ paths.add(join8(entry, "bin"));
11747
11864
  }
11748
11865
  return [...paths];
11749
11866
  }
@@ -11751,9 +11868,9 @@ function childDirs(path) {
11751
11868
  if (!existsSync7(path))
11752
11869
  return [];
11753
11870
  try {
11754
- return readdirSync2(path).map((entry) => join7(path, entry)).filter((entry) => {
11871
+ return readdirSync3(path).map((entry) => join8(path, entry)).filter((entry) => {
11755
11872
  try {
11756
- return statSync3(entry).isDirectory();
11873
+ return statSync4(entry).isDirectory();
11757
11874
  } catch {
11758
11875
  return false;
11759
11876
  }
@@ -11832,7 +11949,7 @@ __export(exports_doctor_filters, {
11832
11949
  printDoctorFiltersHelp: () => printDoctorFiltersHelp
11833
11950
  });
11834
11951
  import { existsSync as existsSync8 } from "node:fs";
11835
- import { homedir as homedir6 } from "node:os";
11952
+ import { homedir as homedir7 } from "node:os";
11836
11953
  import { relative, resolve as resolve3 } from "node:path";
11837
11954
  function printDoctorFiltersHelp() {
11838
11955
  console.log("Usage: aft doctor filters [--show <name>] [trust|untrust]");
@@ -12050,7 +12167,7 @@ function truncate(value) {
12050
12167
  return value.length <= 80 ? value : `${value.slice(0, 77)}…`;
12051
12168
  }
12052
12169
  function formatHome(path) {
12053
- const home = homedir6();
12170
+ const home = homedir7();
12054
12171
  return path.startsWith(home) ? `~${path.slice(home.length)}` : path;
12055
12172
  }
12056
12173
  function formatProjectPath(path, projectRoot) {
@@ -12073,8 +12190,8 @@ var init_doctor_filters = __esm(async () => {
12073
12190
  });
12074
12191
 
12075
12192
  // src/lib/binary-cache.ts
12076
- import { existsSync as existsSync9, readdirSync as readdirSync3, statSync as statSync4 } from "node:fs";
12077
- import { join as join8 } from "node:path";
12193
+ import { existsSync as existsSync9, readdirSync as readdirSync4, statSync as statSync5 } from "node:fs";
12194
+ import { join as join9 } from "node:path";
12078
12195
  function getBinaryCacheInfo(activeVersion) {
12079
12196
  const path = getAftBinaryCacheDir();
12080
12197
  if (!existsSync9(path)) {
@@ -12085,9 +12202,9 @@ function getBinaryCacheInfo(activeVersion) {
12085
12202
  path
12086
12203
  };
12087
12204
  }
12088
- const versions = readdirSync3(path).filter((entry) => {
12205
+ const versions = readdirSync4(path).filter((entry) => {
12089
12206
  try {
12090
- return statSync4(join8(path, entry)).isDirectory();
12207
+ return statSync5(join9(path, entry)).isDirectory();
12091
12208
  } catch {
12092
12209
  return false;
12093
12210
  }
@@ -12107,8 +12224,8 @@ var init_binary_cache = __esm(() => {
12107
12224
  });
12108
12225
 
12109
12226
  // src/lib/lsp-cache.ts
12110
- import { existsSync as existsSync10, readdirSync as readdirSync4, rmSync as rmSync2, statSync as statSync5 } from "node:fs";
12111
- import { join as join9 } from "node:path";
12227
+ import { existsSync as existsSync10, readdirSync as readdirSync5, rmSync as rmSync2, statSync as statSync6 } from "node:fs";
12228
+ import { join as join10 } from "node:path";
12112
12229
  function inspectDir(path) {
12113
12230
  if (!existsSync10(path)) {
12114
12231
  return { entries: [], totalSize: 0 };
@@ -12117,14 +12234,14 @@ function inspectDir(path) {
12117
12234
  let totalSize = 0;
12118
12235
  let names;
12119
12236
  try {
12120
- names = readdirSync4(path);
12237
+ names = readdirSync5(path);
12121
12238
  } catch {
12122
12239
  return { entries: [], totalSize: 0 };
12123
12240
  }
12124
12241
  for (const name of names) {
12125
- const full = join9(path, name);
12242
+ const full = join10(path, name);
12126
12243
  try {
12127
- if (!statSync5(full).isDirectory())
12244
+ if (!statSync6(full).isDirectory())
12128
12245
  continue;
12129
12246
  const size = dirSize(full);
12130
12247
  entries.push({
@@ -12180,8 +12297,8 @@ var init_lsp_cache = __esm(() => {
12180
12297
  });
12181
12298
 
12182
12299
  // src/lib/onnx.ts
12183
- import { existsSync as existsSync11, readdirSync as readdirSync5, readlinkSync, realpathSync as realpathSync2, statSync as statSync6 } from "node:fs";
12184
- import { basename, isAbsolute, join as join10, resolve as resolve4, win32 } from "node:path";
12300
+ import { existsSync as existsSync11, readdirSync as readdirSync6, readlinkSync, realpathSync as realpathSync2, statSync as statSync7 } from "node:fs";
12301
+ import { basename, isAbsolute as isAbsolute2, join as join11, resolve as resolve4, win32 } from "node:path";
12185
12302
  function getOnnxLibraryName() {
12186
12303
  if (process.platform === "darwin")
12187
12304
  return "libonnxruntime.dylib";
@@ -12214,16 +12331,16 @@ function pathEnvValue() {
12214
12331
  return process.env.PATH ?? process.env.Path ?? process.env.path ?? "";
12215
12332
  }
12216
12333
  function pathEntriesForPlatform() {
12217
- const delimiter = process.platform === "win32" ? ";" : ":";
12218
- return pathEnvValue().split(delimiter).map((entry) => entry.trim().replace(/^"|"$/g, "")).filter((entry) => {
12334
+ const delimiter2 = process.platform === "win32" ? ";" : ":";
12335
+ return pathEnvValue().split(delimiter2).map((entry) => entry.trim().replace(/^"|"$/g, "")).filter((entry) => {
12219
12336
  if (!entry || entry === "." || entry.includes("\x00"))
12220
12337
  return false;
12221
- return isAbsolute(entry) || win32.isAbsolute(entry);
12338
+ return isAbsolute2(entry) || win32.isAbsolute(entry);
12222
12339
  });
12223
12340
  }
12224
12341
  function directoryContainsLibrary(dir, libName) {
12225
12342
  try {
12226
- const entries = readdirSync5(dir);
12343
+ const entries = readdirSync6(dir);
12227
12344
  if (process.platform === "win32") {
12228
12345
  const expected = libName.toLowerCase();
12229
12346
  return entries.some((entry) => entry.toLowerCase() === expected);
@@ -12244,21 +12361,21 @@ function findSystemOnnxRuntime() {
12244
12361
  searchPaths.push(...pathEntriesForPlatform());
12245
12362
  const programFiles = process.env.ProgramFiles ?? "C:\\Program Files";
12246
12363
  const programFilesX86 = process.env["ProgramFiles(x86)"] ?? "C:\\Program Files (x86)";
12247
- searchPaths.push(join10(programFiles, "onnxruntime", "lib"), join10(programFiles, "Microsoft ONNX Runtime", "lib"), join10(programFiles, "Microsoft Machine Learning", "lib"), join10(programFilesX86, "onnxruntime", "lib"), ...(() => {
12364
+ searchPaths.push(join11(programFiles, "onnxruntime", "lib"), join11(programFiles, "Microsoft ONNX Runtime", "lib"), join11(programFiles, "Microsoft Machine Learning", "lib"), join11(programFilesX86, "onnxruntime", "lib"), ...(() => {
12248
12365
  const nugetPaths = [];
12249
12366
  const userProfile = process.env.USERPROFILE ?? "";
12250
12367
  if (!userProfile)
12251
12368
  return nugetPaths;
12252
- const nugetPackageDir = join10(userProfile, ".nuget", "packages", "microsoft.ml.onnxruntime");
12369
+ const nugetPackageDir = join11(userProfile, ".nuget", "packages", "microsoft.ml.onnxruntime");
12253
12370
  if (!existsSync11(nugetPackageDir))
12254
12371
  return nugetPaths;
12255
12372
  try {
12256
- for (const entry of readdirSync5(nugetPackageDir, { withFileTypes: true })) {
12373
+ for (const entry of readdirSync6(nugetPackageDir, { withFileTypes: true })) {
12257
12374
  if (!entry.isDirectory())
12258
12375
  continue;
12259
12376
  if (entry.name === "__globalPackagesFolder" || entry.name.startsWith("."))
12260
12377
  continue;
12261
- nugetPaths.push(join10(nugetPackageDir, entry.name, "runtimes", "win-x64", "native"), join10(nugetPackageDir, entry.name, "runtimes", "win-arm64", "native"));
12378
+ nugetPaths.push(join11(nugetPackageDir, entry.name, "runtimes", "win-x64", "native"), join11(nugetPackageDir, entry.name, "runtimes", "win-arm64", "native"));
12262
12379
  }
12263
12380
  } catch {}
12264
12381
  return nugetPaths;
@@ -12288,12 +12405,12 @@ function findSystemOnnxRuntime() {
12288
12405
  return unknownVersionPaths[0] ?? null;
12289
12406
  }
12290
12407
  function findCachedOnnxRuntime(storageDir) {
12291
- const ortDir = join10(storageDir, "onnxruntime", ONNX_RUNTIME_VERSION);
12408
+ const ortDir = join11(storageDir, "onnxruntime", ONNX_RUNTIME_VERSION);
12292
12409
  const libName = getOnnxLibraryName();
12293
- if (existsSync11(join10(ortDir, libName)))
12410
+ if (existsSync11(join11(ortDir, libName)))
12294
12411
  return ortDir;
12295
- const libSubdir = join10(ortDir, "lib");
12296
- if (existsSync11(join10(libSubdir, libName)))
12412
+ const libSubdir = join11(ortDir, "lib");
12413
+ if (existsSync11(join11(libSubdir, libName)))
12297
12414
  return libSubdir;
12298
12415
  return null;
12299
12416
  }
@@ -12318,7 +12435,7 @@ function detectOrtVersion(libDir) {
12318
12435
  return null;
12319
12436
  const libName = getOnnxLibraryName();
12320
12437
  try {
12321
- const entries = readdirSync5(libDir);
12438
+ const entries = readdirSync6(libDir);
12322
12439
  const barePrefix = libName.replace(/\.(so|dylib|dll)$/, "");
12323
12440
  const expectedPrefix = process.platform === "win32" ? barePrefix.toLowerCase() : barePrefix;
12324
12441
  for (const entry of entries) {
@@ -12329,7 +12446,7 @@ function detectOrtVersion(libDir) {
12329
12446
  if (version)
12330
12447
  return version;
12331
12448
  }
12332
- const base = join10(libDir, libName);
12449
+ const base = join11(libDir, libName);
12333
12450
  if (existsSync11(base)) {
12334
12451
  try {
12335
12452
  const real = realpathSync2(base);
@@ -12362,7 +12479,7 @@ var init_onnx = () => {};
12362
12479
 
12363
12480
  // src/lib/sanitize.ts
12364
12481
  import { realpathSync as realpathSync3 } from "node:fs";
12365
- import { homedir as homedir7, userInfo } from "node:os";
12482
+ import { homedir as homedir8, userInfo } from "node:os";
12366
12483
  function escapeRegex(value) {
12367
12484
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
12368
12485
  }
@@ -12393,7 +12510,7 @@ function redactSecrets(content) {
12393
12510
  }
12394
12511
  function sanitizeContent(content) {
12395
12512
  const username = userInfo().username;
12396
- const home = homedir7();
12513
+ const home = homedir8();
12397
12514
  let sanitized = redactSecrets(content);
12398
12515
  const cwd = process.cwd();
12399
12516
  for (const candidate of new Set([cwd, safeRealpath(cwd)])) {
@@ -12445,7 +12562,7 @@ import {
12445
12562
  existsSync as existsSync12,
12446
12563
  openSync as openSync2,
12447
12564
  readSync as readSync2,
12448
- statSync as statSync7
12565
+ statSync as statSync8
12449
12566
  } from "node:fs";
12450
12567
  async function collectDiagnostics(adapters) {
12451
12568
  const cliVersion = getSelfVersion();
@@ -12523,7 +12640,7 @@ async function diagnoseHarness(adapter) {
12523
12640
  logFile: {
12524
12641
  path: logPath,
12525
12642
  exists: existsSync12(logPath),
12526
- sizeKb: existsSync12(logPath) ? Math.round(statSync7(logPath).size / 1024) : 0
12643
+ sizeKb: existsSync12(logPath) ? Math.round(statSync8(logPath).size / 1024) : 0
12527
12644
  }
12528
12645
  };
12529
12646
  }
@@ -12724,7 +12841,7 @@ function tailLogFile(path, lines) {
12724
12841
  const chunkSize = 64 * 1024;
12725
12842
  let fd = null;
12726
12843
  try {
12727
- const size = statSync7(path).size;
12844
+ const size = statSync8(path).size;
12728
12845
  fd = openSync2(path, "r");
12729
12846
  const chunks = [];
12730
12847
  let position = size;
@@ -12904,7 +13021,7 @@ var init_issue_body = __esm(() => {
12904
13021
 
12905
13022
  // src/lib/onnx-fix.ts
12906
13023
  import { existsSync as existsSync13, rmSync as rmSync3 } from "node:fs";
12907
- import { join as join11 } from "node:path";
13024
+ import { join as join12 } from "node:path";
12908
13025
  function findOnnxFixCandidates(report) {
12909
13026
  const candidates = [];
12910
13027
  for (const harness of report.harnesses) {
@@ -12912,7 +13029,7 @@ function findOnnxFixCandidates(report) {
12912
13029
  continue;
12913
13030
  if (!harness.storageDir.exists)
12914
13031
  continue;
12915
- const storageOnnxDir = join11(harness.storageDir.path, "onnxruntime");
13032
+ const storageOnnxDir = join12(harness.storageDir.path, "onnxruntime");
12916
13033
  const systemTooOld = harness.onnxRuntime.systemPath !== null && harness.onnxRuntime.systemCompatible === false;
12917
13034
  const cachedTooOld = harness.onnxRuntime.cachedPath !== null && harness.onnxRuntime.cachedCompatible === false;
12918
13035
  const hasCompatibleCached = harness.onnxRuntime.cachedCompatible === true;
@@ -12986,10 +13103,10 @@ var init_onnx_fix = __esm(() => {
12986
13103
  });
12987
13104
 
12988
13105
  // src/lib/sessions.ts
12989
- import { existsSync as existsSync14, readdirSync as readdirSync6, readFileSync as readFileSync4, statSync as statSync8 } from "node:fs";
13106
+ import { existsSync as existsSync14, readdirSync as readdirSync7, readFileSync as readFileSync4, statSync as statSync9 } from "node:fs";
12990
13107
  import { createRequire as createRequire3 } from "node:module";
12991
- import { homedir as homedir8 } from "node:os";
12992
- import { basename as basename2, join as join12 } from "node:path";
13108
+ import { homedir as homedir9 } from "node:os";
13109
+ import { basename as basename2, join as join13 } from "node:path";
12993
13110
  function listRecentSessions(adapter) {
12994
13111
  try {
12995
13112
  if (adapter.kind === "opencode")
@@ -13018,7 +13135,7 @@ function mapOpenCodeSessionRows(rows) {
13018
13135
  }).filter((session) => session !== null).sort((a, b) => b.lastActivity - a.lastActivity).slice(0, MAX_RECENT_SESSIONS);
13019
13136
  }
13020
13137
  function listRecentOpenCodeSessions() {
13021
- const dbPath = join12(getXdgDataHome(), "opencode", "opencode.db");
13138
+ const dbPath = join13(getXdgDataHome(), "opencode", "opencode.db");
13022
13139
  if (!existsSync14(dbPath))
13023
13140
  return [];
13024
13141
  let db = null;
@@ -13038,14 +13155,14 @@ function listRecentOpenCodeSessions() {
13038
13155
  }
13039
13156
  function getXdgDataHome() {
13040
13157
  const xdgDataHome = process.env.XDG_DATA_HOME;
13041
- return xdgDataHome && xdgDataHome.length > 0 ? xdgDataHome : join12(homedir8(), ".local", "share");
13158
+ return xdgDataHome && xdgDataHome.length > 0 ? xdgDataHome : join13(homedir9(), ".local", "share");
13042
13159
  }
13043
13160
  function listRecentPiSessions() {
13044
- return listPiSessionsFromDir(join12(getHomeDir(), ".pi", "agent", "sessions"));
13161
+ return listPiSessionsFromDir(join13(getHomeDir(), ".pi", "agent", "sessions"));
13045
13162
  }
13046
13163
  function getHomeDir() {
13047
13164
  const envHome = process.platform === "win32" ? process.env.USERPROFILE : process.env.HOME;
13048
- return envHome && envHome.length > 0 ? envHome : homedir8();
13165
+ return envHome && envHome.length > 0 ? envHome : homedir9();
13049
13166
  }
13050
13167
  function listPiSessionsFromDir(sessionsDir) {
13051
13168
  try {
@@ -13053,7 +13170,7 @@ function listPiSessionsFromDir(sessionsDir) {
13053
13170
  return [];
13054
13171
  const files = collectJsonlFiles(sessionsDir).map((filePath) => {
13055
13172
  try {
13056
- const stats = statSync8(filePath);
13173
+ const stats = statSync9(filePath);
13057
13174
  return { filePath, mtimeMs: stats.mtimeMs };
13058
13175
  } catch {
13059
13176
  return null;
@@ -13082,12 +13199,12 @@ function collectJsonlFiles(root) {
13082
13199
  continue;
13083
13200
  let entries;
13084
13201
  try {
13085
- entries = readdirSync6(dir, { withFileTypes: true });
13202
+ entries = readdirSync7(dir, { withFileTypes: true });
13086
13203
  } catch {
13087
13204
  continue;
13088
13205
  }
13089
13206
  for (const entry of entries) {
13090
- const path = join12(dir, entry.name);
13207
+ const path = join13(dir, entry.name);
13091
13208
  if (entry.isDirectory()) {
13092
13209
  stack.push(path);
13093
13210
  } else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
@@ -13184,6 +13301,7 @@ __export(exports_doctor, {
13184
13301
  DOCTOR_FORCE_CLEAR_TARGETS: () => DOCTOR_FORCE_CLEAR_TARGETS,
13185
13302
  DOCTOR_CLEAR_TARGET_OPTIONS: () => DOCTOR_CLEAR_TARGET_OPTIONS
13186
13303
  });
13304
+ import { execFileSync } from "node:child_process";
13187
13305
  import {
13188
13306
  chmodSync as chmodSync2,
13189
13307
  existsSync as existsSync15,
@@ -13192,11 +13310,11 @@ import {
13192
13310
  readFileSync as readFileSync5,
13193
13311
  realpathSync as realpathSync4,
13194
13312
  rmSync as rmSync4,
13195
- statSync as statSync9,
13313
+ statSync as statSync10,
13196
13314
  writeFileSync as writeFileSync2
13197
13315
  } from "node:fs";
13198
13316
  import { tmpdir as tmpdir2 } from "node:os";
13199
- import { join as join13 } from "node:path";
13317
+ import { join as join14 } from "node:path";
13200
13318
  async function runDoctor(options) {
13201
13319
  if (options.issue) {
13202
13320
  return runIssueFlow(options.argv);
@@ -13360,10 +13478,10 @@ function clearOldBinaries() {
13360
13478
  return result;
13361
13479
  }
13362
13480
  for (const version of stale) {
13363
- const dir = join13(info.path, version);
13481
+ const dir = join14(info.path, version);
13364
13482
  let bytes = 0;
13365
13483
  try {
13366
- bytes = statSync9(dir).isDirectory() ? dirSize(dir) : 0;
13484
+ bytes = statSync10(dir).isDirectory() ? dirSize(dir) : 0;
13367
13485
  } catch {
13368
13486
  bytes = 0;
13369
13487
  }
@@ -13383,6 +13501,31 @@ function clearOldBinaries() {
13383
13501
  }
13384
13502
  return result;
13385
13503
  }
13504
+ function findPluginUpdateTargets(adapters, report) {
13505
+ const adaptersByKind = new Map(adapters.map((a) => [a.kind, a]));
13506
+ const targets = [];
13507
+ for (const harness of report.harnesses) {
13508
+ if (harness.kind !== "opencode")
13509
+ continue;
13510
+ if (!harness.hostInstalled || !harness.pluginRegistered)
13511
+ continue;
13512
+ const cache = harness.pluginCache;
13513
+ if (!cache?.exists || !cache.cached || !cache.latest)
13514
+ continue;
13515
+ if (cache.cached === cache.latest)
13516
+ continue;
13517
+ const adapter = adaptersByKind.get(harness.kind);
13518
+ if (!adapter)
13519
+ continue;
13520
+ targets.push({
13521
+ adapter,
13522
+ installDir: cache.path,
13523
+ cached: cache.cached,
13524
+ latest: cache.latest
13525
+ });
13526
+ }
13527
+ return targets;
13528
+ }
13386
13529
  function findSchemaFixTargets(adapters) {
13387
13530
  const targets = [];
13388
13531
  for (const adapter of adapters) {
@@ -13402,6 +13545,35 @@ function findSchemaFixTargets(adapters) {
13402
13545
  }
13403
13546
  return targets;
13404
13547
  }
13548
+ async function applyPluginUpdates(targets) {
13549
+ let updated = 0;
13550
+ let errors = 0;
13551
+ if (targets.length === 0)
13552
+ return { updated, errors };
13553
+ const npm = resolveNpm();
13554
+ if (!npm) {
13555
+ errors += targets.length;
13556
+ O2.error("Could not find npm on PATH or in known version-manager locations, so the plugin cannot be updated automatically. Install Node/npm, or launch your editor from a shell where npm is available.");
13557
+ return { updated, errors };
13558
+ }
13559
+ for (const target of targets) {
13560
+ try {
13561
+ execFileSync(npm.command, ["install", "--no-audit", "--no-fund", "--no-progress", "--ignore-scripts"], {
13562
+ cwd: target.installDir,
13563
+ env: npmSpawnEnv(npm),
13564
+ stdio: ["ignore", "pipe", "pipe"],
13565
+ timeout: 120000
13566
+ });
13567
+ updated += 1;
13568
+ O2.success(`${target.adapter.displayName}: plugin updated ${target.cached} → ${target.latest} (restart ${target.adapter.displayName} to apply)`);
13569
+ } catch (err) {
13570
+ errors += 1;
13571
+ const message = err instanceof Error ? err.message : String(err);
13572
+ O2.error(`${target.adapter.displayName}: plugin update failed: ${message}`);
13573
+ }
13574
+ }
13575
+ return { updated, errors };
13576
+ }
13405
13577
  function applySchemaFixes(targets) {
13406
13578
  let changed = 0;
13407
13579
  let errors = 0;
@@ -13438,6 +13610,12 @@ function buildDoctorFixPlan(adapters, report) {
13438
13610
  });
13439
13611
  }
13440
13612
  }
13613
+ for (const target of findPluginUpdateTargets(adapters, report)) {
13614
+ items.push({
13615
+ kind: "plugin-update",
13616
+ message: `Will update ${target.adapter.displayName} plugin ${target.cached} → ${target.latest} via npm (the plugin's own auto-update could not run, often no npm on PATH)`
13617
+ });
13618
+ }
13441
13619
  if (!report.binaryVersion) {
13442
13620
  const skews = findPluginCliVersionSkews(report);
13443
13621
  items.push({
@@ -13531,6 +13709,7 @@ async function runFixFlow(argv) {
13531
13709
  }
13532
13710
  }
13533
13711
  await fixPluginEntries(adapters);
13712
+ const pluginUpdateSummary = await applyPluginUpdates(findPluginUpdateTargets(adapters, report));
13534
13713
  const storageSummary = ensureStorageDirsForRegisteredPlugins(adapters);
13535
13714
  const schemaSummary = applySchemaFixes(findSchemaFixTargets(adapters));
13536
13715
  let binaryDownloaded = false;
@@ -13561,7 +13740,7 @@ async function runFixFlow(argv) {
13561
13740
  }
13562
13741
  }
13563
13742
  const onnxResult = await runOnnxFix(adapters, report, { yes: true });
13564
- if (onnxResult === null && !binaryDownloaded && !binaryDownloadSkipped && !binaryDownloadError && storageSummary.created === 0 && storageSummary.errors === 0 && schemaSummary.changed === 0 && schemaSummary.errors === 0) {
13743
+ if (onnxResult === null && !binaryDownloaded && !binaryDownloadSkipped && !binaryDownloadError && storageSummary.created === 0 && storageSummary.errors === 0 && schemaSummary.changed === 0 && schemaSummary.errors === 0 && pluginUpdateSummary.updated === 0 && pluginUpdateSummary.errors === 0) {
13565
13744
  O2.info("No auto-fixable issues detected.");
13566
13745
  wt("If you're still seeing 'Semantic Index: failed' in the TUI sidebar, run `aft doctor` (without --fix) for a full diagnostic dump.", "Tip");
13567
13746
  const afterReport2 = await collectDiagnostics(adapters);
@@ -13569,7 +13748,7 @@ async function runFixFlow(argv) {
13569
13748
  gt(stillHasProblems2 ? "Done — some issues remain." : "Done.");
13570
13749
  return stillHasProblems2 ? 1 : 0;
13571
13750
  }
13572
- const hadErrors = (onnxResult?.errors.length ?? 0) > 0 || binaryDownloadError !== null || storageSummary.errors > 0 || schemaSummary.errors > 0;
13751
+ const hadErrors = (onnxResult?.errors.length ?? 0) > 0 || binaryDownloadError !== null || storageSummary.errors > 0 || schemaSummary.errors > 0 || pluginUpdateSummary.errors > 0;
13573
13752
  const afterReport = await collectDiagnostics(adapters);
13574
13753
  const stillHasProblems = hasDoctorProblems(afterReport);
13575
13754
  gt(hadErrors ? "Done — some fixes failed." : stillHasProblems ? "Done — some issues remain." : "Done.");
@@ -13727,11 +13906,11 @@ function deriveIssueTitleFromBody(body) {
13727
13906
  function writeIssueReviewFile(body) {
13728
13907
  let reviewDir = null;
13729
13908
  try {
13730
- reviewDir = mkdtempSync(join13(tmpdir2(), "aft-issue-"));
13909
+ reviewDir = mkdtempSync(join14(tmpdir2(), "aft-issue-"));
13731
13910
  if (process.platform !== "win32") {
13732
13911
  chmodSync2(reviewDir, 448);
13733
13912
  }
13734
- const outPath = join13(reviewDir, "issue.md");
13913
+ const outPath = join14(reviewDir, "issue.md");
13735
13914
  writeFileSync2(outPath, `${body}
13736
13915
  `, { encoding: "utf8", mode: 384, flag: "wx" });
13737
13916
  return { path: outPath, realPath: realpathSync4(outPath) };
@@ -13889,6 +14068,7 @@ https://github.com/cortexkit/aft/issues/new and paste the contents of ${outPath}
13889
14068
  }
13890
14069
  var DOCTOR_CLEAR_TARGET_OPTIONS, DOCTOR_FORCE_CLEAR_TARGETS;
13891
14070
  var init_doctor = __esm(async () => {
14071
+ init_dist();
13892
14072
  init_binary_cache();
13893
14073
  init_fs_util();
13894
14074
  init_github();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/aft",
3
- "version": "0.35.1",
3
+ "version": "0.35.2",
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",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@clack/prompts": "^1.2.0",
27
- "@cortexkit/aft-bridge": "0.35.1",
27
+ "@cortexkit/aft-bridge": "0.35.2",
28
28
  "comment-json": "^4.6.2"
29
29
  },
30
30
  "devDependencies": {