@vibecheck-ai/mcp 24.5.6 → 24.5.8

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.
Files changed (2) hide show
  1. package/dist/index.js +294 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -278752,6 +278752,8 @@ import {
278752
278752
  gateCanonicalScanReportFindings,
278753
278753
  normalizeCanonicalScanReport
278754
278754
  } from "@repo/shared-types";
278755
+ import { formatTrustScoreMcp, getTrustScoreStatus } from "@repo/shared-types";
278756
+ import { dashboardFindingUrl } from "@repo/shared-types";
278755
278757
 
278756
278758
  // ../codegraph/dist/index.js
278757
278759
  var import_fast_glob = __toESM(require_out4(), 1);
@@ -293109,6 +293111,8 @@ var FEATURE_NAMES = {
293109
293111
  REVIEW_WORKFLOWS: "Review Workflows",
293110
293112
  FLOW_WORKFLOWS: "Flow Workflows",
293111
293113
  WIKICODE_ATLAS: "WikiCode Atlas",
293114
+ /** Truthpack generate/validate — local CLI + IDE; registry key matches {@link FEATURE_REGISTRY} */
293115
+ TRUTHPACK: "Truthpack",
293112
293116
  /** LLM guided routes — use getAccessMode for free taste vs Pro unlimited */
293113
293117
  GUIDED_ROUTE: "Guided Route",
293114
293118
  SHIP_SCORE: "Ship Score",
@@ -293955,7 +293959,7 @@ var TOOL_FEATURE_MAP = {
293955
293959
  vibecheck_docguard: FEATURE_NAMES.DOCGUARD,
293956
293960
  vibecheck_commitshield: FEATURE_NAMES.COMMIT_SHIELD,
293957
293961
  vibecheck_polish: FEATURE_NAMES.POLISH,
293958
- vibecheck_truthpack: "Truthpack",
293962
+ vibecheck_truthpack: FEATURE_NAMES.TRUTHPACK,
293959
293963
  vibecheck_review: FEATURE_NAMES.COMMIT_SHIELD
293960
293964
  };
293961
293965
  function getToolApiSurface(toolName) {
@@ -294231,6 +294235,84 @@ var MCP_TOOLS = [
294231
294235
  },
294232
294236
  required: ["file"]
294233
294237
  }
294238
+ },
294239
+ // ── Platform Unification Tools ─────────────────────────────────────
294240
+ {
294241
+ name: "vibecheck_trust_score",
294242
+ description: "Get the current/latest trust score for a project. Returns score (0-100), grade, and status (PASSING/WARNING/FAILING). Alias for vibecheck_score with markdown formatting.",
294243
+ inputSchema: {
294244
+ type: "object",
294245
+ properties: {
294246
+ path: { type: "string", description: "Project path. Defaults to current directory." }
294247
+ }
294248
+ }
294249
+ },
294250
+ {
294251
+ name: "vibecheck_findings",
294252
+ description: 'List findings for the current project, filterable by severity, engine, or file path. Supports natural queries like "show me all critical findings in src/api/".',
294253
+ inputSchema: {
294254
+ type: "object",
294255
+ properties: {
294256
+ path: { type: "string", description: "Project path. Defaults to current directory." },
294257
+ severity: { type: "string", enum: ["critical", "high", "medium", "low", "info"], description: "Filter by severity." },
294258
+ engine: { type: "string", description: 'Filter by engine ID (e.g. "phantom_dep", "ghost_route").' },
294259
+ file: { type: "string", description: "Filter findings to a specific file or directory path." }
294260
+ }
294261
+ }
294262
+ },
294263
+ {
294264
+ name: "vibecheck_finding",
294265
+ description: "Get full detail on a specific finding by ID, including evidence, fix suggestion, and dashboard URL.",
294266
+ inputSchema: {
294267
+ type: "object",
294268
+ properties: {
294269
+ id: { type: "string", description: "Finding ID." },
294270
+ path: { type: "string", description: "Project path. Defaults to current directory." }
294271
+ },
294272
+ required: ["id"]
294273
+ }
294274
+ },
294275
+ {
294276
+ name: "vibecheck_dismiss",
294277
+ description: "Dismiss a finding (mark as false positive or acknowledged). Syncs across all surfaces when authenticated.",
294278
+ inputSchema: {
294279
+ type: "object",
294280
+ properties: {
294281
+ id: { type: "string", description: "Finding ID to dismiss." },
294282
+ reason: { type: "string", description: "Reason for dismissal." },
294283
+ path: { type: "string", description: "Project path. Defaults to current directory." }
294284
+ },
294285
+ required: ["id"]
294286
+ }
294287
+ },
294288
+ {
294289
+ name: "vibecheck_history",
294290
+ description: "Get scan history for a project. Returns recent scans with trust scores and finding counts.",
294291
+ inputSchema: {
294292
+ type: "object",
294293
+ properties: {
294294
+ path: { type: "string", description: "Project path. Defaults to current directory." },
294295
+ limit: { type: "number", description: "Max scans to return. Default 10." }
294296
+ }
294297
+ }
294298
+ },
294299
+ {
294300
+ name: "vibecheck_engines",
294301
+ description: "List available scan engines and their descriptions. Shows which engines are active.",
294302
+ inputSchema: {
294303
+ type: "object",
294304
+ properties: {}
294305
+ }
294306
+ },
294307
+ {
294308
+ name: "vibecheck_status",
294309
+ description: "Check auth status, tier, and entitlements. Returns whether the user is authenticated and their current plan.",
294310
+ inputSchema: {
294311
+ type: "object",
294312
+ properties: {
294313
+ path: { type: "string", description: "Workspace root path. Defaults to current directory." }
294314
+ }
294315
+ }
294234
294316
  }
