ctxo-mcp 0.6.0 → 0.6.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.
- package/dist/{cli-router-NPFFQFTM.js → cli-router-LW4YTNHW.js} +21 -3
- package/dist/cli-router-LW4YTNHW.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +3 -1
- package/tools/ctxo-roslyn/Program.cs +637 -0
- package/tools/ctxo-roslyn/ctxo-roslyn.csproj +14 -0
- package/dist/cli-router-NPFFQFTM.js.map +0 -1
|
@@ -1211,6 +1211,16 @@ import { existsSync as existsSync3, readdirSync } from "fs";
|
|
|
1211
1211
|
import { join as join4 } from "path";
|
|
1212
1212
|
var log = createLogger("ctxo:roslyn");
|
|
1213
1213
|
var IGNORE_DIRS = /* @__PURE__ */ new Set(["bin", "obj", "node_modules", ".git", ".ctxo", "packages"]);
|
|
1214
|
+
function findPackageRoot(startDir) {
|
|
1215
|
+
let dir = startDir;
|
|
1216
|
+
for (let i = 0; i < 10; i++) {
|
|
1217
|
+
if (existsSync3(join4(dir, "package.json"))) return dir;
|
|
1218
|
+
const parent = join4(dir, "..");
|
|
1219
|
+
if (parent === dir) break;
|
|
1220
|
+
dir = parent;
|
|
1221
|
+
}
|
|
1222
|
+
return null;
|
|
1223
|
+
}
|
|
1214
1224
|
function detectDotnetSdk() {
|
|
1215
1225
|
try {
|
|
1216
1226
|
const version = execFileSync("dotnet", ["--version"], { encoding: "utf-8", timeout: 1e4 }).trim();
|
|
@@ -1260,10 +1270,18 @@ function findFiles(dir, ext, maxDepth, currentDepth = 0) {
|
|
|
1260
1270
|
return results;
|
|
1261
1271
|
}
|
|
1262
1272
|
function findCtxoRoslynProject() {
|
|
1273
|
+
const pkgRoot = findPackageRoot(import.meta.dirname);
|
|
1263
1274
|
const candidates = [
|
|
1275
|
+
...pkgRoot ? [join4(pkgRoot, "tools/ctxo-roslyn")] : [],
|
|
1276
|
+
// package root (npx, global, local dev)
|
|
1277
|
+
join4(import.meta.dirname, "../tools/ctxo-roslyn"),
|
|
1278
|
+
// dist/ -> tools/ (tsup bundled)
|
|
1264
1279
|
join4(import.meta.dirname, "../../../../tools/ctxo-roslyn"),
|
|
1265
|
-
|
|
1266
|
-
join4(process.cwd(), "node_modules/ctxo/tools/ctxo-roslyn")
|
|
1280
|
+
// src/adapters/language/roslyn -> tools/ (dev unbundled)
|
|
1281
|
+
join4(process.cwd(), "node_modules/ctxo-mcp/tools/ctxo-roslyn"),
|
|
1282
|
+
// npm install in project
|
|
1283
|
+
join4(process.cwd(), "tools/ctxo-roslyn")
|
|
1284
|
+
// local repo root
|
|
1267
1285
|
];
|
|
1268
1286
|
for (const candidate of candidates) {
|
|
1269
1287
|
const csproj = join4(candidate, "ctxo-roslyn.csproj");
|
|
@@ -3375,4 +3393,4 @@ Usage:
|
|
|
3375
3393
|
export {
|
|
3376
3394
|
CliRouter
|
|
3377
3395
|
};
|
|
3378
|
-
//# sourceMappingURL=cli-router-
|
|
3396
|
+
//# sourceMappingURL=cli-router-LW4YTNHW.js.map
|