trace-mcp 1.16.1 → 1.18.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/cli.js +111 -41
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -88582,7 +88582,7 @@ init_schema();
|
|
|
88582
88582
|
init_store();
|
|
88583
88583
|
init_registry();
|
|
88584
88584
|
init_config();
|
|
88585
|
-
import { Command as
|
|
88585
|
+
import { Command as Command15 } from "commander";
|
|
88586
88586
|
import path120 from "path";
|
|
88587
88587
|
import fs111 from "fs";
|
|
88588
88588
|
import { randomUUID } from "crypto";
|
|
@@ -88596,7 +88596,7 @@ import https from "https";
|
|
|
88596
88596
|
import { spawnSync } from "child_process";
|
|
88597
88597
|
import path63 from "path";
|
|
88598
88598
|
import fs64 from "fs";
|
|
88599
|
-
var CURRENT_VERSION = true ? "1.
|
|
88599
|
+
var CURRENT_VERSION = true ? "1.18.0" : "0.0.0-dev";
|
|
88600
88600
|
var UPDATE_CACHE_PATH = path63.join(TRACE_MCP_HOME, "update-check.json");
|
|
88601
88601
|
function readCache() {
|
|
88602
88602
|
try {
|
|
@@ -108775,7 +108775,7 @@ function registerAdvancedTools(server, ctx) {
|
|
|
108775
108775
|
symbolKinds: symbol_kinds,
|
|
108776
108776
|
maxFiles: max_files,
|
|
108777
108777
|
maxNodes: max_nodes,
|
|
108778
|
-
topoStore: ctx.topoStore,
|
|
108778
|
+
topoStore: ctx.topoStore ?? void 0,
|
|
108779
108779
|
projectRoot
|
|
108780
108780
|
});
|
|
108781
108781
|
if (result.isErr()) return { content: [{ type: "text", text: j3(formatToolError(result.error)) }], isError: true };
|
|
@@ -115505,7 +115505,7 @@ var TopologyStore = class {
|
|
|
115505
115505
|
};
|
|
115506
115506
|
|
|
115507
115507
|
// src/server/server.ts
|
|
115508
|
-
var PKG_VERSION = true ? "1.
|
|
115508
|
+
var PKG_VERSION = true ? "1.18.0" : "0.0.0-dev";
|
|
115509
115509
|
function j2(value) {
|
|
115510
115510
|
return JSON.stringify(value, (_key, val) => val === null || val === void 0 ? void 0 : val);
|
|
115511
115511
|
}
|
|
@@ -116079,7 +116079,7 @@ function isServerRunning(db) {
|
|
|
116079
116079
|
import http from "http";
|
|
116080
116080
|
|
|
116081
116081
|
// src/cli/init.ts
|
|
116082
|
-
import { Command } from "commander";
|
|
116082
|
+
import { Command as Command2 } from "commander";
|
|
116083
116083
|
import fs102 from "fs";
|
|
116084
116084
|
import path113 from "path";
|
|
116085
116085
|
import * as p from "@clack/prompts";
|
|
@@ -117766,9 +117766,13 @@ import path112 from "path";
|
|
|
117766
117766
|
import os13 from "os";
|
|
117767
117767
|
import https2 from "https";
|
|
117768
117768
|
import { execSync as execSync6 } from "child_process";
|
|
117769
|
+
import { Command } from "commander";
|
|
117769
117770
|
var GITHUB_REPO = "nikolai-vysotskyi/trace-mcp";
|
|
117770
117771
|
var APP_NAME = "trace-mcp.app";
|
|
117771
117772
|
var INSTALL_DIR = path112.join(os13.homedir(), "Applications");
|
|
117773
|
+
function sleep(ms2) {
|
|
117774
|
+
return new Promise((resolve3) => setTimeout(resolve3, ms2));
|
|
117775
|
+
}
|
|
117772
117776
|
function fetchLatestRelease(timeoutMs = 1e4) {
|
|
117773
117777
|
return new Promise((resolve3, reject) => {
|
|
117774
117778
|
const req = https2.get(
|
|
@@ -117856,17 +117860,52 @@ function downloadFile(url2, dest, timeoutMs = 6e4) {
|
|
|
117856
117860
|
doGet(url2);
|
|
117857
117861
|
});
|
|
117858
117862
|
}
|
|
117859
|
-
|
|
117863
|
+
function pinToDock(appPath) {
|
|
117864
|
+
try {
|
|
117865
|
+
const dockPlist = execSync6("defaults read com.apple.dock persistent-apps", {
|
|
117866
|
+
encoding: "utf-8",
|
|
117867
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
117868
|
+
});
|
|
117869
|
+
if (dockPlist.includes(appPath)) return;
|
|
117870
|
+
const entry = `<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>${appPath}</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>`;
|
|
117871
|
+
execSync6(
|
|
117872
|
+
`defaults write com.apple.dock persistent-apps -array-add '${entry}'`,
|
|
117873
|
+
{ stdio: "pipe" }
|
|
117874
|
+
);
|
|
117875
|
+
execSync6("killall Dock", { stdio: "pipe" });
|
|
117876
|
+
} catch {
|
|
117877
|
+
}
|
|
117878
|
+
}
|
|
117879
|
+
async function installGuiApp(opts = {}) {
|
|
117860
117880
|
if (process.platform !== "darwin") {
|
|
117861
117881
|
return { installed: false, error: "Menu bar app is macOS only" };
|
|
117862
117882
|
}
|
|
117883
|
+
const { retries = 3, retryDelayMs = 15e3, onRetry } = opts;
|
|
117863
117884
|
const arch = process.arch === "arm64" ? "arm64" : "x64";
|
|
117864
|
-
const
|
|
117885
|
+
const findAsset = (assets) => {
|
|
117886
|
+
const zips = assets.filter((a) => /trace-mcp.*\.zip$/i.test(a.name));
|
|
117887
|
+
if (arch === "arm64") {
|
|
117888
|
+
return zips.find((a) => /arm64/i.test(a.name));
|
|
117889
|
+
}
|
|
117890
|
+
return zips.find((a) => !/arm64/i.test(a.name));
|
|
117891
|
+
};
|
|
117865
117892
|
try {
|
|
117866
|
-
|
|
117867
|
-
|
|
117893
|
+
let release;
|
|
117894
|
+
let asset;
|
|
117895
|
+
for (let attempt = 0; attempt <= retries; attempt++) {
|
|
117896
|
+
release = await fetchLatestRelease();
|
|
117897
|
+
asset = findAsset(release.assets);
|
|
117898
|
+
if (asset) break;
|
|
117899
|
+
if (attempt < retries) {
|
|
117900
|
+
onRetry?.(attempt + 1, retries);
|
|
117901
|
+
await sleep(retryDelayMs);
|
|
117902
|
+
}
|
|
117903
|
+
}
|
|
117868
117904
|
if (!asset) {
|
|
117869
|
-
return {
|
|
117905
|
+
return {
|
|
117906
|
+
installed: false,
|
|
117907
|
+
error: `No ${arch} zip found in release ${release.tag} (${release.assets.length} assets available: ${release.assets.map((a) => a.name).join(", ") || "none"}). The build may still be in progress \u2014 try again in a few minutes with: trace-mcp install-app`
|
|
117908
|
+
};
|
|
117870
117909
|
}
|
|
117871
117910
|
const tmpDir = fs101.mkdtempSync(path112.join(os13.tmpdir(), "trace-mcp-app-"));
|
|
117872
117911
|
const zipPath = path112.join(tmpDir, asset.name);
|
|
@@ -117879,6 +117918,7 @@ async function installGuiApp() {
|
|
|
117879
117918
|
execSync6(`unzip -q -o "${zipPath}" -d "${INSTALL_DIR}"`, { stdio: "pipe" });
|
|
117880
117919
|
fs101.writeFileSync(path112.join(INSTALL_DIR, ".trace-mcp-version"), release.tag, "utf-8");
|
|
117881
117920
|
fs101.rmSync(tmpDir, { recursive: true, force: true });
|
|
117921
|
+
pinToDock(appPath);
|
|
117882
117922
|
return { installed: true, path: appPath };
|
|
117883
117923
|
} catch (err47) {
|
|
117884
117924
|
return { installed: false, error: err47.message };
|
|
@@ -117887,9 +117927,32 @@ async function installGuiApp() {
|
|
|
117887
117927
|
function isAppInstalled() {
|
|
117888
117928
|
return fs101.existsSync(path112.join(INSTALL_DIR, APP_NAME));
|
|
117889
117929
|
}
|
|
117930
|
+
var installAppCommand = new Command("install-app").description("Download and install (or update) the trace-mcp menu bar app (macOS)").option("--retries <n>", "Number of retries if asset not yet uploaded", "3").option("--retry-delay <ms>", "Delay between retries in ms", "15000").action(async (opts) => {
|
|
117931
|
+
if (process.platform !== "darwin") {
|
|
117932
|
+
console.error("Error: Menu bar app is macOS only.");
|
|
117933
|
+
process.exit(1);
|
|
117934
|
+
}
|
|
117935
|
+
const retries = parseInt(opts.retries, 10);
|
|
117936
|
+
const retryDelayMs = parseInt(opts.retryDelay, 10);
|
|
117937
|
+
const already = isAppInstalled();
|
|
117938
|
+
console.log(already ? "Updating trace-mcp menu bar app\u2026" : "Installing trace-mcp menu bar app\u2026");
|
|
117939
|
+
const result = await installGuiApp({
|
|
117940
|
+
retries,
|
|
117941
|
+
retryDelayMs,
|
|
117942
|
+
onRetry: (attempt, total) => {
|
|
117943
|
+
console.log(` Asset not yet available, retrying (${attempt}/${total})\u2026`);
|
|
117944
|
+
}
|
|
117945
|
+
});
|
|
117946
|
+
if (result.installed) {
|
|
117947
|
+
console.log(`\u2713 ${already ? "Updated" : "Installed"} \u2192 ${result.path}`);
|
|
117948
|
+
} else {
|
|
117949
|
+
console.error(`\u2717 ${result.error}`);
|
|
117950
|
+
process.exit(1);
|
|
117951
|
+
}
|
|
117952
|
+
});
|
|
117890
117953
|
|
|
117891
117954
|
// src/cli/init.ts
|
|
117892
|
-
var initCommand = new
|
|
117955
|
+
var initCommand = new Command2("init").description("One-time global setup: configure MCP clients, install hooks, set up CLAUDE.md").option("--yes", "Skip prompts, use recommended defaults").option("--skip-hooks", "Do not install guard hooks").option("--skip-mcp-client", "Do not configure MCP client").option("--skip-claude-md", "Do not add CLAUDE.md block").option("--mcp-client <name>", "Force MCP client: claude-code | claude-desktop | cursor | windsurf | continue").option("--force", "Overwrite existing configuration").option("--dry-run", "Show what would be done without writing files").option("--json", "Output results as JSON (implies --yes)").option("--index", "Also register and index the current project").action(async (opts) => {
|
|
117893
117956
|
const nonInteractive = opts.yes || opts.json || opts.dryRun;
|
|
117894
117957
|
let migrationStep;
|
|
117895
117958
|
if (!opts.dryRun) {
|
|
@@ -117948,15 +118011,15 @@ var initCommand = new Command("init").description("One-time global setup: config
|
|
|
117948
118011
|
{
|
|
117949
118012
|
value: "standard",
|
|
117950
118013
|
label: "Standard \u2014 CLAUDE.md + hooks",
|
|
117951
|
-
hint: "guard hooks intercept tool calls at runtime
|
|
118014
|
+
hint: "guard hooks intercept tool calls at runtime"
|
|
117952
118015
|
},
|
|
117953
118016
|
{
|
|
117954
118017
|
value: "max",
|
|
117955
118018
|
label: "Max \u2014 CLAUDE.md + hooks + tweakcc",
|
|
117956
|
-
hint: tweakccState.installed ? "patches Claude's system prompts (
|
|
118019
|
+
hint: tweakccState.installed ? "patches Claude's system prompts (recommended)" : "requires tweakcc \u2014 install with `npx tweakcc` first (recommended)"
|
|
117957
118020
|
}
|
|
117958
118021
|
],
|
|
117959
|
-
initialValue: "
|
|
118022
|
+
initialValue: "max"
|
|
117960
118023
|
});
|
|
117961
118024
|
if (p.isCancel(levelResult)) {
|
|
117962
118025
|
p.cancel("Cancelled.");
|
|
@@ -118154,7 +118217,13 @@ var initCommand = new Command("init").description("One-time global setup: config
|
|
|
118154
118217
|
if (installApp && !opts.dryRun) {
|
|
118155
118218
|
const spin = p.spinner();
|
|
118156
118219
|
spin.start("Downloading trace-mcp menu bar app\u2026");
|
|
118157
|
-
const appResult = await installGuiApp(
|
|
118220
|
+
const appResult = await installGuiApp({
|
|
118221
|
+
retries: 3,
|
|
118222
|
+
retryDelayMs: 15e3,
|
|
118223
|
+
onRetry: (attempt, total) => {
|
|
118224
|
+
spin.message(`App asset not uploaded yet, retrying (${attempt}/${total})\u2026`);
|
|
118225
|
+
}
|
|
118226
|
+
});
|
|
118158
118227
|
if (appResult.installed) {
|
|
118159
118228
|
spin.stop(`Installed \u2192 ${appResult.path}`);
|
|
118160
118229
|
steps.push({ target: appResult.path, action: "created", detail: "Menu bar app installed" });
|
|
@@ -118368,10 +118437,10 @@ init_pipeline();
|
|
|
118368
118437
|
init_logger();
|
|
118369
118438
|
init_registry2();
|
|
118370
118439
|
init_global();
|
|
118371
|
-
import { Command as
|
|
118440
|
+
import { Command as Command3 } from "commander";
|
|
118372
118441
|
import fs103 from "fs";
|
|
118373
118442
|
import path114 from "path";
|
|
118374
|
-
var upgradeCommand = new
|
|
118443
|
+
var upgradeCommand = new Command3("upgrade").description("Upgrade trace-mcp: run DB migrations, reindex with latest plugins, update hooks and CLAUDE.md").argument("[dir]", "Project directory (omit to upgrade all registered projects)").option("--skip-hooks", "Do not update guard hooks").option("--skip-reindex", "Do not trigger reindex").option("--skip-claude-md", "Do not update CLAUDE.md block").option("--dry-run", "Show what would be done without writing files").option("--json", "Output results as JSON").action(async (dir, opts) => {
|
|
118375
118444
|
const projectRoots = [];
|
|
118376
118445
|
if (dir) {
|
|
118377
118446
|
projectRoots.push(path114.resolve(dir));
|
|
@@ -118475,7 +118544,7 @@ var upgradeCommand = new Command2("upgrade").description("Upgrade trace-mcp: run
|
|
|
118475
118544
|
});
|
|
118476
118545
|
|
|
118477
118546
|
// src/cli/add.ts
|
|
118478
|
-
import { Command as
|
|
118547
|
+
import { Command as Command4 } from "commander";
|
|
118479
118548
|
import fs104 from "fs";
|
|
118480
118549
|
import path115 from "path";
|
|
118481
118550
|
import * as p2 from "@clack/prompts";
|
|
@@ -118521,7 +118590,7 @@ function formatDuration2(ms2) {
|
|
|
118521
118590
|
if (ms2 < 1e3) return `${ms2}ms`;
|
|
118522
118591
|
return `${(ms2 / 1e3).toFixed(1)}s`;
|
|
118523
118592
|
}
|
|
118524
|
-
var addCommand = new
|
|
118593
|
+
var addCommand = new Command4("add").description("Register a project for indexing: detect root, create DB, add to registry").argument("[dir]", "Project directory (default: current directory)", ".").option("--force", "Re-register even if already registered").option("--no-index", "Skip indexing after registration").option("--json", "Output results as JSON").action(async (dir, opts) => {
|
|
118525
118594
|
const resolvedDir = path115.resolve(dir);
|
|
118526
118595
|
if (!fs104.existsSync(resolvedDir)) {
|
|
118527
118596
|
console.error(`Directory does not exist: ${resolvedDir}`);
|
|
@@ -118777,14 +118846,14 @@ function shortPath4(p5) {
|
|
|
118777
118846
|
}
|
|
118778
118847
|
|
|
118779
118848
|
// src/cli/doctor.ts
|
|
118780
|
-
import { Command as
|
|
118849
|
+
import { Command as Command5 } from "commander";
|
|
118781
118850
|
import * as p3 from "@clack/prompts";
|
|
118782
118851
|
var SEVERITY_LABEL = {
|
|
118783
118852
|
critical: "CRITICAL",
|
|
118784
118853
|
warning: "WARNING",
|
|
118785
118854
|
info: "INFO"
|
|
118786
118855
|
};
|
|
118787
|
-
var doctorCommand = new
|
|
118856
|
+
var doctorCommand = new Command5("doctor").description("Check for competing tools that may conflict with trace-mcp").option("--fix", "Automatically fix all fixable conflicts").option("--fix-interactive", "Fix conflicts interactively (ask for each)").option("--dry-run", "Show what --fix would do without making changes").option("--json", "Output results as JSON").action(async (opts) => {
|
|
118788
118857
|
let projectRoot;
|
|
118789
118858
|
try {
|
|
118790
118859
|
projectRoot = findProjectRoot(process.cwd());
|
|
@@ -118923,7 +118992,7 @@ init_pipeline();
|
|
|
118923
118992
|
init_config();
|
|
118924
118993
|
init_global();
|
|
118925
118994
|
init_registry2();
|
|
118926
|
-
import { Command as
|
|
118995
|
+
import { Command as Command6 } from "commander";
|
|
118927
118996
|
import { execFileSync as execFileSync7 } from "child_process";
|
|
118928
118997
|
import path116 from "path";
|
|
118929
118998
|
import fs105 from "fs";
|
|
@@ -119564,7 +119633,7 @@ function resolveDbPath(projectRoot) {
|
|
|
119564
119633
|
if (entry) return entry.dbPath;
|
|
119565
119634
|
return getDbPath(projectRoot);
|
|
119566
119635
|
}
|
|
119567
|
-
var ciReportCommand = new
|
|
119636
|
+
var ciReportCommand = new Command6("ci-report").description("Generate a change impact report for a PR/branch").option("--base <ref>", "Base git ref (default: main)", "main").option("--head <ref>", "Head git ref (default: HEAD)", "HEAD").option("--format <fmt>", "Output format: markdown | json (default: markdown)", "markdown").option("--output <path>", "Output file path (default: stdout, use - for stdout)", "-").option("--fail-on <level>", "Exit with code 1 if risk >= level: critical | high | medium", "").option("--index", "Index the project before generating the report", false).option("--no-project-aware", "Disable domain/ownership/deployment analysis").option("--save-baseline", "Save current scores as quality baseline", false).option("--fail-regression", "Exit 1 if quality regressed vs baseline", false).option("--annotations <format>", "Output annotations: github-actions | json").action(async (opts) => {
|
|
119568
119637
|
let projectRoot;
|
|
119569
119638
|
try {
|
|
119570
119639
|
projectRoot = findProjectRoot(process.cwd());
|
|
@@ -119696,7 +119765,7 @@ init_store();
|
|
|
119696
119765
|
init_config();
|
|
119697
119766
|
init_global();
|
|
119698
119767
|
init_registry2();
|
|
119699
|
-
import { Command as
|
|
119768
|
+
import { Command as Command7 } from "commander";
|
|
119700
119769
|
init_logger();
|
|
119701
119770
|
init_pipeline();
|
|
119702
119771
|
init_registry();
|
|
@@ -119708,7 +119777,7 @@ function resolveDbPath2(projectRoot) {
|
|
|
119708
119777
|
if (entry) return entry.dbPath;
|
|
119709
119778
|
return getDbPath(projectRoot);
|
|
119710
119779
|
}
|
|
119711
|
-
var checkCommand = new
|
|
119780
|
+
var checkCommand = new Command7("check").description("Run quality gate checks against the indexed project (exit code 0 = pass, 1 = fail)").option("--config <path>", "Path to config file with quality_gates section").option("--format <fmt>", "Output format: text | json (default: text)", "text").option("--index", "Re-index the project before checking", false).option("--fail-on <level>", "Override fail_on: error | warning | none").action(async (opts) => {
|
|
119712
119781
|
let projectRoot;
|
|
119713
119782
|
try {
|
|
119714
119783
|
projectRoot = findProjectRoot(process.cwd());
|
|
@@ -119799,7 +119868,7 @@ function getDefaultGatesConfig() {
|
|
|
119799
119868
|
}
|
|
119800
119869
|
|
|
119801
119870
|
// src/cli/bundles.ts
|
|
119802
|
-
import { Command as
|
|
119871
|
+
import { Command as Command8 } from "commander";
|
|
119803
119872
|
init_global();
|
|
119804
119873
|
init_registry2();
|
|
119805
119874
|
function resolveDbPath3(projectRoot) {
|
|
@@ -119807,7 +119876,7 @@ function resolveDbPath3(projectRoot) {
|
|
|
119807
119876
|
if (entry) return entry.dbPath;
|
|
119808
119877
|
return getDbPath(projectRoot);
|
|
119809
119878
|
}
|
|
119810
|
-
var bundlesCommand = new
|
|
119879
|
+
var bundlesCommand = new Command8("bundles").description("Manage pre-indexed bundles for dependency libraries");
|
|
119811
119880
|
bundlesCommand.command("list").description("List installed bundles").action(() => {
|
|
119812
119881
|
ensureBundlesDir();
|
|
119813
119882
|
const bundles = listBundles();
|
|
@@ -119850,7 +119919,7 @@ bundlesCommand.command("remove").description("Remove an installed bundle").requi
|
|
|
119850
119919
|
});
|
|
119851
119920
|
|
|
119852
119921
|
// src/cli/federation.ts
|
|
119853
|
-
import { Command as
|
|
119922
|
+
import { Command as Command9 } from "commander";
|
|
119854
119923
|
init_global();
|
|
119855
119924
|
init_logger();
|
|
119856
119925
|
function createManager() {
|
|
@@ -119859,7 +119928,7 @@ function createManager() {
|
|
|
119859
119928
|
const manager = new FederationManager(topoStore);
|
|
119860
119929
|
return { manager, topoStore };
|
|
119861
119930
|
}
|
|
119862
|
-
var federationCommand = new
|
|
119931
|
+
var federationCommand = new Command9("federation").description("Multi-repo graph federation \u2014 link API contracts across repositories").alias("fed");
|
|
119863
119932
|
federationCommand.command("add").description("Add a repository to the federation").requiredOption("--repo <path>", "Path to the repository").option("--contract <paths...>", "Explicit contract file paths (relative to repo root)").option("--name <name>", "Name for this repo (default: directory basename)").action((opts) => {
|
|
119864
119933
|
const { manager, topoStore } = createManager();
|
|
119865
119934
|
try {
|
|
@@ -119996,7 +120065,7 @@ federationCommand.command("impact").description("Cross-repo impact analysis: who
|
|
|
119996
120065
|
});
|
|
119997
120066
|
|
|
119998
120067
|
// src/cli/analytics.ts
|
|
119999
|
-
import { Command as
|
|
120068
|
+
import { Command as Command10 } from "commander";
|
|
120000
120069
|
init_schema();
|
|
120001
120070
|
init_store();
|
|
120002
120071
|
init_global();
|
|
@@ -120049,7 +120118,7 @@ function printSingleReport(result) {
|
|
|
120049
120118
|
}
|
|
120050
120119
|
console.log("");
|
|
120051
120120
|
}
|
|
120052
|
-
var analyticsCommand = new
|
|
120121
|
+
var analyticsCommand = new Command10("analytics").description("AI agent session analytics: sync logs, view reports, find optimizations");
|
|
120053
120122
|
analyticsCommand.command("sync").description("Parse Claude Code session logs into analytics database").option("--full", "Force full rescan of all sessions", false).option("--project <path>", "Filter by project path").action(async (opts) => {
|
|
120054
120123
|
ensureGlobalDirs();
|
|
120055
120124
|
const analyticsStore = new AnalyticsStore();
|
|
@@ -120337,14 +120406,14 @@ analyticsCommand.command("trends").description("Show daily usage trends: tokens,
|
|
|
120337
120406
|
});
|
|
120338
120407
|
|
|
120339
120408
|
// src/cli/remove.ts
|
|
120340
|
-
import { Command as
|
|
120409
|
+
import { Command as Command11 } from "commander";
|
|
120341
120410
|
import fs107 from "fs";
|
|
120342
120411
|
import path117 from "path";
|
|
120343
120412
|
import * as p4 from "@clack/prompts";
|
|
120344
120413
|
init_registry2();
|
|
120345
120414
|
init_config();
|
|
120346
120415
|
init_global();
|
|
120347
|
-
var removeCommand = new
|
|
120416
|
+
var removeCommand = new Command11("remove").description("Unregister a project and delete its index").argument("[dir]", "Project directory (default: current directory)", ".").option("--force", "Remove without confirmation").option("--keep-db", "Keep the database file (only unregister)").option("--json", "Output results as JSON").action(async (dir, opts) => {
|
|
120348
120417
|
const resolvedDir = path117.resolve(dir);
|
|
120349
120418
|
const isInteractive = !opts.json;
|
|
120350
120419
|
let projectRoot;
|
|
@@ -120533,7 +120602,7 @@ function shortPath6(p5) {
|
|
|
120533
120602
|
// src/cli/status.ts
|
|
120534
120603
|
init_global();
|
|
120535
120604
|
init_registry2();
|
|
120536
|
-
import { Command as
|
|
120605
|
+
import { Command as Command12 } from "commander";
|
|
120537
120606
|
import fs108 from "fs";
|
|
120538
120607
|
import Database9 from "better-sqlite3";
|
|
120539
120608
|
function resolveDbPath5(projectRoot) {
|
|
@@ -120571,7 +120640,7 @@ function formatPipeline(name, p5) {
|
|
|
120571
120640
|
return ` ${label} ${p5.phase}`;
|
|
120572
120641
|
}
|
|
120573
120642
|
}
|
|
120574
|
-
var statusCommand = new
|
|
120643
|
+
var statusCommand = new Command12("status").description("Show indexing progress for the current project").option("--json", "Output as JSON").action((opts) => {
|
|
120575
120644
|
let projectRoot;
|
|
120576
120645
|
try {
|
|
120577
120646
|
projectRoot = findProjectRoot(process.cwd());
|
|
@@ -120631,7 +120700,7 @@ import { execSync as execSync7 } from "child_process";
|
|
|
120631
120700
|
import fs109 from "fs";
|
|
120632
120701
|
import os14 from "os";
|
|
120633
120702
|
import path118 from "path";
|
|
120634
|
-
import { Command as
|
|
120703
|
+
import { Command as Command13 } from "commander";
|
|
120635
120704
|
init_registry2();
|
|
120636
120705
|
function openInBrowser(filePath) {
|
|
120637
120706
|
const platform = process.platform;
|
|
@@ -120642,7 +120711,7 @@ function openInBrowser(filePath) {
|
|
|
120642
120711
|
} catch {
|
|
120643
120712
|
}
|
|
120644
120713
|
}
|
|
120645
|
-
var visualizeCommand = new
|
|
120714
|
+
var visualizeCommand = new Command13("visualize").alias("viz").description("Generate an interactive dependency graph and open it in the browser").argument("[scope]", `what to visualize
|
|
120646
120715
|
|
|
120647
120716
|
Scope can be:
|
|
120648
120717
|
project whole project graph
|
|
@@ -120734,7 +120803,7 @@ visualizeCommand.command("federation").alias("fed").description("Open federation
|
|
|
120734
120803
|
|
|
120735
120804
|
// src/cli/daemon.ts
|
|
120736
120805
|
init_global();
|
|
120737
|
-
import { Command as
|
|
120806
|
+
import { Command as Command14 } from "commander";
|
|
120738
120807
|
import fs110 from "fs";
|
|
120739
120808
|
import path119 from "path";
|
|
120740
120809
|
import { execSync as execSync8, spawn as spawn2 } from "child_process";
|
|
@@ -120815,7 +120884,7 @@ function isPlistLoaded() {
|
|
|
120815
120884
|
return false;
|
|
120816
120885
|
}
|
|
120817
120886
|
}
|
|
120818
|
-
var daemonCommand = new
|
|
120887
|
+
var daemonCommand = new Command14("daemon").description("Manage the trace-mcp background daemon");
|
|
120819
120888
|
daemonCommand.command("start").description("Start the daemon (installs launchd plist and loads it)").option("-p, --port <port>", "Port to listen on", String(DEFAULT_DAEMON_PORT)).action(async (opts) => {
|
|
120820
120889
|
const port = parseInt(opts.port, 10);
|
|
120821
120890
|
if (process.platform !== "darwin") {
|
|
@@ -121085,7 +121154,7 @@ var ProjectManager = class {
|
|
|
121085
121154
|
|
|
121086
121155
|
// src/cli.ts
|
|
121087
121156
|
init_global();
|
|
121088
|
-
var PKG_VERSION2 = true ? "1.
|
|
121157
|
+
var PKG_VERSION2 = true ? "1.18.0" : "0.0.0-dev";
|
|
121089
121158
|
function registerDefaultPlugins2(registry) {
|
|
121090
121159
|
for (const p5 of createAllLanguagePlugins()) registry.registerLanguagePlugin(p5);
|
|
121091
121160
|
for (const p5 of createAllIntegrationPlugins()) registry.registerFrameworkPlugin(p5);
|
|
@@ -121124,7 +121193,7 @@ function runFederationAutoSync2(projectRoot, config) {
|
|
|
121124
121193
|
logger.warn({ error: e }, "Federation auto-sync failed (non-fatal)");
|
|
121125
121194
|
}
|
|
121126
121195
|
}
|
|
121127
|
-
var program = new
|
|
121196
|
+
var program = new Command15();
|
|
121128
121197
|
program.name("trace-mcp").description("Framework-Aware Code Intelligence for Laravel/Vue/Inertia/Nuxt").version(PKG_VERSION2, "-v, --version");
|
|
121129
121198
|
program.command("serve").description("Start MCP server (stdio transport)").action(async () => {
|
|
121130
121199
|
const projectRoot = process.cwd();
|
|
@@ -122213,6 +122282,7 @@ program.addCommand(analyticsCommand);
|
|
|
122213
122282
|
program.addCommand(statusCommand);
|
|
122214
122283
|
program.addCommand(visualizeCommand);
|
|
122215
122284
|
program.addCommand(daemonCommand);
|
|
122285
|
+
program.addCommand(installAppCommand);
|
|
122216
122286
|
program.parse();
|
|
122217
122287
|
/*! Bundled license information:
|
|
122218
122288
|
|