@viberaven/mcp 1.7.5 → 1.7.7

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/README.md CHANGED
@@ -13,7 +13,7 @@ Requires Node.js 20 or newer. Transport is **stdio**. Adapt this example to your
13
13
  "mcpServers": {
14
14
  "viberaven": {
15
15
  "command": "npx",
16
- "args": ["-y", "@viberaven/mcp@1.6.12"]
16
+ "args": ["-y", "@viberaven/mcp"]
17
17
  }
18
18
  }
19
19
  }
@@ -26,7 +26,7 @@ On Windows, hosts launching executables directly can use:
26
26
  "mcpServers": {
27
27
  "viberaven": {
28
28
  "command": "cmd.exe",
29
- "args": ["/d", "/s", "/c", "npx", "-y", "@viberaven/mcp@1.6.12"]
29
+ "args": ["/d", "/s", "/c", "npx", "-y", "@viberaven/mcp"]
30
30
  }
31
31
  }
32
32
  }
@@ -89,11 +89,11 @@ The `rls_disabled` migration enables RLS without policies; browser roles lose ro
89
89
 
90
90
  Readiness prints a summary. Read `gate-result.json` or call `viberaven_gate_result`/`viberaven_strict_gate` for full `gate.status`.
91
91
 
92
- Default check allows warnings: 0 without critical blockers, 1 with blockers, 2 on scan error. Strict gate returns 0 for `clear`/`warning`, 1 for `not_clear`, 2 for `error`, 3 for `unknown` or unavailable results. For warning failures, run `npx -y viberaven@1.6.12 --strict=warning --json` from the app root. Unrestricted SELECT can be intentional public content and is a default warning; focused audit returns 1 for any status other than `pass`.
92
+ Default check allows warnings: 0 without critical blockers, 1 with blockers, 2 on scan error. Strict gate returns 0 for `clear`/`warning`, 1 for `not_clear`, 2 for `error`, 3 for `unknown` or unavailable results. For warning failures, run `npx -y viberaven --strict=warning --json` from the app root. Unrestricted SELECT can be intentional public content and is a default warning; focused audit returns 1 for any status other than `pass`.
93
93
 
94
94
  ## Studio And Optional Artifact Mode
95
95
 
96
- From the app root: `npx -y viberaven@1.6.12` opens Studio; `npx -y viberaven@1.6.12 check` checks. Chat needs an installed/authenticated coding CLI and **Test connection**.
96
+ From the app root: `npx -y viberaven` opens Studio; `npx -y viberaven check` checks. Chat needs an installed/authenticated coding CLI and **Test connection**.
97
97
 
98
98
  Artifact compatibility command:
99
99
 
@@ -554,7 +554,7 @@ function mcpVersion() {
554
554
  } catch {
555
555
  }
556
556
  }
557
- found ??= true ? "1.7.5" : void 0;
557
+ found ??= true ? "1.7.7" : void 0;
558
558
  if (!found || !PLAIN_VERSION.test(found)) {
559
559
  throw new Error(`Could not read a valid ${MCP_PACKAGE} version (got ${JSON.stringify(found)}), so the matching ${CLI_PACKAGE} cannot be pinned.`);
560
560
  }
package/dist/server.js CHANGED
@@ -864,6 +864,7 @@ function renderRecentChanges(result) {
864
864
  if (entry.symptom) lines.push(`Symptom: ${entry.symptom}`);
865
865
  lines.push(`Fix guidance: ${entry.fix}`, `Official source: ${entry.officialSource}`, `Supporting sources: ${entry.sources.map((source) => source.url).join(" ")}`, `Limits: ${entry.limitations}`, "");
866
866
  }
867
+ if (result.entries.length) lines.push("Which of these affect a repo: run npx -y viberaven changes in it. It reads the files only (no sign-in, no network) and names the file and line for each change.", "");
867
868
  lines.push("Source corrections and conflicts:", ...result.correctionsAndConflicts.map((note) => `- ${note}`), "Limits:", ...result.limits.map((limit) => `- ${limit}`));
868
869
  return lines.join("\n");
869
870
  }
