trace-mcp 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +47 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.js +34 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -89740,7 +89740,7 @@ import https from "https";
|
|
|
89740
89740
|
import { spawnSync } from "child_process";
|
|
89741
89741
|
import path65 from "path";
|
|
89742
89742
|
import fs66 from "fs";
|
|
89743
|
-
var CURRENT_VERSION = true ? "1.20.
|
|
89743
|
+
var CURRENT_VERSION = true ? "1.20.1" : "0.0.0-dev";
|
|
89744
89744
|
var UPDATE_CACHE_PATH = path65.join(TRACE_MCP_HOME, "update-check.json");
|
|
89745
89745
|
function readCache() {
|
|
89746
89746
|
try {
|
|
@@ -118740,10 +118740,28 @@ var TopologyStore = class {
|
|
|
118740
118740
|
this.db.pragma("journal_mode = WAL");
|
|
118741
118741
|
this.db.pragma("foreign_keys = ON");
|
|
118742
118742
|
this.db.pragma("busy_timeout = 5000");
|
|
118743
|
+
this.preMigrate();
|
|
118743
118744
|
this.db.exec(TOPOLOGY_DDL);
|
|
118744
118745
|
this.migrate();
|
|
118745
118746
|
logger.debug({ dbPath }, "Topology database initialized");
|
|
118746
118747
|
}
|
|
118748
|
+
/**
|
|
118749
|
+
* Fix legacy schemas BEFORE DDL runs — prevents crashes when
|
|
118750
|
+
* CREATE INDEX references columns that don't exist in old tables.
|
|
118751
|
+
*/
|
|
118752
|
+
preMigrate() {
|
|
118753
|
+
const hasTable = this.db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='federated_repos'").get();
|
|
118754
|
+
if (hasTable) {
|
|
118755
|
+
const fedCols = this.db.pragma("table_info(federated_repos)").map((c) => c.name);
|
|
118756
|
+
if (!fedCols.includes("project_root")) {
|
|
118757
|
+
this.db.exec(`
|
|
118758
|
+
DELETE FROM client_calls;
|
|
118759
|
+
DROP TABLE IF EXISTS federated_repos;
|
|
118760
|
+
`);
|
|
118761
|
+
logger.info("Pre-migration: dropped legacy federated_repos missing project_root column");
|
|
118762
|
+
}
|
|
118763
|
+
}
|
|
118764
|
+
}
|
|
118747
118765
|
migrate() {
|
|
118748
118766
|
const cols = this.db.pragma("table_info(services)").map((c) => c.name);
|
|
118749
118767
|
if (!cols.includes("project_group")) {
|
|
@@ -119253,18 +119271,27 @@ var DecisionStore = class {
|
|
|
119253
119271
|
this.db.pragma("journal_mode = WAL");
|
|
119254
119272
|
this.db.pragma("foreign_keys = ON");
|
|
119255
119273
|
this.db.pragma("busy_timeout = 5000");
|
|
119274
|
+
this.preMigrate();
|
|
119256
119275
|
this.db.exec(DECISIONS_DDL);
|
|
119257
119276
|
this.migrate();
|
|
119258
119277
|
logger.debug({ dbPath }, "Decision store initialized");
|
|
119259
119278
|
}
|
|
119260
|
-
|
|
119261
|
-
|
|
119262
|
-
|
|
119263
|
-
|
|
119264
|
-
|
|
119265
|
-
|
|
119279
|
+
/**
|
|
119280
|
+
* Fix legacy schemas BEFORE DDL runs — prevents crashes when
|
|
119281
|
+
* CREATE INDEX references columns that don't exist in old tables.
|
|
119282
|
+
*/
|
|
119283
|
+
preMigrate() {
|
|
119284
|
+
const hasTable = this.db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='decisions'").get();
|
|
119285
|
+
if (hasTable) {
|
|
119286
|
+
const cols = this.db.pragma("table_info(decisions)").map((c) => c.name);
|
|
119287
|
+
if (!cols.includes("service_name")) {
|
|
119288
|
+
this.db.exec("ALTER TABLE decisions ADD COLUMN service_name TEXT");
|
|
119289
|
+
logger.info("Pre-migration: added service_name column to decisions table");
|
|
119290
|
+
}
|
|
119266
119291
|
}
|
|
119267
119292
|
}
|
|
119293
|
+
migrate() {
|
|
119294
|
+
}
|
|
119268
119295
|
close() {
|
|
119269
119296
|
this.db.close();
|
|
119270
119297
|
}
|
|
@@ -119513,7 +119540,7 @@ var DecisionStore = class {
|
|
|
119513
119540
|
};
|
|
119514
119541
|
|
|
119515
119542
|
// src/server/server.ts
|
|
119516
|
-
var PKG_VERSION = true ? "1.20.
|
|
119543
|
+
var PKG_VERSION = true ? "1.20.1" : "0.0.0-dev";
|
|
119517
119544
|
function j2(value) {
|
|
119518
119545
|
return JSON.stringify(value, (_key, val) => val === null || val === void 0 ? void 0 : val);
|
|
119519
119546
|
}
|
|
@@ -125041,7 +125068,13 @@ function getTraceMcpBinary() {
|
|
|
125041
125068
|
throw new Error("Could not find trace-mcp binary. Ensure it is installed and in PATH.");
|
|
125042
125069
|
}
|
|
125043
125070
|
}
|
|
125071
|
+
function resolveNodePath() {
|
|
125072
|
+
const nodeDir = path130.dirname(process.execPath);
|
|
125073
|
+
const fallback = "/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin";
|
|
125074
|
+
return `${nodeDir}:${fallback}`;
|
|
125075
|
+
}
|
|
125044
125076
|
function generatePlist(binaryPath, port) {
|
|
125077
|
+
const envPath = resolveNodePath();
|
|
125045
125078
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
125046
125079
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
125047
125080
|
<plist version="1.0">
|
|
@@ -125055,6 +125088,11 @@ function generatePlist(binaryPath, port) {
|
|
|
125055
125088
|
<string>--port</string>
|
|
125056
125089
|
<string>${port}</string>
|
|
125057
125090
|
</array>
|
|
125091
|
+
<key>EnvironmentVariables</key>
|
|
125092
|
+
<dict>
|
|
125093
|
+
<key>PATH</key>
|
|
125094
|
+
<string>${envPath}</string>
|
|
125095
|
+
</dict>
|
|
125058
125096
|
<key>RunAtLoad</key>
|
|
125059
125097
|
<true/>
|
|
125060
125098
|
<key>KeepAlive</key>
|
|
@@ -125356,7 +125394,7 @@ var ProjectManager = class {
|
|
|
125356
125394
|
|
|
125357
125395
|
// src/cli.ts
|
|
125358
125396
|
init_global();
|
|
125359
|
-
var PKG_VERSION2 = true ? "1.20.
|
|
125397
|
+
var PKG_VERSION2 = true ? "1.20.1" : "0.0.0-dev";
|
|
125360
125398
|
function registerDefaultPlugins2(registry) {
|
|
125361
125399
|
for (const p5 of createAllLanguagePlugins()) registry.registerLanguagePlugin(p5);
|
|
125362
125400
|
for (const p5 of createAllIntegrationPlugins()) registry.registerFrameworkPlugin(p5);
|