294235
294317
  ];
294236
294318
  function isKnownToolName(toolName) {
@@ -294379,7 +294461,7 @@ function createScanIdempotencyKey(prefix) {
294379
294461
  // src/mcp-scan-meter-client.ts
294380
294462
  var MCP_SCAN_METER_CLIENT = {
294381
294463
  type: "mcp",
294382
- version: "24.5.6"
294464
+ version: "24.5.8"
294383
294465
  };
294384
294466
 
294385
294467
  // src/server.ts
@@ -294911,6 +294993,216 @@ ${validation.errors.join("\n")}`
294911
294993
  ]
294912
294994
  };
294913
294995
  }
294996
+ // ── Platform Unification Tool Handlers ──────────────────────────────
294997
+ case "vibecheck_trust_score": {
294998
+ const result = await withTimeout(
294999
+ runtime.runScore(targetPath),
295000
+ MCP_TOOL_TIMEOUT_MS,
295001
+ "vibecheck_trust_score"
295002
+ );
295003
+ const status = getTrustScoreStatus(result.score);
295004
+ const emoji = status === "passing" ? "\u2705" : status === "warning" ? "\u26A0\uFE0F" : "\u{1F6A8}";
295005
+ const text = [
295006
+ `## Trust Score`,
295007
+ "",
295008
+ `**${result.score}/100** (${status.toUpperCase()}) ${emoji}`,
295009
+ `**Grade:** ${result.grade}`,
295010
+ `**Decision:** ${result.decision}`,
295011
+ "",
295012
+ `> ${formatTrustScoreMcp(result.score)}`
295013
+ ].join("\n");
295014
+ return { content: [{ type: "text", text }] };
295015
+ }
295016
+ case "vibecheck_findings": {
295017
+ const report = await withTimeout(
295018
+ runtime.runScan(targetPath, { enginePreset: "full" }),
295019
+ MCP_TOOL_TIMEOUT_MS,
295020
+ "vibecheck_findings"
295021
+ );
295022
+ const gatedReport = gateCanonicalScanReportFindings(report, userPlan);
295023
+ let filtered = gatedReport.findings;
295024
+ if (args2.severity) {
295025
+ filtered = filtered.filter((f) => f.severity === args2.severity);
295026
+ }
295027
+ if (args2.engine) {
295028
+ filtered = filtered.filter((f) => f.engine === args2.engine);
295029
+ }
295030
+ if (args2.file) {
295031
+ const fileFilter = args2.file;
295032
+ filtered = filtered.filter((f) => f.file?.includes(fileFilter));
295033
+ }
295034
+ const lines = [
295035
+ `## Findings (${filtered.length} of ${gatedReport.summary.total})`,
295036
+ ""
295037
+ ];
295038
+ for (const f of filtered.slice(0, 50)) {
295039
+ const loc = f.file ? `${f.file}${f.line ? `:${f.line}` : ""}` : "unknown";
295040
+ lines.push(`- **[${f.severity.toUpperCase()}]** ${f.message}`);
295041
+ lines.push(` \`${loc}\` (${f.engine})`);
295042
+ if (f.suggestion) lines.push(` Fix: ${f.suggestion}`);
295043
+ }
295044
+ if (filtered.length > 50) {
295045
+ lines.push("", `_...and ${filtered.length - 50} more findings_`);
295046
+ }
295047
+ return { content: [{ type: "text", text: lines.join("\n") }] };
295048
+ }
295049
+ case "vibecheck_finding": {
295050
+ const findingId = args2.id;
295051
+ if (!findingId) {
295052
+ return buildErrorResponse('vibecheck_finding requires "id"');
295053
+ }
295054
+ const report = await withTimeout(
295055
+ runtime.runScan(targetPath, { enginePreset: "full" }),
295056
+ MCP_TOOL_TIMEOUT_MS,
295057
+ "vibecheck_finding"
295058
+ );
295059
+ const finding = report.findings.find((f) => f.id === findingId);
295060
+ if (!finding) {
295061
+ return buildErrorResponse(`Finding "${findingId}" not found in current scan results.`);
295062
+ }
295063
+ const loc = finding.file ? `${finding.file}${finding.line ? `:${finding.line}` : ""}` : "unknown";
295064
+ const text = [
295065
+ `## Finding: ${finding.message}`,
295066
+ "",
295067
+ `| Field | Value |`,
295068
+ `|-------|-------|`,
295069
+ `| ID | \`${finding.id}\` |`,
295070
+ `| Severity | ${finding.severity.toUpperCase()} |`,
295071
+ `| Engine | ${finding.engine} |`,
295072
+ `| Location | \`${loc}\` |`,
295073
+ `| Confidence | ${finding.confidence ?? "N/A"} |`,
295074
+ finding.suggestion ? `| Suggestion | ${finding.suggestion} |` : "",
295075
+ "",
295076
+ report.runId ? `**Dashboard:** ${dashboardFindingUrl(report.runId, finding.id)}` : ""
295077
+ ].filter(Boolean).join("\n");
295078
+ return { content: [{ type: "text", text }] };
295079
+ }
295080
+ case "vibecheck_dismiss": {
295081
+ const findingId = args2.id;
295082
+ if (!findingId) {
295083
+ return buildErrorResponse('vibecheck_dismiss requires "id"');
295084
+ }
295085
+ const reason = args2.reason ?? "Dismissed via MCP";
295086
+ const token = process.env.VIBECHECK_TOKEN?.trim();
295087
+ if (!token) {
295088
+ return {
295089
+ content: [{
295090
+ type: "text",
295091
+ text: JSON.stringify({
295092
+ ok: false,
295093
+ message: "Authentication required to dismiss findings across surfaces. Set VIBECHECK_TOKEN or run `vibecheck auth login`.",
295094
+ localOnly: true,
295095
+ findingId,
295096
+ reason
295097
+ }, null, 2)
295098
+ }]
295099
+ };
295100
+ }
295101
+ try {
295102
+ const apiBase = process.env.VIBECHECK_API_URL || "https://api.vibecheckai.dev";
295103
+ const resp = await fetch(`${apiBase}/api/v1/findings/${findingId}`, {
295104
+ method: "PATCH",
295105
+ headers: {
295106
+ "Authorization": `Bearer ${token}`,
295107
+ "Content-Type": "application/json"
295108
+ },
295109
+ body: JSON.stringify({ resolved: true })
295110
+ });
295111
+ if (!resp.ok) {
295112
+ return buildErrorResponse(`Failed to dismiss finding: HTTP ${resp.status}`);
295113
+ }
295114
+ return {
295115
+ content: [{
295116
+ type: "text",
295117
+ text: `Finding \`${findingId}\` dismissed. Reason: ${reason}
295118
+ This change is synced across all surfaces.`
295119
+ }]
295120
+ };
295121
+ } catch (err2) {
295122
+ return buildErrorResponse(`Failed to dismiss finding: ${err2 instanceof Error ? err2.message : String(err2)}`);
295123
+ }
295124
+ }
295125
+ case "vibecheck_history": {
295126
+ const token = process.env.VIBECHECK_TOKEN?.trim();
295127
+ if (!token) {
295128
+ return {
295129
+ content: [{
295130
+ type: "text",
295131
+ text: "Scan history requires authentication. Set VIBECHECK_TOKEN or run `vibecheck auth login`."
295132
+ }]
295133
+ };
295134
+ }
295135
+ try {
295136
+ const apiBase = process.env.VIBECHECK_API_URL || "https://api.vibecheckai.dev";
295137
+ const limit = args2.limit ?? 10;
295138
+ const resp = await fetch(`${apiBase}/api/v1/scans/recent?limit=${limit}`, {
295139
+ headers: { "Authorization": `Bearer ${token}` }
295140
+ });
295141
+ if (!resp.ok) {
295142
+ return buildErrorResponse(`Failed to fetch scan history: HTTP ${resp.status}`);
295143
+ }
295144
+ const body2 = await resp.json();
295145
+ const scans = body2.data ?? [];
295146
+ if (scans.length === 0) {
295147
+ return { content: [{ type: "text", text: "No scan history found. Run `vibecheck scan .` to create your first scan." }] };
295148
+ }
295149
+ const lines = [`## Scan History (${scans.length} most recent)`, ""];
295150
+ for (const s of scans) {
295151
+ const status = s.status ?? "unknown";
295152
+ const created = s.createdAt ?? "";
295153
+ const id = s.id ?? "";
295154
+ lines.push(`- **${status}** \u2014 ${created} (\`${id}\`)`);
295155
+ }
295156
+ return { content: [{ type: "text", text: lines.join("\n") }] };
295157
+ } catch (err2) {
295158
+ return buildErrorResponse(`Failed to fetch history: ${err2 instanceof Error ? err2.message : String(err2)}`);
295159
+ }
295160
+ }
295161
+ case "vibecheck_engines": {
295162
+ const engineIds = [
295163
+ "type-contract",
295164
+ "security-pattern",
295165
+ "perf-antipattern",
295166
+ "env_var",
295167
+ "ghost_route",
295168
+ "phantom_dep",
295169
+ "api_truth",
295170
+ "credentials",
295171
+ "security",
295172
+ "framework_packs",
295173
+ "fake_features",
295174
+ "version_hallucination",
295175
+ "logic_gap",
295176
+ "error_handling",
295177
+ "outcome_verification",
295178
+ "incomplete_impl"
295179
+ ];
295180
+ const lines = [
295181
+ `## Available Engines (${engineIds.length})`,
295182
+ "",
295183
+ "| Engine ID | Status |",
295184
+ "|-----------|--------|"
295185
+ ];
295186
+ for (const id of engineIds) {
295187
+ lines.push(`| \`${id}\` | Active |`);
295188
+ }
295189
+ lines.push("", "All engines are included in the free tier.");
295190
+ return { content: [{ type: "text", text: lines.join("\n") }] };
295191
+ }
295192
+ case "vibecheck_status": {
295193
+ const token = process.env.VIBECHECK_TOKEN?.trim();
295194
+ const authenticated = !!token;
295195
+ const text = [
295196
+ `## VibeCheck Status`,
295197
+ "",
295198
+ `**Authenticated:** ${authenticated ? "Yes" : "No"}`,
295199
+ `**Tier:** ${userPlan}`,
295200
+ `**MCP Server:** Active`,
295201
+ "",
295202
+ authenticated ? "All scans are synced to the dashboard." : "Run `vibecheck auth login` to sync scans across devices."
295203
+ ].join("\n");
295204
+ return { content: [{ type: "text", text }] };
295205
+ }
294914
295206
  case "vibecheck_forge":
294915
295207
  case "vibecheck_reality":
294916
295208
  case "vibecheck_ship":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecheck-ai/mcp",
3
- "version": "24.5.6",
3
+ "version": "24.5.8",
4
4
  "description": "The trust layer for AI-generated software. Catches phantom dependencies, ghost API routes, fake SDK methods, and hardcoded secrets — before they ship.",
5
5
  "mcpName": "io.github.guardiavault-oss/vibecheck-mcp",
6
6
  "type": "module",