@@ -892,17 +893,30 @@ function recentProviderChanges(args) {
892
893
  var PROVIDER_TOOL = {
893
894
  name: "provider_playbook",
894
895
  title: "Get a provider playbook",
895
- description: `Plan setup and integration before implementing a feature that touches a provider. Returns versioned setup guidance, gotchas, dated changes, integration seams, existing repo checks and planned live checks with official sources. Available packs: ${Object.keys(registry_generated_default).sort().join(", ")}.
896
+ description: `Plan setup and integration before implementing a feature that touches a provider. Returns versioned setup guidance, gotchas, dated changes, integration seams, existing repo checks and planned live checks with official sources. Available packs: ${Object.keys(registry_generated_default).sort().join(", ")}. Pass topic (for example "grants", "auth redirect", "pooler") to get the matching items, a fraction of the whole pack.
896
897
  Limits: guidance only; does not connect to providers, read your project, run checks or verify that a feature works.`,
897
- inputSchema: { type: "object", properties: { provider: { type: "string", minLength: 1, maxLength: 40, pattern: "^[a-z][a-z0-9-]*$", description: "Provider id, for example supabase. Unsupported ids return the available packs." } }, required: ["provider"], additionalProperties: false },
898
- outputSchema: { type: "object", properties: { provider: { type: "string" }, packVersion: { type: "string" }, packHash: { type: "string" }, pack: { type: "object" }, verification: { type: "object" }, nextStep: { type: "object" } }, required: ["provider", "packVersion", "packHash", "pack", "verification", "nextStep"] },
898
+ inputSchema: { type: "object", properties: { provider: { type: "string", minLength: 1, maxLength: 40, pattern: "^[a-z][a-z0-9-]*$", description: "Provider id, for example supabase. Unsupported ids return the available packs." }, topic: { type: "string", minLength: 1, maxLength: 80, description: 'Optional words for the part you need, for example "grants" or "auth redirect". Only matching items are returned; with no match, the whole pack.' } }, required: ["provider"], additionalProperties: false },
899
+ outputSchema: { type: "object", properties: { provider: { type: "string" }, packVersion: { type: "string" }, packHash: { type: "string" }, pack: { type: "object" }, topic: { type: "object" }, verification: { type: "object" }, nextStep: { type: "object" } }, required: ["provider", "packVersion", "packHash", "pack", "verification", "nextStep"] },
899
900
  annotations: { title: "Get a provider playbook", readOnlyHint: true, destructiveHint: false, openWorldHint: false, idempotentHint: true }
900
901
  };
901
902
  var listProviders = () => Object.keys(registry_generated_default).sort();
903
+ var SECTIONS = ["setup", "gotchas", "changes", "seams", "repo-checks", "live-checks"];
904
+ var TOPIC_STOPWORDS = /* @__PURE__ */ new Set(["the", "and", "for", "with", "how", "what", "why", "not", "my", "app", "set", "use", "using"]);
905
+ var topicWords = (topic) => [...new Set(topic.toLowerCase().split(/[^a-z0-9_]+/).filter((w) => w.length >= 3 && !TOPIC_STOPWORDS.has(w)))];
906
+ function narrowToTopic(pack, topic) {
907
+ const words2 = topicWords(topic);
908
+ if (words2.length === 0) return { pack, matched: 0 };
909
+ const hits = (item) => words2.some((w) => `${item.title} ${item.text} ${item.appliesTo} ${(item.ruleIds ?? []).join(" ")}`.toLowerCase().includes(w));
910
+ const matched = SECTIONS.reduce((n, s) => n + pack[s].filter(hits).length, 0);
911
+ if (matched === 0) return { pack, matched: 0 };
912
+ return { pack: { ...pack, ...Object.fromEntries(SECTIONS.map((s) => [s, pack[s].filter(hits)])) }, matched };
913
+ }
902
914
  function renderPlaybook(result) {
903
915
  const { pack } = result;
904
916
  const lines = [`${pack.displayName} provider playbook ${pack.packVersion} (reviewed ${pack.reviewedAt})`, pack.summary, "Guidance only. Repository and live checks: not checked.", ""];
905
- for (const section of ["setup", "gotchas", "changes", "seams", "repo-checks", "live-checks"]) {
917
+ if (result.topic) lines.push(result.topic.matched ? `Topic "${result.topic.query}": ${result.topic.matched} matching items. Call without topic for the whole pack.` : `Topic "${result.topic.query}": no item matched, so this is the whole pack.`, "");
918
+ for (const section of SECTIONS) {
919
+ if (result.topic?.matched && pack[section].length === 0) continue;
906
920
  lines.push(section.toUpperCase());
907
921
  for (const item of pack[section]) {
908
922
  lines.push(`- ${item.title}: ${item.text}`, ` Applies: ${item.appliesTo}`, ` Evidence needed: ${item.evidence}`);
@@ -917,20 +931,23 @@ function renderPlaybook(result) {
917
931
  return lines.join("\n");
918
932
  }
919
933
  function providerPlaybook(args) {
920
- if (!args || typeof args !== "object" || Array.isArray(args) || Object.keys(args).some((k) => k !== "provider") || typeof args.provider !== "string" || !/^[a-z][a-z0-9-]{0,39}$/.test(args.provider) || !Object.hasOwn(registry_generated_default, args.provider)) {
921
- const field = args && typeof args === "object" && !Array.isArray(args) && Object.keys(args).some((k) => k !== "provider") ? "arguments" : "provider";
934
+ if (!args || typeof args !== "object" || Array.isArray(args) || Object.keys(args).some((k) => k !== "provider" && k !== "topic") || args.topic !== void 0 && (typeof args.topic !== "string" || args.topic.length < 1 || args.topic.length > 80) || typeof args.provider !== "string" || !/^[a-z][a-z0-9-]{0,39}$/.test(args.provider) || !Object.hasOwn(registry_generated_default, args.provider)) {
935
+ const field = args && typeof args === "object" && !Array.isArray(args) && Object.keys(args).some((k) => k !== "provider" && k !== "topic") ? "arguments" : args?.topic !== void 0 && (typeof args.topic !== "string" || args.topic.length < 1 || args.topic.length > 80) ? "topic" : "provider";
922
936
  return { isError: true, content: [{ type: "text", text: `invalid_input: Choose a supported provider.
923
937
  Field: ${field}
924
938
  Next step: Select an available pack: ${listProviders().join(", ")}. No connection or check was attempted.
925
939
  Example arguments: {"provider":"supabase"}` }] };
926
940
  }
927
941
  const entry = registry_generated_default[args.provider];
928
- const pack = JSON.parse(JSON.stringify(entry.pack));
942
+ const full = JSON.parse(JSON.stringify(entry.pack));
943
+ const narrowed = typeof args.topic === "string" ? narrowToTopic(full, args.topic) : void 0;
944
+ const pack = narrowed ? narrowed.pack : full;
929
945
  const structuredContent = {
930
946
  provider: pack.provider,
931
947
  packVersion: pack.packVersion,
932
948
  packHash: entry.hash,
933
949
  pack,
950
+ ...narrowed ? { topic: { query: args.topic, matched: narrowed.matched } } : {},
934
951
  verification: { repo: "not_checked", live: "not_checked" },
935
952
  nextStep: { phase: "P2-planned", accountRequiredForLive: true, message: "Use this guidance to plan the requested feature and run relevant local checks. Live connections are not implemented in this candidate; do not claim provider verification. Local guidance and checks need no account." }
936
953
  };
@@ -1858,7 +1875,7 @@ async function boundedJson2(response2) {
1858
1875
  }
1859
1876
 
1860
1877
  // ../cli/src/version.ts
1861
- var VERSION = "1.7.5";
1878
+ var VERSION = "1.7.7";
1862
1879
 
1863
1880
  // ../cli/src/commands/account.ts
1864
1881
  var loginNext = `npx -y viberaven@${VERSION} login --json`;
@@ -2203,7 +2220,7 @@ function mcpVersion() {
2203
2220
  } catch {
2204
2221
  }
2205
2222
  }
2206
- found ??= true ? "1.7.5" : void 0;
2223
+ found ??= true ? "1.7.7" : void 0;
2207
2224
  if (!found || !PLAIN_VERSION.test(found)) {
2208
2225
  throw new Error(`Could not read a valid ${MCP_PACKAGE} version (got ${JSON.stringify(found)}), so the matching ${CLI_PACKAGE} cannot be pinned.`);
2209
2226
  }
@@ -2471,7 +2488,7 @@ async function handleRequest(method, params) {
2471
2488
  }
2472
2489
 
2473
2490
  // src/server.ts
2474
- var SERVER_INFO = { name: "viberaven-mcp", version: "1.7.5" };
2491
+ var SERVER_INFO = { name: "viberaven-mcp", version: "1.7.7" };
2475
2492
  var INSTRUCTIONS = [
2476
2493
  "VibeRaven reads a repository and lists launch gaps for AI-built apps that deploy on Vercel and use Supabase.",
2477
2494
  "Suggest one viberaven_check_readiness run before such an app launches or is handed off, after a Supabase migration or policy change,",
@@ -865,6 +865,7 @@ function renderRecentChanges(result) {
865
865
  if (entry.symptom) lines.push(`Symptom: ${entry.symptom}`);
866
866
  lines.push(`Fix guidance: ${entry.fix}`, `Official source: ${entry.officialSource}`, `Supporting sources: ${entry.sources.map((source) => source.url).join(" ")}`, `Limits: ${entry.limitations}`, "");
867
867
  }
868
+ if (result.entries.length) lines.push("Which of these affect a repo: run npx -y viberaven changes in it. It reads the files only (no sign-in, no network) and names the file and line for each change.", "");
868
869
  lines.push("Source corrections and conflicts:", ...result.correctionsAndConflicts.map((note) => `- ${note}`), "Limits:", ...result.limits.map((limit) => `- ${limit}`));
869
870
  return lines.join("\n");
870
871
  }
@@ -893,17 +894,30 @@ function recentProviderChanges(args) {
893
894
  var PROVIDER_TOOL = {
894
895
  name: "provider_playbook",
895
896
  title: "Get a provider playbook",
896
- description: `Plan setup and integration before implementing a feature that touches a provider. Returns versioned setup guidance, gotchas, dated changes, integration seams, existing repo checks and planned live checks with official sources. Available packs: ${Object.keys(registry_generated_default).sort().join(", ")}.
897
+ description: `Plan setup and integration before implementing a feature that touches a provider. Returns versioned setup guidance, gotchas, dated changes, integration seams, existing repo checks and planned live checks with official sources. Available packs: ${Object.keys(registry_generated_default).sort().join(", ")}. Pass topic (for example "grants", "auth redirect", "pooler") to get the matching items, a fraction of the whole pack.
897
898
  Limits: guidance only; does not connect to providers, read your project, run checks or verify that a feature works.`,
898
- inputSchema: { type: "object", properties: { provider: { type: "string", minLength: 1, maxLength: 40, pattern: "^[a-z][a-z0-9-]*$", description: "Provider id, for example supabase. Unsupported ids return the available packs." } }, required: ["provider"], additionalProperties: false },
899
- outputSchema: { type: "object", properties: { provider: { type: "string" }, packVersion: { type: "string" }, packHash: { type: "string" }, pack: { type: "object" }, verification: { type: "object" }, nextStep: { type: "object" } }, required: ["provider", "packVersion", "packHash", "pack", "verification", "nextStep"] },
899
+ inputSchema: { type: "object", properties: { provider: { type: "string", minLength: 1, maxLength: 40, pattern: "^[a-z][a-z0-9-]*$", description: "Provider id, for example supabase. Unsupported ids return the available packs." }, topic: { type: "string", minLength: 1, maxLength: 80, description: 'Optional words for the part you need, for example "grants" or "auth redirect". Only matching items are returned; with no match, the whole pack.' } }, required: ["provider"], additionalProperties: false },
900
+ outputSchema: { type: "object", properties: { provider: { type: "string" }, packVersion: { type: "string" }, packHash: { type: "string" }, pack: { type: "object" }, topic: { type: "object" }, verification: { type: "object" }, nextStep: { type: "object" } }, required: ["provider", "packVersion", "packHash", "pack", "verification", "nextStep"] },
900
901
  annotations: { title: "Get a provider playbook", readOnlyHint: true, destructiveHint: false, openWorldHint: false, idempotentHint: true }
901
902
  };
902
903
  var listProviders = () => Object.keys(registry_generated_default).sort();
904
+ var SECTIONS = ["setup", "gotchas", "changes", "seams", "repo-checks", "live-checks"];
905
+ var TOPIC_STOPWORDS = /* @__PURE__ */ new Set(["the", "and", "for", "with", "how", "what", "why", "not", "my", "app", "set", "use", "using"]);
906
+ var topicWords = (topic) => [...new Set(topic.toLowerCase().split(/[^a-z0-9_]+/).filter((w) => w.length >= 3 && !TOPIC_STOPWORDS.has(w)))];
907
+ function narrowToTopic(pack, topic) {
908
+ const words2 = topicWords(topic);
909
+ if (words2.length === 0) return { pack, matched: 0 };
910
+ const hits = (item) => words2.some((w) => `${item.title} ${item.text} ${item.appliesTo} ${(item.ruleIds ?? []).join(" ")}`.toLowerCase().includes(w));
911
+ const matched = SECTIONS.reduce((n, s) => n + pack[s].filter(hits).length, 0);
912
+ if (matched === 0) return { pack, matched: 0 };
913
+ return { pack: { ...pack, ...Object.fromEntries(SECTIONS.map((s) => [s, pack[s].filter(hits)])) }, matched };
914
+ }
903
915
  function renderPlaybook(result) {
904
916
  const { pack } = result;
905
917
  const lines = [`${pack.displayName} provider playbook ${pack.packVersion} (reviewed ${pack.reviewedAt})`, pack.summary, "Guidance only. Repository and live checks: not checked.", ""];
906
- for (const section of ["setup", "gotchas", "changes", "seams", "repo-checks", "live-checks"]) {
918
+ if (result.topic) lines.push(result.topic.matched ? `Topic "${result.topic.query}": ${result.topic.matched} matching items. Call without topic for the whole pack.` : `Topic "${result.topic.query}": no item matched, so this is the whole pack.`, "");
919
+ for (const section of SECTIONS) {
920
+ if (result.topic?.matched && pack[section].length === 0) continue;
907
921
  lines.push(section.toUpperCase());
908
922
  for (const item of pack[section]) {
909
923
  lines.push(`- ${item.title}: ${item.text}`, ` Applies: ${item.appliesTo}`, ` Evidence needed: ${item.evidence}`);
@@ -918,20 +932,23 @@ function renderPlaybook(result) {
918
932
  return lines.join("\n");
919
933
  }
920
934
  function providerPlaybook(args) {
921
- if (!args || typeof args !== "object" || Array.isArray(args) || Object.keys(args).some((k) => k !== "provider") || typeof args.provider !== "string" || !/^[a-z][a-z0-9-]{0,39}$/.test(args.provider) || !Object.hasOwn(registry_generated_default, args.provider)) {
922
- const field = args && typeof args === "object" && !Array.isArray(args) && Object.keys(args).some((k) => k !== "provider") ? "arguments" : "provider";
935
+ if (!args || typeof args !== "object" || Array.isArray(args) || Object.keys(args).some((k) => k !== "provider" && k !== "topic") || args.topic !== void 0 && (typeof args.topic !== "string" || args.topic.length < 1 || args.topic.length > 80) || typeof args.provider !== "string" || !/^[a-z][a-z0-9-]{0,39}$/.test(args.provider) || !Object.hasOwn(registry_generated_default, args.provider)) {
936
+ const field = args && typeof args === "object" && !Array.isArray(args) && Object.keys(args).some((k) => k !== "provider" && k !== "topic") ? "arguments" : args?.topic !== void 0 && (typeof args.topic !== "string" || args.topic.length < 1 || args.topic.length > 80) ? "topic" : "provider";
923
937
  return { isError: true, content: [{ type: "text", text: `invalid_input: Choose a supported provider.
924
938
  Field: ${field}
925
939
  Next step: Select an available pack: ${listProviders().join(", ")}. No connection or check was attempted.
926
940
  Example arguments: {"provider":"supabase"}` }] };
927
941
  }
928
942
  const entry = registry_generated_default[args.provider];
929
- const pack = JSON.parse(JSON.stringify(entry.pack));
943
+ const full = JSON.parse(JSON.stringify(entry.pack));
944
+ const narrowed = typeof args.topic === "string" ? narrowToTopic(full, args.topic) : void 0;
945
+ const pack = narrowed ? narrowed.pack : full;
930
946
  const structuredContent = {
931
947
  provider: pack.provider,
932
948
  packVersion: pack.packVersion,
933
949
  packHash: entry.hash,
934
950
  pack,
951
+ ...narrowed ? { topic: { query: args.topic, matched: narrowed.matched } } : {},
935
952
  verification: { repo: "not_checked", live: "not_checked" },
936
953
  nextStep: { phase: "P2-planned", accountRequiredForLive: true, message: "Use this guidance to plan the requested feature and run relevant local checks. Live connections are not implemented in this candidate; do not claim provider verification. Local guidance and checks need no account." }
937
954
  };
@@ -1859,7 +1876,7 @@ async function boundedJson2(response2) {
1859
1876
  }
1860
1877
 
1861
1878
  // ../cli/src/version.ts
1862
- var VERSION = "1.7.5";
1879
+ var VERSION = "1.7.7";
1863
1880
 
1864
1881
  // ../cli/src/commands/account.ts
1865
1882
  var loginNext = `npx -y viberaven@${VERSION} login --json`;
@@ -2204,7 +2221,7 @@ function mcpVersion() {
2204
2221
  } catch {
2205
2222
  }
2206
2223
  }
2207
- found ??= true ? "1.7.5" : void 0;
2224
+ found ??= true ? "1.7.7" : void 0;
2208
2225
  if (!found || !PLAIN_VERSION.test(found)) {
2209
2226
  throw new Error(`Could not read a valid ${MCP_PACKAGE} version (got ${JSON.stringify(found)}), so the matching ${CLI_PACKAGE} cannot be pinned.`);
2210
2227
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viberaven/mcp",
3
- "version": "1.7.5",
3
+ "version": "1.7.7",
4
4
  "description": "MCP server for VibeRaven: lets Claude Code, Cursor and Codex run the Supabase RLS and security check on an AI-built Vercel + Supabase app and read the findings.",
5
5
  "license": "MIT",
6
6
  "author": "VibeRaven",