@vibecheck-ai/mcp 26.0.0 → 26.0.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/analytics-RKAYZLK7.js +36 -0
- package/dist/{chunk-RPSVX4GS.js → chunk-M5RKCWHG.js} +209 -212
- package/dist/{dist-74DHDHNJ.js → dist-E7DNWZIO.js} +1 -1
- package/dist/index.js +3295 -3235
- package/package.json +1 -1
- package/dist/analytics-HY3UUAAZ.js +0 -135
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibecheck-ai/mcp",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.2",
|
|
4
4
|
"description": "VibeCheck MCP — the code intelligence layer for AI-built software, wired into your agent. Truth-grounded, runtime-aware, multi-agent. 16+ verification engines, runtime probes, and live truthpack context for Cursor, Claude, Windsurf, and any MCP-compatible client.",
|
|
5
5
|
"mcpName": "io.github.guardiavault-oss/vibecheck-mcp",
|
|
6
6
|
"type": "module",
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module';
|
|
2
|
-
import { fileURLToPath } from 'url';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { dirname } from 'path';
|
|
5
|
-
import './chunk-YWUMPN4Z.js';
|
|
6
|
-
import * as fs from 'fs';
|
|
7
|
-
import * as os from 'os';
|
|
8
|
-
import * as crypto from 'crypto';
|
|
9
|
-
|
|
10
|
-
createRequire(import.meta.url);
|
|
11
|
-
const __filename$1 = fileURLToPath(import.meta.url);
|
|
12
|
-
dirname(__filename$1);
|
|
13
|
-
var POSTHOG_KEY = "phc_BsYUFF2kwF3H1As50roEinN6C8IcmM7Sf8TLZZ6Q5oV";
|
|
14
|
-
var POSTHOG_HOST = "https://us.i.posthog.com";
|
|
15
|
-
var BUILD_ID = "26.0.0.1778827744596";
|
|
16
|
-
var client = null;
|
|
17
|
-
var distinctId = "";
|
|
18
|
-
var mcpVersion = "unknown";
|
|
19
|
-
var initialized = false;
|
|
20
|
-
var disabled = false;
|
|
21
|
-
function isTelemetryDisabled() {
|
|
22
|
-
return process.env.VIBECHECK_NO_TELEMETRY === "1" || process.env.VIBECHECK_NO_TELEMETRY === "true" || process.env.DO_NOT_TRACK === "1" || process.env.DO_NOT_TRACK === "true";
|
|
23
|
-
}
|
|
24
|
-
function getDistinctIdPath() {
|
|
25
|
-
return path.join(os.homedir(), ".vibecheck", "analytics.json");
|
|
26
|
-
}
|
|
27
|
-
function loadOrCreateDistinctId() {
|
|
28
|
-
const p = getDistinctIdPath();
|
|
29
|
-
try {
|
|
30
|
-
const raw = fs.readFileSync(p, "utf-8");
|
|
31
|
-
const data = JSON.parse(raw);
|
|
32
|
-
if (typeof data.distinctId === "string" && data.distinctId.length > 0) {
|
|
33
|
-
return data.distinctId;
|
|
34
|
-
}
|
|
35
|
-
} catch {
|
|
36
|
-
}
|
|
37
|
-
const id = crypto.randomUUID();
|
|
38
|
-
try {
|
|
39
|
-
fs.mkdirSync(path.dirname(p), { recursive: true });
|
|
40
|
-
fs.writeFileSync(p, JSON.stringify({ distinctId: id }, null, 2), "utf-8");
|
|
41
|
-
} catch {
|
|
42
|
-
}
|
|
43
|
-
return id;
|
|
44
|
-
}
|
|
45
|
-
async function initAnalytics(version) {
|
|
46
|
-
if (initialized) return;
|
|
47
|
-
initialized = true;
|
|
48
|
-
mcpVersion = version;
|
|
49
|
-
if (isTelemetryDisabled() || !POSTHOG_KEY) {
|
|
50
|
-
disabled = true;
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
distinctId = loadOrCreateDistinctId();
|
|
54
|
-
try {
|
|
55
|
-
const mod = await import('posthog-node');
|
|
56
|
-
client = new mod.PostHog(POSTHOG_KEY, {
|
|
57
|
-
host: POSTHOG_HOST,
|
|
58
|
-
flushAt: 1,
|
|
59
|
-
flushInterval: 1e3
|
|
60
|
-
});
|
|
61
|
-
client.capture({
|
|
62
|
-
distinctId,
|
|
63
|
-
event: "mcp_server_started",
|
|
64
|
-
properties: {
|
|
65
|
-
mcp_version: mcpVersion,
|
|
66
|
-
build_id: BUILD_ID,
|
|
67
|
-
platform: process.platform,
|
|
68
|
-
node_version: process.version
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
} catch {
|
|
72
|
-
disabled = true;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function trackToolCall(toolName, extra = {}) {
|
|
76
|
-
if (disabled || !client) return;
|
|
77
|
-
try {
|
|
78
|
-
client.capture({
|
|
79
|
-
distinctId,
|
|
80
|
-
event: "mcp_tool_call",
|
|
81
|
-
properties: {
|
|
82
|
-
tool: toolName,
|
|
83
|
-
mcp_version: mcpVersion,
|
|
84
|
-
build_id: BUILD_ID,
|
|
85
|
-
...extra
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
} catch {
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function trackToolResult(toolName, success, durationMs, extra = {}) {
|
|
92
|
-
if (disabled || !client) return;
|
|
93
|
-
try {
|
|
94
|
-
client.capture({
|
|
95
|
-
distinctId,
|
|
96
|
-
event: "mcp_tool_completed",
|
|
97
|
-
properties: {
|
|
98
|
-
tool: toolName,
|
|
99
|
-
success,
|
|
100
|
-
duration_ms: durationMs,
|
|
101
|
-
mcp_version: mcpVersion,
|
|
102
|
-
build_id: BUILD_ID,
|
|
103
|
-
...extra
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
} catch {
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function trackError(context, err, extra = {}) {
|
|
110
|
-
if (disabled || !client) return;
|
|
111
|
-
try {
|
|
112
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
113
|
-
client.capture({
|
|
114
|
-
distinctId,
|
|
115
|
-
event: "mcp_error",
|
|
116
|
-
properties: {
|
|
117
|
-
context,
|
|
118
|
-
error_message: message,
|
|
119
|
-
mcp_version: mcpVersion,
|
|
120
|
-
build_id: BUILD_ID,
|
|
121
|
-
...extra
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
} catch {
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async function shutdownAnalytics() {
|
|
128
|
-
if (!client) return;
|
|
129
|
-
try {
|
|
130
|
-
await client.shutdown();
|
|
131
|
-
} catch {
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export { initAnalytics, shutdownAnalytics, trackError, trackToolCall, trackToolResult };
|